Skip to content

Commit d99aceb

Browse files
bizybotYogesh Gaikwad
authored andcommitted
Enhance docs for create api keys created when role descriptor not specified (#46897)
This commit adds the documentation to point the user that when one creates API keys with no role descriptor specified then that API key will have a point in time snapshot of user permissions. Closes#46876
1 parent 85ed456 commit d99aceb

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

x-pack/docs/en/rest-api/security/create-api-keys.asciidoc

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,15 @@ The following parameters can be specified in the body of a POST or PUT request:
3737
`name`::
3838
(string) Specifies the name for this API key.
3939

40-
`role_descriptors` (optional)::
41-
(array-of-role-descriptor) An array of role descriptors for this API key. This
42-
parameter is optional. When it is not specified or is an empty array, then the API key will have
43-
the permissions of the authenticated user. If you supply role descriptors, they must
44-
be a subset of the authenticated user's permissions. The structure of role descriptor is the
45-
same as the request for create role API. For more details, see
46-
<<security-api-roles,role management APIs>>.
40+
`role_descriptors`::
41+
(Optional, array-of-role-descriptor) An array of role descriptors for this API
42+
key. This parameter is optional. When it is not specified or is an empty array,
43+
then the API key will have a _point in time snapshot of permissions of the
44+
authenticated user_. If you supply role descriptors then the resultant permissions
45+
would be an intersection of API keys permissions and authenticated user's permissions
46+
thereby limiting the access scope for API keys.
47+
The structure of role descriptor is the same as the request for create role API.
48+
For more details, see <<security-api-roles,role management APIs>>.
4749

4850
`expiration`::
4951
(string) Optional expiration time for the API key. By default, API keys never expire.

0 commit comments

Comments
 (0)