Fix unique realm name check to cover default realms#87999
Merged
elasticsearchmachine merged 5 commits intoelastic:masterfrom Jun 24, 2022
Merged
Fix unique realm name check to cover default realms#87999elasticsearchmachine merged 5 commits intoelastic:masterfrom
elasticsearchmachine merged 5 commits intoelastic:masterfrom
Conversation
All enabled realms must have unique names. This PR tightened the logic for ensuring realm name uniqueness. Previously the unique name check does not cover realms that are automatically enabled. Relates: elastic#69096
Collaborator
|
Pinging @elastic/es-security (Team:Security) |
Collaborator
|
Hi @ywangd, I've created a changelog YAML for you. |
ywangd
commented
Jun 24, 2022
| ) | ||
| ); | ||
|
|
||
| // It is OK if the explicitly configured realm is disabled |
Member
Author
There was a problem hiding this comment.
This and a few other test scenarios below can be seen as a leniency. Ideally these names should not be used at all. We may want to do something about it, e.g. log warnings. But it is a separate issue from what we are trying to fix here.
Member
Author
|
@elasticmachine update branch |
n1v0lg
approved these changes
Jun 24, 2022
Contributor
n1v0lg
left a comment
There was a problem hiding this comment.
LGTM! Thanks for the fix.
x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/Realms.java
Outdated
Show resolved
Hide resolved
…ecurity/authc/Realms.java Co-authored-by: Nikolaj Volgushev <n1v0lg@users.noreply.github.com>
Member
Author
|
@elasticmachine run elasticsearch-ci/part-2-fips |
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.
All enabled realms must have unique names. This PR tightened the logic
for ensuring realm name uniqueness. Previously the unique name check
does not cover realms that are automatically enabled.
Relates: #69096