Configuring Openshift v4 identity provider inside of RHBK 26 leads to "IdentityBrokerException: Could not initialize oAuth metadata" when fetching well known endpoint
Issue
- Getting "Could not initialize oAuth metadata" when trying to configure Openshift v4 identity provider
ERROR [org.keycloak.services.error.KeycloakErrorHandler] (executor-thread-7) Uncaught server error: org.keycloak.broker.provider.IdentityBrokerException: Could not initialize oAuth metadata
at org.keycloak.social.openshift.OpenshiftV4IdentityProvider.getAuthJson(OpenshiftV4IdentityProvider.java:52)
at org.keycloak.social.openshift.OpenshiftV4IdentityProvider.<init>(OpenshiftV4IdentityProvider.java:39)
at org.keycloak.social.openshift.OpenshiftV4IdentityProviderFactory.create(OpenshiftV4IdentityProviderFactory.java:28)
at org.keycloak.social.openshift.OpenshiftV4IdentityProviderFactory.create(OpenshiftV4IdentityProviderFactory.java:16)
at org.keycloak.services.resources.admin.IdentityProviderResource.createIdentityProviderInstance(IdentityProviderResource.java:266)
at org.keycloak.services.resources.admin.IdentityProviderResource.getMapperTypes(IdentityProviderResource.java:284)
at org.keycloak.services.resources.admin.IdentityProviderResource$quarkusrestinvoker$getMapperTypes_0be925c7ba3f074dcae485e618ff57eb387d5324.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:635)
at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:11)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:11)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.RuntimeException: Failed : HTTP error code : 404
at org.keycloak.social.openshift.OpenshiftV4IdentityProvider.getOauthMetadataInputStream(OpenshiftV4IdentityProvider.java:64)
at org.keycloak.social.openshift.OpenshiftV4IdentityProvider.getAuthJson(OpenshiftV4IdentityProvider.java:48)
... 17 more
Environment
- Red Hat build of Keycloak 26
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.