-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Role Management - use ES Builtin Privilege API to drive list of privileges #40270
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
Conversation
This comment has been minimized.
This comment has been minimized.
| * you may not use this file except in compliance with the Elastic License. | ||
| */ | ||
|
|
||
| export interface BuiltinESPrivileges { |
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'm not married to the name, but I thought I'd keep it consistent with what ES chose to call this.
💚 Build Succeeded |
| kibanaPrivileges() { | ||
| return kfetch({ method: 'get', pathname: '/api/security/privileges', query: { includeActions: true } }); | ||
| }, | ||
| builtinESPrivileges() { |
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.
Once we de-angularize, I think it'd make sense to make the ElasticsearchPrivileges component (or similar) responsible for this, rather than passing it down from the EditRolesPage component. I opted for this approach to stay consistent with the rest of the page, and we can come up with a holistic data-access approach for the entire screen once we remove angular.
|
Pinging @elastic/kibana-security |
💚 Build Succeeded |
…tic#40270) * use ES builtin privileges API for role management * Exclude 'none' from privilege lists * additional cleanup
Summary
Replaces hard-coded cluster and index privileges with a list generated from the ES builtin privileges endpoint (
/_security/privilege/_builtin).Closes #40247
Note: CI will fail until the ES snapshot is updated with the new endpoint.