Running OpenCTI behind a reverse proxy with TLS

Publishing OpenCTI through Nginx or another reverse proxy needs correct websocket handling, context paths, a TLS decision and secure session cookies. This page explains each choice and how to verify it.

On this page

Why teams put OpenCTI behind a reverse proxy with TLS

A platform team that must expose OpenCTI to analysts on a corporate network needs to decide where TLS ends and how the application trusts what reaches it. OpenCTI's own HTTPS settings cover a certificate key and crt, CA certificates for self-signed clients, and a cookie_secure flag for session cookies. A reverse proxy such as Nginx can take on the public-facing TLS work instead, or pass encrypted traffic through to the platform. Either choice is valid, but the decision changes which settings you configure in the platform and which you configure at the proxy, so make it before anyone writes a configuration file.

In practice, most publishing faults sit in the proxy layer rather than in OpenCTI itself. The web application and GraphQL API both depend on long-lived connections for live updates, so the proxy must forward websocket upgrade headers and must not cut idle connections too early. A context path, if you publish OpenCTI under a sub-path instead of a dedicated hostname, adds a second source of breakage because static assets and API calls must resolve under the same prefix. Confirm the exact websocket and path requirements against the configuration documentation for the release you deploy, and test them with a real analyst session rather than only a health check.

The cookie_secure flag is the setting most often left at the wrong value. If TLS terminates at the proxy, the browser still sees HTTPS, so the flag should match what the browser actually receives, and a mismatch can either block sessions or leave cookies sent over plain HTTP. Ask your security team to verify the cookie attributes in the browser after login, and record the proxy configuration under change control so that a later upgrade or certificate renewal does not silently change the trust path.

Which TLS and proxy options fit your environment

This table compares three ways to place TLS in front of OpenCTI: terminating at the proxy, passing encrypted traffic through to OpenCTI's own HTTPS settings, and re-encrypting between the proxy and the platform. Read each row against your internal CA policy and your need to inspect traffic at the edge, and treat the cookie_secure setting as a requirement whenever users reach OpenCTI over HTTPS.

OptionCertificate and CA materialWhen it fitsPoints to confirm
TLS termination at the proxyPublic or internal certificate and key on the proxy; OpenCTI serves plain HTTP on the internal networkProxy is the single place certificates are managed and renewed, and the internal network is segmentedConfirm that traffic between proxy and platform stays on a trusted network and that cookie_secure is set so session cookies are marked secure
TLS passthrough to OpenCTI HTTPS settingsCertificate key and crt configured in OpenCTI; proxy forwards the encrypted stream without decrypting itPolicy requires end-to-end encryption and the proxy must not hold private keysProxy cannot inspect or modify HTTP headers, so confirm your forwarding and websocket needs are met before choosing this
Re-encryption to the platformCertificate on the proxy for clients, plus OpenCTI certificate and key; CA certificates set in OpenCTI for trust of the proxyClients and platform both need encryption, and the proxy must still apply policy or loggingConfirm which CA signs the internal certificate and that the CA certificates setting covers every upstream the proxy uses
Self-signed or internal CA certificatesCA certificates supplied to OpenCTI so it can trust self-signed or privately issued peersLab, air-gapped or private PKI environments where no public CA issues the certificateConfirm the chain is complete and that clients outside the organization are not expected to trust the internal CA
cookie_secure enabledSetting in OpenCTI configuration; requires users to reach the platform over HTTPS for the browser to send the cookieAny deployment where users connect through HTTPS, including proxy terminationConfirm the public address is HTTPS before enabling it, since a plain HTTP path can prevent sign-in

How to configure the proxy for OpenCTI step by step

