Skip to content

Commit 706e0b0

Browse files
committed
[Agent Builder] Add page about permissions and access control
1 parent ac93a60 commit 706e0b0

File tree

4 files changed

+107
-0
lines changed

4 files changed

+107
-0
lines changed

solutions/search/agent-builder/get-started.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ Find **Agents** in the navigation menu to begin using the feature, or search for
5252

5353
::::
5454

55+
:::{note}
56+
To learn about required privileges for {{agent-builder}}, refer to [Permissions and access control](permissions.md).
57+
:::
58+
5559
:::::
5660

5761
::::{step} Ingest some data
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
---
2+
applies_to:
3+
stack: preview 9.2
4+
serverless:
5+
elasticsearch: preview
6+
observability: unavailable
7+
security: unavailable
8+
navigation_title: "Permissions & access control"
9+
---
10+
11+
12+
# Permissions and access control in {{agent-builder}}
13+
14+
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.
15+
16+
Agent Builder requires privileges at three levels:
17+
18+
- [{{kib}} feature access](#kib-privileges)
19+
- [{{es}} cluster access](#es-cluster-privileges)
20+
- [{{es}} index access](#es-index-privileges)
21+
22+
### {{kib}} privileges
23+
24+
Agent Builder uses two {{kib}} privileges within the `agentBuilder` feature:
25+
26+
- `read_onechat`: Required to use agents, send chat messages, view tools, and access conversations. Maps to the "Read" feature privilege.
27+
- `manage_onechat`: Required to create, update, or delete custom agents and tools. Maps to the "All" feature privilege along with `read_onechat`.
28+
29+
Learn more about [{{kib}} privileges](elasticsearch://reference/elasticsearch/security-privileges.md#privileges-list-kibana).
30+
31+
### {{es}} cluster privileges
32+
33+
Agent Builder requires cluster-level privileges for AI-powered query generation:
34+
35+
- `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.
36+
37+
Learn more about [cluster privileges](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-privileges.html#privileges-list-cluster).
38+
39+
### {{es}} index privileges
40+
41+
Tools execute queries against {{es}} indices as the current user. Required privileges depend on which indices the tools access:
42+
43+
- `read`: Required for tools that query data, including `execute_esql`, `search`, `get_document_by_id`, and [{{esql}} tools](tools/esql-tools.md)
44+
- `view_index_metadata`: Required for tools that inspect index structure, including `list_indices`, `get_index_mapping`, and `index_explorer`
45+
46+
Learn more about [index privileges](elasticsearch://reference/elasticsearch/security-privileges.md#privileges-list-indices).
47+
48+
### Granting access with roles
49+
50+
[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.
51+
52+
Example role for users who need full Agent Builder access:
53+
54+
```json
55+
POST /_security/role/agent-builder-full
56+
{
57+
"cluster": ["monitor_inference"],
58+
"indices": [
59+
{
60+
"names": ["logs-*", "metrics-*"],
61+
"privileges": ["read", "view_index_metadata"]
62+
}
63+
],
64+
"applications": [
65+
{
66+
"application": "kibana-.kibana",
67+
"privileges": ["feature_agentBuilder.all"],
68+
"resources": ["space:default"]
69+
}
70+
]
71+
}
72+
```
73+
74+
:::{tip}
75+
For read-only access, use `feature_agentBuilder.read` instead of `feature_agentBuilder.all`.
76+
:::
77+
78+
### API keys for programmatic access
79+
80+
When using the Agent Builder APIs programmatically, authenticate with an API key that includes the required privileges.
81+
82+
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.
83+
84+
See these pages for API key configuration examples:
85+
- [MCP server](mcp-server.md#api-key-application-privileges)
86+
- [{{kib}} API](kibana-api.md)
87+
88+
Learn more about [API keys](/deploy-manage/api-keys/elasticsearch-api-keys.md).
89+
90+
### Spaces
91+
92+
Agent Builder respects {{kib}} Spaces when enabled. All conversations, custom agents, and custom tools are scoped to the current Space.
93+
94+
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.
95+
96+
Learn more about [{{kib}} Spaces](/deploy-manage/manage-spaces.md).

solutions/search/elastic-agent-builder.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ These interfaces enable you to build integrations with other applications and ex
6666

6767
[**Learn more about programmatic access**](agent-builder/programmatic-access.md)
6868

69+
## Permissions and access control
70+
71+
Configure security roles and API keys to control who can use agents, which tools they can access, and what data they can query.
72+
73+
[**Learn more about permissions and access control**](agent-builder/permissions.md)
74+
6975
## Limitations and known issues
7076

7177
{{agent-builder}} is in technical preview.

solutions/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ toc:
7777
- file: search/agent-builder/kibana-api.md
7878
- file: search/agent-builder/a2a-server.md
7979
- file: search/agent-builder/mcp-server.md
80+
- file: search/agent-builder/permissions.md
8081
- file: search/agent-builder/limitations-known-issues.md
8182
- file: search/rag.md
8283
children:

0 commit comments

Comments
 (0)