Interview Prep/Jenkins/Credentials & security

A pentest shows Jenkins is behind a reverse proxy but the "It appears that your reverse proxy set up is broken" warning is shown and some redirects go to `http://`. What do you fix?

IntermediateScenarioCredentials & security
Answer

Situation read → The proxy does not forward the right headers, or the Jenkins URL is wrong.

What I'd do →

  1. Set unclassified.location.url: https://jenkins.example.com/ in JCasC.
  2. Configure the proxy to pass Host, X-Forwarded-Proto: https, X-Forwarded-Port: 443 and X-Forwarded-For, and to proxy WebSocket upgrades.
  3. For nginx: proxy_set_header X-Forwarded-Proto $scheme; and proxy_redirect correct; for ingress-nginx the defaults usually work with the URL set.
  4. Enable HSTS at the proxy.

Why → Jenkins builds absolute URLs from its configured URL and forwarded headers.

Interview tip → Mention WebSocket agents also need upgrade headers through the proxy.

All Jenkins questions Roadmap: Jenkins

More on Credentials & security