This sequence takes an OpenCTI platform from a direct HTTP listener to a reverse proxy that serves the UI over HTTPS, passes live updates through, and issues secure session cookies. Each step ends with a check so the team can confirm the previous change worked before moving on.

  1. Confirm the base URL and context path

    The platform administrator records the public address users will type, including scheme, host and any path prefix such as /opencti, and sets the matching application base URL in the platform configuration. The proxy must forward that same path without rewriting it, or links, redirects and API calls will point to addresses that do not resolve. Check: open the platform's internal address and the public address from a workstation and confirm the login page and its asset links use the public host name and the expected path.

  2. Install the certificate and private key

    The infrastructure or security team places the server certificate chain and private key on the proxy host, with permissions limited to the service account that runs the proxy. If the platform itself terminates HTTPS, the key and crt settings in the HTTPS section of the configuration point to the same files, and CA certificates are added when internal clients use self-signed certificates. Confirm the chain is complete and the key matches the certificate before reloading. Check: the proxy configuration test passes and the certificate shown in a browser covers the public host name.

  3. Add the websocket upgrade headers

    The proxy configuration for the OpenCTI location is updated so that connection upgrade requests for websockets are passed to the platform with the HTTP version and Upgrade and Connection headers set, and read timeouts are long enough that idle live-update connections are not dropped. Live updates in the interface depend on this path working, so the setting is applied to the route that serves the application, not only to static files. Check: after reload, the proxy test passes and the browser developer tools show the websocket connection in an open state rather than failing with a 400 or 502 response.

  4. Set the forwarded headers

    The proxy adds headers that tell the platform the original client address, the original host name and the original protocol, such as X-Forwarded-For, X-Forwarded-Proto and X-Forwarded-Host, and the platform is configured to trust only this proxy as the source of those headers. Accepting these headers from arbitrary clients can distort audit logs and authentication decisions, so the trusted proxy list is reviewed with the network team. Check: sign in, then confirm in the platform's activity or audit records that the recorded address and protocol match the client and HTTPS, not the proxy's internal address.

  5. Enable secure session cookies

    The administrator sets the cookie secure flag in the platform configuration so session cookies are sent only over HTTPS, and confirms the public address uses HTTPS before enabling it, since a cookie marked secure will not be returned over plain HTTP. Any HTTP redirect to HTTPS is configured on the proxy so users are not stranded on an address that no longer sets cookies. Check: after sign-in, inspect the session cookie in the browser and confirm it carries the Secure attribute and is set for the public host.

  6. Restart the services and confirm the change set

    The platform and proxy are restarted in a controlled window, in the order the team documented, and the configuration files are compared with the change record so the running state matches what was approved. Restarting the platform without the proxy, or the reverse, can leave stale routes in place, so both are checked after the restart. Check: the platform reports healthy in its own status view, and the proxy access log shows successful responses for the login page and API requests.

  7. Verify login and live updates end to end

    A test account signs in through the public HTTPS address, opens a report or indicator, and makes a small change that another signed-in session can observe, which exercises authentication, the GraphQL API and the websocket path together. The team also tests the HTTP address to confirm it redirects or is closed, and checks that the session expires and that sign-out clears the cookie. Record the results with the configuration version so future upgrades or proxy changes can be compared against a known good state. Check: the login page loads over HTTPS without mixed-content warnings, and the second session shows the change without a manual refresh.

How a browser request reaches OpenCTI through the proxy

The request starts in an analyst's browser on the corporate network and reaches the reverse proxy, which terminates TLS for the client. The proxy then forwards traffic to the OpenCTI platform inside the internal network, and WebSocket upgrades must pass through the same hop without being dropped. The platform sets the session cookie, so check that the cookie_secure flag matches the HTTPS path analysts actually use.

Request path from analyst browser through the proxy to the OpenCTI platform, with the trust boundary marked.

How websocket and context path settings break a proxied OpenCTI

The OpenCTI web application depends on persistent connections from the browser to the platform, so a reverse proxy that handles those connections incorrectly will produce a UI that appears to work but does not stay current. Live updates and some real-time views rely on websocket traffic, which requires the proxy to forward the HTTP Upgrade and Connection headers from the client to the platform. If the proxy drops those headers, or uses HTTP/1.0 to the upstream, the browser falls back or fails silently, and users see pages that load but do not refresh when other analysts change data.

The other common failure is a context path mismatch. If the proxy serves OpenCTI under a sub-path, such as a prefix on the public hostname, but the platform still believes it lives at the root, asset URLs, redirects and websocket endpoints point to paths the proxy does not route. Typical symptoms include a login page that loads without styles, redirect loops after sign-in, or a session that is accepted and then immediately lost. Because these symptoms look like application bugs, teams often lose time debugging the wrong layer.

