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
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ docker compose version
- `docker compose pull` if you want to use pre-built images or `docker compose build` if you want to build your own (see the [Troubleshooting](#troubleshooting) section in case of errors)
- `docker compose up`
- Add `-d` to run the services in the background
- Login to `https://localhost`
- Login to `http://localhost`
- User: `admin@admin.test`
- Password: `admin`

Expand Down Expand Up @@ -366,8 +366,12 @@ This improves security and scalability of the front-facing NGINX server but lead
| | |
| `DISABLE_SSL_REDIRECT` | Removed entirely, SSL is auto-detected via cert presence |

**Base URL:** The BASE_URL variable is now mandatory because the SSL logic is changed (see below). Please make sure it is in your environment.

**TLS/SSL:** The existing `./ssl` volume mount from `misp-core` is moved to the `misp-nginx` container, so existing certificates keep working.

**Certificates:** SSL is disabled if certificates are missing, but you can generate self-signed certificates with the following command: `mkdir -p ./ssl/ && openssl req -x509 -subj '/CN=localhost' -nodes -newkey rsa:4096 -keyout ssl/key.pem -out ssl/cert.pem -days 365 -addext "subjectAltName = DNS:localhost, IP:127.0.0.1, IP:::1"`

**GPG key delivery:** `gpg.asc` is now served via `misp-nginx`, which proxies the request through to `misp-core` (PHP-FPM) rather than serving a static file from the webroot path.

**Kubernetes/Helm:** manifests have been updated for the new two-container topology; if you deploy via Helm/Kubernetes, review the updated chart before upgrading.
Expand Down
11 changes: 1 addition & 10 deletions core/files/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ if [ "$ENABLE_REDIS_EMPTY_PASSWORD" = "true" ]; then
else
export REDIS_PASSWORD=${REDIS_PASSWORD:-redispassword}
fi
export BASE_URL=${BASE_URL:-https://localhost}
export BASE_URL=${BASE_URL}
export DISABLE_IPV6=${DISABLE_IPV6:-false}
export DISABLE_SSL_REDIRECT=${DISABLE_SSL_REDIRECT:-false}
export DISABLE_CA_REFRESH=${DISABLE_CA_REFRESH:-false}
export SMTP_FQDN=${SMTP_FQDN:-mail}
export SMTP_PORT=${SMTP_PORT:-25}
Expand Down Expand Up @@ -70,10 +69,6 @@ export PROXY_ENABLE=${PROXY_ENABLE:-false}
export DEBUG=${DEBUG:-0}
export ENABLE_THEMES=${ENABLE_THEMES:-false}

export FASTCGI_READ_TIMEOUT=${FASTCGI_READ_TIMEOUT:-300s}
export FASTCGI_SEND_TIMEOUT=${FASTCGI_SEND_TIMEOUT:-300s}
export FASTCGI_CONNECT_TIMEOUT=${FASTCGI_CONNECT_TIMEOUT:-300s}

export PHP_LISTEN_FPM=true
export PHP_FCGI_CHILDREN=${PHP_FCGI_CHILDREN:-5}
export PHP_FCGI_START_SERVERS=${PHP_FCGI_START_SERVERS:-2}
Expand All @@ -98,10 +93,6 @@ export PHP_SESSION_COOKIE_SAMESITE=${PHP_SESSION_COOKIE_SAMESITE:-Lax}

export TZ=${TZ:-UTC}

export NGINX_X_FORWARDED_FOR=${NGINX_X_FORWARDED_FOR:-false}
export NGINX_SET_REAL_IP_FROM=${NGINX_SET_REAL_IP_FROM}
export NGINX_CLIENT_MAX_BODY_SIZE=${NGINX_CLIENT_MAX_BODY_SIZE:-50M}

export STUNNEL=${STUNNEL:-false}
export STUNNEL_CONFIG=${STUNNEL_CONFIG}

Expand Down
7 changes: 3 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ services:
interval: 2s
timeout: 1s
retries: 3
start_period: 30s
start_period: 60s
start_interval: 30s
expose:
- 9002
Expand All @@ -139,14 +139,13 @@ services:
# mount custom ca root certificates
# - "./rootca.pem:/usr/local/share/ca-certificates/rootca.crt:Z"
environment:
- "BASE_URL=${BASE_URL}"
- "BASE_URL=${BASE_URL:?The BASE_URL variable is now mandatory because the SSL logic is changed, see README.md for instructions.}"
- "CRON_USER_ID=${CRON_USER_ID}"
- "CRON_PULLALL=${CRON_PULLALL}"
- "CRON_PUSHALL=${CRON_PUSHALL}"
- "FETCH_FEED_INTERVAL=${FETCH_FEED_INTERVAL}"
- "CACHE_FEED_INTERVAL=${CACHE_FEED_INTERVAL}"
- "DISABLE_IPV6=${DISABLE_IPV6}"
- "DISABLE_SSL_REDIRECT=${DISABLE_SSL_REDIRECT}"
- "ENABLE_DB_SETTINGS=${ENABLE_DB_SETTINGS}"
- "AUTH_ENFORCED=${AUTH_ENFORCED}"
- "ENABLE_BACKGROUND_UPDATES=${ENABLE_BACKGROUND_UPDATES}"
Expand Down Expand Up @@ -357,7 +356,7 @@ services:
- ALL
environment:
- "TZ=${TZ}"
- "BASE_URL=${BASE_URL}"
- "BASE_URL=${BASE_URL:?The BASE_URL variable is now mandatory because the SSL logic is changed, see README.md for instructions.}"
- "DISABLE_IPV6=${DISABLE_IPV6}"
# NGINX settings
- "NGINX_X_FORWARDED_FOR=${NGINX_X_FORWARDED_FOR}"
Expand Down
2 changes: 1 addition & 1 deletion experimental/podman-systemd/misp-core.container
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Volume=misp-core_gpg.volume:/var/www/MISP/.gnupg/
Volume=misp-core_certs.volume:/etc/nginx/certs/
Volume=misp-core_logs.volume:/var/www/MISP/app/tmp/logs/
EnvironmentFile=misp.env
HealthCmd=curl -ks ${BASE_URL:-https://localhost}/users/heartbeat > /dev/null || exit 1
HealthCmd=curl -ks ${BASE_URL:-http://localhost}/users/heartbeat > /dev/null || exit 1
HealthInterval=2s
HealthTimeout=1s
HealthRetries=3
Expand Down
8 changes: 4 additions & 4 deletions kubernetes/helm-chart/files/custom/customize_misp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ echo "Starting custom MISP configuration..."
echo "Waiting for MISP to be ready..."

# First check basic HTTP response
while ! curl -s -k "${BASE_URL:-https://localhost}/users/heartbeat" > /dev/null; do
while ! curl -s -k "${BASE_URL:-http://localhost}/users/heartbeat" > /dev/null; do
echo "Waiting for MISP HTTP response..."
sleep 10
done
Expand Down Expand Up @@ -55,9 +55,9 @@ set_misp_setting() {
local setting_name="$1"
local setting_value="$2"
local description="$3"

echo "Setting ${description}: ${setting_name}=${setting_value}"

# Use cake command (should work now since MISP is fully ready)
if ./app/Console/cake Admin setSetting "${setting_name}" "${setting_value}"; then
echo "✓ Successfully set ${setting_name} via cake command"
Expand Down Expand Up @@ -111,4 +111,4 @@ echo "MISP | Configure background jobs ..." && configure_background_jobs
echo "MISP | Restarting workers ..." && supervisorctl -u "${SUPERVISOR_USERNAME}" -p "${SUPERVISOR_PASSWORD}" restart misp-workers:*
# echo "MISP | Run custom Python scripts ..." && run_custom_python_scripts

echo "Custom MISP configuration completed successfully!"
echo "Custom MISP configuration completed successfully!"
2 changes: 1 addition & 1 deletion nginx/files/00-misp.envsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

export TZ="${TZ:-UTC}"
export BASE_URL="${BASE_URL:-https://localhost}"
export BASE_URL="${BASE_URL}"
export DISABLE_IPV6="${DISABLE_IPV6:-false}"

export NGINX_X_FORWARDED_FOR="${NGINX_X_FORWARDED_FOR:-false}"
Expand Down
6 changes: 3 additions & 3 deletions template.env
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ ADMIN_PASSWORD=
GPG_PASSPHRASE=
# defaults to 1 (the admin user)
CRON_USER_ID=
# defaults to 'https://localhost'
# note: if you are exposing MISP on a non-standard port (i.e., the port is part of the URL you would use to access it, e.g., https://192.168.0.1:4433) you need to include the port in the BASE_URL variable
BASE_URL=
# defaults to 'http://localhost'
# note: if you are exposing MISP on a non-standard port (i.e., the port is part of the URL you would use to access it, e.g., http://192.168.0.1:4433) you need to include the port in the BASE_URL variable
BASE_URL=http://localhost
# NGINX_HTTP_PORT=80
# NGINX_HTTPS_PORT=443
# store settings in db except those that must stay in config.php. true/false, defaults to false
Expand Down