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

Adds optional Keycloak security config #43

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

Conversation

pierre-le-corre
Copy link

Our internal authentication system uses Keycloak, so we need is2 to support it so that we can use it internally.

This adds Keycloak support in the following fashion:

  • if there isn't a keycloak.realm property, everything works as before. All the extra stuff added for Keycloak isn't taken into account (thanks to SpringBoot's @ConditionalOnProperty). The only difference is that the additional dependency (keycloak-spring-boot-starter) in the final jar.
  • if there is a keycloak.realm property, the user authentication is done through Keycloak. Once authenticated, the app uses the email from Principal in the same fashion as before.
  • when the user is first authenticated with Keycloak, if its email is not in the database, a new matching user is created in the database.

I can squash the commits if you need things to be cleaner.

Please tell me if you need more info or have any remarks or doubts.

Pierre and others added 8 commits March 25, 2021 10:08
The app use either the default IS2 configuration or Keycloak.

The decision is automatically made by looking for the "keycloak.realm" property.
If it is absent, the default security configuration is used.
If it is present, Keycloak is used.
@sonarcloud
Copy link

sonarcloud bot commented Apr 28, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 6 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

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.

1 participant