wedaa-tech / wda-server

Server Code for WDA/WDI
Apache License 2.0
0 stars 0 forks source link

OAuth2/OIDC Client Registration Error in jhipster-registry.yml without Keycloak #84

Closed anil7620 closed 1 month ago

anil7620 commented 1 month ago

Issue: OAuth2/OIDC Client Registration Error in jhipster-registry.yml without Keycloak

Description:

We are encountering an error when running docker-compose for our Go application with service discovery using jhipster-registry.yml. The error is related to OAuth2/OIDC client registration, attempting to connect to Keycloak at http://localhost:9080/auth/realms/jhipster, which is not part of our setup.

Steps to Reproduce:

  1. Create a Go application with service discovery in canvas(dont add Keycloak).
  2. Run docker-compose with jhipster-registry.yml in go->appname->docker folder.
  3. We Encounter OAuth2/Keycloak connection error.

Observed Behavior:

The app tries to connect to Keycloak even though we are not using it, causing the error.

Expected Behavior:

jhipster-registry.yml should not include Keycloak/OAuth2 code if Keycloak is not required.

Temporary Fix:

Removing Keycloak/OAuth2-related code from SPRING_PROFILES_ACTIVE allows the app to run.

Suggested Fix:

Make Keycloak and OAuth2 configurations conditional based on project requirements.