-
Notifications
You must be signed in to change notification settings - Fork 25.4k
Add {m365_defender,microsoft_defender_endpoint}.vulnerability indices to kibana_system role permissions #132445
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
35e366a
Add permissions for Microsoft Defender integrations required for 3rd …
kcreddy ce1f3de
[CI] Auto commit changes from spotless
422c48a
Address PR comments
kcreddy de59582
Merge remote-tracking branch 'origin/3p-cdr-permissions' into 3p-cdr-…
kcreddy 163bd32
Merge remote-tracking branch 'upstream/main' into 3p-cdr-permissions
kcreddy e54bc0a
remove comments
kcreddy edcad92
fix conflicts
kcreddy abae8fd
fix previous change
kcreddy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -517,10 +517,21 @@ static RoleDescriptor kibanaSystem(String name) { | |
"logs-tenable_io.vulnerability-*", | ||
"logs-rapid7_insightvm.vulnerability-*", | ||
"logs-rapid7_insightvm.asset_vulnerability-*", | ||
"logs-carbon_black_cloud.asset_vulnerability_summary-*" | ||
"logs-carbon_black_cloud.asset_vulnerability_summary-*", | ||
"logs-m365_defender.vulnerability-*", | ||
"logs-microsoft_defender_endpoint.vulnerability-*" | ||
) | ||
.privileges("read", "view_index_metadata") | ||
.build(), | ||
// For source indices of the Cloud Detection & Response (CDR) packages | ||
// that has ILM policy | ||
RoleDescriptor.IndicesPrivileges.builder() | ||
.indices("logs-m365_defender.vulnerability-*", "logs-microsoft_defender_endpoint.vulnerability-*") | ||
kcreddy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
.privileges( | ||
// Require "delete_index" to perform ILM policy actions | ||
TransportDeleteIndexAction.TYPE.name() | ||
) | ||
.build(), | ||
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. This fixes the permission error for the ILM policy. Without this correct permissions following error is received when deleting index as user with {
"error": {
"root_cause": [
{
"type": "security_exception",
"reason": "action [indices:admin/delete] is unauthorized for user [kibana-system] with effective roles [editor,kibana_system,viewer] on indices [.ds-logs-m365_defender.vulnerability-default-2025.08.05-000002], this action is granted by the index privileges [delete_index,manage,all]"
}
],
"type": "security_exception",
"reason": "action [indices:admin/delete] is unauthorized for user [kibana-system] with effective roles [editor,kibana_system,viewer] on indices [.ds-logs-m365_defender.vulnerability-default-2025.08.05-000002], this action is granted by the index privileges [delete_index,manage,all]"
},
"status": 403
} |
||
// For alias indices of the Cloud Detection & Response (CDR) packages that ships a | ||
// transform | ||
RoleDescriptor.IndicesPrivileges.builder() | ||
|
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
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
This adds permission for the transform, without which results in following error inside the transform:
Uh oh!
There was an error while loading. Please reload this page.
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.
Just a note: Per ILM policy you shared, Kibana needs the permission to execute rollover action but that is already covered by
logs-*
pattern here:elasticsearch/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/store/KibanaOwnedReservedRoleDescriptors.java
Lines 311 to 329 in 78c49a6