-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add Keycloak support #44
base: 2.5.x
Are you sure you want to change the base?
Conversation
This commit introduces an OAuth2 test resource module, which would be automatically enabled if the `micronaut-security-oauth2` module is found on classpath. This module currently only defines a single resolver for Keycloak.
@sdelamo I'd be glad to get your feedback on this. Especially, I'm not sure what properties make sense to provide. I wrote a simple test which seems to work fine, but you'd better take a look. The provider is also supposed to provide JWT tokens, but for this I have no idea how to test it. There's a question we must answer: this new oauth test resource module would be added automatically if |
SonarCloud Quality Gate failed. |
Looking at build results, it appears that this module cannot be used with Java 8. This can be an issue with inference, in case a Java 8 app uses Micronaut Security Oauth2. However, there's a workaround which is to disable inference in this case. |
Hi @melix, thank you very much for this module, but I have a question. From the code, it seems it is hardcoded to provider name "keycloak" in the configuration and enabled only for this one provider name. We use custom provider names and multiple providers (all backed by keycloak). Will it be supported in this case? I think it should be more open like datasources. |
I'm missing experience with OAuth2 configuration in general to tell if it's doable or not. Test resources need a way to figure out that it's a keycloak server which needs to be spawned. Currently it uses the |
In my opinion, we should add support to security module. some new property like It is connected to this issue micronaut-projects/micronaut-security#1024 (comment). Maybe we should consider implementing this first and replace existing automatic "guesing" in What do you think @sdelamo? |
This commit introduces an OAuth2 test resource module, which would
be automatically enabled if the
micronaut-security-oauth2
moduleis found on classpath.
This module currently only defines a single resolver for Keycloak.