OIDC config fixed

This commit is contained in:
Vladimir D
2025-05-27 12:52:55 +04:00
parent 56d4cee9c8
commit 056b8e6e42
2 changed files with 3 additions and 2 deletions

View File

@@ -55,12 +55,14 @@ xmlstarlet ed --inplace --update '//properties/entry[@key="web.url"]' -v "${CLOU
# OIDC
if [[ -n "${CLOUDRON_OIDC_ISSUER:-}" ]]; then
# update config file (to be removed on the next release)
sed -e 's/^.*openid.issuerUrl.*$//g' -i /app/data/traccar.xml
echo "=> Ensure OIDC settings"
# CLOUDRON_OIDC_PROVIDER_NAME is not supported
xmlstarlet ed --inplace \
--update '//properties/entry[@key="openid.clientId"]' -v "${CLOUDRON_OIDC_CLIENT_ID}" \
--update '//properties/entry[@key="openid.clientSecret"]' -v "${CLOUDRON_OIDC_CLIENT_SECRET}" \
--update '//properties/entry[@key="openid.issuerUrl"]' -v "${CLOUDRON_OIDC_ISSUER}" \
--update '//properties/entry[@key="openid.authUrl"]' -v "${CLOUDRON_OIDC_AUTH_ENDPOINT}" \
--update '//properties/entry[@key="openid.tokenUrl"]' -v "${CLOUDRON_OIDC_TOKEN_ENDPOINT}" \
--update '//properties/entry[@key="openid.userInfoUrl"]' -v "${CLOUDRON_OIDC_PROFILE_ENDPOINT}" \