Skip to content

Add Keycloak auth configuration (env + config loading) #11

Description

@JulienLouisSchneider

Issue 1 — Add Keycloak auth configuration (env + config loading)

Description

Add the configuration required for validating Keycloak JWTs in the customer-service. This includes issuer URL and JWKS URL, loaded via the existing config/config.go and exposed to the app.

Checklist

  • Add new env vars to .env.example:

    • KEYCLOAK_ISSUER (ex: http://localhost:8888/realms/dev)

    • KEYCLOAK_JWKS_URL (ex: http://localhost:8888/realms/dev/protocol/openid-connect/certs)

    • (optional) KEYCLOAK_AUDIENCE (if you decide to validate aud)

  • Extend config/config.go to load these variables.

  • Wire config into cmd/main.go so routes/middlewares can access it.

  • Document in backend README how to set these values for local Keycloak.

Acceptance Criteria

  • App boots with KEYCLOAK_ISSUER + KEYCLOAK_JWKS_URL set.

  • App fails fast with a clear error if one of the required vars is missing.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions