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

OAuth error from IdP if mapped claim is no string #1831

Closed
strehle opened this issue Apr 4, 2022 · 1 comment · Fixed by #1925
Closed

OAuth error from IdP if mapped claim is no string #1831

strehle opened this issue Apr 4, 2022 · 1 comment · Fixed by #1925
Labels
accepted Accepted the issue in_review The PR is currently in review
Milestone

Comments

@strehle
Copy link
Member

strehle commented Apr 4, 2022

What version of UAA are you running?

75.18.0, develop UAA

How are you deploying the UAA?

I am deploying the UAA

  • locally only using gradlew

Created oauth provider in uaa.yml to forward authentication requests to another OIDC provider.
The received id_token is mapped to UAA user.

What did you do?

Exception

There was an error when authenticating against the external identity provider: class java.util.ArrayList cannot be cast to class java.lang.String (java.util.ArrayList and java.lang.String are in module java.base of loader 'bootstrap')

e.g.
image

What did you expect to see? What goal are you trying to achieve with the UAA?

Error handling which describes the problem.

What did you see instead?

Error stack from uaa log
[2022-04-04T11:21:01.081495Z] uaa - 1045980 [http-nio-8080-exec-6] .... ERROR --- ExternalOAuthAuthenticationFilter: ExternalOAuth Authentication exception
org.springframework.security.authentication.InsufficientAuthenticationException: Unable to map email claim
at org.cloudfoundry.identity.uaa.provider.oauth.ExternalOAuthAuthenticationManager.getUser(ExternalOAuthAuthenticationManager.java:358) ~[cloudfoundry-identity-server-0.0.0.jar:?]
at org.cloudfoundry.identity.uaa.provider.oauth.ExternalOAuthAuthenticationManager.getUser(ExternalOAuthAuthenticationManager.java:105) ~[cloudfoundry-identity-server-0.0.0.jar:?]
at org.cloudfoundry.identity.uaa.authentication.manager.ExternalLoginAuthenticationManager.authenticate(ExternalLoginAuthenticationManager.java:119) ~[cloudfoundry-identity-server-0.0.0.jar:?]
at org.cloudfoundry.identity.uaa.provider.oauth.ExternalOAuthAuthenticationFilter.authenticationWasSuccessful(ExternalOAuthAuthenticationFilter.java:111) ~[cloudfoundry-identity-server-0.0.0.jar:?]
at org.cloudfoundry.identity.uaa.provider.oauth.ExternalOAuthAuthenticationFilter.doFilter(ExternalOAuthAuthenticationFilter.java:65) ~[cloudfoundry-identity-server-0.0.0.jar:?]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.6.2.jar:5.6.2]
at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90) ~[spring-security-web-5.6.2.jar:5.6.2]

@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/181771375

The labels on this github issue will be updated when the story is started.

@strehle strehle added this to the 75.21.0 milestone Jun 24, 2022
@strehle strehle linked a pull request Jun 24, 2022 that will close this issue
@strehle strehle added scheduled in_review The PR is currently in review and removed unscheduled labels Jun 25, 2022
Repository owner moved this from Inbox to Done in Foundational Infrastructure Working Group Jun 28, 2022
@cf-gitbot cf-gitbot added delivered accepted Accepted the issue and removed delivered labels Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Accepted the issue in_review The PR is currently in review
Projects
Development

Successfully merging a pull request may close this issue.

2 participants