-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Granting kibana_system
reserved role access to "all" privileges to .adhoc.alerts*
and .internal.adhoc.alerts*
indices
#127321
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
base: main
Are you sure you want to change the base?
Changes from 8 commits
d559964
5966787
9a47df2
e34b3e7
49cf63d
5231345
c0df6dd
f543bd9
44ce3ba
8be39d4
8394f72
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pr: 127321 | ||
summary: Granting `kibana_system` reserved role access to "all" privileges to `.adhoc.alerts*` | ||
and `.internal.adhoc.alerts*` indices | ||
area: Authorization | ||
type: enhancement | ||
issues: [] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -265,6 +265,12 @@ static RoleDescriptor kibanaSystem(String name) { | |
RoleDescriptor.IndicesPrivileges.builder().indices(ReservedRolesStore.ALERTS_INDEX_ALIAS).privileges("all").build(), | ||
// "Alerts as data" public index alias used in Security Solution | ||
// Kibana system user uses them to read / write alerts. | ||
RoleDescriptor.IndicesPrivileges.builder() | ||
.indices(ReservedRolesStore.ADHOC_ALERTS_BACKING_INDEX, ReservedRolesStore.ADHOC_ALERTS_INDEX_ALIAS) | ||
.privileges("create_index", "manage", "read", "write") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @e40pud Thanks for updating this! The last thing I'd like to ask, is about the
Aiming for the minimum necessary privileges, could we include just a subset of these? If not, could you provide justification to include them? Sorry to have to ask. We like to be as thorough as we can when changing this role. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I went through the ES apis that we use to work with this indices and here is the list of all of them:
Regarding the
and according to the
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @e40pud First, sorry for the delay. Second, sorry to ask for another change. I reviewed this with @slobodanadamovic, and while it is true that we do not have specific alias privileges, we are also not limited to using only end-user named privileges. In this case, we can reduce the scope being granted by the Does this seem like a better match here? We'd prefer this from a security perspective, since we can hone in on just the action needed without needing to grant any additional access via There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for the response @jeramysoucy. I'm just not quite sure which actions I will need to use in this case. There are multiple APIs that will have access to the index and it's alias (16 mentioned above) and I do not really know what set of privileges will cover all of them. Is there some kind of map of I'm also not sure why the documentation states the required There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
My understanding is that the documentation is intended for end-users. As user, we would only be able to include named privileges in a role. But as a developer, we do not have this limitation. IIUC, the example linked above will impart the privilege for the necessary alias actions. Regarding the others you listed, I'll need some help from @elastic/es-security (cc @slobodanadamovic) Here is what I could identify so far...
|
||
.build(), | ||
// "Alerts as data" public index alias used in Security Solution | ||
// Kibana system user uses them to read / write alerts. | ||
RoleDescriptor.IndicesPrivileges.builder().indices(ReservedRolesStore.PREVIEW_ALERTS_INDEX_ALIAS).privileges("all").build(), | ||
// "Alerts as data" internal backing indices used in Security Solution | ||
// Kibana system user creates these indices; reads / writes to them via the | ||
|
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.
Are these indices created/owned by Kibana?
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.
Correct