-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI: fix token expiry banner for batch tokens #27479
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
6d22f47
fix: calculate expiration of all batch tokens to ensure expire warnin…
e4099b7
fix: ensure allowExpiration doesn't get overridden
d77ed01
fix: set expirationCalcTS outside of calculateExpression
cf72bf2
tests: verify expirationEpoch is calculated when only expiry_time is …
86a9519
fix: calculate expireTime using expire_time if its passed in
f3b01e2
tests: clean up auth tests
5b47409
tests: organize batch token vs. service token tests into separate module
7167ff3
chore: update changelog
da4e1c7
Update changelog/27479.txt
9d63357
fix: ensure tokens in test envs do not expire
0033b44
cleanup: pull setExpiration settings into own method & add tests
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:bug | ||
ui: Ensure token expired banner displays when batch token expires | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the
this.calculateExpiration
function is already set up to handle batch tokens returned by/auth/[backend]/login
methods since those APIs return alease_duration
, which is accounted for on line 220 above.as a result, i didn't see a reason why we wouldn't couldn't call
calculateExpiration
regardless of whether or notresp.renewable
or not.so you'll notice i modified
this.calculateExpiration
to handle the case whereresp.type === 'batch'
(which happens when logging in via a token directly). this waycalculateExpiration
is used universally, regardless of the authentication method (token/userpass/ldap, batch token, service token etc).