Skip to content

Conversation

@lloydmeta
Copy link
Member

@lloydmeta lloydmeta commented Aug 21, 2020

Backport of #61354 to 7.9 branch

The API key document currently doesn't include the user's full_name or email attributes,
and as a result, when those attributes return null when hitting GETing /_security/_authenticate,
and in the SAML response from the IdP Plugin.

This changeset adds those fields to the document and extracts them to fill in the User when
authenticating. They're effectively going to be a snapshot of the User from when the key was
created, but this is in line with roles and metadata as well.

@lloydmeta lloydmeta added :Security/Authentication Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc) :Security/Security Security issues without another label backport Team:Security Meta label for security team v7.9.1 :Security/IdentityProvider Identity Provider (SSO) project in X-Pack labels Aug 21, 2020
@lloydmeta lloydmeta force-pushed the backport-7.9-security/API-keys-add-full_name-email-to-doc branch from da7550c to 4c7a227 Compare August 21, 2020 06:37
…se them to populate authing User (elastic#61354)

The API key document currently doesn't include the user's full_name or email attributes,
and as a result, when those attributes return `null` when hitting `GET`ing  `/_security/_authenticate`,
and in the SAML response from the [IdP Plugin](elastic#54046).

This changeset adds those fields to the document and extracts them to fill in the User when
authenticating. They're effectively going to be a snapshot of the User from when the key was
created, but this is in line with roles and metadata as well.

Signed-off-by: lloydmeta <[email protected]>
@lloydmeta lloydmeta force-pushed the backport-7.9-security/API-keys-add-full_name-email-to-doc branch from 4c7a227 to 51d1ff4 Compare August 21, 2020 06:44
@lloydmeta lloydmeta marked this pull request as ready for review August 21, 2020 07:13
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security (:Security/Authentication)

@lloydmeta lloydmeta requested a review from jkakavas August 21, 2020 08:03
Copy link
Contributor

@jkakavas jkakavas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lloydmeta lloydmeta merged commit 2cf2311 into elastic:7.9 Aug 21, 2020
@lloydmeta lloydmeta deleted the backport-7.9-security/API-keys-add-full_name-email-to-doc branch August 21, 2020 09:32
@lloydmeta lloydmeta self-assigned this Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport :Security/Authentication Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc) :Security/IdentityProvider Identity Provider (SSO) project in X-Pack :Security/Security Security issues without another label Team:Security Meta label for security team v7.9.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants