-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Phase 1 support for operator privileges #65256
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
Merged
ywangd
merged 25 commits into
elastic:master
from
ywangd:meta-101-operator-privileges-phase-one
Dec 3, 2020
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
4966365
WIP: operator privileges initial working code with smoke tests
ywangd 3d5f3b0
WIP: working on tests
ywangd cd5f339
Remove unnecessary file
ywangd 9834e47
Use javaRestTest instead of test to align with recent changes
ywangd 9b63010
Add a test plugin to ensure every action is declared either operator-…
ywangd be893ec
spotless
ywangd 2d66a05
testingConventions test
ywangd 1b28476
Update x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/s…
ywangd 892840f
address feedback
ywangd 9314789
Simplify the plugin IT test with reflection
ywangd 5dedd54
spotless
ywangd 901ecd2
Refactor as suggested
ywangd b52c814
Move plugin test package
ywangd 5883923
Fix authenticationService tests
ywangd 1b3344f
Fix tests and telemetry
ywangd 0e170d9
Merge remote-tracking branch 'origin/master' into meta-101-operator-p…
ywangd 1082b13
fix test failures
ywangd c3fa2ba
Update x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/s…
ywangd 4cf5b08
wip
ywangd 973e7a5
Address feedback
ywangd 2ae1bef
Fix import
ywangd 91d2ef0
Tweak
ywangd 6bddcff
fix test
ywangd e7042f9
Update x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/s…
ywangd 5807b33
Merge remote-tracking branch 'origin/master' into meta-101-operator-p…
ywangd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
33 changes: 33 additions & 0 deletions
33
x-pack/plugin/security/qa/operator-privileges-tests/build.gradle
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| apply plugin: 'elasticsearch.esplugin' | ||
| apply plugin: 'elasticsearch.java-rest-test' | ||
|
|
||
| esplugin { | ||
| name 'operator-privileges-test' | ||
| description 'An test plugin for testing hard to get internals' | ||
| classname 'org.elasticsearch.xpack.security.operator.OperatorPrivilegesTestPlugin' | ||
| } | ||
|
|
||
| dependencies { | ||
| compileOnly project(':x-pack:plugin:core') | ||
| javaRestTestImplementation project(':x-pack:plugin:core') | ||
| javaRestTestImplementation project(':client:rest-high-level') | ||
| javaRestTestImplementation project(':x-pack:plugin:security') | ||
| // let the javaRestTest see the classpath of main | ||
| javaRestTestImplementation project.sourceSets.main.runtimeClasspath | ||
| } | ||
|
|
||
| testClusters.all { | ||
| testDistribution = 'DEFAULT' | ||
| numberOfNodes = 3 | ||
|
|
||
| extraConfigFile 'operator_users.yml', file('src/javaRestTest/resources/operator_users.yml') | ||
| extraConfigFile 'roles.yml', file('src/javaRestTest/resources/roles.yml') | ||
|
|
||
| setting 'xpack.license.self_generated.type', 'trial' | ||
| setting 'xpack.security.enabled', 'true' | ||
| setting 'xpack.security.http.ssl.enabled', 'false' | ||
| setting 'xpack.security.operator_privileges.enabled', "true" | ||
|
|
||
| user username: "test_admin", password: 'x-pack-test-password', role: "superuser" | ||
| user username: "test_operator", password: 'x-pack-test-password', role: "limited_operator" | ||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.