-
Notifications
You must be signed in to change notification settings - Fork 176
[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
base: main
Are you sure you want to change the base?
Changes from all commits
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,104 @@ | ||
| --- | ||
| 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. | ||
|
|
||
| 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 uses two {{kib}} privileges within the `agentBuilder` feature: | ||
|
|
||
| - `read_onechat`: Required to use agents, send chat messages, view tools, and access conversations. Maps to the "Read" feature privilege. | ||
| - `manage_onechat`: Required to create, update, or delete custom agents and tools. Maps to the "All" feature privilege along with `read_onechat`. | ||
|
|
||
| Learn more about [{{kib}} privileges](/deploy-manage/users-roles/cluster-or-deployment-auth/kibana-privileges.md). | ||
|
Comment on lines
+22
to
+29
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. Do we usually describe the API privileges granted by a Kibana feature? It feels more like an implementation detail (or I always assumed it was). I would have presented it that way, personally: (but I'm not a doc writer 😄)
Contributor
Author
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. Wasn't sure really how much detail we needed here, @ppf2 can chime in here and can tweak accordingly |
||
|
|
||
| ### {{es}} cluster privileges | ||
|
|
||
| Agent Builder requires cluster-level privileges for AI-powered query generation: | ||
|
|
||
| - `monitor_inference`: Required for agents to use AI-powered tools. The built-in tools `search` and `generate_esql`, as well as [index search tools](tools/index-search-tools.md), call the {{es}} Inference API to generate queries from natural language. | ||
|
Comment on lines
+33
to
+35
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. So technically this is only true when using an Another point, technically to use any connector, the user gonna need at least |
||
|
|
||
| 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, including `execute_esql`, `search`, `get_document_by_id`, and [{{esql}} tools](tools/esql-tools.md) | ||
| - `view_index_metadata`: Required for tools that inspect index structure, including `list_indices`, `get_index_mapping`, and `index_explorer` | ||
|
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. not sure we need an exhaustive list, but for information - |
||
|
|
||
| Learn more about [index privileges](elasticsearch://reference/elasticsearch/security-privileges.md#privileges-list-indices). | ||
|
|
||
| ### Granting 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. | ||
|
|
||
| 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"], | ||
| "resources": ["space:default"] | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| :::{tip} | ||
| For read-only access, use `feature_agentBuilder.read` instead of `feature_agentBuilder.all`. | ||
| ::: | ||
|
|
||
| ### API keys for programmatic access | ||
|
|
||
| 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). | ||
|
|
||
| ### 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). | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -208,4 +208,8 @@ The **Tools** UI provides a **Copy your MCP server URL** button for easy access. | |
| :width: 250px | ||
| ::: | ||
|
|
||
| :::{important} | ||
| If you're using a custom {{kib}} Space, the copied URL will not include the space name. You must manually add `/s/<space-name>` to the URL path. For example: `https://<deployment>/s/<space-name>/api/agent_builder/mcp` | ||
| ::: | ||
|
|
||
|
Comment on lines
+211
to
+214
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. (related to last comment) |
||
| For detailed MCP server configuration, refer to [MCP server](mcp-server.md). | ||
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 was fixed in elastic/kibana#240955, afaik? Is the current version of the documentation meant to be for
9.2.0?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.
yep we'll remove this once 9.3 lands
I'll add version tag to make it clear