Security hardening
The defensive layers the app applies out of the box, and what each leaves to you. The settings named here are described in CONFIGURATION.md; what the app stores and logs about callers is in PRIVACY.md.
-
Security headers (
Content-Security-Policy,X-Content-Type-Options,X-Frame-Options,Referrer-Policy). Everything the page loads or connects to (the Debug pane’s websocket included) is same-origin, so the CSP allows nothing else. The policy is:default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline';font-src 'self'; img-src 'self' data:; connect-src 'self'; object-src 'none';base-uri 'self'; form-action 'self'; frame-ancestors 'none'script-src 'self'runs only script files this app serves: no inline<script>, noonclick=-style handler, nojavascript:URL, noeval. No page carries any: the editor’s code is served from/static, and the data a page needs (the flow, for the editor) travels in a<script type="application/json">block, which the browser never executes. So text that gets into a page (a flow’s description, a component’s prompt) can’t run as script there even if its escaping were ever wrong, and couldn’t send what it read anywhere but this app.style-srckeeps'unsafe-inline'because the in-browser Tailwind build writes its styles at runtime; injected CSS can restyle a page, not run script. A proxy in front of the app that adds a CSP of its own must not loosen this one, and one that injects a script (analytics, a “you are on staging” banner) needs it served as a file, or the browser refuses it. Script URLs carry a?v=content hash, so a browser never runs a cached editor from a previous release. -
Request size limit: bodies over
MAX_REQUEST_BYTES(1 MiB) are rejected with413. -
Rate limiting: per-IP
RATE_LIMIT_PER_MINUTEon the UI/API (webhooks and/healthexempt). This is a per-process first line of defence; for cross-instance limits and webhook-flood protection, front the instance with a gateway (the platform layer). -
Global error handler: unhandled exceptions are logged server-side and return a generic error (never a stack trace).
-
Authentication: session login (
AUTH_ADMIN_*, plus an optional view-onlyAUTH_READONLY_*account) for standalone use, or delegated auth (TRUSTED_USER_HEADER) where a fronting gateway authenticates and passes the identity in a header (the seam a hosting platform uses). Trusted-header mode is safe only when the gateway is the sole route to the app and strips the header inbound; or, better, also setTRUSTED_USER_HEADER_SECRET: the identity header is then honoured only on a request carrying the same value inX-Trusted-Proxy-Secret, which the gateway adds (and the app strips before anything else sees it). -
Sign-in bounds: a session ends after
SESSION_IDLE_TIMEOUTseconds without a request (the cookie’sMax-Ageis the same, so the browser drops it too), and the moment its account’s password is changed (every session made with the old one, including a stolen cookie in active use). The cookie isHttpOnly,SameSite=Lax, andSecureon an https deployment. -
Guessing limits: an address that fails
LOGIN_MAX_ATTEMPTSsign-ins is refused forLOGIN_LOCKOUT_SECONDS, before its password is even checked. Guessing spread over many addresses runs intoLOGIN_GLOBAL_MAX_ATTEMPTS, the shared count for every browser that has never signed in here; reaching it pauses sign-in for those browsers and logs anERROR. A browser that has signed in before carries a signedknown_browsercookie (sent only to/login, bound to its account and current password) and is counted on its own instead, so a campaign can’t lock the real admin out. None of this replaces a long random password: the app warns at startup about any password under 16 characters (webhook basic auth included, which has no limit at all). -
Flows can’t read the manager’s secrets: a component may reference
{{headers}}to inspect the inbound request, so the credential-bearing headers (Authorization,Proxy-Authorization,Jambonz-Signature,Cookie,X-Trusted-Proxy-Secret) are masked before a flow sees them. -
Bounded outbound responses: the
http_requestnode streams and abandons a response pastHTTP_REQUEST_MAX_BYTES, and never follows redirects (a redirect would be resolved after the SSRF check). -
Webhook authenticity:
WEBHOOK_SECRETenables verification of theJambonz-Signatureheader Jambonz sends on every webhook (t=<ts>,v1=<hex>, HMAC-SHA256 over"{timestamp}.{body}", the same scheme Jambonz’s own SDKs verify). The signed timestamp is checked against a 300 s tolerance, so captured requests can’t be replayed later. The value is your account’s webhook secret from the Jambonz portal (GET /Accounts/{Sid}/WebhookSecret); comma-separate several for multiple accounts or rotation. Alternatively (or additionally),WEBHOOK_BASIC_AUTH_USER+WEBHOOK_BASIC_AUTH_PASSWORDrequire, on webhook routes only, the basic-auth credentials configured on the application’s two webhooks in Jambonz. With neither, anyone who can reach the port can run any flow, and hand it its env-var values, which arrive on that same inbound hook: an HTTP Request node whose URL starts with{{env_vars.API_BASE}}then sends the token it carries to whatever host they name. Every start logs aSECURITY:error until one is set. -
The env-var schema is public by Jambonz’s design. Jambonz fetches a flow’s application env-var schema with an
OPTIONSrequest to its webhook and signs nothing on it, so anyone who can reach the port can ask (webhook basic auth, if set, still applies). The answer shows which flow names declare env vars, and each variable’s name, description and default, unless it is obscure. Keep internal URLs and anything else you’d rather not publish in an obscure variable, or set them in the Jambonz portal with no default in the flow. -
“Obscure” hides a value here, not from Jambonz. An obscure env var is masked in the Debug and Simulate panes, shown as
••••••••to the read-only account, never logged, never in theOPTIONSschema, and dropped from exports and version downloads. But its value rides on the call (customerData, echoed on every webhook), so Jambonz, its portal’s call traces (OpenTelemetryhttp.body) and its call records have it in clear. A default for one is also stored in clear in the flow, its version history and every backup, and a save warns about it: set secrets in the Jambonz portal. See PRIVACY.md.