Deploy Nexus PDP
Run Permit Nexus PDP (permitio/nexus-pdp), a self-hosted policy decision point (PDP), with Docker or on Kubernetes, and verify that it answers permission checks. This page lists the storage, memory, port, probe, and shutdown requirements, gives a runnable command and a pod spec, and covers the Nexus PDP logs and security properties an operator needs. For what Nexus PDP is, see Permit Nexus PDP.
Prerequisites
- Nexus PDP enabled for your Permit account.
- The Nexus PDP API key of the Permit environment the Nexus PDP serves. Once Permit activates Nexus PDP for an environment, select that environment in the Permit dashboard and copy the Nexus PDP API key. As of November 2026, the action is named Copy Nexus PDP API Key. It is in the user menu and the environment card's menu, and it needs edit permission on the environment. The ordinary environment API key from Get your API key does not work with Nexus PDP: the container fails at startup. Services that query Nexus PDP send the same Nexus PDP API key as their SDK
token(theAuthorization: Bearervalue); Nexus PDP rejects the environment API key with HTTP401. The Permit API (permit.api) also accepts the Nexus PDP API key, with the same access as the environment API key, so one SDK client configured with the Nexus PDP API key runs both permission checks and Permit API calls. Protect the Nexus PDP API key as you protect the environment API key. - A container platform that provides persistent volumes, such as Kubernetes.
Deployment requirements
Nexus PDP has operational requirements that the container PDP (the Edge PDP image permitio/pdp-v2) does not have. Meet each requirement before you send traffic to a Nexus PDP.
| Requirement | Setting | What happens if you skip it |
|---|---|---|
| Image | permitio/nexus-pdp, pinned by digest (permitio/nexus-pdp@sha256:<digest>) | permitio/nexus-pdp has no latest tag, so a pull without a tag fails. Tags can move: 0-beta moves to each new beta or release build, and a numbered beta tag name can be published again for a later build. A new build can rename configuration variables. See Nexus PDP configuration reference. |
| One container per environment | Set PDP_API_KEY to the Nexus PDP API key of one Permit environment | Nexus PDP has no multi-environment mode. The Nexus PDP API key binds the container to exactly one environment. |
| Persistent storage | Mount a persistent volume at /var/lib/edge-pdp, which holds the embedded database and the event store at default paths | On ephemeral storage, every restart runs a full cold start with a snapshot transfer of your whole data set. |
| Memory | A memory limit of 4 GiB to start, and never below 2.5 GiB. An environment with about 20 million facts needs more: its cold start peaked above 5 GiB. | In Nexus PDP 0.8.0 and later, below 2304 MiB Nexus PDP refuses to start and exits with code 78. Older builds start, and their embedded database can stop applying changes without reporting it. See Watching for a stalled database. With about 20 million facts, cold start peaked at 5.26 to 6.71 GiB under a 10 GiB limit, and lower limits were not tested. See Nexus PDP resource footprint and Nexus PDP memory benchmarks. |
| Volume permissions | The volume is writable by user ID and group ID 10001 | Nexus PDP runs as the non-root user 10001 and cannot write its database or event store. |
| Credentials directory | PDP_RUNTIME_DIR (default /tmp/edge-pdp) is a directory that the user Nexus PDP runs as (user ID 10001) can write, owned by that user or by root (a Kubernetes emptyDir mount point is root-owned and writable by every user), not a symbolic link, not on the persistent volume, and used by one Nexus PDP only. On Kubernetes, mount an emptyDir with medium: Memory there, into the Nexus PDP container only, as in the example below. | Nexus PDP keeps the NATS credentials it receives from the Permit control plane at startup in this directory, never on the persistent volume. Startup fails with an error that names PDP_RUNTIME_DIR if Nexus PDP cannot create or write the directory, or if the directory belongs to another user, is a symbolic link, is under EDGE_DATA_DIR or EDGE_DB_PATH, or is already used by another Nexus PDP. |
| Exposed ports | 7000 (authorization API) and 7001 (health) only | Other ports bind to loopback inside the container and are not reachable from outside. |
| Termination grace period | terminationGracePeriodSeconds: 40 or higher | 40 seconds is the sum of the default shutdown budgets EDGE_DRAIN_TIMEOUT_SECS (10) and EDGE_CHILD_TERMINATION_TIMEOUT_SECS (30). With a shorter grace period, Kubernetes kills the NATS leaf node before its on-disk event store finishes flushing. |
| Liveness probe | GET /health on port 7001 | A liveness probe on port 7000 fails during the cold start and restarts the container. See Health and readiness. |
| Readiness probe | GET /health/ready on port 7001 | Traffic reaches a Nexus PDP that cannot answer yet. |
| Startup probe | Enough time for a cold start of your data set | A cold start takes longer as your data grows. A short startup probe restarts a first boot that is still loading data. |
Run Nexus PDP with Docker
Replace <digest> with the digest of the permitio/nexus-pdp build you deploy (see Image name and tags), and set NEXUS_PDP_API_KEY in your shell to the Nexus PDP API key of the environment this container serves. The command maps the authorization API to host port 7766, keeps the health port on 7001, and stores the embedded database in the named volume nexus-data:
docker run -d --name nexus-pdp \
-p 7766:7000 -p 7001:7001 \
-e PDP_API_KEY="$NEXUS_PDP_API_KEY" \
-v nexus-data:/var/lib/edge-pdp \
--memory 4g \
permitio/nexus-pdp@sha256:<digest>
Kubernetes pod settings for Nexus PDP
This pod-spec excerpt sets the ports, probes, memory request, volumes, and shutdown budget from the requirements table: the persistent data volume at /var/lib/edge-pdp, and an in-memory emptyDir at /tmp/edge-pdp for PDP_RUNTIME_DIR. fsGroup: 10001 makes the persistent data volume writable by the non-root user that Nexus PDP runs as. Create the nexus-pdp-api-key secret with the environment's Nexus PDP API key under the key PDP_API_KEY, which the pod spec reads, reusing the shell variable from the Docker step:
kubectl create secret generic nexus-pdp-api-key \
--from-literal=PDP_API_KEY="$NEXUS_PDP_API_KEY"
Then size the nexus-pdp-data claim for your data set, and add a startup probe with enough time for a cold start:
terminationGracePeriodSeconds: 40
securityContext:
fsGroup: 10001
containers:
- name: nexus-pdp
image: permitio/nexus-pdp@sha256:<digest>
ports:
- containerPort: 7000 # authorization API
- containerPort: 7001 # health
resources:
requests:
memory: 4Gi
env:
- name: PDP_API_KEY
valueFrom:
secretKeyRef:
name: nexus-pdp-api-key
key: PDP_API_KEY
livenessProbe:
httpGet: { path: /health, port: 7001 }
readinessProbe:
httpGet: { path: /health/ready, port: 7001 }
volumeMounts:
- name: nexus-data
mountPath: /var/lib/edge-pdp
- name: nexus-runtime # NATS credentials, kept in memory
mountPath: /tmp/edge-pdp
volumes:
- name: nexus-data
persistentVolumeClaim:
claimName: nexus-pdp-data
- name: nexus-runtime
emptyDir:
medium: Memory
sizeLimit: 1Mi
The macOS AirPlay Receiver uses port 7000. Map the Nexus PDP authorization API to another host port, for example -p 7766:7000, and set your SDK's PDP URL to http://localhost:7766.
Verify a Nexus PDP deployment
- Send
GET /health/readyto the health port,7001:curl -i http://localhost:7001/health/ready. Nexus PDP returns HTTP200when every component that gates readiness is up, and HTTP503while any of them is still starting. A cold start can take minutes on a large data set, so retry until the response is200. - Set the SDK's PDP URL to the authorization port and its
tokento the Nexus PDP API key, then run a permission check. With the port mapping in Run Nexus PDP with Docker, the PDP URL ishttp://localhost:7766. See Check permissions, and use the Nexus PDP API key wherever that page uses the environment API key. A decision that matches your policy confirms that Nexus PDP has your policy and data.
Health and readiness
Nexus PDP serves health endpoints on the management port, 7001. Point every probe at port 7001.
| Endpoint | Authentication | Behavior |
|---|---|---|
GET /health | None | Always returns 200 and the status of each component. Answers during startup, including a cold start. |
GET /health/ready | None | Returns 200 only when every component that gates readiness is up, and 503 otherwise. In Nexus PDP 0.8.1 and later, it also returns 200 once Nexus PDP serves, while it serves stale data. |
GET /health/detail | Bearer token equal to PDP_API_KEY | Returns full diagnostic detail for each component. |
In Nexus PDP 0.8.1 and later, ten components gate readiness at startup: the NATS leaf node (nats_leaf), its link to the control plane (hub_link), the four sync planes (wal_mirror, kv_source, policy_files_source, policy_data_source), the embedded database (embedded_db), Open Policy Agent (OPA) (opa), and both loopback servers (query_loopback, bundle_server). In Nexus PDP 0.8.0 and earlier, nine components gate readiness: the same list without hub_link, where nats_leaf also reports the link to the control plane.
In Nexus PDP 0.8.1 and later, losing the control plane does not turn readiness off once Nexus PDP serves. When hub_link, wal_mirror, or kv_source goes down, GET /health/ready keeps returning 200 with "state": "serving_stale". Any other gating component going down returns 503, and so does hub_link reading rejected, when the control plane refuses this Nexus PDP. See Stale serving while the control plane is unreachable. Nexus PDP 0.8.0 and earlier report not ready when they lose the control plane.
The Nexus PDP authorization port, 7000, also answers GET /health and GET /healthy. Nexus PDP keeps /healthy so tooling written for the container PDP works. Don't point probes at port 7000:
- Port
7000has no/health/readyendpoint. A readiness probe on:7000/health/readygets404, and the pod never becomes ready. - Port
7000opens only after Nexus PDP is ready. A liveness probe on port7000fails during the whole cold start, and Kubernetes restarts the container before it finishes starting.
Port 7001 answers from the moment the Nexus PDP process starts.
Diagnose a stale or lagging Nexus PDP
Call GET /health/detail on port 7001 with the header Authorization: Bearer <PDP_API_KEY>. The response reports:
- restart counts and exit codes for the OPA and NATS leaf node child processes,
- the Nexus PDP's position in the change stream compared with the oldest change the control plane still holds,
- whether the Nexus PDP is serving stale data, and for how long (in Nexus PDP 0.8.1 and later, the fields
state,stale_on,stale_seconds, andstale_limit_exceeded; see Health fields that report staleness), - whether decision-log shipping is configured and working.
A Nexus PDP that serves stale data, or that cannot ship decision logs, stays ready and keeps answering authorization queries. In Nexus PDP 0.8.1 and later, you can make a stale Nexus PDP report not ready after a time you choose with PDP_MAX_STALE_SECS. See Limit how long a stale Nexus PDP stays ready.
Logs
Nexus PDP writes structured logs to stdout at the info level by default. Set RUST_LOG to change the level: info,edge_pdp=debug adds debug logs from Nexus PDP itself. Nexus PDP captures the output of OPA and the NATS leaf node and writes it to the same log stream, labeled with the source process and log level, so the container logs contain all output.
Raising the log level of the OPA or NATS child processes writes authorization data into the container logs. For the variables that control those levels and what each level exposes, see Nexus PDP child process logging.
Decision logs
The OPA process in Nexus PDP sends decision logs to Permit in batches over HTTPS, with a bounded in-memory buffer. Nexus PDP ships decision logs only when both conditions are true:
- Decision logging is enabled for the environment in Permit.
EDGE_DECISION_LOG_OPT_OUTis not set totrueon the container.
EDGE_DECISION_LOG_OPT_OUT can only turn decision logging off. It cannot turn logging on for an environment where Permit has it off.
Security properties to plan your deployment around
Four properties of the container decide how you place, scope, and isolate a Nexus PDP.
| Property | What it means for your deployment |
|---|---|
| Request authentication | Every caller needs the container's own PDP_API_KEY. The key also has environment-level access to the Permit API, so give it the same protection as the environment API key. |
| One environment per container | Run one container per Permit environment, and route each service to the container for its environment. |
| Child process isolation | Variables you set on the container do not all reach OPA and the NATS leaf node. Set Nexus PDP variables, not OPA or NATS variables. |
| Blast radius | A compromised container exposes one environment. Apply the network policy and secret scope of that environment to it. |
Request authentication uses the container's own API key
Nexus PDP compares the bearer token on each authorization request, in constant time, with the container's PDP_API_KEY. The Nexus PDP binary does not include a Permit API client, so Nexus PDP never contacts the Permit API to authenticate or authorize a request.
One Nexus PDP container serves one environment
Nexus PDP fixes its environment at startup from PDP_API_KEY, and accepts only that key. Any other key, including the environment API key of the same environment, does not authenticate against the container, and a caller cannot direct a request at data outside the container's environment.
Child processes start with a cleared environment
Nexus PDP starts OPA and the NATS leaf node with an empty environment, except for PATH, and then adds only the variables each child process needs. OPA receives PDP_API_KEY to authenticate to the query loopback server. The NATS leaf node does not receive PDP_API_KEY.
Nexus PDP writes credential files with 0600 permissions, creates them without following symbolic links, and references them by path in generated configuration files.
A compromised Nexus PDP exposes one environment
A Nexus PDP container holds the data and credentials of its own environment only. An attacker who controls one Nexus PDP container gets that environment's authorization data, not data from other environments.
Next steps
- Nexus PDP configuration reference: environment variables for storage, ports, logging, and memory
- How Nexus PDP syncs data: sync, consistency, cold start, and sizing
- Nexus PDP architecture: the processes and ports inside the container
- Nexus PDP feature parity: supported endpoints and capabilities
- Monitor PDPs: PDP fleet visibility in the Permit dashboard