Added clarification on b64 encoding of API key (#78394)

* Added clarification on b64 encoding of API key

The current documentation does not specify how to encode the response to get a valid api key, I added it from the info found here: https://github.com/elastic/elasticsearch/issues/50235#issuecomment-644170902

* Updated for consistency with Elasticsearch docs

https://github.com/elastic/kibana/pull/78394#pullrequestreview-497412674
This commit is contained in:
Théo Frasquet 2020-09-29 20:35:15 +02:00 committed by GitHub
parent 4f6df624e9
commit e9acb95657
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -72,9 +72,9 @@ The response should look something like this:
"api_key" : "FD6P5UA4QCWlZZQhYF3YGw"
}
Now, you can use the API key to request {kib} roles. You will need
to base64-encode the `id` and `api_key` provided in the response
and add it to your request as an authorization header. For example:
Now, you can use the API key to request {kib} roles. You'll need to send a request with a
`Authorization` header with a value having the prefix `ApiKey` followed by the credentials,
where credentials is the base64 encoding of `id` and `api_key` joined by a colon. For example:
[source,js]
curl --location --request GET 'http://localhost:5601/api/security/role' \