[Entity Analytics] Check agent builder permissions when rendering entity summary highlight.#250093
Merged
ymao1 merged 2 commits intoelastic:mainfrom Jan 23, 2026
Merged
[Entity Analytics] Check agent builder permissions when rendering entity summary highlight.#250093ymao1 merged 2 commits intoelastic:mainfrom
ymao1 merged 2 commits intoelastic:mainfrom
Conversation
ymao1
commented
Jan 22, 2026
| if (!aiConnectors || !connectorId) return ''; | ||
| return aiConnectors.find((c) => c.id === connectorId)?.name ?? ''; | ||
| }, [aiConnectors, connectorId]); | ||
| const { hasAssistantPrivilege, isAssistantEnabled, isAssistantVisible } = |
Contributor
Author
There was a problem hiding this comment.
Access to the inference API does not depend on whether the assistant is enabled so I removed this check.
Contributor
|
Pinging @elastic/security-entity-analytics (Team:Entity Analytics) |
CAWilson94
approved these changes
Jan 23, 2026
Contributor
CAWilson94
left a comment
There was a problem hiding this comment.
LGTM!
Desk tested: works as described 🥳
For anyone else desk testing - make sure management perms are set to 'all' for connectors, for the first two cases. :D
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
The entity summary feature calls the inference plugin chat complete API which does not perform its own RBAC checks and instead relies on the calling feature to check permissions. Currently, it checks whether the user has permissions to access AI assistant. This PR expands the checks to also check whether the user has permissions to agent builder and whether the user has connector permissions (which is needed to invoke gen ai connectors).
Note: I did not replace the permissions check for AI Assistant with Agent Builder. Instead, I modified the check to ensure that a user has at least one of these permissions. This prevents users who only have AI Assistant permissions from suddenly not being able to see the entity summary highlight. In the future, when Assistant is removed, we can update the check to only check Agent Builder permissions.
To Verify
Actions and Connectorsunder Stack Managementtestand assign it to the role you just createdtestuser, reload the entity flyout. You should now see the entity summary highlight sectiontestuser, reload the entity flyout. You should now see the entity summary highlight sectionActions and ConnectorsunderStack Managementtestuser, reload the entity flyout. You should no longer see the entity summary highlight section.