-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Security Solution][Attacks/Alerts][Setup and miscellaneous] Attacks indices RBAC (#243079) #244667
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
[Security Solution][Attacks/Alerts][Setup and miscellaneous] Attacks indices RBAC (#243079) #244667
Conversation
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
|
@elasticmachine merge upstream |
...ommon/impl/schemas/attack_discovery/routes/internal/privileges/get_missing_privileges.gen.ts
Show resolved
Hide resolved
KDKHD
left a comment
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.
.../impl/schemas/attack_discovery/routes/internal/privileges/get_missing_privileges.schema.yaml
Outdated
Show resolved
Hide resolved
andrew-goldstein
left a comment
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.
Thanks @e40pud for this new API!
✅ Desk tested locally
LGTM 🚀
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Public APIs missing comments
Unknown metric groupsAPI count
References to deprecated APIs
History
cc @e40pud |
…indices RBAC (elastic#243079) (elastic#244667) ## Summary Related to elastic#243079 Here we introduce a new internal attack discovery endpoint that returns missing index privileges for the users. There are two indices user should have access to in order to be able to work with attack discovery feature: `.alerts-security.attack.discovery.alerts-*` and `.adhoc.alerts-security.attack.discovery.alerts`. The required privileges are `read`, `write`, `view_index_metadata` and `maintenance`. The endpoint checks whether any of those required privileges are missing for those two indices and returns the information about it in a form like this: ``` [ { indexName: '.alerts-security.attack.discovery.alerts-default', privileges: ['read', 'write', 'view_index_metadata', 'maintenance'], }, { indexName: '.adhoc.alerts-security.attack.discovery.alerts-default', privileges: ['read', 'write', 'view_index_metadata', 'maintenance'], }, ] ``` ## Testing 1. Create a role which has attack discovery kibana privileges and lacks index privileges to one of the indices: `.alerts-security.attack.discovery.alerts-*` and/or `.adhoc.alerts-security.attack.discovery.alerts`. 2. Use this cURL request to get missing privileges information ``` curl --location 'http://localhost:5601/internal/elastic_assistant/attack_discovery/_missing_privileges' \ --header 'kbn-xsrf: true' \ --header 'elastic-api-version: 1' \ --header 'x-elastic-internal-origin: security-solution' ``` **NOTE**: You need to add credentials of the user with the created role rights in this request. --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Summary
Related to #243079
Here we introduce a new internal attack discovery endpoint that returns missing index privileges for the users.
There are two indices user should have access to in order to be able to work with attack discovery feature:
.alerts-security.attack.discovery.alerts-*and.adhoc.alerts-security.attack.discovery.alerts.The required privileges are
read,write,view_index_metadataandmaintenance.The endpoint checks whether any of those required privileges are missing for those two indices and returns the information about it in a form like this:
Testing
.alerts-security.attack.discovery.alerts-*and/or.adhoc.alerts-security.attack.discovery.alerts.NOTE: You need to add credentials of the user with the created role rights in this request.