Sign-in Fails Because the Pro Settings Are Missing (Pro)
On DefectDojo 3.4.100 and later, the login page shows:
The login service is not responding correctly. Reload the page, or contact an administrator if this continues.and a sign-in through /login?force_login_form fails with:
Sign in did not complete because the login service sent an unexpected response. Please try again, or contact an administrator if this continues.From DefectDojo 3.2.201 through 3.4.0, the login page shows only the logo and footer, and a sign-in through /login?force_login_form fails with:
Sign in failed (HTTP 200). Please try again, or contact your administrator if this continues.Releases before 3.2.201 show no message at all: the Login button appears to do nothing.
In every version, the browser’s Network tab shows each request to /api/vue/ answered with a 302 redirect to /login?next=/api/vue/..., for example /api/vue/auth/login/config/ redirected to /login?next=/api/vue/auth/login/config/.
Cause
The Pro settings file, pro_settings.py, is not loaded. DefectDojo loads it only if it exists and starts without it, as the Open Source application. The Pro API under /api/vue/ then needs a signed-in session like any other page, so every anonymous request to it, including the login form’s own requests, is redirected to /login. The login page gets an HTML page where it expected JSON, and reports the unexpected response.
On Docker Compose the file is customizations/pro_settings.py under the install directory (/opt/dojo/customizations/pro_settings.py by default). It goes missing when an air-gapped install skips copying it from the settings image, or when the customizations directory is replaced or restored without it. The Helm chart mounts the file itself, so on Kubernetes this symptom means the chart’s settings were overridden.
Confirm
On the Docker Compose host:
ls -l /opt/dojo/customizations/pro_settings.pyFrom any machine that reaches DefectDojo, an anonymous request to the login configuration shows the redirect:
curl -sk -o /dev/null -w '%{http_code} %{redirect_url}\n' https://defectdojo.example.com/api/vue/auth/login/config/A working instance answers 200 with no redirect. An instance without the Pro settings answers 302 and names /login?next=/api/vue/auth/login/config/.
Fix
Copy the pro_settings.py that matches the running DefectDojo version from the settings image. Use the version you run in place of x.y.z:
SETTINGS_IMAGE="us-south1-docker.pkg.dev/defectdojo-container-registry/dojo-pro/settings:x.y.z"
docker pull "$SETTINGS_IMAGE"
docker create --name settings_image "$SETTINGS_IMAGE"
sudo docker cp settings_image:/settings/. /opt/dojo/customizations/
docker rm settings_image
ls -l /opt/dojo/customizations/pro_settings.py
sudo -E dojo-compose-cli app restartOn an air-gapped host, pull the image on the staging host and carry the file over, as in step 3 of the air-gapped installation. Never copy a pro_settings.py from another version: see Settings files and upgrades.