Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add warning about derived API keys to docs #62351

Merged
merged 4 commits into from
Sep 17, 2020
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
13 changes: 13 additions & 0 deletions x-pack/docs/en/rest-api/security/create-api-keys.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ Creates an API key for access without requiring basic authentication.

* To use this API, you must have at least the `manage_api_key` cluster privilege.

IMPORTANT: If the credential that is used to authenticate this request is
an API key, the derived API key cannot have any privileges. If you specify privileges, the API returns an error.
See the note under `role_descriptors`.

[[security-api-create-api-key-desc]]
==== {api-description-title}

Expand Down Expand Up @@ -56,6 +60,15 @@ would be an intersection of API keys permissions and authenticated user's permis
thereby limiting the access scope for API keys.
The structure of role descriptor is the same as the request for create role API.
For more details, see <<security-api-put-role, create or update roles API>>.
+
--
NOTE: Due to the way in which this permission intersection is calculated, it is not
possible to create an API key that is a child of another API key, unless the derived
key is created without any privileges. In this case, you must explicitly specify a
role descriptor with no privileges. The derived API key can be used for
authentication; it will not have authority to call {es} APIs.

--

`expiration`::
(Optional, string) Expiration time for the API key. By default, API keys never
Expand Down