X-Pack modules accept api_key settings for Elasticsearch authentication:
xpack.management.elasticsearch.api_key
xpack.monitoring.elasticsearch.api_key
These settings support:
<id>:<key> pair API key (Logstash, Beats format)
- base64 encoded string
Elastic Cloud org level API keys carry essu_ prefix + base64 string, which is neither <id>:<key> pair nor regular base64 format.
X-Pack Central Management and Stack Monitoring use the Elasticsearch Output plugin HTTP client to connect to Elasticsearch. This is the same client path used by the output plugin to transform the configured api_key into the Authorization: ApiKey ... request header.
The Elasticsearch Output plugin will be updated soon when this PR gets merged to support Elastic Cloud org level API keys and to use them as-is instead of base64 encoding them again. This plugin update is expected to be available in the next Logstash patch release, expected on Wednesday 22 July.
Benefit of using Elastic Cloud org level API keys is that they are person independent, while Hosted/Project API keys are tied to the person who creates the API keys.
Expectation
When providing Elastic Cloud org level API keys to X-Pack api_key settings, Logstash needs to utilize them as-is in its requests when connecting to Elastic Cloud.
Related
X-Pack modules accept
api_keysettings for Elasticsearch authentication:xpack.management.elasticsearch.api_keyxpack.monitoring.elasticsearch.api_keyThese settings support:
<id>:<key>pair API key (Logstash, Beats format)Elastic Cloud org level API keys carry
essu_prefix +base64string, which is neither<id>:<key>pair nor regular base64 format.X-Pack Central Management and Stack Monitoring use the Elasticsearch Output plugin HTTP client to connect to Elasticsearch. This is the same client path used by the output plugin to transform the configured
api_keyinto theAuthorization: ApiKey ...request header.The Elasticsearch Output plugin will be updated soon when this PR gets merged to support Elastic Cloud org level API keys and to use them as-is instead of base64 encoding them again. This plugin update is expected to be available in the next Logstash patch release, expected on Wednesday 22 July.
Benefit of using Elastic Cloud org level API keys is that they are person independent, while Hosted/Project API keys are tied to the person who creates the API keys.
Expectation
When providing Elastic Cloud org level API keys to X-Pack
api_keysettings, Logstash needs to utilize them as-is in its requests when connecting to Elastic Cloud.Related