docs: clarify privileges in api key api (#127675)

This commit is contained in:
Brandon Morelli 2022-03-15 13:39:30 -06:00 committed by GitHub
parent e4b8d97e91
commit 97301c7d6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -742,20 +742,24 @@ include::api.asciidoc[tag=using-the-APIs]
[[apm-create-agent-key]]
==== Create agent key
Create an APM agent key. Specify privileges in the request body at creation time.
Create an APM agent API key. Specify API key privileges in the request body at creation time.
[[apm-create-agent-key-privileges]]
===== Privileges
Users must have at least the `manage_own_api_key` cluster privilege and the required application privileges.
The user creating an APM agent API key must have at least the `manage_own_api_key` cluster privilege
and the APM application-level privileges that it wishes to grant.
====== Example role:
====== Example role
The example below uses the Kibana <<role-management-api,role management API>> to create a role named `apm_agent_key_user`.
Create and assign this role to a user that wishes to create APM agent API keys.
[source,js]
--------------------------------------------------
POST /_security/role/apm_agent_key_user
{
"cluster": ["manage_own_api_key"],
"cluster": ["manage_own_api_key"],
"applications": [{
"application": "apm",
"privileges": ["event:write", "sourcemap:write", "config_agent:read"],