Additional Configuration Parameter for OIDC with Auth0, fix for AD-Schema Import in AD #624
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
you can find the following changes in this PR:
(1) I've added a new configuration parameter in the OIDC config
HttpMethod
that can be set to POST (default) and GET for the UserInfo endpoint.This is because some OIDC providers like Auth0 require a GET request instead of a POST request to obtain data from the userinfo endpoint (see the User Profile API Doc for more details).
(2) To make OIDC logins work with the refactoring in 2.1.0 branch again, I've also had to update the PwmResponse.java to again work with external redirects. As far as I understand, in 2.0.0 all calls to the redirect response method were made with the baseUrl already added to the redirect target. Now, the baseUrl is conditionally added inside the method, which breaks external redirects like the ones to an OIDC sign in URL. The result in this case was
/pwmhttps://login.auth0...
which will obviously not work. In addition to checking for the presence of the baseUrl, i've also added a check to see it the redirect includes a protocol (http:// or https://) and in this case, skip adding the baseUrl in front of the redirect target.Also, the settings lookup in the OIDC auth had to be updated to
getAppConfig
instead ofgetDomainConfig
, otherwise it will fail with the following error:(3) In addition to this, I've updated the provided AD-schema.ldif example to actually work with Microsoft Active Directory. As far as my tests went, AD fails with a schema validation as long as the leading whitespaces after
dn:
are present.Please let me know if you have any questions or feedback I should include in the PR.
Best Regards,
Florian.