Skip to content
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

Merged
merged 10 commits into from Dec 28, 2018

Conversation

Projects
None yet
5 participants
@jkakavas
Copy link
Contributor

commented Dec 20, 2018

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

jkakavas added some commits Dec 19, 2018

Removes bwc for token invalidation
- 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
@elasticmachine

This comment has been minimized.

Copy link

commented Dec 20, 2018

@jkakavas

This comment has been minimized.

Copy link
Contributor Author

commented Dec 20, 2018

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

@jaymode
Copy link
Member

left a comment

LGTM

@tvernum
Copy link
Contributor

left a comment

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()))));

This comment has been minimized.

Copy link
@tvernum

tvernum Dec 28, 2018

Contributor

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

7 checks passed

CLA Commit author is a member of Elasticsearch
Details
elasticsearch-ci-1 Build finished.
Details
elasticsearch-ci-2 Build finished.
Details
elasticsearch-ci/default-distro Build finished.
Details
elasticsearch-ci/docbldesx Build finished.
Details
elasticsearch-ci/oss-distro-docs Build finished.
Details
elasticsearch-ci/packaging-sample Build finished.
Details

@jkakavas jkakavas deleted the jkakavas:remove-bwc-invalidate-tokens branch Dec 28, 2018

original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Dec 28, 2018

Remove bwc logic for token invalidation (elastic#36893)
- 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

jkakavas added a commit that referenced this pull request Jan 9, 2019

Ensure that ActionListener is called exactly once
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 referenced this pull request Jan 16, 2019

Closed

Invalidate tokens API #34556

@jimczi jimczi added v7.0.0-beta1 and removed v7.0.0 labels Feb 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.