Skip to content

Commit

Permalink
fix: Fix entrypoint housekeeping api key scope format (#449)
Browse files Browse the repository at this point in the history
  • Loading branch information
lotooo authored Apr 9, 2024
1 parent 8a28715 commit a12f3e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ if [ ! -f "${ALERTA_CONF_FILE}" ]; then
# Add API key to client config, if required
if [ "${AUTH_REQUIRED,,}" == "true" ]; then
echo "# Auth enabled; add admin API key to client configuration."
HOUSEKEEPING_SCOPES="--scope \"read\" --scope \"write:alerts\" --scope \"admin:management\""
HOUSEKEEPING_SCOPES="--scope read --scope write:alerts --scope admin:management"
if grep -qE 'CUSTOMER_VIEWS.*=.*True' ${ALERTA_SVR_CONF_FILE};then
HOUSEKEEPING_SCOPES="--scope \"admin:alerts\" ${HOUSEKEEPING_SCOPES}"
HOUSEKEEPING_SCOPES="--scope admin:alerts ${HOUSEKEEPING_SCOPES}"
fi
export API_KEY=$(alertad key \
--username "${ADMIN_USER}" \
Expand Down

0 comments on commit a12f3e0

Please sign in to comment.