Skip to content

Conversation

@jkakavas
Copy link
Contributor

Removes bwc for token invalidation

  • Removes bwc invalidation logic from the TokenService
  • Removes bwc serialization for InvalidateTokenResponse objects as
    old nodes in supported mixed clusters during upgrade will be 6.7 and
    thus will know of the new format
  • Removes the created field from the TokensInvalidationResult and the
    InvalidateTokenResponse as it is no longer useful in > 7.0

Resolves: #36727

- 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
@jkakavas jkakavas added >enhancement >breaking >breaking-java v7.0.0 :Security/Authentication Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc) labels Dec 20, 2018
@jkakavas jkakavas requested review from jaymode and tvernum December 20, 2018 13:28
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security

@jkakavas
Copy link
Contributor Author

@elasticmachine run the gradle build tests 2 σε παρακαλώ πολύ

Copy link
Member

@jaymode jaymode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@tvernum tvernum left a 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()))));
Copy link
Contributor

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?

@jkakavas jkakavas merged commit 0cae979 into elastic:master Dec 28, 2018
@jkakavas jkakavas deleted the remove-bwc-invalidate-tokens branch December 28, 2018 11:09
jkakavas added a commit that referenced this pull request Jan 9, 2019
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.
@jkakavas jkakavas mentioned this pull request Jan 16, 2019
@jimczi jimczi removed the v7.0.0 label Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>breaking >breaking-java >enhancement :Security/Authentication Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc) v7.0.0-beta1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants