mirror of https://github.com/MISP/misp-docker
Add option to configure proxy using environment vars (#69)
Co-authored-by: Thibault Van Win <thibault.van.win@axsguard.com>pull/70/head
parent
d56c893f4d
commit
76fadc5496
|
@ -201,6 +201,21 @@ set_up_aad() {
|
||||||
sudo -u www-data /var/www/MISP/app/Console/cake Admin setSetting -q "Security.require_password_confirmation" false
|
sudo -u www-data /var/www/MISP/app/Console/cake Admin setSetting -q "Security.require_password_confirmation" false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_up_proxy() {
|
||||||
|
if [[ "$PROXY_ENABLE" != "true" ]]; then
|
||||||
|
echo "... Proxy disabled"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "... configuring proxy settings"
|
||||||
|
|
||||||
|
sudo -u www-data /var/www/MISP/app/Console/cake Admin setSetting -q "Proxy.host" "$PROXY_HOST"
|
||||||
|
sudo -u www-data /var/www/MISP/app/Console/cake Admin setSetting -q "Proxy.port" "$PROXY_PORT"
|
||||||
|
sudo -u www-data /var/www/MISP/app/Console/cake Admin setSetting -q "Proxy.method" "$PROXY_METHOD"
|
||||||
|
sudo -u www-data /var/www/MISP/app/Console/cake Admin setSetting -q "Proxy.user" "$PROXY_USER"
|
||||||
|
sudo -u www-data /var/www/MISP/app/Console/cake Admin setSetting -q "Proxy.password" "$PROXY_PASSWORD"
|
||||||
|
}
|
||||||
|
|
||||||
apply_updates() {
|
apply_updates() {
|
||||||
# Run updates (strip colors since output might end up in a log)
|
# Run updates (strip colors since output might end up in a log)
|
||||||
sudo -u www-data /var/www/MISP/app/Console/cake Admin runUpdates | sed -r "s/[[:cntrl:]]\[[0-9]{1,3}m//g"
|
sudo -u www-data /var/www/MISP/app/Console/cake Admin runUpdates | sed -r "s/[[:cntrl:]]\[[0-9]{1,3}m//g"
|
||||||
|
@ -450,5 +465,7 @@ echo "MISP | Set Up LDAP ..." && set_up_ldap
|
||||||
|
|
||||||
echo "MISP | Set Up AAD ..." && set_up_aad
|
echo "MISP | Set Up AAD ..." && set_up_aad
|
||||||
|
|
||||||
|
echo "MISP | Set Up Proxy ..." && set_up_proxy
|
||||||
|
|
||||||
echo "MISP | Mark instance live"
|
echo "MISP | Mark instance live"
|
||||||
sudo -u www-data /var/www/MISP/app/Console/cake Admin live 1
|
sudo -u www-data /var/www/MISP/app/Console/cake Admin live 1
|
|
@ -130,6 +130,12 @@ services:
|
||||||
- "AAD_MISP_ORGADMIN=${AAD_MISP_ORGADMIN}"
|
- "AAD_MISP_ORGADMIN=${AAD_MISP_ORGADMIN}"
|
||||||
- "AAD_MISP_SITEADMIN=${AAD_MISP_SITEADMIN}"
|
- "AAD_MISP_SITEADMIN=${AAD_MISP_SITEADMIN}"
|
||||||
- "AAD_CHECK_GROUPS=${AAD_CHECK_GROUPS}"
|
- "AAD_CHECK_GROUPS=${AAD_CHECK_GROUPS}"
|
||||||
|
# Proxy settings
|
||||||
|
- "PROXY_HOST=${PROXY_HOST}"
|
||||||
|
- "PROXY_PORT=${PROXY_PORT}"
|
||||||
|
- "PROXY_METHOD=${PROXY_METHOD}"
|
||||||
|
- "PROXY_USER=${PROXY_USER}"
|
||||||
|
- "PROXY_PASSWORD=${PROXY_PASSWORD}"
|
||||||
# sync server settings (see https://www.misp-project.org/openapi/#tag/Servers for more options)
|
# sync server settings (see https://www.misp-project.org/openapi/#tag/Servers for more options)
|
||||||
- "SYNCSERVERS=${SYNCSERVERS}"
|
- "SYNCSERVERS=${SYNCSERVERS}"
|
||||||
- |
|
- |
|
||||||
|
|
|
@ -134,3 +134,11 @@ SYNCSERVERS_1_KEY=
|
||||||
# AAD_MISP_ORGADMIN="Misp Org Admins"
|
# AAD_MISP_ORGADMIN="Misp Org Admins"
|
||||||
# AAD_MISP_SITEADMIN="Misp Site Admins"
|
# AAD_MISP_SITEADMIN="Misp Site Admins"
|
||||||
# AAD_CHECK_GROUPS=false
|
# AAD_CHECK_GROUPS=false
|
||||||
|
|
||||||
|
# Enable the use of a Proxy server
|
||||||
|
# PROXY_ENABLE=true
|
||||||
|
# PROXY_HOST=
|
||||||
|
# PROXY_PORT=
|
||||||
|
# PROXY_METHOD=
|
||||||
|
# PROXY_USER=
|
||||||
|
# PROXY_PASSWORD=
|
||||||
|
|
Loading…
Reference in New Issue