-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
[HLRC] Add support for put privileges API #35679
[HLRC] Add support for put privileges API #35679
Conversation
This commit adds support for API to create or update application privileges. Note: I have used the ApplicationPrivilege and Tests from the changes done for get privileges API (by Ioannis) and have modified to support toXContent.
Pinging @elastic/es-core-infra |
Pinging @elastic/es-security |
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 @bizybot , I left a couple of minor comments. I'd welcome an additional opinion on the status states that this introduces but other than that this looks good
client/rest-high-level/src/main/java/org/elasticsearch/client/SecurityClient.java
Outdated
Show resolved
Hide resolved
...t/rest-high-level/src/main/java/org/elasticsearch/client/security/PutPrivilegesResponse.java
Show resolved
Hide resolved
...t/rest-high-level/src/main/java/org/elasticsearch/client/security/PutPrivilegesResponse.java
Outdated
Show resolved
Hide resolved
...t-high-level/src/test/java/org/elasticsearch/client/security/PutPrivilegesResponseTests.java
Show resolved
Hide resolved
- Corrected the toXContent for PutPrivilegesRequest for multiple privileges in application. - Changes to address TODO in testGetPrivileges - modified tests to test the scenario that got missed earlier
+Fix random test failure
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.
I left some suggestions.
...nt/rest-high-level/src/main/java/org/elasticsearch/client/security/PutPrivilegesRequest.java
Show resolved
Hide resolved
...t/rest-high-level/src/main/java/org/elasticsearch/client/security/PutPrivilegesResponse.java
Outdated
Show resolved
Hide resolved
...t/rest-high-level/src/main/java/org/elasticsearch/client/security/PutPrivilegesResponse.java
Show resolved
Hide resolved
...t-high-level/src/test/java/org/elasticsearch/client/security/PutPrivilegesResponseTests.java
Outdated
Show resolved
Hide resolved
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 once the docs are fixed @bizybot !
...t/rest-high-level/src/main/java/org/elasticsearch/client/security/PutPrivilegesResponse.java
Outdated
Show resolved
Hide resolved
...t/rest-high-level/src/main/java/org/elasticsearch/client/security/PutPrivilegesResponse.java
Outdated
Show resolved
Hide resolved
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
This commit adds support for API to create or update application privileges in high-level rest client.
* elastic/6.x: (37 commits) [HLRC] Added support for Follow Stats API (elastic#36253) Exposed engine must have all ops below gcp during rollback (elastic#36159) TEST: Always enable soft-deletes in ShardChangesTests Use delCount of SegmentInfos to calculate numDocs (elastic#36323) Add soft-deletes upgrade tests (elastic#36286) Remove LocalCheckpointTracker#resetCheckpoint (elastic#34667) Option to use endpoints starting with _security (elastic#36379) [CCR] Restructured QA modules (elastic#36404) RestClient: on retry timeout add root exception (elastic#25576) [HLRC] Add support for put privileges API (elastic#35679) HLRC: Add rollup search (elastic#36334) Explicitly recommend to forceMerge before freezing (elastic#36376) Rename internal repository actions to be internal (elastic#36377) Core: Remove parseDefaulting from DateFormatter (elastic#36386) [ML] Prevent stack overflow while copying ML jobs and datafeeds (elastic#36370) Docs: Fix Jackson reference (elastic#36366) [ILM] Fix issue where index may not yet be in 'hot' phase (elastic#35716) Undeprecate /_watcher endpoints (elastic#36269) Docs: Fix typo in bool query (elastic#36350) HLRC: Add delete template API (elastic#36320) ...
This commit adds support for API to create or update
application privileges in high-level rest client.