Before you change anything, confirm the exact header forwarding, base path and public URL settings against the OpenCTI configuration documentation and your own environment. Then test in a non-production instance: open the UI in two browser sessions, make a change in one, and verify it appears in the other without a manual reload. Check the browser developer tools for failed websocket handshakes and confirm the proxy access logs show upgrade requests returning the expected status. Document the working proxy configuration with your deployment so upgrades do not quietly reintroduce the problem.

Security controls to review when publishing OpenCTI

Once OpenCTI is reachable through a reverse proxy, the proxy and the platform share responsibility for who connects, how sessions are protected and what the client address means. The cards below cover the configuration decisions that connect those layers, and each one is worth confirming in your own environment before go-live.

Secure session cookies

Browser sessions depend on cookies that the platform issues. Set the cookie_secure flag in the platform configuration so session cookies are only sent over HTTPS, and confirm the proxy presents HTTPS to users on every path. Then test a login from a clean browser and inspect the cookie attributes in the developer tools. A cookie that arrives without the Secure attribute usually means the setting or the scheme seen by the platform is wrong.

Configuration docs

Restrict who reaches the platform

Publishing the platform on a public address exposes the login page and the GraphQL endpoint to the whole internet. Decide which networks, VPN ranges or identity-aware access layers may reach the hostname, and enforce that at the proxy or the network edge. Keep the message broker, search engine, Redis and object storage off the proxy entirely. Ask your security team to confirm that only the intended paths answer from outside your network.

Trusted forwarded header sources

When the proxy adds forwarded client address headers, the platform will log and may act on whatever address those headers contain. Configure the proxy to overwrite incoming forwarded headers rather than append to them, and limit the platform to trusting only the proxy's own address. Without this, a client can send a spoofed address that appears in audit trails and in any logic that uses the client address.

Certificate key handling

The private key and certificate used for HTTPS are sensitive material. Keep the key readable only by the service account that needs it, store it outside the repository and container images, and document who can rotate it. If the platform terminates TLS itself, the key and certificate settings must match the chain your clients trust. If the proxy terminates TLS, the key stays on the proxy and the platform's internal connection needs its own review.

Proxy access logging

Proxy access logs record requests before they reach the platform, which helps when the platform's own logs are incomplete or when a request never reached the application. Decide where the logs are stored, how long they are kept, and who can read them, because they contain user identifiers, paths and client addresses. Confirm that log rotation runs and that a sample request appears in the log with the expected client address.

Questions teams ask about proxying OpenCTI

How much effort does a reverse proxy setup for OpenCTI take?

The proxy itself is a small part of the work. Most of the effort goes into agreeing the public hostname, certificates, the path OpenCTI is served under, and the websocket and header settings that the web application depends on. Effort rises when the proxy sits in front of several services, when the team must add a load balancer in front of multiple platform nodes, or when security reviewers want evidence for each setting. Ask the implementer to list each setting they will change in the proxy and in the cookie_secure and HTTPS settings of OpenCTI, so you can see the full surface before work starts.

Can our internal team set up the proxy without outside help?

Often yes, if your team already runs Nginx or another reverse proxy in production and has someone comfortable with TLS and DNS. The parts teams most often underestimate are the websocket upgrade path, the context path if OpenCTI is not served from the root, and session cookie behavior after a change of hostname. Consider outside help if no one on the team has verified a websocket connection through a proxy before, or if the setup must pass an internal security review on a fixed date. Either way, document each setting so the next person can reproduce it.

What does the proxy work need from our team?

Plan to provide a few inputs before anyone changes configuration:

  • A DNS name for the OpenCTI hostname and a decision on whether the proxy terminates TLS or passes it through to OpenCTI.
  • A certificate and private key from your certificate authority, plus any CA certificates that self-signed clients need.
  • Network routes from the proxy to the OpenCTI platform nodes, and firewall rules for the ports in use.
  • A test environment that mirrors production hostnames and certificates, so changes can be checked before cutover.

Confirm with your platform owner which of these you already have and who approves certificate issuance.

How long does validation take, and what changes the timeline?

Validation depends on your environment more than on the proxy software. Timing usually changes with the number of hostnames and certificate chains, how quickly your certificate authority issues certificates, whether a change window is required, and how many user groups must test sign-in and live updates. Ask any implementer to tie the validation plan to your change process and to name the checks they will run, such as login through your identity provider, an authenticated GraphQL request, and a live update in the interface. Treat any duration quoted without those inputs as an estimate to confirm.

What drives the cost of a proxy setup up?

