User and operator guide · Deployment
Reverse Proxy And TLS Configuration
On this page
Reference TopologyPublic URL SettingsRequired Header BehaviorHeaders To Strip From Client RequestsTLS RequirementsPublic ListenerUpstream To Atlas GatewayCookie And Session BehaviorWebSocket BehaviorSAML, OIDC, And WebAuthn ConsiderationsSAMLOIDC App LaunchWebAuthnBrowser CAC/PIVNGINX Reference ConfigurationKubernetes Ingress NotesLoad Balancer And WAF NotesValidation ProcedureTroubleshootingDeployment Evidence ChecklistUse this page when Atlas is installed behind an enterprise reverse proxy, load balancer, Kubernetes Ingress, WAF, or service-mesh gateway.
Atlas can serve the browser UI and API directly, but most enterprise deployments place the public hostname at an edge tier and forward to the Atlas gateway. That edge tier becomes part of the authentication boundary. It must preserve the external URL context, protect TLS, pass authentication/session headers, support WebSocket upgrades when enabled, and strip spoofable client-supplied forwarding or identity headers.
|
Important
|
Do not deploy Atlas behind a reverse proxy that rewrites the browser-visible host, scheme, or callback URLs without updating Atlas public URL settings. SAML metadata, SAML SSO, OIDC launch token endpoints, WebAuthn origins, cookies, CORS, HSTS, and audit client-IP evidence all depend on consistent public URL handling. |
Reference Topology
The recommended production topology is:
-
Browser to edge: HTTPS on the public Atlas hostname.
-
Edge to Atlas gateway: HTTPS with certificate validation, preferably mTLS or private network enforcement.
-
Atlas gateway to internal services: the configured Atlas service security model, including TLS/mTLS where enabled.
For non-development environments, Atlas configuration validation requires api_gateway.tls_enabled=true. If the edge terminates browser TLS, keep TLS enabled on the gateway upstream as well unless a formally approved platform boundary documents a different control.
Public URL Settings
Configure Atlas with the browser-visible external origin. Do not use internal service DNS names in public metadata or browser callback settings.
| Setting | Purpose | Required value behind a reverse proxy |
|---|---|---|
|
Fallback public base URL for browser-visible metadata and SAML IdP URLs. |
|
|
Overrides the SAML IdP metadata and SSO base URL. |
|
|
Adds a browser origin for WebAuthn and browser-based validation flows. |
|
|
Overrides the OIDC app launch token endpoint when Host/proxy headers cannot be trusted. |
|
|
CORS/WebSocket allowed browser origins. |
Exact HTTPS origins only, for example |
|
Public URL for the browser CAC/PIV client-certificate listener when enabled. |
HTTPS URL on the certificate-auth hostname or port. |
Production api_gateway.allowed_origins must not contain *, and each origin must use HTTPS. This is enforced by Atlas configuration validation outside development-like environments.
Required Header Behavior
The reverse proxy must set these headers before forwarding to Atlas:
| Header | Required behavior | Why it matters |
|---|---|---|
|
Preserve the original public host, including port when non-default. |
Atlas uses |
|
Set to |
Atlas emits HSTS and marks browser session cookies secure when it sees TLS or |
|
Set to the external client IP chain after stripping any client-supplied value. |
Atlas uses this for authentication audit and rate-limiting context only when the direct peer is a trusted proxy address. |
|
Set to the single external client IP after stripping any client-supplied value. |
Fallback client-IP source for audit/rate limiting when |
|
Set to the public host when the platform standard requires it. |
Useful for diagnostics and downstream integrations, but Atlas primarily relies on |
|
Set to the public port when non-default. |
Helps operators diagnose public URL mismatches. |
|
Preserve the browser-sent origin. |
CORS and WebSocket origin checks depend on the real browser origin. |
|
Do not strip. |
API clients and bearer-token flows require it. |
|
Do not strip. |
Browser sessions, step-up, SSO handoff, and trusted-device flows require cookies. |
|
Do not rewrite |
Atlas deliberately sets browser session cookie security attributes. |
|
Preserve for WebSocket paths. |
Required for |
|
Set to |
Required for WebSocket tunnel establishment. |
Headers To Strip From Client Requests
Before setting trusted proxy headers, the edge must remove any client-supplied version of:
-
Forwarded -
X-Forwarded-For -
X-Forwarded-Host -
X-Forwarded-Port -
X-Forwarded-Proto -
X-Real-IP -
X-Client-Cert -
X-SSL-Client-Cert -
X-Forwarded-Client-Cert -
X-Atlas-User -
X-Atlas-Email -
X-Atlas-Groups -
X-Atlas-Trust-Score
Atlas uses X-Forwarded-For and X-Real-IP only when the direct peer is loopback, private, or link-local. That prevents normal public clients from spoofing forwarded IPs, but the edge must still strip and rewrite forwarding headers so there is exactly one trusted source of client network evidence.
Never pass X-Atlas-* identity headers from the public client side. Those headers are reserved for Atlas-controlled proxy-header application integrations and must be generated only inside a documented trusted proxy boundary.
TLS Requirements
Public Listener
The public reverse-proxy listener must:
-
use a certificate whose SAN covers the public Atlas hostname
-
serve the complete certificate chain
-
redirect HTTP to HTTPS, or block HTTP entirely
-
prefer TLS 1.3
-
disable TLS 1.0 and TLS 1.1
-
allow TLS 1.2 only when the enterprise platform requires it and only with approved AEAD ciphers
-
enable HSTS after certificate and host routing are correct
-
avoid response compression for secrets-bearing API responses unless an enterprise review approves it
Atlas itself emits:
-
Strict-Transport-Security: max-age=31536000; includeSubDomainswhen the request is TLS or hasX-Forwarded-Proto: https -
X-Content-Type-Options: nosniff -
X-Frame-Options: DENY -
Referrer-Policy: strict-origin-when-cross-origin -
Permissions-Policy: geolocation=(), microphone=(), camera=() -
a restrictive Content Security Policy
The edge may add the same security headers, but do not loosen Atlas headers.
Upstream To Atlas Gateway
The upstream connection from the reverse proxy to the Atlas gateway should use HTTPS. The Atlas gateway server is configured with MinVersion: tls.VersionTLS13 when it terminates TLS.
Required upstream controls:
-
validate the gateway certificate chain
-
set SNI to the gateway certificate name when the proxy supports it
-
keep the upstream network private
-
prefer mTLS for edge-to-gateway traffic in enterprise or classified environments
-
do not use
proxy_ssl_verify offoutside local development
If a platform owner terminates TLS at the edge and forwards plaintext to a gateway in the same pod or same host namespace, record the exception, the compensating controls, and the exact network boundary. That exception is not the normal enterprise deployment posture.
Cookie And Session Behavior
Atlas sets session and handoff cookies with HttpOnly and SameSite attributes. Cookie Secure is selected from the request scheme:
-
direct TLS request: secure cookie
-
proxied request with
X-Forwarded-Proto: https: secure cookie -
plaintext request without forwarded HTTPS: non-secure cookie
Therefore, a TLS-terminating reverse proxy must set X-Forwarded-Proto: https on public HTTPS requests. If it does not, sign-in, SAML handoff, step-up, trusted-device, and browser SSO flows may fail or appear insecure.
Do not rewrite cookie paths or domains unless the deployment intentionally hosts Atlas below a path prefix. Path-prefix deployments are not the recommended posture; Atlas should normally be served from the root of its own hostname.
WebSocket Behavior
/ws/trust-scores backs the live Trust Scores dashboard experience: the gateway trust WebSocket bridge turns the Redis trust producers into typed envelopes and streams a live trust topology to connected operators. It is gated on api_gateway.websocket_enabled (package default false; the demo stack sets it true). See operations:trust-scores.html for the operator view.
When the live experience is enabled, the reverse proxy must pass /ws/trust-scores as a WebSocket upgrade:
-
configure
api_gateway.allowed_originswith the exact HTTPS browser origin -
forward
/ws/to the gateway -
use HTTP/1.1 upstream for the WebSocket location
-
preserve
Upgrade -
set
Connection: upgrade -
increase proxy read timeout for long-lived streams
-
preserve
Host,Origin, and forwarding headers
When api_gateway.websocket_enabled is false, the route returns not found; the dashboard still renders its REST-seeded trust topology but receives no live updates. Do not expose a separate unauthenticated WebSocket endpoint at the edge.
SAML, OIDC, And WebAuthn Considerations
SAML
When Atlas acts as a SAML IdP, public metadata and SSO URLs must use the external HTTPS Atlas origin. Set:
ATLAS_PUBLIC_BASE_URL=https://atlas.example.mil
ATLAS_SAML_IDP_BASE_URL=https://atlas.example.mil
Verify:
curl -fsS https://atlas.example.mil/api/v1/sso/saml/<app-id>/metadata \
| grep -E "EntityDescriptor|SingleSignOnService|X509Certificate"
The metadata must not contain internal service names such as api-gateway, Kubernetes service DNS, pod IPs, or localhost.
OIDC App Launch
Atlas builds the OIDC app launch token endpoint from X-Forwarded-Proto and Host unless ATLAS_APP_LAUNCH_TOKEN_ENDPOINT is set. For deterministic deployments, set:
ATLAS_APP_LAUNCH_TOKEN_ENDPOINT=https://atlas.example.mil/api/v1/me/apps/oidc/token
This avoids bad token endpoints when a load balancer rewrites host headers.
WebAuthn
WebAuthn depends on exact browser origins. Set:
ATLAS_BROWSER_BASE_URL=https://atlas.example.mil
ATLAS_PUBLIC_BASE_URL=https://atlas.example.mil
Do not mix http://, internal hostnames, or alternate ports in WebAuthn registration and authentication flows unless those origins are deliberately part of the deployment.
Browser CAC/PIV
Browser CAC/PIV client-certificate authentication uses a dedicated browser-facing listener when enabled:
-
api_gateway.client_certificate_auth.enabled -
api_gateway.client_certificate_auth.browser_listen_addr -
api_gateway.client_certificate_auth.browser_base_url -
api_gateway.client_certificate_auth.trust_bundle_path
If the enterprise reverse proxy terminates client certificates, do not simply forward certificate headers to the normal Atlas listener. Use the dedicated browser CAC listener or a documented mTLS boundary that preserves certificate assurance and prevents header spoofing.
NGINX Reference Configuration
This example serves Atlas at https://atlas.example.mil and forwards to a TLS-enabled Atlas gateway at https://atlas-gateway.internal:8443.
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
server_name atlas.example.mil;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
server_name atlas.example.mil;
ssl_certificate /etc/nginx/tls/atlas.fullchain.pem;
ssl_certificate_key /etc/nginx/tls/atlas.key;
ssl_protocols TLSv1.3 TLSv1.2;
ssl_prefer_server_ciphers off;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
client_max_body_size 1m;
proxy_read_timeout 240s;
proxy_send_timeout 240s;
proxy_connect_timeout 15s;
# Remove spoofable client-supplied forwarding and identity headers.
proxy_set_header Forwarded "";
proxy_set_header X-Forwarded-For "";
proxy_set_header X-Forwarded-Host "";
proxy_set_header X-Forwarded-Port "";
proxy_set_header X-Forwarded-Proto "";
proxy_set_header X-Real-IP "";
proxy_set_header X-Client-Cert "";
proxy_set_header X-SSL-Client-Cert "";
proxy_set_header X-Forwarded-Client-Cert "";
proxy_set_header X-Atlas-User "";
proxy_set_header X-Atlas-Email "";
proxy_set_header X-Atlas-Groups "";
proxy_set_header X-Atlas-Trust-Score "";
location / {
proxy_pass https://atlas-gateway.internal:8443;
proxy_http_version 1.1;
proxy_ssl_server_name on;
proxy_ssl_name atlas-gateway.internal;
proxy_ssl_verify on;
proxy_ssl_trusted_certificate /etc/nginx/trust/atlas-gateway-ca.pem;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port 443;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Origin $http_origin;
proxy_set_header Authorization $http_authorization;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
location /ws/ {
proxy_pass https://atlas-gateway.internal:8443;
proxy_http_version 1.1;
proxy_read_timeout 86400s;
proxy_ssl_server_name on;
proxy_ssl_name atlas-gateway.internal;
proxy_ssl_verify on;
proxy_ssl_trusted_certificate /etc/nginx/trust/atlas-gateway-ca.pem;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port 443;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Origin $http_origin;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade;
}
location = /health {
proxy_pass https://atlas-gateway.internal:8443;
proxy_ssl_server_name on;
proxy_ssl_name atlas-gateway.internal;
proxy_ssl_verify on;
proxy_ssl_trusted_certificate /etc/nginx/trust/atlas-gateway-ca.pem;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto https;
}
}
|
Note
|
NGINX inheritance rules can be subtle. If you define |
Kubernetes Ingress Notes
For Kubernetes, prefer an ingress controller or gateway class that can:
-
terminate public TLS with the enterprise certificate
-
validate HTTPS upstream to the Atlas service
-
strip and reset forwarding headers
-
preserve the external host
-
support WebSocket upgrade
-
set request-body and timeout limits compatible with Atlas
For NGINX Ingress, the annotations normally include:
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
nginx.ingress.kubernetes.io/proxy-read-timeout: "240"
nginx.ingress.kubernetes.io/proxy-send-timeout: "240"
nginx.ingress.kubernetes.io/proxy-body-size: "1m"
Use controller-specific configuration snippets or policy objects to clear spoofable forwarding and identity headers before setting the trusted values. Keep the rendered ingress manifest as deployment evidence.
Load Balancer And WAF Notes
If the edge is an appliance, cloud load balancer, or WAF:
-
preserve the public
Host -
force
X-Forwarded-Proto=https -
append or set
X-Forwarded-Foronly after removing client-supplied values -
forward
Authorization,Cookie,Origin, andUser-Agent -
allow
/api/,/auth/,/graphql,/ws/,/me,/my-apps,/applications,/security,/audit, and static UI routes -
allow SAML HTTP-POST binding payloads to
/api/v1/sso/saml/<app-id>/sso -
do not inject JavaScript into Atlas pages
-
do not rewrite SAML, OIDC, or WebAuthn callback paths
-
disable response transformations that break CSP, SAML form posts, or WebAuthn
Validation Procedure
Run these checks after configuring the reverse proxy.
-
Confirm public health.
curl -fsS https://atlas.example.mil/health curl -fsS https://atlas.example.mil/readiness -
Confirm HSTS appears on the public endpoint.
curl -fsSI https://atlas.example.mil/health | grep -i strict-transport-security -
Confirm cookies are secure after login.
curl -k -i https://atlas.example.mil/auth/health | grep -i set-cookie || trueFor an actual login response,
Set-Cookiemust includeHttpOnly; session and SSO cookies on HTTPS should includeSecure. -
Confirm metadata uses the public host.
curl -fsS https://atlas.example.mil/api/v1/sso/saml/<app-id>/metadata \ | grep -E "atlas.example.mil|SingleSignOnService" -
Confirm CORS origin is exact.
curl -i -X OPTIONS https://atlas.example.mil/api/v1/me \ -H 'Origin: https://atlas.example.mil' \ -H 'Access-Control-Request-Method: GET' \ | grep -i access-control-allow-origin -
Confirm spoofed forwarded headers are not accepted from the public side.
curl -fsSI https://atlas.example.mil/health \ -H 'X-Forwarded-For: 1.2.3.4' \ -H 'X-Forwarded-Proto: http'Then inspect proxy and Atlas logs. The edge should overwrite these values before the request reaches Atlas.
-
If WebSockets are enabled, confirm the upgrade path with the browser validation suite or an approved WebSocket client. The route is
/ws/trust-scores.
Troubleshooting
| Symptom | Likely cause and fix |
|---|---|
Session cookies are missing |
The proxy is forwarding plaintext without |
SAML metadata contains |
|
OIDC app launch token endpoint points to an internal host |
The proxy rewrote |
WebAuthn registration fails with origin/RP errors |
|
CORS preflight does not include |
|
Client IP in audit is the proxy address |
The direct peer is not recognized as trusted, or the proxy did not set |
WebSocket connection fails |
The proxy is not using HTTP/1.1 upstream, did not preserve |
Browser CAC/PIV login fails behind proxy |
Client certificates are being terminated at the wrong listener or converted into spoofable headers. Use the dedicated browser CAC listener and configure |
Deployment Evidence Checklist
Record these artifacts for production or enterprise review:
-
public DNS record and owner
-
public TLS certificate chain and expiration
-
upstream gateway certificate chain and validation mode
-
rendered reverse-proxy or ingress configuration
-
list of stripped inbound headers
-
list of headers set for Atlas upstream requests
-
ATLAS_PUBLIC_BASE_URL,ATLAS_SAML_IDP_BASE_URL,ATLAS_BROWSER_BASE_URL, andATLAS_APP_LAUNCH_TOKEN_ENDPOINTvalues -
api_gateway.allowed_origins -
HSTS validation output
-
SAML metadata public-host validation output
-
WebAuthn registration/authentication validation output when enabled
-
WebSocket validation output when enabled
-
audit sample showing expected client IP and user agent
-
exception record for any plaintext edge-to-gateway hop