Skip to content

Conversation

@lloydmeta
Copy link
Member

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 >enhancement >non-issue :Security/Security Security issues without another label v7.8.0 v7.8.2 v7.10.0 v7.9.1 :Security/IdentityProvider Identity Provider (SSO) project in X-Pack labels Aug 20, 2020
@lloydmeta lloydmeta requested review from jkakavas and tvernum August 20, 2020 05:42
@lloydmeta lloydmeta self-assigned this Aug 20, 2020
…ulate user

The API key document currently doesn't include the user's full_name or
email attributes.

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 security/API-keys-add-full_name-email-to-doc branch from b620dff to 18fa022 Compare August 20, 2020 05:58
@lloydmeta lloydmeta added v8.0.0 and removed v7.8.0 labels Aug 20, 2020
@lloydmeta lloydmeta marked this pull request as ready for review August 20, 2020 07:40
@elasticmachine
Copy link
Collaborator

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

@elasticmachine elasticmachine added the Team:Security Meta label for security team label Aug 20, 2020
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! Thanks LLoyd. I consider this a bug so I agree it should go in the next patch releases ( 7.8.2, 7.9.1 ) too. I don't see this breaking a client's response, the Authenticate API is supposed to be returning these two fields either way

Signed-off-by: lloydmeta <[email protected]>
@lloydmeta lloydmeta force-pushed the security/API-keys-add-full_name-email-to-doc branch from 135cbc0 to a13a122 Compare August 20, 2020 09:50
@lloydmeta lloydmeta merged commit d135f5d into elastic:master Aug 20, 2020
@lloydmeta lloydmeta deleted the security/API-keys-add-full_name-email-to-doc branch August 20, 2020 11:11
@jkakavas
Copy link
Contributor

@lloydmeta we usually tend to wait for a review from all reviewers that we ask. No big deal though, Tim can always comment and we can adjust if he has any suggestions/objections.

I realize this is not the practice in all repos/teams ,just bringing it up for future reference:)

@lloydmeta
Copy link
Member Author

@lloydmeta we usually tend to wait for a review from all reviewers that we ask. No big deal though, Tim can always comment and we can adjust if he has any suggestions/objections.

I realize this is not the practice in all repos/teams ,just bringing it up for future reference:)

Oh, sorry about that. Thanks for letting me know :) makes sense to me. Will keep that in mind.

Copy link
Contributor

@tvernum tvernum left a comment

Choose a reason for hiding this comment

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

LGTM

@tvernum tvernum removed the v7.8.2 label Aug 21, 2020
@tvernum
Copy link
Contributor

tvernum commented Aug 21, 2020

I dropped 7.8.2. Now that 7.9.0 is released, we don't maintain 7.8 and we don't plan to release a 7.8.2
Backporting to 7.8 is a waste of effort.

@lloydmeta Do you want us to backport this, or do you have it under control?

@lloydmeta
Copy link
Member Author

Thanks @tvernum I'm happy to handle the backporting as well.

lloydmeta added a commit to lloydmeta/elasticsearch that referenced this pull request Aug 21, 2020
…hem 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 added a commit to lloydmeta/elasticsearch that referenced this pull request Aug 21, 2020
…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
Copy link
Member Author

lloydmeta added a commit that referenced this pull request Aug 21, 2020
…hem to populate authing User (#61354) (#61403)

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](#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 added a commit that referenced this pull request Aug 21, 2020
…se them to populate authing User (#61354) (#61404)

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](#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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>enhancement >non-issue :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 v7.10.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants