Remove deprecated Authentication#getUser#91069
Merged
ywangd merged 3 commits intoelastic:mainfrom Oct 25, 2022
Merged
Conversation
This PR removes the deprecated Authentication#getUser method and replaces its usages with #getEffectiveSubject#getUser. Relates: elastic#88494
Collaborator
|
Pinging @elastic/es-security (Team:Security) |
Member
Author
|
Failure is unrelated. It's reproducible on the main branch and I raised #91070 |
Member
Author
|
@elasticmachine run elasticsearch-ci/part-2 |
n1v0lg
approved these changes
Oct 24, 2022
| logger.trace( | ||
| "Looking up run-as user [{}] for authenticated user [{}]", | ||
| runAsUsername, | ||
| authentication.getEffectiveSubject().getUser().principal() |
Contributor
There was a problem hiding this comment.
Should we use getAuthenticatingSubject here instead? I know at this stage in the flow that will be the same as getEffectiveSubject but it's slightly more accurate. No need to do it as part of this PR since it may have cascading changes to tests where we mock
Member
Author
There was a problem hiding this comment.
Good catch! I'll update this and below to use getAuthenticatingSubject. Will fix the tests if there are any failure. Thanks!
jakelandis
added a commit
that referenced
this pull request
Oct 25, 2022
#91069 removed this method. This commit removes the usage from the examples.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR removes the deprecated Authentication#getUser method and replaces its usages with #getEffectiveSubject#getUser.
Relates: #88494