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

Additional Configuration Parameter for OIDC with Auth0, fix for AD-Schema Import in AD #624

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

fbuchmeier-abi
Copy link

@fbuchmeier-abi fbuchmeier-abi commented Oct 1, 2021

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 of getDomainConfig, otherwise it will fail with the following error:

java.lang.IllegalStateException: attempt to read system scope setting 'Domains ⇨ Site URL' as domain scope
        at password.pwm.config.StoredSettingReader.readSetting(StoredSettingReader.java:309)
        at password.pwm.config.StoredSettingReader.readSettingAsString(StoredSettingReader.java:100)
        at password.pwm.config.DomainConfig.readSettingAsString(DomainConfig.java:153)

(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.

Merge in OSSC/pwm-project-pwm from develop to master

* commit 'c5b6306a0195a71c7714dfc0f946d3cfae861c81':
  fixed "invalid" DN error on importing schema into MS Active Directory
  added missing class
  simplified method
  updated labels
  added option to send either POST or GET requests to oauth userinfo endpoint
  simplified GET requests for userinfo endpoint
  quick fix for GET request on userinfo endpoint
Merge in OSSC/pwm-project-pwm from develop to master

* commit 'e05ab2b2ea599c005b7a5202956c7a26e6e597d9':
  Removed obsolete debug output
  Returning new password as per https://www.pwm-project.org/pwm/public/reference/rest.jsp#rest-setpassword
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant