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

OIDC password grant using external IdP with discoveryUrl config #3271

Closed
mikeroda opened this issue Feb 3, 2025 · 1 comment · Fixed by #3280
Closed

OIDC password grant using external IdP with discoveryUrl config #3271

mikeroda opened this issue Feb 3, 2025 · 1 comment · Fixed by #3280

Comments

@mikeroda
Copy link
Contributor

mikeroda commented Feb 3, 2025

This is a regression created by PR #3165. If you have an external IdP and the config contains a discoveryUrl instead of the tokenUrl, you will get an exception:

java.lang.NullPointerException: Cannot invoke "java.net.URL.toString()" because "tokenUrl" is null
    at org.cloudfoundry.identity.uaa.authentication.manager.PasswordGrantAuthenticationManager.oidcPasswordGrant(PasswordGrantAuthenticationManager.java:233)

This is because previously the PasswordGrantAuthenticationManager used the ExternalOAuthProviderConfigurator and the configurator would overlay the tokenUrl by fetching the oidc metadata. But now it does a simple lookup using the IdentityProviderProvisioning which doesn't fetch the oidc metadata.

@strehle
Copy link
Member

strehle commented Feb 6, 2025

@mikeroda should be fixed with #3280

strehle added a commit that referenced this issue Feb 11, 2025
* Fix OIDC discovery update

Issue #3271

* Add tests

* sonar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants