-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Fix unique realm name check to cover default realms #87999
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
Fix unique realm name check to cover default realms #87999
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
|
Pinging @elastic/es-security (Team:Security) |
|
Hi @ywangd, I've created a changelog YAML for you. |
| ) | ||
| ); | ||
|
|
||
| // It is OK if the explicitly configured realm is disabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
|
@elasticmachine update branch |
tvernum
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
n1v0lg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
|
@elasticmachine run elasticsearch-ci/part-2-fips |
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