Repository navigation
[SIEM][Detection Engine] Adds privileges API endpoint - #52707
Merged
Merged
Conversation
Contributor
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
dhurley14
approved these changes
Dec 11, 2019
dhurley14
left a comment
Contributor
There was a problem hiding this comment.
The read_privelege code is super clean! Good catch with that missing await. Tested locally and looks and works great! LGTM
Contributor
|
Pinging @elastic/siem (Team:SIEM) |
2 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds a privileges API endpoint for the UI and people to query to check to see if their namespaced index is going to have the correct privileges or not.
Usage:
Testing:
Set up your user name and password to a test space for the CLI. Give whatever permissions
you want for restricted access to the test-space user, test-space role, and the test-space actual
space to ensure everything works out as expected.
Then use it like so
API:
CLI:
Return will be something like this:
{ "username": "test-space", "has_all_requested": false, "cluster": { "monitor_ml": true, "manage_ccr": false, "manage_index_templates": true, "monitor_watcher": true, "monitor_transform": true, "read_ilm": true, "manage_api_key": false, "manage_security": false, "manage_own_api_key": false, "manage_saml": false, "all": false, "manage_ilm": true, "manage_ingest_pipelines": true, "read_ccr": false, "manage_rollup": true, "monitor": true, "manage_watcher": true, "manage": true, "manage_transform": true, "manage_token": false, "manage_ml": true, "manage_pipeline": true, "monitor_rollup": true, "transport_client": true, "create_snapshot": true }, "index": { ".siem-signals-test-space": { "all": false, "manage_ilm": true, "read": false, "create_index": true, "read_cross_cluster": false, "index": false, "monitor": true, "delete": false, "manage": true, "delete_index": true, "create_doc": false, "view_index_metadata": true, "create": false, "manage_follow_index": true, "manage_leader_index": true, "write": false } }, "application": {} }Example permissions that work for managing all signal indexes across all spaces so that the user in question can create it for each space:
Example permissions that work for managing only a specific signal index:

Example permissions that work for an end user using signals across all spaces:

Example permissions that work for an end user using signals for a a specific index:

Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.- [ ] This was checked for cross-browser compatibility, including a check against IE11- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support- [ ] Documentation was added for features that require explanation or tutorials- [ ] This was checked for keyboard-only and screenreader accessibilityFor maintainers
- [ ] This was checked for breaking API changes and was labeled appropriately