Skip to content
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
18 changes: 17 additions & 1 deletion core/files/configure_misp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,21 @@ set_up_oidc() {
}" > /dev/null
fi

# Set a custom label for the OIDC login button (shown when OIDC_MIXEDAUTH is enabled).
# Enforced on every start: when unset, clear any previous value so MISP falls back to
# its default ("Login with OIDC") instead of keeping a stale label.
if [[ -n "${OIDC_LOGIN_TEXT}" ]]; then
Comment thread
cln-io marked this conversation as resolved.
# JSON-encode the value so labels containing quotes/backslashes don't break the payload
OIDC_LOGIN_TEXT_JSON=$(printf '%s' "${OIDC_LOGIN_TEXT}" | jq -Rs .)
else
OIDC_LOGIN_TEXT_JSON='""'
fi
sudo -u www-data php /var/www/MISP/tests/modify_config.php modify "{
\"OidcAuth\": {
\"login_button_text\": ${OIDC_LOGIN_TEXT_JSON}
}
}" > /dev/null

# Set the custom logout URL for OIDC if it is defined
if [[ -n "${OIDC_LOGOUT_URL}" ]]; then
if [[ "${OIDC_LOGOUT_URL}" == *"?"* ]]; then
Expand Down Expand Up @@ -148,7 +163,8 @@ set_up_oidc() {
\"code_challenge_method\": \"\",
\"roles_property\": \"\",
\"role_mapper\": \"\",
\"default_org\": \"\"
\"default_org\": \"\",
\"login_button_text\": \"\"
}
}" > /dev/null

Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ services:
- "OIDC_ROLES_MAPPING=${OIDC_ROLES_MAPPING}"
- "OIDC_DEFAULT_ORG=${OIDC_DEFAULT_ORG}"
- "OIDC_MIXEDAUTH=${OIDC_MIXEDAUTH}"
- "OIDC_LOGIN_TEXT=${OIDC_LOGIN_TEXT}"
- "OIDC_AUTH_METHOD=${OIDC_AUTH_METHOD}"
- "OIDC_REDIRECT_URI=${OIDC_REDIRECT_URI}"
- "OIDC_SCOPES=${OIDC_SCOPES}"
Expand Down
1 change: 1 addition & 0 deletions template.env
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ SYNCSERVERS_1_PULL_RULES=
# OIDC_ROLES_MAPPING="{\"admin\": 1}"
# OIDC_DEFAULT_ORG=
# OIDC_MIXEDAUTH=true
# OIDC_LOGIN_TEXT="Login with OIDC"
Comment thread
cln-io marked this conversation as resolved.
# OIDC_AUTH_METHOD="client_secret_post"
# OIDC_REDIRECT_URI=
# OIDC_SCOPES="[\"profile\", \"email\"]"
Expand Down