Skip to content

Network and connections

For security reviewers and firewall owners. This page lists every port Sefra listens on and every connection it opens, what crosses each one, and how to turn it off. It describes the sefra process. PostgreSQL, Temporal, the secret manager and the identity provider are separate products with their own network behaviour, and need their own review.

  • Sefra listens on two TCP ports, both plain HTTP. TLS is terminated in front of them.
  • Sefra makes no call to its vendor. This version has no licence check, update check, usage report or analytics, and no vendor host is written into the code.
  • Every outbound destination comes from the deployment’s configuration or from the active bundle. Sefra needs the internet only if one of those destinations is on the internet.
  • Policies cannot open connections. Bundles are compiled without OPA’s non-deterministic built-ins, which include http.send and net.lookup_ip_addr.
  • JSON Schemas are compiled without a remote loader, so a $ref to a URL is refused and not fetched.
Listener Key, conventional port Opened by Serves On by default How to turn it off
Agent listen.mcp, 8080 AI agents /mcp, the REST mirror (POST /v1/executions, GET /v1/executions/{id}, POST /v1/executions/{id}/cancel), protected resource metadata Yes, in the api role sefra serve --role worker does not open it
Operator listen.operator, 8081 People, automation, load balancer probes Operator API /v1/…, probes, protected resource metadata; the approval page and the console when configured Yes, in every role It cannot be turned off. Restrict it at the network level

Expose the agent listener to agents only and the operator listener to people and automation only. The operator listener does not need to be reachable from outside the customer’s network. No feature needs a third party to call Sefra.

Every other route under /v1/ on the operator listener needs a valid bearer token, and every route of the agent listener except the metadata needs an access token.

Route Listener Why it has no bearer check What protects it, and what it returns
GET /.well-known/oauth-protected-resource… Both A client must discover how to get a token (RFC 9728) Public metadata: the resource URL and the allowed issuers
GET /healthz Operator Liveness probe Returns a fixed {"status":"ok"}
GET /readyz Operator Readiness probe Returns {"status":"ready"}, or 503 with the names of the failing checks (postgres, temporal, identity, secrets, bundle). The errors stay in the log
GET /approvals/page.css Operator A stylesheet, loaded before sign-in Static file. Only with approval_page
GET /approvals, GET /approvals/{id} Operator Browsers carry a session, not a bearer token Session cookie. Without one, a redirect to sign-in. Only with approval_page
POST /approvals/{id}/decision Operator The same Session cookie, CSRF token in the form, a recent sign-in, and the execution hash
GET /sign-in, GET /sign-in/callback Operator They create the session OpenID Connect code flow with PKCE, state and nonce. Only with approval_page
POST /sign-out Operator Browser session Session cookie and CSRF token
GET /console/… Operator The application must load before sign-in The console’s static files, which hold no deployment data. Only with console.enabled

The console’s data is at /console/api/…. It needs the session cookie, and a write also needs a CSRF token, a same-origin request and, in most cases, a recent sign-in. Its content security policy allows connections to its own origin only, so the browser loads nothing from a third party. The optional console.trace_url_template and console.temporal_url_template only render links; Sefra does not call them.

Sefra opens all of these connections.

