Remove uniqueness constraint for API key name and make it optional (#47549)

Since we cannot guarantee the uniqueness of the API key `name` this commit removes the constraint and makes this field optional.

Closes #46646
This commit is contained in:
Yogesh Gaikwad 2019-10-12 16:58:39 +11:00 committed by GitHub
parent 1fc7a69038
commit 4ac25f3016
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 60 additions and 113 deletions

View file

@ -12,8 +12,8 @@ API Key can be created using this API.
[id="{upid}-{api}-request"]
==== Create API Key Request
A +{request}+ contains name for the API key,
list of role descriptors to define permissions and
A +{request}+ contains an optional name for the API key,
an optional list of role descriptors to define permissions and
optional expiration for the generated API key.
If expiration is not provided then by default the API
keys do not expire.
@ -37,4 +37,4 @@ expiration.
include-tagged::{doc-tests-file}[{api}-response]
--------------------------------------------------
<1> the API key that can be used to authenticate to Elasticsearch.
<2> expiration if the API keys expire
<2> expiration if the API keys expire