Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 44 additions & 3 deletions docs/reference/central-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,51 @@

You need a valid {{es}} API key to authenticate to the {{es}} endpoint.

::::{include} _snippets/retrieve-credentials.md
::::
:::::

:::::{step} Create an Elasticsearch API key for central configuration

Create an API key with the `config_agent:read` privilege. This API key will be used by EDOT SDKs and validated by the Collector.

Check notice on line 72 in docs/reference/central-configuration.md

View workflow job for this annotation

GitHub Actions / vale

Elastic.Passive: In general, use active voice instead of passive voice ('be used').

Check notice on line 72 in docs/reference/central-configuration.md

View workflow job for this annotation

GitHub Actions / vale

Elastic.FutureTense: 'will be' might be in future tense. Write in the present tense to describe the state of the product as it is now.

Use the following API request to generate the key:

Make sure the API key has `config_agent:read` permissions and resources set to `-`.
```json
POST /_security/api_key
{
"name": "apmconfig-opamp-test-sdk",
"metadata": {
"application": "apm"
},
"role_descriptors": {
"apm": {
"cluster": [],
"indices": [],
"applications": [
{
"application": "apm",
"privileges": [
"config_agent:read"
],
"resources": [
"*"
]
}
],
"run_as": [],
"metadata": {}
}
}
}
```

::::{note}
The EDOT Collector doesn't store or embed the {{es}} API key.

Each EDOT SDK must send its own API key in the `Authorization` header (for example: `Authorization: ApiKey <Base64(id:key)>`).

The `apikeyauth` extension only validates this API key against {{es}}, ensuring it includes the `config_agent:read` privilege with `resources: ["*"]`.
::::
:::::

::::{dropdown} Example JSON payload
```json
Expand Down
Loading