You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having issues building and running the sso-kubernetes example from the Camunda community repository. Initially, I tried running the example with Minikube, but encountered issues. Since I don't have much Kubernetes experience, I decided to convert the example to Docker Compose.
After converting to Docker Compose, I encountered the same issues. I believe a working Docker Compose example would not only help me but also others who might face similar challenges.
Error Details:
The errors I am receiving in Camunda containder are:
KEYCLOAK-01011 TOKEN request failed: I/O error on POST request for "http://keycloak-combined:8080/auth/realms/camunda/protocol/openid-connect/token": Connect to http://keycloak-combined:8080 [keycloak-combined/172.18.0.2] failed: Connection refused
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'restApiSecurityConfig': Unsatisfied dependency expressed through field 'clientService': Error creating bean with name 'authorizedClientService' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/client/servlet/OAuth2WebSecurityConfiguration.class]: Unsatisfied dependency expressed through method 'authorizedClientService' parameter 0: Error creating bean with name 'clientRegistrationRepository' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/client/servlet/OAuth2ClientRegistrationRepositoryConfiguration.class]: Failed to instantiate [org.springframework.security.oauth2.client.registration.InMemoryClientRegistrationRepository
Docker Compose Setup:
This is my docker-compose.yaml file:
version: "3.9"
postgres:
image: postgres
environment:
- POSTGRES_DB=camunda
- POSTGRES_USER=camunda
- POSTGRES_PASSWORD=camunda1!
ports:
- "5432:5432"
Observations:
The depends_on directive ensures that Keycloak starts before Camunda, but the connection is still refused.
The Camunda container shuts down after the error, likely due to the unresolved dependency related to restApiSecurityConfig.
Expected Outcome:
I would like help resolving the connection issue between Camunda and Keycloak in the Docker Compose environment. Additionally, guidance on the OAuth2 configuration in the Spring Boot application would be appreciated.
Additional context:
I am having issues building and running the sso-kubernetes example from the Camunda community repository. Initially, I tried running the example with Minikube, but encountered issues. Since I don't have much Kubernetes experience, I decided to convert the example to Docker Compose.
After converting to Docker Compose, I encountered the same issues. I believe a working Docker Compose example would not only help me but also others who might face similar challenges.
Error Details:
The errors I am receiving in Camunda containder are:
KEYCLOAK-01011 TOKEN request failed: I/O error on POST request for "http://keycloak-combined:8080/auth/realms/camunda/protocol/openid-connect/token": Connect to http://keycloak-combined:8080 [keycloak-combined/172.18.0.2] failed: Connection refused
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'restApiSecurityConfig': Unsatisfied dependency expressed through field 'clientService': Error creating bean with name 'authorizedClientService' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/client/servlet/OAuth2WebSecurityConfiguration.class]: Unsatisfied dependency expressed through method 'authorizedClientService' parameter 0: Error creating bean with name 'clientRegistrationRepository' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/client/servlet/OAuth2ClientRegistrationRepositoryConfiguration.class]: Failed to instantiate [org.springframework.security.oauth2.client.registration.InMemoryClientRegistrationRepository
Docker Compose Setup:
This is my docker-compose.yaml file:
version: "3.9"
services:
keycloak-combined:
image: gunnaraccso/keycloak.server:24.0.3
restart: unless-stopped
environment:
TZ: Europe/Berlin
DB_VENDOR: h2
KEYCLOAK_ADMIN: keycloak
KEYCLOAK_ADMIN_PASSWORD: keycloak1!
KC_HTTP_RELATIVE_PATH: /auth
PROXY_ADDRESS_FORWARDING: true
ports:
- "9001:8443"
- "9000:8080"
command:
- start-dev
- --features=admin-fine-grained-authz
camunda:
image: docker.io/gunnaraccso/camunda-showcase-keycloak:7.21.7-SNAPSHOT
environment:
- JDBC_URL=jdbc:postgresql://postgres:5432/camunda
- JDBC_USER=camunda
- JDBC_PASSWORD=camunda1!
- KEYCLOAK_URL_AUTH=http://localhost:9000/auth
- KEYCLOAK_URL_TOKEN=http://keycloak-combined:8080/auth
- KEYCLOAK_URL_PLUGIN=http://keycloak-combined:8080/auth
- KEYCLOAK_CLIENT_ID=camunda-identity-service
- KEYCLOAK_CLIENT_SECRET=0F0yFyCvv2T901fvMSbKlAd7f8QkyxNg
depends_on:
- keycloak-combined
- postgres
postgres:
image: postgres
environment:
- POSTGRES_DB=camunda
- POSTGRES_USER=camunda
- POSTGRES_PASSWORD=camunda1!
ports:
- "5432:5432"
Observations:
The depends_on directive ensures that Keycloak starts before Camunda, but the connection is still refused.
The Camunda container shuts down after the error, likely due to the unresolved dependency related to restApiSecurityConfig.
Expected Outcome:
I would like help resolving the connection issue between Camunda and Keycloak in the Docker Compose environment. Additionally, guidance on the OAuth2 configuration in the Spring Boot application would be appreciated.
Additional context:
Any help would be greatly appreciated!
The text was updated successfully, but these errors were encountered: