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 # OIDC
if [[ -n "${CLOUDRON_OIDC_ISSUER:-}" ]]; then 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" echo "=> Ensure OIDC settings"
# CLOUDRON_OIDC_PROVIDER_NAME is not supported # CLOUDRON_OIDC_PROVIDER_NAME is not supported
xmlstarlet ed --inplace \ xmlstarlet ed --inplace \
--update '//properties/entry[@key="openid.clientId"]' -v "${CLOUDRON_OIDC_CLIENT_ID}" \ --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.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.authUrl"]' -v "${CLOUDRON_OIDC_AUTH_ENDPOINT}" \
--update '//properties/entry[@key="openid.tokenUrl"]' -v "${CLOUDRON_OIDC_TOKEN_ENDPOINT}" \ --update '//properties/entry[@key="openid.tokenUrl"]' -v "${CLOUDRON_OIDC_TOKEN_ENDPOINT}" \
--update '//properties/entry[@key="openid.userInfoUrl"]' -v "${CLOUDRON_OIDC_PROFILE_ENDPOINT}" \ --update '//properties/entry[@key="openid.userInfoUrl"]' -v "${CLOUDRON_OIDC_PROFILE_ENDPOINT}" \

View File

@@ -27,7 +27,6 @@
<entry key='openid.clientId'>##CLOUDRON_OIDC_CLIENT_ID##</entry> <entry key='openid.clientId'>##CLOUDRON_OIDC_CLIENT_ID##</entry>
<entry key='openid.clientSecret'>##CLOUDRON_OIDC_CLIENT_SECRET##</entry> <entry key='openid.clientSecret'>##CLOUDRON_OIDC_CLIENT_SECRET##</entry>
<entry key='openid.issuerUrl'>##CLOUDRON_OIDC_ISSUER##</entry>
<entry key='openid.authUrl'>##CLOUDRON_OIDC_AUTH_ENDPOINT##</entry> <entry key='openid.authUrl'>##CLOUDRON_OIDC_AUTH_ENDPOINT##</entry>
<entry key='openid.tokenUrl'>##CLOUDRON_OIDC_TOKEN_ENDPOINT##</entry> <entry key='openid.tokenUrl'>##CLOUDRON_OIDC_TOKEN_ENDPOINT##</entry>
<entry key='openid.userInfoUrl'>##CLOUDRON_OIDC_PROFILE_ENDPOINT##</entry> <entry key='openid.userInfoUrl'>##CLOUDRON_OIDC_PROFILE_ENDPOINT##</entry>