Skip to content

Conversation

@tvernum
Copy link
Contributor

@tvernum tvernum commented Oct 28, 2020

This changes the token service so that it recognizes when a refresh
token is already invalidated and does not attempt to invalidated it
again.

Although the update would be detected as a no-op and handled
appropriately, the code could fail if the underlying document was
deleted between the search and the update.

Since we know that update will be a no-op, we can skip any attempt to
do the update, and return immediately.

Relates: #56903

This changes the token service so that it recognises when a refresh
token is already invalidated and does not attempt to invalidated it
again.

Although the update would be detected as a no-op and handled
appropriately, the code could fail if the underlying document was
deleted between the search and the update.

Since we know that update will be a no-op, we can skip any attempt to
do the update, and return immediately.

Relates: elastic#56903
@tvernum tvernum added >bug :Security/Authentication Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc) v8.0.0 v7.11.0 labels Oct 28, 2020
@tvernum tvernum requested a review from jkakavas October 28, 2020 06:07
Copy link
Contributor

@jkakavas jkakavas left a comment

Choose a reason for hiding this comment

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

LGTM

@tvernum tvernum merged commit c835ed4 into elastic:master Oct 30, 2020
tvernum added a commit that referenced this pull request Oct 30, 2020
Rebasing #64259 on top of #64031 introduced a test compile error, but
it looks like PR-CI failed to run the correct set of checks so the PR
was green and was merged.

This change fixes those compile issues.
tvernum added a commit to tvernum/elasticsearch that referenced this pull request Nov 6, 2020
This changes the token service so that it recognises when a refresh
token is already invalidated and does not attempt to invalidated it
again.

Although the update would be detected as a no-op and handled
appropriately, the code could fail if the underlying document was
deleted between the search and the update.

Since we know that update will be a no-op, we can skip any attempt to
do the update, and return immediately.

Backport of: elastic#64259
tvernum added a commit that referenced this pull request Nov 9, 2020
This changes the token service so that it recognises when a refresh
token is already invalidated and does not attempt to invalidated it
again.

Although the update would be detected as a no-op and handled
appropriately, the code could fail if the underlying document was
deleted between the search and the update.

Since we know that update will be a no-op, we can skip any attempt to
do the update, and return immediately.

Backport of: #64259
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :Security/Authentication Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc) v7.11.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants