> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Networking

## Inbound access

Hosted runtime addresses are public by default. Administrators with a Hosting
write grant can restrict public access or use AWS PrivateLink on a dedicated
Enterprise installation. Authenticate callers and declare who may enter each function with
[allow](https://docs.bijection.com/access) and the application’s [guards](https://docs.bijection.com/access/guards.md).

### Enterprise ingress policy

Set a complete policy with `bijection installation ingress-policy set`. Public
access has three modes.

* `open` admits public requests.
* `allowlist` admits requests from the listed IPv4 or IPv6 addresses and CIDRs.
  Supply up to 64 entries. A single address matches one client IP. The public
  edge uses the address that connected to it, which will be your proxy's
  address if you put a proxy in front of the installation.
* `disabled` closes public access to the installation API and HTTP actions,
  including their default hostnames, runtime custom domains and WebSockets.

For example, save the following as `ingress.json`.

```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "public_access": "allowlist",
  "public_sources": ["203.0.113.10", "2001:db8:10::/48"]
}
```

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
bijection installation ingress-policy show <cell-id>
bijection installation ingress-policy set <cell-id> --revision <revision> --once <request-key> --input - < ingress.json
bijection installation ingress-policy show <cell-id>
```

Use the dedicated Hosting cell ID and the revision returned by `show`. A change
records the caller and policy in management history, then applies
asynchronously. Use `show` to read the requested generation, the apply status,
and the PrivateLink service name when applied. The management API uses `GET`
and `POST` on `/v1/hosting/dedicated-cells/{cell}/ingress-policy`. To reopen
public ingress and remove PrivateLink configuration, submit
`{"public_access":"open"}` with the current cell revision and a new request key.

### AWS PrivateLink

1. Add the IDs of the AWS accounts that can request endpoints to
   `private_link_accounts`. Keep your current public mode while setting up the
   private path. Wait for the policy to show `applied` and copy
   `private_link_service`.
2. In an approved AWS account, create an interface VPC endpoint for that service
   in the installation's AWS region. Allow HTTPS from your clients in the
   endpoint's security group. Copy the endpoint ID.
3. Replace the policy with the same account list and the IDs you intend to
   accept in `private_link_endpoints`. Only the listed endpoint IDs are
   accepted. Remove an ID to revoke that endpoint's connection. Accounts
   control who may request a connection and endpoint IDs control which
   connections are accepted.
4. In your private DNS, resolve the installation's normal API and HTTP action
   hostnames to the interface endpoint. Keep those hostnames in URLs so TLS and
   host routing use the installation's certificate. After clients can connect
   privately, set `public_access` to `disabled` to close internet access.

Delete any unaccepted interface endpoints before removing the endpoint
service. AWS requires pending connections to be removed or rejected first.
[Delete an AWS endpoint service](https://docs.aws.amazon.com/vpc/latest/privatelink/delete-endpoint-service.html).

The policy covers installation runtime traffic. Account management and separately
published app assets have their own endpoints. The [browser origin policy](#browser-origins-and-framing)
still governs browser response access and framing. Outbound policies below govern
connections initiated by the installation.

## Egress IP addresses

Requests made by the hosted installation backend, including the tasks it sends to
[targets](https://docs.bijection.com/functions/effects.md) (log export batches among them) and OIDC discovery, leave through
the installation's network address translation. Function code has no network of
its own: a query or mutation performs no I/O, and reaches another service only
by submitting a task that the host sends.

Bijection does not publish these addresses here. If you need to configure a
firewall or allowlist for an external service to accept traffic from your
installation, ask for your installation's address at
[contact@bijection.com](mailto:contact@bijection.com).

> [!WARNING]
>
> The egress address is shared by all installations on the platform, not
> just yours. Do not rely on source IP alone to authenticate or authorize
> incoming requests.

## Where outbound requests can go

These outbound requests from your installation reach public internet addresses
only:

* Tasks sent to [targets](https://docs.bijection.com/functions/effects.md): the one JSON `POST` of an
  `http(url, { bearer })` target, and each request of a receiver's
  operations, to the URL the declaration names. Batches from a
  [log export](https://docs.bijection.com/operate/observability/log-export.md) are such sends.
* OIDC discovery and JWKS requests for [authentication](https://docs.bijection.com/access/authentication).

The check applies to the address a request actually connects to, whether the
URL names it directly or DNS returns it. Loopback, private network (such as
`10.0.0.0/8` and `192.168.0.0/16`), link-local, cloud instance metadata (such as
`169.254.169.254`), shared carrier (`100.64.0.0/10`) and other reserved
addresses are refused, including IPv6 forms of these addresses.

A task send follows no redirect: a performer that answers with a redirect
settles the task `Failed`. OIDC discovery doesn't follow redirects either.

A task whose send is refused settles `Failed`, and its message names the
refused URL. A log export counts a refused batch's lines as `refused` and
reports the message as its last error.

## Installation egress policy

An installation operator can restrict outbound requests to destinations they
have approved. The policy is a JSON file that lists destination hosts and,
optionally, their ports:

```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "revision": 3,
  "destinations": [
    { "host": "api.example.com", "ports": [443] },
    { "host": "*.my.salesforce.com" },
    { "host": "db.example.net", "ports": [5432] },
    { "host": "203.0.113.10", "ports": [8443] }
  ]
}
```

* `revision` is a positive integer. Increase it each time you change the
  file, so a refusal names the version that decided it.
* `host` is an exact DNS name, a `*.` pattern or an IP address. A pattern
  matches names below its suffix: `*.my.salesforce.com` matches
  `acme.my.salesforce.com` but not `my.salesforce.com`. A pattern needs at
  least two labels after `*.`. Write internationalized names in their
  `xn--` form. Matching ignores case and a trailing dot.
* `ports` lists the ports that host may be reached on. Leave it out to allow
  every port. A URL without a port uses its scheme's default, such as 443 for
  `https`.

The policy only narrows the [address check](#where-outbound-requests-can-go).
If a listed name resolves to a private, loopback or metadata address, the
request is still refused. A file with an empty `destinations` list allows no
destination.

Start every process of the installation with the same file:
`--egress-policy <path>` (or the `BIJECTION_EGRESS_POLICY` environment
variable) on the backend. A
process reads the file once at startup. Restart the processes to apply a new
revision. A process that hosts several installations refuses an installation
started with a different policy.

With a policy in place, these requests must name a listed destination:

* Task sends to `http` targets and receivers.
* OIDC discovery and JWKS requests, except a private OIDC origin the operator
  configured on the command line.
* Connections and integrations: HTTP requests, database and other protocol
  connections, broker peers, Kerberos, and connections routed through a
  network relay or a private endpoint.
* Iceberg catalog connections and the publisher's S3, GCS and delegated Azure
  Blob file requests. List each storage host and port the publisher actually
  reaches. S3 virtual-hosted access can add the bucket name to the host.
  For a self-hosted endpoint override, list the configured endpoint as well.
  OpenDAL's S3 and GCS credential exchanges use the same policy, including
  token refresh. Use explicit credentials or an allowed token service when the
  ambient credential chain requires a restricted instance-metadata address.
  A storage redirect requires configuring the final endpoint. List each approved
  logical store in `iceberg_storage` as well, for example
  `["s3://sales-warehouse", "gs://sales-analytics", "azure://salesaccount"]`.
  The two lists are independent. A listed HTTP endpoint can serve several
  storage accounts. Omitting the logical list or leaving it empty refuses all
  Iceberg file access under the policy, including file URLs. Azure entries
  cover containers in that account. Catalog and cloud credentials can limit
  individual prefixes or objects further. Bijection supplies external readers
  with signed reads for the exact snapshot objects under an active policy.
  A catalog that supplies only an opaque bearer credential cannot serve
  those reads.
* Google REST catalog authentication checks the selected token endpoint on
  each refresh. For a service-account key or a user refresh token, list the
  credential's token host, usually `oauth2.googleapis.com` on port 443. For
  service-account impersonation, also list `iamcredentials.googleapis.com`
  on port 443. The publisher refuses redirects from token endpoints.
* Cloud key, vault and model gateway endpoints that an installation reaches.
  List these too.
* Every connection from module analysis on the Lambda executor. The executor
  runs in a network whose only route out is the backend that invokes it, and
  the backend decides each connection. A backend with a policy refuses to
  invoke an executor that is not confined this way. Connections to the
  locations the backend downloads the code from are not narrowed while
  analysis runs. Every package an app imports is [bundled](https://docs.bijection.com/functions/bundling.md)
  by the CLI on the machine that deploys, so the installation never reaches an
  npm registry.

On a backend or runner started with `--self-hosted-egress`, the policy checks
the host and port of task sends and OIDC requests before they reach
`--bijection-http-proxy` (or connect directly). The proxy still decides which
addresses those requests may reach. OIDC discovery and key lookups check every
redirect target against the same host and port allowlist. Add an issuer’s
redirect destination if it serves metadata or keys from a different host.

A refused request reports the policy revision. A refused task send settles
`Failed` with the message `Request to <url> forbidden: a destination outside
the installation egress policy (egress policy revision 3)`. A connection fails
with `IntegrationAddressPolicy`, which also names the revision.

The policy does not cover:

* Platform clients whose endpoints the platform, not an installation,
  chooses: the cloud provider's SDK for Lambda invocations and platform
  storage, a relay cell's replica connections and a runner's container
  metadata read. Like a private OIDC origin, these are operator destinations,
  so the policy does not narrow them.
* The Google metadata service when the operator has enabled ambient catalog
  credentials and supplied no credential file. This uses the installation's
  workload identity.

When an installation has an egress policy, local module analysis is refused
before the host Node process starts. The protected Node worker keeps its
separate isolated execution path.

### On Bijection-hosted installations

An Enterprise installation runs alone in a dedicated cell, so it can have its
own egress policy. Team administrators view and change it in the console,
under the installation's **Egress Policy** settings, or through the management
API at `/v1/installations/{id}/egress-policy`: `GET` reads it, `PUT` sets it
and `DELETE` removes it. A `PUT` lists the destinations without a revision:

```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "destinations": [
    { "host": "api.example.com", "ports": [443] },
    { "host": "*.my.salesforce.com" },
    { "host": "storage.googleapis.com", "ports": [443] }
  ],
  "iceberg_storage": ["gs://sales-analytics"]
}
```

Use the console or send this JSON directly to the management API to set
`iceberg_storage`. CLI builds with the updated management bindings accept
the same file. An earlier CLI can reject the field or an updated response.
For a CLI with the updated bindings, save it as `destinations.json` and run:

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
bijection installation egress-policy set <project>:<name> --revision <revision> --once <key> --input - < destinations.json
bijection installation egress-policy show <project>:<name>
```

`show` returns the confirmed policy values and digests. `set` follows the
administrator approval flow below.

* Bijection checks every destination with the rules above, rewrites it in its
  canonical spelling and assigns the next revision. Revisions only go up, and
  removing the policy also takes one. Sending an unchanged list records
  nothing.
* Only team administrators can read or change the policy. Each change is
  attributed to the administrator who made it and appears in the team's audit
  log as an installation update.
* A `PUT` or `DELETE` takes effect only after a second team administrator
  approves that exact request. The first attempt is refused with
  `428 ApprovalRequired` and the ID of the request it recorded; another
  administrator approves the exact command digest with
  `bijection installation approve <scope-id> <command-digest>`, and you
  repeat the identical request within 24 hours. See
  [administrator approvals](https://docs.bijection.com/operate/administration/approvals.md#administrator-approvals-for-sensitive-management-changes).
* A new revision takes effect while the installation keeps running: no suspension
  or restart is needed. Its backend and function runners apply the revision to
  every outbound request they decide after it arrives; a request already under
  way is not stopped. The policy's `status` is `pending` until the
  installation's cell has received the latest revision, then `delivered`.
* Task sends to `http` targets and receivers pass the policy and the
  [address check](#where-outbound-requests-can-go) one request at a time.
  Function code opens no socket of its own: run a client that needs raw
  sockets or a database driver (such as `pg`, `mysql2`, `mongodb` or
  `ioredis`) on [external compute](https://docs.bijection.com/transforms/workers.md) that performs a
  target, or reach the database through a [connection](https://docs.bijection.com/integrations).
* The policy's file form is limited to 16 KiB.

Pro installations cannot have an egress policy. They share their cell's
processes with other installations, and a policy applies to a whole process.
A Pro installation can still reach private systems through a network relay,
whose target list is its own allowlist.

## Browser origins and framing

A Bijection-hosted installation has a browser origin policy. It answers
cross-origin browser requests, including requests that carry cookies, only
from the origins in that policy. Only those sites, and the installation itself,
can show its responses in a frame.

### Which origins are allowed

By default the policy includes:

* the installation's own URL and the URL its route reactions serve;
* the Bijection console;
* the URLs of the installation's apps, including the workspace, and their
  verified [custom domains](https://docs.bijection.com/operate/networking/domains.md);
* on development and preview installations, any port of `localhost` and
  `127.0.0.1`, so a frontend you run locally keeps working.

A page on another origin can still send a request, but its browser does not
let it read the response. Requests that do not come from a web page, such as
those from the CLI, from your servers and from Node.js scripts, send no
`Origin` header and are not affected. WebSocket connections are not affected.

A frontend served from anywhere else, such as a local frontend calling a
production installation, a site on a domain you have not added as a custom
domain, or a browser IDE such as StackBlitz, needs its origin declared. Each
declared entry is one of:

* an exact origin, such as `https://app.example.com` or
  `http://localhost:5173`;
* the subdomains of a domain, such as `https://*.example.com`, which does not
  include `https://example.com` itself;
* any port of a loopback host, such as `http://localhost:*`.

Plain `http` is accepted only for `localhost`, `127.0.0.1` and `[::1]`. An
entry has no path, and Bijection stores it in lowercase without its default
port. An installation declares at most 32 allowed origins and 32 frame
ancestors. Changing either is an installation setting that needs the same
permission as adding a custom domain, and appears in the team's audit log as
an installation update.

The management settings operation accepts both declarations:

```http theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
PATCH /v1/installations/{id}/settings
Content-Type: application/json
Authorization: Bearer <management-token>

{
  "browser_origins": ["https://app.example.com"],
  "frame_ancestors": ["https://portal.example.com"]
}
```

Omitting a field preserves it. Sending `null` or `[]` clears that declaration;
the platform-owned default origins remain. Both supplied settings commit
together and use the existing deployment-settings audit and runtime delivery.
Generated management clients and CLI flags must include these fields before
they can submit the declarations; their regeneration and publication are pending.

### Framing

Each response from the installation's URL carries
`Content-Security-Policy: frame-ancestors 'self'` followed by the installation's
app origins and declared frame ancestors. When no other site may frame it, it
also carries `X-Frame-Options: SAMEORIGIN`. Any other policy a response
already states, such as the sandbox policy of a stored file, still applies.

App pages, including the workspace, are framed only by their own origin
unless the app's server sends its own `Content-Security-Policy` or
`X-Frame-Options`. Declared frame ancestors do not apply to app pages yet.

### Route reactions

[Route reactions](https://docs.bijection.com/functions/reactions.md#routes) answer requests at the
`.bijection.run` URL. The installation policy does not add to or change those
responses. A route's answer is its returned value, and a route cannot yet set
its own response headers, such as CORS headers. Routes run only at the head;
branches take no requests.

### When changes apply

Bijection delivers the policy with the installation's other settings. A changed
declaration, app or custom domain is applied within about a minute, and the
installation applies a delivered policy to its next request. A self-hosted or
local backend receives no policy: it keeps answering every origin and adds no
framing headers.

For a platform operator, the installation runtime must be upgraded before
control starts delivering the policy. Until then, a runtime that does not
know the policy refuses the settings that carry it, and its client-log and
plan settings stay pending.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.