Skip to content

Commit

Permalink
Add OIDC Custom Logout URL (#148)
Browse files Browse the repository at this point in the history
* Add oidc logout url to env and docker image

* Set the custom logout URL if OIDC_LOGOUT_URL is defined

---------

Co-authored-by: diegolamaral <[email protected]>
  • Loading branch information
Diogo-Rego and diegolamaral authored Oct 2, 2024
1 parent beb62e4 commit 26ae2bf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/files/configure_misp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ set_up_oidc() {
}
}" > /dev/null

# Set the custom logout URL for the OIDC plugin only if OIDC_LOGOUT_URL is defined
if [[ -n "${OIDC_LOGOUT_URL}" ]]; then
sudo -u www-data /var/www/MISP/app/Console/cake Admin setSetting -q "Plugin.CustomAuth_custom_logout" "${OIDC_LOGOUT_URL}&post_logout_redirect_uri=${BASE_URL}/users/login"
else
echo "OIDC_LOGOUT_URL is not set"
fi

# Disable password confirmation as stated at https://github.com/MISP/MISP/issues/8116
sudo -u www-data /var/www/MISP/app/Console/cake Admin setSetting -q "Security.require_password_confirmation" false
}
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ services:
- "OIDC_ROLES_PROPERTY=${OIDC_ROLES_PROPERTY}"
- "OIDC_ROLES_MAPPING=${OIDC_ROLES_MAPPING}"
- "OIDC_DEFAULT_ORG=${OIDC_DEFAULT_ORG}"
- "OIDC_LOGOUT_URL=${OIDC_LOGOUT_URL}"
# LDAP authentication settings
- "LDAP_ENABLE=${LDAP_ENABLE}"
- "LDAP_APACHE_ENV=${LDAP_APACHE_ENV}"
Expand Down
1 change: 1 addition & 0 deletions template.env
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ SYNCSERVERS_1_PULL_RULES=
# OIDC_ROLES_PROPERTY="roles"
# OIDC_ROLES_MAPPING="{\"admin\": \"1\"}"
# OIDC_DEFAULT_ORG=
# OIDC_LOGOUT_URL=

# Enable LDAP (using the ApacheSecureAuth component) authentication, according to https://github.com/MISP/MISP/issues/6189
# NOTE: Once you enable LDAP authentication with the ApacheSecureAuth component,
Expand Down

0 comments on commit 26ae2bf

Please sign in to comment.