Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map only specific type of OIDC Claims (#58524) #59043

Merged
merged 1 commit into from
Jul 6, 2020

Conversation

ywangd
Copy link
Member

@ywangd ywangd commented Jul 6, 2020

This commit changes our behavior in 2 ways:

  • When mapping claims to user properties ( principal, email, groups,
    name), we only handle string and array of string type. Previously
    we would fail to recognize an array of other types and that would
    cause failures when trying to cast to String.
  • When adding unmapped claims to the user metadata, we only handle
    string, number, boolean and arrays of these. Previously, we would
    fail to recognize an array of other types and that would cause
    failures when attempting to process role mappings.

For user properties that are inherently single valued, like
principal(username) we continue to support arrays of strings where
we select the first one in case this is being depended on by users
but we plan on removing this leniency in the next major release.

This commit changes our behavior in 2 ways:

- When mapping claims to user properties ( principal, email, groups,
name), we only handle string and array of string type. Previously
we would fail to recognize an array of other types and that would
cause failures when trying to cast to String.
- When adding unmapped claims to the user metadata, we only handle
string, number, boolean and arrays of these. Previously, we would
fail to recognize an array of other types and that would cause
failures when attempting to process role mappings.

For user properties that are inherently single valued, like
principal(username) we continue to support arrays of strings where
we select the first one in case this is being depended on by users
but we plan on removing this leniency in the next major release.
@ywangd ywangd added the backport label Jul 6, 2020
@ywangd ywangd merged commit a9151db into elastic:7.x Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants