- Omnel
- Documentation
- Omnel API documentation
Omnel API documentation
The README of the Omnel API as its repository held it on 22 November 2026, unchanged. It describes work in private development; nothing is on sale yet.
Last updated 22 November 2026
The Nexus management and licensing API: api.umbra.nexus (management, for the console and customer API keys) and license.umbra.nexus (activation, leases, key sets; the licence edge since P3.1) and, later, tenant issuer hosts. One service holding several Nexus products (products: in the Umbra workspace manifest), built on the domainless engine umbra-me/nexus-engine.
Status: pre-release, phase P2 (foundations), slices P2.1, P2.2, P2.4 and P2.5; phase P3, slice P3.1 (licensing core): the management side (part a) and the licence edge (part b); slice P3.3: the engine's exports in place of this service's mirrors (engine pin 89aef7f); slice P3.4: the egress proxy, the outbound client and the SSRF policy (part a), and outbound customer webhooks (part b); slice P3.5: console sessions through Umbra Identity, members, invitations and the role matrix (source only: no Identity configuration exists anywhere, so console sign-in is disabled); batch B1: webhook lifecycle and queue maintenance; B2a: post-lifecycle session admission and transactional membership revocation (local source only). No production deployment, no domain, no customer data; the control plane runs it only in its optional non-production stack nexus-platform (management API on loopback 3022, licence edge on 3023, plus the environment's offset), where P3.1 passed its smoke test, a licence end-to-end check, the restore drill and the cross-tenant fuzz suite on staging (docs/p3-1.md, "Runtime"). The plan is docs/nexus-platform-plan/ in the Umbra control plane (umbra-me/umbra); this repository is its component nexus/api in the Nexus workspace.
What exists (P2.1)#
Crate nexus-api (library and binary nexus-api): organisations, console members, projects, test and live environments and management API keys, with
- a typed tenant scope (
OrgScope) that only authentication and the operator bootstrap path produce and every tenant transaction requires; - Postgres row-level security on the transaction-local
nexus.org_id, the service connecting as the non-owner rolenexus_api_app; - management API keys (
nxk_…) stored as a digest, shown once, compared in constant time, read-only or admin, optionally restricted to one project, optionally expiring; - a per-organisation SHA-256 audit chain with a verifier, and a transactional outbox: every change commits with its audit event and outbox row, or not at all;
- rate-limited security events in the key's organisation for revoked, expired and wrong keys and for requests naming another organisation's objects, which always answer 404.
Details, test mapping, limits and open questions: docs/p2-1.md.
What exists (P2.2)#
- Key hierarchy (SEC-010): a root KEK held in memory only, read once at start from a 0600 file; a tenant KEK per organisation, created with it and wrapped by the root KEK; per environment a data-encryption key and an Ed25519 signing key, created with it and wrapped by the tenant KEK. Every wrapping is AES-256-GCM with a fresh nonce and associated data binding version, algorithm, wrapping key, organisation, environment, mode, purpose and row, so a wrapped value moved anywhere else does not open.
- Envelope format v1 (SEC-022): the one encrypted-value format, with explicit version, algorithm and key ID; unknown versions and algorithms fail closed with typed errors. Data under an environment DEK gets a per-value key (HKDF-SHA256), so the AES-GCM invocation limit never binds.
- Signing service (SEC-012), internal (Rust, not HTTP): signs with an environment's active key and returns its
kid; test keys never sign for live or the reverse; signatures counted per key, not audited one by one. Public keys are published read-only and signing keys rotate with an overlap, every lifecycle change with its audit and outbox events. - Operator commands: root and tenant KEK rotation by re-wrapping (owner role), and per-organisation escrow sealed to an X25519 recipient that restores into an empty database.
- Outbox relay (PADR-16, ACC-ARC-06): publishes each organisation's events in order to a pluggable sink (in-memory, JSON lines), marks them only after acknowledgement, republishes the same event ID after a crash, and a consumer helper deduplicates effects by event ID in the effect's transaction.
Details, formats, test mapping, limits and open questions: docs/p2-2.md.
What exists (P2.4)#
- Signed escrow (lead decisions 1 and 2 of P2.2): bundles are format version 2, signed with the operator's Ed25519 key and sealed only to the pinned recipient; an import verifies the signature against the pinned operator key before it decrypts anything, and refuses unsigned (v1), foreign-signed and tampered bundles, each with its own error.
- Key encodings: escrow keys written as base64url without padding (as
docker exec --env-fileand Pass keep them), read as that or as standard base64. - Keys-only import for the restore drill: the tenant KEK and environment keys from a bundle into a database restored from a dump without key data.
sign-probe: one signature by an environment's active key over a domain-separated input, to compare before and after a restore.- Image: a writable
/var/lib/nexus-apifor the outbox volume.
Formats, the signed input, the probe's domain separation, test mapping, limits and open questions: docs/p2-4.md.
What exists (P2.5)#
- Event envelope version 2 (PADR-16): every published event carries
env,resource_revisionandcorrelation_id. Every mutable row has arevisionthat each mutation advances in its own transaction; consumers apply a subject's change only if its revision is newer (ConsumerTx::newer). - Correlation IDs (OBS-008): a valid inbound
X-Request-Idis kept, anything else replaced byreq_<ULID>; every response echoes it, and the request's log line, error lines, audit events and outbox rows carry it. Operator commands generate one per invocation. - Audit hash version 2: new rows also hash the three envelope fields; rows from before keep version 1 and verify; a downgrade is refused.
- One denial for every unknown identifier: a well-formed identifier not found in the caller's organisation records the same rate-limited
not_founddenial whether it exists in another organisation or nowhere; nothing asks which (migration 0006), so neither the caller's audit log nor the timing tells them apart. - Cross-tenant fuzz suite (SR-01, ACC-ARC-01, OBS-001): seeded, in process on a disposable Postgres and remotely against a running service; a foreign identifier and its unknown twin must answer and leave traces alike.
- Forbidden edges (ACC-ARC-02, API side) and versioned formats (OBS-006):
docs/events.mdanddocs/schema/, enforced by tests on every event and log line.
Formats: docs/events.md. Evidence, test mapping, threat-model delta, limits and open questions: docs/p2-5.md.
What exists (P3.1, part a)#
- Licensing data model below organisation, project and environment (migration
0007_licensing.sql): products (app_), policies (pol_: perpetual, subscription or trial; bindingnoneorinstallation; seats; lease within the engine's caps; namespaced capabilities and allowances), licences (lic_: the key shown once in the engine's format and stored as its hash; status active, suspended, revoked or expired;status_epoch), entitlements, installations (ins_) and activations (act_, released rather than deleted), data-plane service keys (dpk_, secretnxd_…, one environment each). Row-level security on every new table; noDELETEfor the application. - The engine's own operations (
nexus-engineat the pin): itsStore,TxandSignerports run over these tables inside the API's write transactions (src/store/engine.rs), so issuing, re-signing, blocking, seats and key sets are the engine's code. Every environment gets an Ed25519 root (key sets only) beside its document-signing key, both wrapped under the tenant KEK and escrowed. - Management routes under
/v1/projects/{id}/environments/{env_id}/:products,policies(PATCH re-signs the policy's licences),licenceswithsuspend,restore,revoke,renew,reissue-key,refund,dispute,entitlementsandactivations(operator release),service-keys,keys/root;GET /v1/eventsreplays published events. - Idempotency-Key on every POST that creates or acts and every PUT and PATCH (24 hours); ETag on single reads and If-Match on updates and transitions; OpenAPI 3.1 in
docs/openapi.json, checked against the router both ways and against every response the tests receive.
What exists (P3.1, part b)#
- The licence edge, a second listener of the same process (
NEXUS_API_EDGE_BIND, 127.0.0.1:8482), in the engine's edge wire format: nonces, activation, refresh, deactivation and trials signed by the installation's Ed25519 key (proof of possession, durable single-use nonces,cnf.jktleases), key sets since a sequence number, a licence's status by key, and its holder's seat list and release (same-origin only). A data plane on the same listener for customers' servers, authenticated by environment service keys (nxd_…): issue, read and renew licences. - Key lifecycle: a retiring key leaves the key sets only when the engine's guards allow it (
POST .../keys/{kid}/remove, and the sweep at the end of the overlap, which otherwise raisesnexus.signing_key.overlap_exceededonce); a compromised key is revoked in a new key set with its licences re-signed (.../keys/{kid}/revoke);.../keys/transitionhands an environment to its customer with a transition key set (PADR-17). - Rate limits per client address, installation, licence, environment (nonces), service key and organisation, answering 429 with
Retry-After; edge security denials are audited and rate-limited. - IP class (TEN-006) on every event a request writes: audit hash version 3, envelope version 3, log lines version 2 (
docs/events.md).
Evidence and limits: docs/p3-1.md.
What exists (P3.3)#
- No mirrored engine code (RSK-34): revocation, an operator's seat release, renewals, entitlement and policy changes, payment state, licence signing and the active key's choice are the engine's operations and rules (
Engine::revoke_licence,release_seat,update_licence_in,sign_licence,LicenceRecord::set_commerce_blocks); the edge's signing input, headers, bodies and answers are the engine client crate'snexus_licence::edge, its problems the sharedProblemKindtable and engine mapping, its limiternexus_server_support::limiter. - Revocation is terminal: a revoked licence takes no new entitlements (409
licence-revoked), and a policy change re-signs only the policy's licences that are not revoked. - The engine pin is
89aef7fe3a277abccc3e67dabfb886e167af7408; its corpus has 121 fixtures.
Evidence and the visible changes: docs/p3-3.md.
What exists (P3.4, part a)#
- Egress proxy (GW-013):
nexus-api egress, a mode of the same binary onNEXUS_API_EGRESS_BIND(127.0.0.1:8490) with no database, key or secret. It serves HTTPCONNECTonly, resolves the destination itself, refuses any non-public address (loopback, RFC 1918, link-local, carrier-grade NAT, unique local, multicast, reserved and documentation ranges,0.0.0.0/8, IPv4-mapped, NAT64, 6to4 and Teredo forms, cloud metadata addresses) and any port but 443 and 8443, opens the tunnel to the address it vetted (DNS rebinding), limits each tunnel's bytes and time, and logs oneegressline per request (host, port, decision, reason class; never a path or query). - Outbound client (
src/outbound.rs): one HTTPS request through the proxy, TLS end to end (rustls on ring, the Mozilla roots, SNI), no redirects, bodies dropped after 4 KiB, strict timeouts. Customer webhooks use the proxy; P3.5 Identity JWKS/lifecycle calls use the API's separateoutbound::Directclient unlessNEXUS_API_IDENTITY_TRANSPORT=egress, which sends them through this proxy. Real Identity remains unconfigured. - SSRF policy (the engine's
nexus-address-policy, re-exported bysrc/ssrf.rsand shared with the M19 observer): the address ranges, the port allowlist, and the URL check a webhook registration will use (httpsonly, no userinfo or fragment, canonical IP literals only, IDNs to their A-labels, no special-use names); operator-only test destinations (NEXUS_API_EGRESS_TEST_DESTINATIONS, non-public by construction); the host's own public addresses (NEXUS_API_EGRESS_DENIED_ADDRESSES, RSK-35), refused for every destination. - The owner-approved TLS dependencies (
docs/dependency-review.md, "P3.4") and a 182-case SSRF corpus (tests/ssrf.rs).
What exists (P3.4, part b)#
- Webhook endpoints (TEN-007) under
/v1/webhook-endpoints: organisation resources for unrestricted management keys (admin to write, read-only to read), each taking one environment's events or every event of the organisation, filtered by type; URLs checked by the SSRF policy;whsec_signing secrets shown once, sealed under the tenant KEK, rotated with an overlap during which deliveries carry both signatures. - Delivery (GW-010): the outbox relay's
webhooksconsumer queues one delivery per matching endpoint in the transaction that records the event ID (PADR-16), within a bound of 10,000 pending deliveries per organisation; a worker inserveclaims due deliveries (FOR UPDATE SKIP LOCKED, a lease), signs the published envelope (Standard Webhooks:webhook-idis the event ID), sends it through the egress proxy, records each attempt's status, latency and error class, retries with jittered backoff for up to 15 attempts, then dead-letters with an event. A proxy that cannot be reached queues deliveries; a crash between sending and recording sends again with the samewebhook-id. - Replay by event ID or time range, keeping the original IDs; delivery and attempt listings; new event types (
docs/events.md) and the reference verifier. - Migration
0009_webhooks.sql(endpoints, deliveries, attempts, row-level security, the identifier-only due-deliveries function).
Evidence, the threat-model delta, the Compose proposal and limits: docs/p3-4.md.
What exists (P3.5)#
- Console sessions (
src/console.rs,src/identity.rs): this service is Umbra Identity's relying party for the console (clientnexus-console). The console's backend hands it the ID token and the nonce; it verifies RS256 against Identity's JWKS (cached 10 minutes, an unknownkidfetched again at most every 30 seconds),iss,aud,exp/nbf/iatwith 60 seconds of skew, the nonce, and refuses a replayed token; checks the subject's lifecycle; and creates an opaque session (nxs_…, shown once, stored as a digest; 30 minutes idle, 12 hours absolute). A new key kind, the console workload key (nxc_…,nexus-api console-key create), is the console's credential and can do nothing else. - Member requests: every tenant route under
/v1/orgs/{org}with the console key andNexus-Session. Every one asks Identity for the subject's lifecycle, with no cache: unavailable is 503, inactive 401 with every session revoked, missing (deleted) 401 with every session revoked and the subject removed from every organisation, an organisation losing its last owner flagged for the operator (ACC-ID-04, ACC-ID-07). - Members and invitations (TEN-003): roles owner, admin, developer and read-only (role definitions version 1; billing is never given), one-time invitation codes (
nxi_…, no email) accepted by a signed-in subject, role changes and removals that never leave an organisation without an owner, and ownership transfer. Every change audited and evented; management keys are refused (403). - The role matrix (AUTHZ-001,
src/authz.rs): one table for every console and management action, enforced by the router's gate before every tenant handler, deny by default;tests/rbac.rsasserts it against an independent table for every action and principal, and through the router. - The cross-tenant fuzz suite has member sessions as principals (each role, a subject of another organisation, a member's other organisation's objects) and the new routes.
Evidence, the matrix, deviations and open questions: docs/p3-5.md.
What exists (B2a)#
- Admission after Identity's active reply rechecks stored revocation and both session expiries. It returns 401
invalid-sessionwhen the session ended during that reply, without reviving an expired or revoked cached record. - Actual role changes and ordinary membership removal revoke all sessions of the affected subject, across organisations, in the membership transaction. Ownership transfer ends both subjects' sessions, including an existing-owner target. Same-role PATCH and idempotent replay do not end fresh sessions.
- Membership, revocation, audit/outbox and idempotency roll back together. Opposite transfers acquire global session locks in a consistent order. Identity deletion retains its cleanup-before-revocation retry behavior.
- Migration
0012_membership_session_revocation.sqladds the revocation reason without expanding database grants. It has not been applied to a running stack.
Contract, reproduction and verification: B2a. Step-up authentication and console UI remain outside this slice. Requests already admitted before a subsequent revocation are not recalled.
What exists (B1)#
- Terminal webhook deletion on management and member paths requires
If-Matchand idempotency. A listable tombstone clears current endpoint configuration and sealed secrets, cancels pending/claimed work and frees capacity. An outbound attempt admitted before deletion cannot be recalled. - Bounded maintenance purges at most 100 terminal delivery parents per tenant, attempts first, 30 days after completion. Pending/leased work and immutable audit/outbox/consumer/replay sources remain. Migration 0011 adds bounded tenant discovery, an active-endpoint index and role matrix v2; historical role-v1 events and cached original responses remain compatible.
- Automatic disable on HTTP 410 or three consecutive committed terminal dead letters cancels pending work. Manual disable retains it; explicit re-enable and replay provide recovery.
- Local queue signals track pending depth and oldest age, raising at 80% capacity for five minutes and clearing below 50%, with persistent deduplication. They do not send external notifications.
Evidence and retention/admission boundaries: docs/b1-webhook-lifecycle.md. B1 source publication did not deploy an image or apply migration 0011 to dev. At that 13 October receipt, dev ran API/egress 79c9270, console 689478ca and engine 89aef7f, with API migrations through 0010; staging was down. This is a dated runtime receipt, not a description of the current maclocal stack. B2a has not changed that stack or applied migration 0012 to it.
Commands#
cargo fmt --all --check
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo test --workspace --locked # database tests are reported as ignored
scripts/test-postgres.sh # every test on a disposable postgres:17-alpine
# the cross-tenant fuzz suite: NEXUS_API_FUZZ_CASES (2,000) cases from
# NEXUS_API_FUZZ_SEED (printed when unset; set it to repeat a run exactly)
NEXUS_API_FUZZ_CASES=20000 NEXUS_API_FUZZ_SEED=0x5eed0025 \
scripts/test-postgres.sh --test cross_tenant_fuzz -- --nocapture
# the same suite against a running service on a loopback address; FILE (0600)
# holds three or more admin keys or bootstrap-org JSON lines
cargo run --example cross_tenant_fuzz -- --base-url http://127.0.0.1:13022 --orgs-file FILEThe engine is a private git dependency (pinned at 89aef7fe3a277abccc3e67dabfb886e167af7408; its client crate nexus-licence comes with it and is used through the engine's re-exports), and so is its nexus-server-support crate at the same revision (the server modules this service shares with the engine's nexus-server: configuration, the application role's password, the health check, KEK check values, sealing primitives and backoff): fetch with CARGO_NET_GIT_FETCH_WITH_CLI=true and an authenticated git (gh auth login). scripts/test-postgres.sh needs Docker; it starts a container labelled umbra.purpose=disposable-test on a random 127.0.0.1 port and removes it on every exit path.
nexus-api migrate # as the owner role (NEXUS_API_MIGRATE_DATABASE_URL); with
# NEXUS_API_APP_DB_PASSWORD also enables login for nexus_api_app
nexus-api bootstrap-org --name NAME --owner-sub UUID [--key-name NAME]
# organisation (with its tenant KEK), owner and first admin
# key; prints the key once
nexus-api serve # the API on NEXUS_API_BIND (127.0.0.1:8481 by default) and the
# licence edge on NEXUS_API_EDGE_BIND (127.0.0.1:8482); with
# NEXUS_API_OUTBOX_FILE or NEXUS_API_EGRESS_PROXY also the
# outbox relay (and its webhooks consumer), with
# NEXUS_API_EGRESS_PROXY the webhook delivery worker
nexus-api healthcheck # GET /readyz on 127.0.0.1; exit 0 or 1
nexus-api egress # the egress proxy on NEXUS_API_EGRESS_BIND (127.0.0.1:8490):
# CONNECT only, public addresses on 443 and 8443 only
nexus-api egress --profile push
# the M21 push profile on NEXUS_API_PUSH_EGRESS_BIND
# (127.0.0.1:8491, never an unspecified address): only APNs'
# two gateways, FCM and its token endpoint; 1 h, 64 MiB per
# direction, 8 tunnels, 5 idle minutes
nexus-api healthcheck --egress # GET /readyz on the egress proxy's port
nexus-api healthcheck --push-egress # ... on the push profile's port
nexus-api keygen root-kek --out FILE # a new root KEK (0600)
nexus-api keygen escrow-recipient --out FILE # an X25519 escrow recipient (FILE, FILE.pub)
nexus-api keygen escrow-signer --out FILE # an Ed25519 escrow signer (FILE, FILE.pub)
nexus-api rotate-root-kek --new-kek-file PATH # owner role: every tenant KEK re-wrapped
nexus-api rotate-tenant-kek --org ID # owner role: one organisation's keys re-wrapped
nexus-api export-escrow --org ID --out FILE [--recipient FILE]
# signed, sealed to the pinned recipient
nexus-api import-escrow --in FILE --org ID --owner-sub UUID [--key-name NAME]
# a full restore into a database without the organisation
nexus-api import-escrow --in FILE --org ID --keys-only
# keys into a dump restored without key data
nexus-api sign-probe --org ID --env ENV [--label TEXT]
# one probe signature: kid, alg, input, signature, public_key
nexus-api console-key create --name NAME # owner role: a console workload key, shown once
nexus-api console-key revoke --id cwk_… # owner role
nexus-api console-key list # owner role: metadata only
nexus-api set-owner --org ID --owner-sub UUID # an owner for an organisation whose last owner
# Umbra Identity deleted; auditedConfiguration is environment-only (.env.example, placeholders); secrets also as <NAME>_FILE (mode 0600); the root KEK only as the 0600 file NEXUS_API_ROOT_KEK_FILE. Without a root KEK the service starts, answers /readyz and every key operation with 503, and serves the rest.
Egress configuration (P3.4, docs/p3-4.md): NEXUS_API_EGRESS_BIND (the proxy's listener, nexus-api egress); NEXUS_API_EGRESS_PROXY (the proxy's host:port, for the service's outbound client); and, in dev and staging only, NEXUS_API_EGRESS_TEST_DESTINATIONS (exact non-public host:port entries the proxy may reach and the API may accept over http) and NEXUS_API_EGRESS_TEST_ROOTS_FILE (PEM roots trusted for those destinations only). NEXUS_API_EGRESS_DENIED_ADDRESSES (RSK-35, the proxy only) lists the host's own public addresses, as addresses or CIDR prefixes (at most 64, no /0, host bits zero, no IPv4-mapped IPv6); the proxy refuses any CONNECT whose resolved addresses include one, with host-address, and without the list it starts with an egress-host-addresses-unset warning. Set it before any production use. None of them is a secret.
Push egress configuration (M21 P0, docs/m21-p0.md): NEXUS_API_PUSH_EGRESS_BIND (the push profile's listener, nexus-api egress --profile push; 127.0.0.1:8491, and never an unspecified address even with the opt-in). Its limits default to the documented ceilings and may be lowered only: NEXUS_API_PUSH_EGRESS_TUNNEL_SECONDS (3,600), NEXUS_API_PUSH_EGRESS_TUNNEL_BYTES (67,108,864), NEXUS_API_PUSH_EGRESS_MAX_TUNNELS (8) and NEXUS_API_PUSH_EGRESS_IDLE_SECONDS (300). It reads the same NEXUS_API_EGRESS_TEST_DESTINATIONS, NEXUS_API_EGRESS_DENIED_ADDRESSES and NEXUS_API_EGRESS_TEST_ROOTS_FILE seams; the webhook profile's limits do not change. No push credential is configured in P0.
Console configuration (P3.5, docs/p3-5.md), all four Identity variables or none (a value empty after trimming counts as unset): NEXUS_API_IDENTITY_ISSUER (the exact iss), NEXUS_API_IDENTITY_JWKS_URL, NEXUS_API_IDENTITY_LIFECYCLE_URL (HTTPS to a public host, or an exact NEXUS_API_EGRESS_TEST_DESTINATIONS entry in dev and staging) and the secret NEXUS_API_IDENTITY_LIFECYCLE_KEY (or its _FILE); NEXUS_API_IDENTITY_TRANSPORT (direct, the default, or egress); and NEXUS_API_CONSOLE_SESSION_IDLE_SECONDS (1,800) and NEXUS_API_CONSOLE_SESSION_MAX_SECONDS (43,200). direct connects straight to Identity. egress sends the JWKS and lifecycle calls through NEXUS_API_EGRESS_PROXY and requires that variable; an egress-proxy outage then also blocks console sign-in, which is acceptable for staging. Production keeps direct. Without Identity the service starts (a console-sign-in-disabled warning), sign-in answers 503 and so does every member request. In env-nexus these are absent until Identity registers nexus-console and issues a lifecycle key.
Escrow configuration (docs/p2-4.md): NEXUS_API_ESCROW_RECIPIENT (the pinned X25519 recipient) and NEXUS_API_ESCROW_OPERATOR_PUBLIC (the pinned Ed25519 signer) are public values; NEXUS_API_ESCROW_SIGNING_KEY (export-escrow) and NEXUS_API_ESCROW_RECIPIENT_SECRET (import-escrow) are secrets, a value or a 0600 file, passed only to the command that needs them. All four are 32 bytes as base64url without padding (standard base64 is read too).
Tenant export configuration (B5, docs/b5-tenant-lifecycle.md): NEXUS_API_EXPORT_SIGNING_KEY (a value or a 0600 file; an Ed25519 seed as keygen escrow-signer writes one) signs every export envelope, for serve and export-tenant; without it exports answer 503 export-unavailable. A recipient checks an envelope with open-export (NEXUS_API_EXPORT_RECIPIENT_SECRET, NEXUS_API_EXPORT_SIGNER_PUBLIC). In a hosted deployment (NEXUS_API_ALLOW_NON_LOOPBACK_BIND=1) the holder seat routes need NEXUS_API_EDGE_ORIGIN.
API#
Management keys: Authorization: Bearer nxk_…. Member sessions (P3.5): the same tenant routes under /v1/orgs/{org} (GET /v1/orgs/{org} for GET /v1/org) with Authorization: Bearer nxc_… (the console key) and Nexus-Session: nxs_…. Routes: GET /v1/org; GET/POST /v1/projects, GET /v1/projects/{id}, POST /v1/projects/{id}/archive; GET/POST /v1/projects/{id}/environments; GET /v1/projects/{id}/environments/{env_id}/keys (public signing keys), POST /v1/projects/{id}/environments/{env_id}/keys/rotate (admin keys); GET/POST /v1/api-keys, POST /v1/api-keys/{id}/revoke; GET /v1/audit?after=<seq>&limit=<n>, GET /v1/audit/verify; the licensing routes above and GET /v1/events; GET/POST /v1/webhook-endpoints, GET/PATCH /v1/webhook-endpoints/{endpoint_id}, POST .../rotate-secret, POST .../replay, POST .../delete (B1, required If-Match), GET .../deliveries, GET .../deliveries/{delivery_id} (P3.4; unrestricted keys); P3.5: GET /v1/access, GET /v1/members, GET/PATCH /v1/members/{sub}, POST /v1/members/{sub}/remove, POST /v1/ownership/transfer, GET/POST /v1/invitations, POST /v1/invitations/{id}/revoke (member sessions); the console's own POST /v1/console/sessions, GET /v1/console/session, POST /v1/console/session/revoke, POST /v1/console/invitations/accept; GET /healthz, GET /readyz. The authorization matrix is src/authz.rs (the gate in src/http.rs applies it to every tenant route); the contract is docs/openapi.json.
Licence edge (NEXUS_API_EDGE_BIND), under /v1/orgs/{org}/envs/{env}: POST nonce, POST activate, POST refresh, POST deactivate, POST trials (signed: Nexus-Nonce, Nexus-Signature), GET keysets, POST status, POST seats, POST seats/release; the data plane (Authorization: Bearer nxd_…): POST /v1/server/licences, GET /v1/server/licences/{licence_id}, POST /v1/server/licences/{licence_id}/renew; GET /healthz, GET /readyz. The wire format is in docs/p3-1.md. Independent observers renew on the edge with POST /v1/observer-leases. The operator enrollment and signing-key commands are documented in M19 I2 observer leases.
Every response carries X-Request-Id: the caller's when it is one value of 1 to 64 characters from [A-Za-z0-9._-], else a new req_<ULID>.
Limits#
No Umbra Identity configuration anywhere (console sign-in fails closed), no lifecycle feed (a deleted subject's memberships go at its next request or sign-in), no offline environment roots (each root is wrapped and escrowed like every other key), no KMS or HSM root, no off-host audit anchors, no webhook ping, no external queue-alert routing, no asymmetric (v1a) webhook signatures, no Stripe account connected (the billing adapter, LIC-019, docs/lic-019-stripe-adapter.md, is tested only against a local fake), no audit export, no shared rate limits across instances (in-process windows), no OpenTelemetry, and no production deployment. See docs/p2-1.md, docs/p2-2.md, docs/p2-4.md, docs/p2-5.md, docs/p3-1.md, docs/p3-3.md, docs/p3-4.md and docs/p3-5.md and docs/b1-webhook-lifecycle.md. Terminal webhook retention does not erase all tenant history; idempotency expiry remains logical and original cached responses can retain prior endpoint configuration.
| Path | Contents |
|---|---|
src/ | scope (typed scope, authentication, bootstrap, operator paths, member scopes), authz (the role matrix, P3.5), identity (Umbra Identity: ID tokens, JWKS, lifecycle; P3.5), console (console sessions and their routes, P3.5), http_members (members, invitations, ownership, access; P3.5), store (Postgres; store/keys.rs, store/escrow.rs, store/relay.rs, store/engine.rs (the engine's ports), store/licensing.rs, store/edge.rs, store/lifecycle.rs, store/webhooks.rs, store/console.rs), licensing, http_licensing, webhooks (Standard Webhooks signatures, the relay's consumer, the delivery worker), http_webhooks, egress (the egress proxy, nexus-api egress), outbound (the HTTPS client through it), ssrf (the address, port and URL policy), idempotency, edge (the licence edge), client (client address and IP class), sweep, envelope, custody, escrow (bundle format v2), escrow_keys (the operator's escrow keys, pins and encodings), relay (envelope version 3), audit (hash versions 1 to 3), correlation (request and command IDs), key, http, model, ids, config (this service's variables, bind rule and application role), log (log line version 2), main.rs; configuration reading, the role's password, the healthcheck client, sealing primitives and backoff are the engine's nexus-server-support |
migrations/ | 0001 tenancy tables and row-level security; 0002 pre-tenant SECURITY DEFINER lookups; 0003 the key hierarchy; 0004 the outbox relay's ledger and pending function; 0005 the event envelope (revisions, envelope columns, hash versions, consumer_revisions); 0006 drops the cross-organisation existence lookup; 0007 licensing (products, policies, licences, installations, activations, key sets, roots and key states, data-plane service keys, idempotency records); 0008 the edge's nonces, the IP class on audit and outbox rows (hash version 3); 0009 webhook endpoints, deliveries and attempts; 0010 console keys, sessions and the ID token ledger, member removal and role versions, invitations, the ownership review flag; 0011 webhook deletion/disable metadata, role matrix v2, bounded terminal-history purge and tenant maintenance directory |
tests/ | router.rs (in process, no database), postgres.rs (isolation, API keys, audit, outbox), keys.rs (hierarchy, signing, isolation of keys), rotation.rs, escrow.rs, relay.rs, envelope.rs (revisions, correlation IDs, hash versions), licensing.rs (the licensing routes, the engine's verifier on what they issue), edge.rs (the licence edge: proof of possession, seat scenarios and concurrency, tamper sweep, key lifecycle, IP class, cross-tenant twins), conformance.rs (the engine's fixture corpus at the pin), openapi.rs and openapi/ (the document against the router and responses), cross_tenant_fuzz.rs and fuzz/ (the fuzz suite), forbidden_edges.rs, schemas.rs and schema/ (the format validator), cli.rs (the binary); P3.4: ssrf.rs (the SSRF corpus), egress.rs and egress_support/ (the proxy and the outbound client in process), webhooks.rs (endpoints, queueing, the worker, end to end), fixtures/tls/ (synthetic TLS material, tests only); P3.5: identity.rs (ID token verification, the JWKS cache, the lifecycle client over HTTP and TLS), console.rs (sessions, lifecycle outcomes, members, invitations, ownership), rbac.rs (the role matrix), support/issuer.rs (the test-only Umbra Identity), fixtures/identity/ (its synthetic RSA keys) |
examples/cross_tenant_fuzz.rs | The fuzz suite against a running service (not in the image) |
scripts/test-postgres.sh | The disposable Postgres test run |
Dockerfile, .dockerignore | The image (private engine via a BuildKit secret; /var/lib/nexus-api for the outbox volume) |
docs/ | openapi.json (the HTTP contract), p2-1.md, p2-2.md, p2-4.md, p2-5.md, p3-1.md, p3-3.md, p3-4.md and p3-5.md (scope, evidence, limits; P2.3, the move onto the engine's exported modules, is recorded in p2-2.md and dependency-review.md), events.md and schema/ (the event, webhook, audit hash and log formats, with the webhook reference verifier), dependency-review.md, b1-webhook-lifecycle.md (B1 source checks and remaining deployment/notification gates), c1b-telemetry-tokens.md (M19 S0/C1b) and c2b-telemetry-grants.md (M19 C2b, the nexus-api grant route) |