Repository navigation
JSPWIKI-1375 Make the OpenID Connect login work with any OpenID Connect provider - #644
Draft
arturobernalg wants to merge 4 commits into
Draft
arturobernalg wants to merge 4 commits into
arturobernalg wants to merge 4 commits into
Conversation
A new jspwiki-oidc module uses the pac4j filters to send the user to the identity provider and a filter that presents the logged in user to the wiki as a container login. The wiki recognizes the user as authenticated without changes in its authentication code. Work in progress, not ready for review.
…d a test The filters of the proof of concept are commented out in web.xml, as the container managed authentication section is, and the war does not include the module. Adds the ChangeLog entry and a test of the request wrapper.
…onnect module OidcAuthorizer declares that the container handles the login and takes the roles from the property jspwiki.oidc.roles, so Login.jsp and the roles of the identity provider work as with a container login. The logout filter ends the session of the identity provider and returns to the wiki. The war includes the module with the profile oidc. Adds the tests of the authorizer and a description of how to enable it.
…ct provider The login used the Keycloak client of pac4j and its roles generator. It now uses the generic OpenID Connect client, configured with the discovery address of the provider. The claim with the name of the user, the claim with the roles, which may be a dotted path and is read from the profile and from the access token, and a mapping from the values of that claim to roles of the wiki are configurable. The callback address has no parameters, so it can be registered as is in the provider. Adds the tests of the new classes and the description of the configuration for Keycloak, Azure and Google.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The OpenID Connect login of #643 uses the Keycloak client of pac4j and its roles generator, so it works only with Keycloak. This makes it work with any OpenID Connect provider, as Google or Microsoft Entra ID (Azure), which speak standard OpenID Connect.
This depends on #643, so the commits of that PR are included here. The new one is the last: JSPWIKI-1375 Make the OpenID Connect login work with any OpenID Connect provider. When #643 is merged I will rebase this on master.
cc @spyhunter99 @juanpablo-santos
What changes:
I checked it with a real Keycloak used as a generic provider, the wiki with its pages in Tomcat, and two configurations:
I did not try it with Google or Azure themselves, as that needs an application registered in each. The configurations in the README follow what those providers document.