-
Notifications
You must be signed in to change notification settings - Fork 181
[Agent Builder] Add page about permissions and access control #3851
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
+163
−8
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
706e0b0
[Agent Builder] Add page about permissions and access control
leemthompo 683b1e7
fix link
leemthompo 99d633e
Clarify spaces URLs, add known issue for copy button
leemthompo c0d6a32
add another link to MCP copy URL
leemthompo 78b699e
incorporate Pierre's feedback, minor cleanups
leemthompo 031280f
clarify version for copy mcp url button bug
leemthompo 19448e1
Merge branch 'main' into leemthompo-AB-privileges
leemthompo 72d5449
fix anchor
leemthompo ba1355f
update roles and AI connector info
leemthompo 2cc7b21
reorganize headings
leemthompo 3404273
fix anchor
leemthompo 612f24c
Update solutions/search/agent-builder/permissions.md
leemthompo 1c36e55
use lead text to avoid stacking heading levels
leemthompo 8505d7e
use variables
leemthompo 1d76d4b
Merge branch 'main' into leemthompo-AB-privileges
leemthompo 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
Some comments aren't visible on the classic Files Changed page.
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
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
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
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 |
|---|---|---|
| @@ -0,0 +1,121 @@ | ||
| --- | ||
| applies_to: | ||
| stack: preview 9.2 | ||
| serverless: | ||
| elasticsearch: preview | ||
| observability: unavailable | ||
| security: unavailable | ||
| navigation_title: "Permissions & access control" | ||
| --- | ||
|
|
||
| # Permissions and access control in {{agent-builder}} | ||
|
|
||
| Use this page to learn how to configure security roles and API keys for {{agent-builder}}. Understanding these privileges helps you control who can use agents, which tools they can access, and what data they can query. | ||
|
|
||
| ## Required privileges | ||
|
|
||
| {{agent-builder}} requires privileges at three levels: | ||
|
|
||
| - [{{kib}} feature access](#kib-privileges) | ||
| - [{{es}} cluster access](#es-cluster-privileges) | ||
| - [{{es}} index access](#es-index-privileges) | ||
|
|
||
| ### {{kib}} privileges | ||
|
|
||
| {{agent-builder}} access control is managed by the `agentBuilder` {{kib}} feature: | ||
|
|
||
| - "Read" access to the `agentBuilder` feature: Required to use agents, send chat messages, view tools, and access conversations. | ||
| - "All" access to the `agentBuilder` feature: Required to create, update, or delete custom agents and tools. | ||
| - "Read" access to the "Actions and Connectors" feature: Required to use AI connectors with agents. | ||
|
|
||
| Learn more about [{{kib}} privileges](/deploy-manage/users-roles/cluster-or-deployment-auth/kibana-privileges.md). | ||
|
|
||
| ### {{es}} cluster privileges | ||
|
|
||
| {{agent-builder}} requires cluster-level privileges for AI-powered query generation: | ||
|
|
||
| - `monitor_inference`: Required when the agent uses an AI connector that calls the {{es}} Inference API (such as the Elastic default LLM or other AI connectors configured to use the Inference API). The built-in tools `search` and `generate_esql`, as well as [index search tools](tools/index-search-tools.md), use this API to generate queries from natural language. This privilege is not required when the agent uses other {{kib}} GenAI connectors. | ||
|
|
||
| Learn more about [cluster privileges](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-privileges.html#privileges-list-cluster). | ||
|
|
||
| ### {{es}} index privileges | ||
|
|
||
| Tools execute queries against {{es}} indices as the current user. Required privileges depend on which indices the tools access: | ||
|
|
||
| - `read`: Required for tools that query data. | ||
| - `view_index_metadata`: Required for tools that inspect index structure. Also required for the built-in `search` tool and [index search tools](tools/index-search-tools.md), which may use index exploration capabilities internally. | ||
|
|
||
| Learn more about [index privileges](elasticsearch://reference/elasticsearch/security-privileges.md#privileges-list-indices). | ||
|
|
||
| ## Grant access | ||
|
|
||
leemthompo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| You can grant users access to {{agent-builder}} using these methods: | ||
|
|
||
| - [Roles](#grant-access-with-roles) to bundle privileges for users. | ||
| - [API keys](#grant-access-with-api-keys) for programmatic access. | ||
| - [Spaces](#working-with-spaces) to scope access to specific environments. | ||
|
|
||
| ### Grant access with roles | ||
|
|
||
| [Roles](/deploy-manage/users-roles/cluster-or-deployment-auth/defining-roles.md) are {{es}} security constructs that bundle together {{kib}} feature privileges and {{es}} privileges. To grant users access to {{agent-builder}}, create a role that includes the required privileges. | ||
|
|
||
| :::{note} | ||
| When configuring roles in the {{kib}} UI, {{agent-builder}} privileges are currently located under the **Analytics** section, not the {{es}} section. | ||
| ::: | ||
|
|
||
| Example role for users who need full {{agent-builder}} access: | ||
|
|
||
| ```json | ||
| POST /_security/role/agent-builder-full | ||
| { | ||
| "cluster": ["monitor_inference"], | ||
| "indices": [ | ||
| { | ||
| "names": ["logs-*", "metrics-*"], | ||
| "privileges": ["read", "view_index_metadata"] | ||
| } | ||
| ], | ||
| "applications": [ | ||
| { | ||
| "application": "kibana-.kibana", | ||
| "privileges": [ | ||
| "feature_agentBuilder.all", | ||
| "feature_actions.read" | ||
| ], | ||
| "resources": ["space:default"] | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| :::{tip} | ||
| For read-only access, use `feature_agentBuilder.read` instead of `feature_agentBuilder.all`. | ||
| ::: | ||
|
|
||
| ### Grant access with API keys | ||
|
|
||
| When using the {{agent-builder}} APIs programmatically, authenticate with an API key that includes the required privileges. | ||
|
|
||
| Unlike roles, which use UI-friendly feature privilege names like `feature_agentBuilder.all`, API keys use the underlying API privilege names (`read_onechat`, `manage_onechat`). This is because API keys interact directly with the {{kib}} API layer rather than through the UI. | ||
|
|
||
| Refer to these pages for API key configuration examples: | ||
| - [MCP server](mcp-server.md#api-key-application-privileges) | ||
| - [{{kib}} API](kibana-api.md) | ||
|
|
||
| Learn more about [API keys](/deploy-manage/api-keys/elasticsearch-api-keys.md). | ||
|
|
||
| ### Working with Spaces | ||
|
|
||
| {{agent-builder}} respects {{kib}} Spaces when enabled. All conversations, custom agents, and custom tools are scoped to the current Space. | ||
|
|
||
| When configuring roles or API keys, specify the Space in the application privileges resources (e.g., `"resources": ["space:production"]`). Users and API keys cannot access resources in other Spaces. | ||
|
|
||
| Learn how to [Copy your MCP server URL](tools.md#copy-your-mcp-server-url). | ||
|
|
||
| :::{important} | ||
| When accessing {{agent-builder}} APIs or the MCP server from a custom Space, include the space name in the URL path: `https://<deployment>/s/<space-name>/api/agent_builder/...` | ||
|
|
||
| The default space uses the standard URL format without `/s/<space-name>`. | ||
| ::: | ||
|
|
||
| Learn more about [{{kib}} Spaces](/deploy-manage/manage-spaces.md). | ||
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
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
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.
WDYT about adding an H2 here as parent to the 3 privileges sections? (they're all H3 currently while there's no H2), and another before the Granting access ones, to split he page into a "reference" part and a "how-to" part?
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.
makes sense! 😄