Skip to content

Can API operations that create access tokens include respective full user info in the response? #59685

Closed
@azasypkin

Description

@azasypkin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions