-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Remove bwc logic for token invalidation #36893
Remove bwc logic for token invalidation #36893
Conversation
- Removes bwc invalidation logic from the TokenService - Removes bwc serialization for InvalidateTokenResponse objects as olf nodes in supported mixed clusters during upgade will be 6.7 and thus will know of the new format - Removes the created field from the InvalidateTokenResponse as it is no longer useful in > 7.0
Pinging @elastic/es-security |
@elasticmachine run the gradle build tests 2 σε παρακαλώ πολύ |
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.
LGTM
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.
LGTM
.should(QueryBuilders.rangeQuery("creation_time").lte(now.minus(24L, ChronoUnit.HOURS).toEpochMilli())))); | ||
.filter(QueryBuilders.termsQuery("doc_type", "token")) | ||
.filter(QueryBuilders.boolQuery() | ||
.must(QueryBuilders.rangeQuery("creation_time").lte(now.minus(24L, ChronoUnit.HOURS).toEpochMilli())))); |
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.
Do we need a bool
here? Can't we just add the range
directly to the filter?
This bug was introduced in #36893 and had the effect that execution would continue after calling onFailure on the the listener in checkIfTokenIsValid in the case that the token is expired. In a case of many consecutive requests this could lead to the unwelcome side effect of an expired access token producing a successful authentication response.
Removes bwc for token invalidation
old nodes in supported mixed clusters during upgrade will be 6.7 and
thus will know of the new format
InvalidateTokenResponse as it is no longer useful in > 7.0
Resolves: #36727