Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update auth and monitoring templates #480

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions ansible/templates/stacks/auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,25 @@ version: '3.8'
services:

keycloak:
image: jboss/keycloak:latest
image: keycloak/keycloak:latest
restart: always
networks:
- auth_default
- traefik-public
environment:
KEYCLOAK_USER: '{{secret.auth.keycloak.user}}'
KEYCLOAK_PASSWORD: '{{secret.auth.keycloak.password}}'
PROXY_ADDRESS_FORWARDING: 'true'
DB_VENDOR: POSTGRES
DB_ADDR: postgres
DB_DATABASE: keycloak
DB_USER: keycloak
DB_SCHEMA: public
DB_PASSWORD: '{{secret.auth.postgres.password}}'
KEYCLOAK_ADMIN: '{{secret.auth.keycloak.user}}'
KEYCLOAK_ADMIN_PASSWORD: '{{secret.auth.keycloak.password}}'

KC_HOSTNAME: '{{secret.auth.keycloak.host}}'
KC_HOSTNAME_STRICT: 'false'
KC_PROXY: edge
KC_PROXY_ADDRESS_FORWARDING: 'true'
KC_HTTP_ENABLED: 'true'

KC_DB: postgres
KC_DB_URL: jdbc:postgresql://postgres/keycloak
KC_DB_USERNAME: keycloak
KC_DB_PASSWORD: '{{secret.auth.postgres.password}}'
deploy:
placement:
constraints: [node.role == manager]
Expand Down
8 changes: 4 additions & 4 deletions ansible/templates/stacks/monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ services:
GF_AUTH_GENERIC_OAUTH_ALLOW_SIGN_UP: "true"
GF_AUTH_GENERIC_OAUTH_CLIENT_ID: "{{secret.monitoring.grafana.oauth.client_id}}"
GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET: "{{secret.monitoring.grafana.oauth.client_secret}}"
GF_AUTH_GENERIC_OAUTH_SCOPES: profile
GF_AUTH_GENERIC_OAUTH_AUTH_URL: "https://{{secret.monitoring.grafana.oauth.domain}}/auth/realms/Internal/protocol/openid-connect/auth"
GF_AUTH_GENERIC_OAUTH_TOKEN_URL: "https://{{secret.monitoring.grafana.oauth.domain}}/auth/realms/Internal/protocol/openid-connect/token"
GF_AUTH_GENERIC_OAUTH_API_URL: "https://{{secret.monitoring.grafana.oauth.domain}}/auth/realms/Internal/protocol/openid-connect/userinfo"
GF_AUTH_GENERIC_OAUTH_SCOPES: 'openid profile email'
GF_AUTH_GENERIC_OAUTH_AUTH_URL: "https://{{secret.monitoring.grafana.oauth.domain}}/realms/Internal/protocol/openid-connect/auth"
GF_AUTH_GENERIC_OAUTH_TOKEN_URL: "https://{{secret.monitoring.grafana.oauth.domain}}/realms/Internal/protocol/openid-connect/token"
GF_AUTH_GENERIC_OAUTH_API_URL: "https://{{secret.monitoring.grafana.oauth.domain}}/realms/Internal/protocol/openid-connect/userinfo"
GF_AUTH_GENERIC_OAUTH_ROLE_ATTRIBUTE_PATH: "contains(roles[*], 'admin') && 'Admin' || contains(roles[*], 'editor') && 'Editor' || 'Viewer'"
user: "0"
deploy:
Expand Down
Loading