Description
Context: elastic/kibana#68117 (comment)
Currently every Elasticsearch API call that creates an access token made by Kibana is followed by the request to retrieve full user information (GET /_security/_authenticate
):
/_security/oauth2/token
(Kerberos and Token)/_security/delegate_pki
(PKI)/_security/saml/authenticate
(SAML)/_security/oidc/authenticate
(OIDC)
Even though it's not technically required in some cases today we do this for the consistency sake. But soon we're going to implement features that would require this additional round-trip in all cases, e.g. to limit number of currently active sessions based on various criteria (username+realm or specific role name).
Currently /_security/saml/authenticate
and /_security/oidc/authenticate
return username
, but based on the example above in the near future we may need to know user roles and whatnot.
The question we have is, would it make sense to attach full user info right to the response of the operations that produce access tokens (or at least for some of them)?
@elastic/kibana-security