From 139deeb58859cf223197c60daaea6684ecc9503f Mon Sep 17 00:00:00 2001 From: Kipchumba Bett Date: Thu, 19 Dec 2024 10:11:52 +0300 Subject: [PATCH] OZ-573: Remove referencing of env vars declared within same .env file --- .env | 4 +--- docker-compose-bundled-sso.yml.template | 6 +++--- docker-compose-erpnext-sso.yml | 2 +- docker-compose-keycloak.yml | 2 +- docker-compose-odoo-sso.yml | 2 +- docker-compose-senaite-sso.yml | 2 +- 6 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.env b/.env index d9005b5..d05941d 100644 --- a/.env +++ b/.env @@ -193,14 +193,12 @@ ODOO_CLIENT_UUID=70a0e2fd-2bb2-4417-9fc6-22cdca1bb5be ODOO_CLIENT_SECRET=z3epa8rE66tUIZz6 KEYCLOAK_ADMIN_SA_CLIENT_SECRET=5HuMNB6gwHd0fY2L -EIP_CLIENT_SECRET=h9PQzv6zWnVl1yxnhdfZulnW7FPqPlci # # EIP OAuth2 # -OAUTH_ENABLED=${ENABLE_SSO} OAUTH_CLIENT_ID=eip -OAUTH_CLIENT_SECRET=${EIP_CLIENT_SECRET} +OAUTH_CLIENT_SECRET=h9PQzv6zWnVl1yxnhdfZulnW7FPqPlci OAUTH_CLIENT_SCOPE=openid OAUTH_ACCESS_TOKEN_URL=http://keycloak:8080/realms/ozone/protocol/openid-connect/token diff --git a/docker-compose-bundled-sso.yml.template b/docker-compose-bundled-sso.yml.template index 6d89d71..9a6a54d 100644 --- a/docker-compose-bundled-sso.yml.template +++ b/docker-compose-bundled-sso.yml.template @@ -35,7 +35,7 @@ services: SUPERSET_CLIENT_SECRET: \${SUPERSET_CLIENT_SECRET} SUPERSET_CLIENT_UUID: \${SUPERSET_CLIENT_UUID} KEYCLOAK_ADMIN_SA_CLIENT_SECRET: \${KEYCLOAK_ADMIN_SA_CLIENT_SECRET} - EIP_CLIENT_SECRET: \${EIP_CLIENT_SECRET} + EIP_CLIENT_SECRET: \${OAUTH_CLIENT_SECRET} KEYCLOAK_EXTRA_ARGS_PREPENDED: "--spi-login-protocol-openid-connect-legacy-logout-redirect-uri=true" KEYCLOAK_EXTRA_ARGS: " -Dkeycloak.profile.feature.scripts=enabled @@ -81,7 +81,7 @@ services: eip-odoo-openmrs: environment: OAUTH_ACCESS_TOKEN_URL: \${OAUTH_ACCESS_TOKEN_URL} - OAUTH_ENABLED: \${OAUTH_ENABLED} + OAUTH_ENABLED: \${ENABLE_SSO} OAUTH_CLIENT_ID: \${OAUTH_CLIENT_ID} OAUTH_CLIENT_SECRET: \${OAUTH_CLIENT_SECRET} OAUTH_CLIENT_SCOPE: \${OAUTH_CLIENT_SCOPE} @@ -109,7 +109,7 @@ services: eip-openmrs-senaite: environment: OAUTH_ACCESS_TOKEN_URL: \${OAUTH_ACCESS_TOKEN_URL} - OAUTH_ENABLED: \${OAUTH_ENABLED} + OAUTH_ENABLED: \${ENABLE_SSO} OAUTH_CLIENT_ID: \${OAUTH_CLIENT_ID} OAUTH_CLIENT_SECRET: \${OAUTH_CLIENT_SECRET} OAUTH_CLIENT_SCOPE: \${OAUTH_CLIENT_SCOPE} diff --git a/docker-compose-erpnext-sso.yml b/docker-compose-erpnext-sso.yml index c029f00..cdf2eec 100644 --- a/docker-compose-erpnext-sso.yml +++ b/docker-compose-erpnext-sso.yml @@ -1,6 +1,6 @@ x-oauth-variables: &oauth-variables OAUTH_ACCESS_TOKEN_URL: ${OAUTH_ACCESS_TOKEN_URL} - OAUTH_ENABLED: ${OAUTH_ENABLED} + OAUTH_ENABLED: ${ENABLE_SSO} OAUTH_CLIENT_ID: ${OAUTH_CLIENT_ID} OAUTH_CLIENT_SECRET: ${OAUTH_CLIENT_SECRET} OAUTH_CLIENT_SCOPE: ${OAUTH_CLIENT_SCOPE} diff --git a/docker-compose-keycloak.yml b/docker-compose-keycloak.yml index 2de3928..9182f4d 100644 --- a/docker-compose-keycloak.yml +++ b/docker-compose-keycloak.yml @@ -66,7 +66,7 @@ services: - KEYCLOAK_URL=${SERVER_SCHEME}://${KEYCLOAK_HOSTNAME} - KEYCLOAK_INTERNAL_HOST_URL=${KEYCLOAK_INTERNAL_HOST_URL} - KEYCLOAK_ADMIN_SA_CLIENT_SECRET=${KEYCLOAK_ADMIN_SA_CLIENT_SECRET} - - EIP_CLIENT_SECRET=${EIP_CLIENT_SECRET} + - EIP_CLIENT_SECRET=${OAUTH_CLIENT_SECRET} - OPENMRS_PUBLIC_URL=${SERVER_SCHEME}://${O3_HOSTNAME} - OPENMRS_CLIENT_UUID=${OPENMRS_CLIENT_UUID} - OPENMRS_CLIENT_SECRET=${OPENMRS_CLIENT_SECRET} diff --git a/docker-compose-odoo-sso.yml b/docker-compose-odoo-sso.yml index 0f42c71..4f23a05 100644 --- a/docker-compose-odoo-sso.yml +++ b/docker-compose-odoo-sso.yml @@ -6,7 +6,7 @@ services: eip-odoo-openmrs: environment: OAUTH_ACCESS_TOKEN_URL: ${OAUTH_ACCESS_TOKEN_URL} - OAUTH_ENABLED: ${OAUTH_ENABLED} + OAUTH_ENABLED: ${ENABLE_SSO} OAUTH_CLIENT_ID: ${OAUTH_CLIENT_ID} OAUTH_CLIENT_SECRET: ${OAUTH_CLIENT_SECRET} OAUTH_CLIENT_SCOPE: ${OAUTH_CLIENT_SCOPE} diff --git a/docker-compose-senaite-sso.yml b/docker-compose-senaite-sso.yml index 423f5f8..16921d5 100644 --- a/docker-compose-senaite-sso.yml +++ b/docker-compose-senaite-sso.yml @@ -11,7 +11,7 @@ services: eip-openmrs-senaite: environment: OAUTH_ACCESS_TOKEN_URL: ${OAUTH_ACCESS_TOKEN_URL} - OAUTH_ENABLED: ${OAUTH_ENABLED} + OAUTH_ENABLED: ${ENABLE_SSO} OAUTH_CLIENT_ID: ${OAUTH_CLIENT_ID} OAUTH_CLIENT_SECRET: ${OAUTH_CLIENT_SECRET} OAUTH_CLIENT_SCOPE: ${OAUTH_CLIENT_SCOPE}