Destination Set by Protocol Needs internet What crosses On by default How to turn it off
PostgreSQL database.url PostgreSQL. TLS as the URL’s sslmode says No All of Sefra’s state: executions, step inputs and outputs within retention, approvals, the audit trail, bundles Required Cannot be off
Temporal temporal.address, temporal.tls, temporal.payload_encryption gRPC. Plaintext and unauthenticated by default; TLS or mutual TLS with temporal.tls No Always readable by Temporal: execution ids, workflow and Activity names, workflow statuses, timings, error types, trace context. Also the output of each successful step, step indexes and error text, unless temporal.payload_encryption is set. No step inputs Required Cannot be off
Identity provider oauth.issuers; the discovered jwks_uri and token_endpoint HTTPS (an http:// issuer is accepted) Only for a cloud provider Discovery documents and signing keys in. With the approval page: the authorization code, PKCE verifier and client secret out, the ID token in Required Cannot be off. The sign-in part ends without approval_page
Connector token endpoints token_url in the bundle’s connectors.yaml HTTP(S) Only if the endpoint is Client id and secret, scope; an access token in Only for oauth_client_credentials connectors Use another auth type
Systems of record base_url in the bundle’s connectors.yaml HTTP(S), JSON or form bodies, at most 1 MiB Only if the system is (Stripe, for example) Step inputs as the manifest maps them, fact reads, compensations, Sefra’s credential; answers in Only what the active bundle names Remove the connector from the bundle. For an emergency: the kill switches (CLI)
Secret manager secret_manager.address OpenBao or Vault HTTP API No, normally GET /v1/<mount>/data/<path> with Sefra’s token; secret values in Off Use env or file references in secrets
Webhook receivers webhooks.approval_requested.url, webhooks.operator_alert.url HTTP(S) POST, signed with HMAC-SHA256 Only if the receiver is See below Off Leave the URL empty
OpenTelemetry collector OTEL_EXPORTER_OTLP_ENDPOINT or a signal’s endpoint OTLP/HTTP with protobuf Only if the collector is See below Off Leave the variables unset, or set OTEL_SDK_DISABLED=true

The sefra CLI is a separate client. approvals, control, executions, drain and bundle call the operator listener. migrate, audit and policy replay connect to PostgreSQL.

  • Temporal’s protection is optional and off by default (configuration). Without it, a step’s output crosses this connection in the clear and stays in the workflow history for the namespace’s retention (7 days by convention). In that case keep Temporal on a private network segment that only Sefra can reach.
    • Transport. temporal.tls turns on TLS 1.2 or later and always verifies the server’s certificate. With a client certificate it is mutual TLS, which is also how Sefra authenticates to Temporal. There is no other credential option.
    • Payloads. temporal.payload_encryption encrypts workflow and Activity inputs and outputs, Signals, and failure messages and stack traces with AES-256-GCM before they leave Sefra. Whoever holds the key and the history can read them.
    • What payload encryption does not hide. Trace-context headers, execution ids, workflow and Activity names, the task queue, workflow statuses, timings, attempt counts and error types stay readable to Temporal. Search attributes and memos are not encrypted either; Sefra sets none.
    • Warnings at start. Neither stops Sefra. Without temporal.tls, unless the address is localhost or a loopback IP: temporal connection is not encrypted: set temporal.tls, or keep Temporal on a private network. Without temporal.payload_encryption: temporal stores step outputs in workflow history in the clear: set temporal.payload_encryption.
  • The bundle decides where connectors go. A principal with sefra_admin can activate a bundle with a new base_url. Activation is audited, but only an egress firewall stops the call. http:// URLs are accepted, so the firewall is also where plain HTTP is refused.
  • Redirects. Connectors, the secret manager client, the identity provider client and the webhook client never follow a redirect. A 3xx from a webhook receiver is a failed attempt: it is audited as approval.notify_failed or alert.notify_failed and retried, and the signed body goes to no other host.
  • Proxies. Connectors and the secret manager client ignore HTTP_PROXY and HTTPS_PROXY. The identity provider client, the webhook client and the OTLP exporters honour them. If a proxy variable is set, list internal hosts in NO_PROXY.
  • jwks_uri and token_endpoint may be on another host than the issuer. Sefra only requires them to be https when the issuer is. Read the provider’s discovery document when building the allow-list.
Event Body data
approval.requested Approval id, one summary line per step, roles still required, expiry, execution hash, link to the approval
operator.alert Execution id, status, step, error code, reason

Step inputs are not sent, but summary lines hold values from them, such as an amount or a vendor name. Only fields the bundle author marked x-sefra-sensitive appear as [redacted], and nothing detects a field that should have been marked. Keep the receiver inside your network, or review the summary_template of each intent before pointing the webhook elsewhere. Deliveries carry X-Sefra-Timestamp and X-Sefra-Signature, and are retried for up to one hour (configuration).

Telemetry is off until an endpoint is set, and it goes only to the collector you name. An unreachable collector drops data and never blocks a request.

Allowed in attributes Ids (execution, approval, step, intent type, principal), statuses, error codes, counts, durations, protocol fields (method, route, HTTP status, protocol version)
Never sent Step input or output values, rationale, idempotency keys, approval comments, tokens, secrets
Resource service.name, service.version, the SDK’s own attributes, and anything you add through OTEL_RESOURCE_ATTRIBUTES
Logs Sefra’s structured logs, the same ones written to standard error

Principal ids are in the allowed list and may identify a person. If that matters, keep the collector inside the same trust boundary as the audit trail.

We check this by running a plan and searching everything the collector received for that run’s input values, outputs, idempotency key and rationale. It also checks that the trace id matches the audit trail and that a plan still succeeds with the collector stopped. It is a check on one run, not a proof about every possible value.

Allow these destinations from the Sefra host and deny everything else. Fill each one in from sefra.yaml, the environment and the active bundle’s connectors.yaml.

# Required
<host of database.url>:5432/tcp              PostgreSQL
<temporal.address>/tcp                       Temporal gRPC (7233 by convention)
<host of each oauth.issuers entry>:443/tcp   discovery, keys, code exchange
<host of jwks_uri, token_endpoint>:443/tcp   if the provider's document names another host
<host of each connector base_url>:443/tcp    systems of record
<DNS resolvers>:53                           name resolution

# Only if configured
<host of each connector token_url>:443/tcp   oauth_client_credentials connectors
<host of secret_manager.address>/tcp         OpenBao or Vault (8200 by convention)
<host of each webhooks.*.url>:443/tcp        webhook receivers
<host of the OTLP endpoint>:4318/tcp         OpenTelemetry collector

Ports are the usual ones; use those in your URLs. Review this list whenever a bundle that changes connectors.yaml is activated.

Sefra has no chat integration. A customer who wants approvers notified in a chat tool builds a small receiver inside its own network. The receiver takes the approval.requested webhook, verifies its signature and timestamp, and posts the link to the channel. The approver opens the link, signs in with OpenID Connect and decides on the approval page at evidence level oidc.

The receiver is the customer’s component. It decides what leaves the network, so it should post the link and leave out the summary lines unless the chat tool is approved for that data. It holds the webhook signing secret and no credential that can decide an approval.