Open bytebilly opened 5 years ago
Pinging @elastic/es-security (:Security/Authentication)
cc @cjcenizal @jethr0null
Both approaches have pros and cons.
Maybe worth summarizing them in order to facilitate the discussion and decision in this issue?
It looks like this should have been labelled team-discuss
rather than discuss
. Please change labels again if I'm mistaken.
We can consider the idea to provide a UI to add new API keys to Elasticsearch.
API keys have a
name
attribute that is not enforced to be unique for technical constraints that can be found in https://github.com/elastic/elasticsearch/issues/46646.However, since
name
is the attribute that identifies a specific key from a high-level user perspective, having multiple keys with the same name could lead to confusion, for example when it's time to revoke one of them.In order to increase usability, we can consider to enforce uniqueness of
name
in the UI. It can be done by checking if a key with the same name exists before creating a new one. This will not ensurename
to be unique, but if we make this check on a per-user basis, it is unlikely to happen that the same user is inserting two keys with the samename
before the index is refreshed.There are two possible approaches if there is already a key with the same
name
field: