Updatable API keys - auto-update legacy superuser RDs#88514
Merged
n1v0lg merged 11 commits intoelastic:masterfrom Jul 14, 2022
Merged
Updatable API keys - auto-update legacy superuser RDs#88514n1v0lg merged 11 commits intoelastic:masterfrom
n1v0lg merged 11 commits intoelastic:masterfrom
Conversation
Collaborator
|
Hi @n1v0lg, I've created a changelog YAML for you. |
Collaborator
|
Pinging @elastic/es-security (Team:Security) |
ywangd
approved these changes
Jul 14, 2022
x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ApiKeyService.java
Show resolved
Hide resolved
x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ApiKeyService.java
Show resolved
Hide resolved
n1v0lg
commented
Jul 14, 2022
| false | ||
| ); | ||
| if (false == (newRoleDescriptors.size() == currentRoleDescriptors.size() | ||
| && Set.copyOf(newRoleDescriptors).containsAll(new HashSet<>(currentRoleDescriptors)))) { |
Contributor
Author
There was a problem hiding this comment.
The HashSet bit here is actually redundant: we check that the list sizes are equal and that one collection (as a set) contains the other.
Member
There was a problem hiding this comment.
Indeed. My suggestion on the previous PR did not have it.
Contributor
Author
|
@elasticmachine run elasticsearch-ci/part-2 |
weizijun
added a commit
to weizijun/elasticsearch
that referenced
this pull request
Jul 15, 2022
* upstream/master: (2974 commits) Reserved cluster state service (elastic#88527) Add transport action immutable state checks (elastic#88491) Remove suggest flag from index stats docs (elastic#85479) Polling cluster formation state for master-is-stable health indicator (elastic#88397) Add test execution guide in yamlRestTest asciidoc (elastic#88490) Add troubleshooting guide for corrupt repository (elastic#88391) [Transform] Finetune Schedule to be less noisy on retry and retry slower (elastic#88531) Updatable API keys - auto-update legacy RDs (elastic#88514) Fix typo in TransportForceMergeAction and TransportClearIndicesCacheA… (elastic#88064) Fixed NullPointerException on bulk request (elastic#88358) Avoid needless index metadata builders during reroute (elastic#88506) Set metadata on request in API key noop test (elastic#88507) Fix passing positional args to ES in Docker (elastic#88502) Improve description for task api detailed param (elastic#88493) Support cartesian shape with doc values (elastic#88487) Promote usage of Subjects in Authentication class (elastic#88494) Add CCx 2.0 feature flag (elastic#88451) Reword the watcher 'always' and 'never' condition docs (elastic#86105) Simplify azure discovery installation docs (elastic#88404) Breakup FIPS CI testing jobs ... # Conflicts: # server/src/main/java/org/elasticsearch/index/mapper/NumberFieldMapper.java # x-pack/plugin/mapper-aggregate-metric/src/main/java/org/elasticsearch/xpack/aggregatemetric/mapper/AggregateDoubleMetricFieldMapper.java
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.
API keys created in
7.xmay have legacysuperuseruser roledescriptors. In
8.xthis is handled by translating these to8.xsuperuserrole descriptors when they are read. Instead, we canautomatically update them (once) when an API key is first updated. This
PR tweaks our noop detection logic to enable this.
Labeling
non-issuesince this is an implementation detail of anot-yet released feature.