Repository navigation
Support for fetching user claims from the OIDC UserInfo endpoint (email not present in id_token) #35249
|
Hi everyone, We're running OpenMetadata 2.0.5 (Docker) with a custom OIDC provider (confidential client, authorization code flow) together with LDAP. The problem: Our IdP does not include the Looking at the
We also couldn't find any configuration option for this (e.g. something like Questions:
Happy to open an issue or PR if this direction sounds acceptable. Thanks! |
Replies: 1 comment 1 reply
|
To your first question: no, not in 2.0.x. I couldn't find an existing issue or PR about reading UserInfo either. I'm not a maintainer, so I can't speak for the roadmap. Until something lands, the realistic workaround is on the IdP side: get On the contribution: your design matches how this is normally done, and the handler already has what it needs. The access token from the token response is kept on the credentials (L1131-L1135), so the UserInfo call fits right before the claims map is built. pac4j 6.5.6, which OpenMetadata already depends on, has a reference implementation in |
To your first question: no, not in 2.0.x.
handleCallbackbuilds the claims map from the ID token only and resolves username and email from that map (AuthenticationCodeFlowHandler.java#L550-L556). The only places that readuserinfo_endpointare the config validators (CustomOidcValidator.java#L170, OidcDiscoveryValidator.java#L46), andoidcClientConfig.jsonhas no flag for it. Same onmaintoday. The two symptoms you describe are exactly whatfindEmailFromClaimsdoes: with a mapping it requires a claim containing@or throws, without one it takes the firstjwtPrincipalClaimsmatch and appendsprincipalDomain(SecurityUtil.java#L147-L172).I couldn't find an existing issue or PR about readin…