-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
User Profile - Use security origin for BWC cases (#86345)
The security profile action origin and internal user is not available before version 8.3.0. This PR makes all profile actions to use the existing security origin if the cluster has any node that is older than 8.3.0. The change makes it possible to use User Profile features in a mixed cluster as long as the request always hits a newer (newer than 8.3) node first.
- Loading branch information
Showing
6 changed files
with
131 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
33 changes: 33 additions & 0 deletions
33
.../rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/140_user_profile.yml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
"Test User Profile feature will work in a mixed cluster": | ||
|
||
- skip: | ||
features: node_selector | ||
version: " - 7.99.99" | ||
reason: "https://github.com/elastic/elasticsearch/issues/86373" | ||
|
||
- do: | ||
node_selector: | ||
version: " 8.3.0 - " | ||
security.activate_user_profile: | ||
body: > | ||
{ | ||
"grant_type": "password", | ||
"username": "test_user", | ||
"password" : "x-pack-test-password" | ||
} | ||
- is_true: uid | ||
- match: { "user.username" : "test_user" } | ||
- set: { uid: profile_uid } | ||
|
||
- do: | ||
node_selector: | ||
version: " 8.3.0 - " | ||
security.get_user_profile: | ||
uid: "$profile_uid" | ||
|
||
- length: { $body: 1 } | ||
- is_true: "$profile_uid" | ||
- set: { $profile_uid: profile } | ||
- match: { $profile.uid : "$profile_uid" } | ||
- match: { $profile.user.username : "test_user" } |