anthony44
anthony44

Reputation: 347

google-cloud-run quarkus Keyloack

I deploy Keycloak under GCE. I succesfully reach the /auth url. Now I try to deploy a secured microservice under cloud run. This microservice must communicate with keycloak to check authentification This microservice is a quarkus application. Properties are :

# Configuration file
quarkus.oidc.auth-server-url=https://[url]:[port]/auth/realms/quarkus
quarkus.oidc.client-id=backend-service
quarkus.oidc.credentials.secret=secret
quarkus.http.cors=true

# Enable Policy Enforcement
quarkus.keycloak.policy-enforcer.enable=true

# Disables policy enforcement for a path
quarkus.keycloak.policy-enforcer.paths.1.path=/api/public
quarkus.keycloak.policy-enforcer.paths.1.enforcement-mode=DISABLED

At the last step, when cloud build have to deploy and run the native image, i get an error :

Caused by: io.quarkus.oidc.OIDCException: OIDC server is not available at the 'quarkus.oidc.auth-server-url' URL. Please make sure it is correct. Note it has to end with a realm value if you work with Keycloak, for example: 'https://localhost:8180/auth/realms/quarkus'

Can someone can help me ?

Thanks

Upvotes: 0

Views: 582

Answers (1)

anthony44
anthony44

Reputation: 347

Fix this issue by updating https://[url]:[port]/auth/realms/quarkus to https://[url]/auth/realms/quarkus. No port value !

Upvotes: 1

Related Questions