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

Compatibilty with Keycloak 1.25 #3

Open
djacob65 opened this issue Dec 5, 2024 · 4 comments
Open

Compatibilty with Keycloak 1.25 #3

djacob65 opened this issue Dec 5, 2024 · 4 comments

Comments

@djacob65
Copy link

djacob65 commented Dec 5, 2024

Hi,

I've install the keycloak-orcid extension v 1.3.0.
My Keycloak version is 25.0.6

After creating an entry in my ORCID account (https://orcid.org/developer-tools) and then setting up an Identity Provider based on the ORCID extension in keycloak, I managed to connect to ORCID, then, upon returning, I still get the error message: "an internal server error has occurred" on the login screen.

In the log file, we have :

2024-12-05 13:29:32,472 WARN  [org.keycloak.events] (executor-thread-9) type="REVOKE_GRANT_ERROR", realmId="8dd9d3b8-6350-41c3-b7e8-eeb6a142aabc", realmName="Maggot", clientId="maggot", userId="null", ipAddress="172.20.0.1", error="user_session_not_found", client_auth_method="client-secret"
2024-12-05 13:30:29,732 WARN  [org.keycloak.events] (executor-thread-9) type="REVOKE_GRANT_ERROR", realmId="8dd9d3b8-6350-41c3-b7e8-eeb6a142aabc", realmName="Maggot", clientId="maggot", userId="null", ipAddress="172.20.0.1", error="user_session_not_found", client_auth_method="client-secret"
2024-12-05 13:42:28,246 ERROR [org.keycloak.services.error.KeycloakErrorHandler] (executor-thread-12) Uncaught server error: java.lang.NoSuchMethodError: 'void org.keycloak.broker.provider.BrokeredIdentityContext.<init>(java.lang.String)'
        at org.keycloak.social.orcid.OrcidIdentityProvider.extractIdentityFromProfile(OrcidIdentityProvider.java:46)
        at org.keycloak.social.orcid.OrcidIdentityProvider.getFederatedIdentity(OrcidIdentityProvider.java:84)
        at org.keycloak.broker.oidc.AbstractOAuth2IdentityProvider$Endpoint.authResponse(AbstractOAuth2IdentityProvider.java:557)
        at org.keycloak.broker.oidc.AbstractOAuth2IdentityProvider$Endpoint$quarkusrestinvoker$authResponse_ab908fbdd086ee82e140d8a818c077362a2d04b4.invoke(Unknown Source)
        at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
        at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:141)
        at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:147)
        at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:582)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
        at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
        at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:1583)

See https://wapnmr.fr/maggot/ to login, https://wapnmr.fr/maggot/logout to logout

Thanks for your response.

Cheers,
Daniel

@djacob65
Copy link
Author

djacob65 commented Dec 5, 2024

I would mention that the use of the API in CLI works very well with my access codes (client id + secret) to retrieve the token via https://orcid.org/oauth, then to retrieve information via https://pub.orcid.org/v3.0/. In addition, I put the redirection URL given by the keycloak-orcid module. So we must rule out a configuration error in the ORCID account. I also checked that these are the right codes (client id + secret) entered in keycloak. So we must also rule out a configuration error in keycloak.

Thank you

@djacob65
Copy link
Author

djacob65 commented Dec 6, 2024

Trying to compile from sources based on keycloak 25.0.6, I obtained

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /opt/keycloak-orcid/src/main/java/org/keycloak/social/orcid/OrcidIdentityProvider.java:[46,40] constructor BrokeredIdentityContext in class org.keycloak.broker.provider.BrokeredIdentityContext cannot be applied to given types;
  required: java.lang.String,org.keycloak.models.IdentityProviderModel
  found:    java.lang.String
  reason: actual and formal argument lists differ in length
[ERROR] /opt/keycloak-orcid/src/main/java/org/keycloak/social/orcid/OrcidIdentityProvider.java:[68,13] cannot find symbol
  symbol:   method setIdpConfig(org.keycloak.social.orcid.OrcidIdentityProviderConfig)
  location: variable user of type org.keycloak.broker.provider.BrokeredIdentityContext
[INFO] 2 errors

@corneliusroemer
Copy link

We've also hit this issue after upgrading.

There's a PR that hopefully solves this issue: #2

@cgeorgilakis
Copy link
Collaborator

Thanks @djacob65 for mentioning the issue.
I have created the version 1.4.0 that supports Keycloak over 25.
Unfortunatelly, I can not check login because we do not have a Keycloak instance over 25. ORCID needs https endpoint.
Could you @djacob65 and @corneliusroemer confirm that login is working?

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

No branches or pull requests

3 participants