Cost follows the number of people and hours needed to design, configure, test and document the change. Costs rise with multiple environments, strict change control, custom certificate chains, several identity providers that need correct callback URLs, and a requirement for evidence that auditors or internal reviewers will read. If you buy outside help, the written scope should list the environments, the proxy product and version, the TLS mode, and the handover deliverables. Ask for these items in any quote so you can compare offers on the same basis. DeployOpen provides a quote from a written scope and does not publish a price list.

Do session cookies need changes when OpenCTI moves behind TLS?

Yes, usually. OpenCTI has a cookie_secure setting that controls whether session cookies are marked secure, so they are sent only over HTTPS. If users reach OpenCTI over HTTPS through the proxy but the platform sees plain HTTP internally, a misconfigured flag can cause sign-in loops or cookies that browsers never send back. Test sign-in from a clean browser session after each change, and confirm with the OpenCTI configuration documentation how your chosen TLS mode interacts with this flag.

Does the proxy change how OpenCTI is upgraded later?

It can. Each upgrade may change how the web application loads or which paths the interface calls, so the proxy configuration should be reviewed with each release. Keep the proxy settings in version control, record which OpenCTI version they were tested against, and add a live-update and sign-in check to your upgrade runbook. Confirm the release notes for your target version before an upgrade window.

How to test the publishing path before analysts depend on it

Test the proxy path as a sequence of checks that an analyst would hit in their first hour, and run the same sequence again before every upgrade. Start with login over HTTPS: open the public hostname, sign in with a local account and with your SSO provider if one is configured, and confirm the browser lands on the OpenCTI home page without redirects to an internal address or a plain HTTP URL. Check that the external hostname and scheme in your OpenCTI configuration match what users type, because mismatches show up here first as broken callbacks from the identity provider.

Next, inspect the cookie attributes in the browser developer tools after login. Confirm the session cookie is marked Secure and HttpOnly, that its domain and path match the hostname and context path you published, and that it is not sent over plain HTTP. Match these results against the cookie_secure setting in your configuration, since a proxy that terminates TLS can make the platform believe it is serving HTTP. Then confirm live updates: open the same investigation in two browser sessions, make a change in one, and watch the other update without a page reload. If updates stall, the websocket upgrade headers in the proxy are the first place to look.

Verify the API path with a GraphQL request sent through the proxy using a token from a test account, and compare the response with one sent directly to the platform inside your network. Then test behavior after a platform restart, a proxy reload and a certificate renewal, because renewal often replaces the chain that clients or the platform trust. Record each run in a short test log: date, OpenCTI version, proxy version, certificate issuer and expiry, the exact checks performed, and pass or fail with evidence. Keep the log with your configuration files so a later upgrade can be retested against the same list. Confirm exact header and configuration requirements with the OpenCTI configuration documentation for your release.

How DeployOpen scopes and delivers OpenCTI proxy and TLS work

DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside the client's own infrastructure. For OpenCTI behind a reverse proxy with TLS, that means agreeing the routing, certificate and cookie decisions in writing before any configuration changes, then testing and handing over the result to your team.

How we scope

  • Confirm the proxy product, the public hostname and any context path the platform will be published under.
  • Decide with your security team whether TLS terminates at the proxy or passes through to OpenCTI.
  • Record certificate sources, internal CA trust needs and secure cookie requirements in the written scope.
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.

How we build

  • Configure proxy routes, websocket upgrade settings and timeouts against your OpenCTI version and URL layout.
  • Set the HTTPS certificate key, certificate and CA settings in OpenCTI's configuration to match your trust model.
  • Enable and verify secure session cookie behavior, then test login, session expiry and real-time UI updates.
  • Test the published path from user networks, including any proxy headers used by your authentication strategy.

How we hand over

  • Deliver a written configuration record covering proxy rules, certificate locations, cookie settings and trusted CAs.
  • Provide a verification checklist your operations team can rerun after certificate renewal or proxy changes.
  • Walk through the design with the engineers who will run the proxy and the OpenCTI platform.
  • Document known limits, such as features that depend on specific proxy headers or websocket paths.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after handover.
  • Retest proxy and TLS settings when you upgrade OpenCTI or change the reverse proxy product.
  • Confirm with your team which certificate renewal and monitoring tasks stay in-house and which move to a retainer.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.