- Omnel
- Documentation
- Omnel Engine documentation
Omnel Engine documentation
The README of the Omnel Engine 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 Rust licensing engine and contract harness of the Nexus platform, built through phases N1, N2, P2.3, P3.2 and P3.3 of docs/nexus-platform-plan/approval-and-handoff.md §4 in the Umbra control plane. Since P3.1 the Nexus API (umbra-me/api-umbra-nexus) runs this engine inside its own store, through the engine's ports, and serves the licence edge; this repository's nexus-server remains the N2 prototype. Synthetic only: no real key, customer data or Polaris code. N1 keys derive from fixed, public test labels; the servers generate their KEKs, keys and passwords per run. Published privately as umbra-me/nexus-engine and registered in the Umbra control plane as the optional component nexus/engine; nexus-server deploys only in the non-production stack nexus-platform (dev and staging; docs/runbooks/nexus-platform.md in the control plane). No production deployment, and nothing here is published.
A Cargo workspace:
nexus-engine(the repository root): the engine, its ports and in-memory reference implementations, and the language-neutral contract (N1). Since P3.3 it also exports what the Nexus API used to mirror: the active key, licence signing, the status-change rule, revocation, release by licence and licence updates (docs/p3-3.md).crates/nexus-address-policy(M19 I2): the Nexus public-address (SSRF) policy, moved unchanged from the Nexus API so the API and the native M19 observer share one owner rather than a copy: URL admission, host normalisation (a documented UTS 46 subset), non-public address classes and cloud metadata addresses, allowed ports, test destinations and denied addresses. Pure: no dependencies, I/O or environment access; callers read their own configuration variables.crates/nexus-licence(P3.3): the client crate a customer application links (LIC-025): the offline verifier, the JWS profile, claims, keys and thumbprints, tenancy and identifiers, the edge's signing input and bodies, a sans-IO edge client (EdgeClientbuilds signed requests,parse_*read answers and RFC 9457 problems) and the installation key. No store, signer, randomness or I/O; no dependency the engine does not have. The engine re-exports its modules under their old paths.crates/nexus-release(M20 C5, stage I1): the release-feed formats. Minisign public keys and prehashed (ED) signatures exactly as the Tauri v2 updater verifies them (interop-tested againstminisign-verifyin both directions), the signed trusted comment the signer composes, SemVer 2.0.0 precedence and the per-installation rollout bucket. Pure: no I/O, clock or randomness. Onlynexus-apisigns (with arelease_signingkey, never a licence key);nexus-buildand tests verify.crates/nexus-server(N2-local): the engine on Postgres (SERIALIZABLEwith bounded retry, row-level security per environment), the HTTP edge API with installation proof of possession, signing keys wrapped under a KEK, the outbox worker, sealed exports, and thenexus-serverbinary, which also ships as a container image (Dockerfile).crates/nexus-server-support(P2.3): the server modulesnexus-serverand the Nexus API (umbra-me/api-umbra-nexus) share, so neither keeps a copy: configuration from the environment and the loopback-only bind rule, the application role's password, the/readyzhealth check, KEK sealing and its check value, the sealing primitives (recipient keys, X25519 agreement, HKDF content key, AES-256-GCM, the Ed25519 operator key and signed input) and the worker backoff; since P3.3 also the edge's fixed-window limiter and the problem document for every engine refusal, so both edges answer alike. Each takes the variable names, role, labels and associated data from its caller. The engine also exportsprefixed_id!(defined innexus-licence), so the API defines its identifiers the engine's way.sdk/(P3.2, private, unpublished): the verifier SDKs that pass the same fixtures and tamper sweep as the Rust reference:sdk/swift(SwiftPM, CryptoKit, Keychain installation keys, for directly distributed macOS apps),sdk/typescript(an ESM package with declarations), the shared edge request and strictness vectors, the channel matrix (CHANNELS.md) and the command-line contract every example consumer follows (sdk/README.md).docs/p3-2.mdrecords them and the Rust client review.
cargo fmt --all --check
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo test --workspace --locked # in memory; Postgres and drill tests are reported as ignored
scripts/test-postgres.sh # nexus-server tests on a disposable postgres:17-alpine
scripts/restore-drill.sh # dump + key escrow restored into a second server
cargo build --workspace --locked --release
cargo run -p nexus-engine --example fixture_consumer # the fixture corpus through the public API
NEXUS_LICENCE_KEY=… cargo run -p nexus-licence --example edge_activation -- \
--base http://127.0.0.1:PORT/v1/orgs/ORG/envs/ENV --app APP --root X --key-file FILE
# activate, refresh, verify offline, release (docs/p3-3.md)
(cd sdk/typescript && npm ci && npx tsc --noEmit && node --test && npm run build) # the TypeScript SDK
(cd sdk/swift && swift build && swift test) # the Swift SDK (also: swift test --traits MacAppStore)
python3 sdk/compare-consumers.py # Swift, TypeScript and Rust consumers, byte for byteBoth scripts need Docker; they start containers labelled umbra.purpose=disposable-test on random 127.0.0.1 ports and remove them on every exit path.
The tests that need a server are #[ignore = "needs NEXUS_TEST_DATABASE_URL; run scripts/test-postgres.sh"] (the two restore-drill phases name scripts/restore-drill.sh), so a plain cargo test counts them as ignored instead of passing without running them: 179 passed and 86 ignored. scripts/test-postgres.sh runs them with --include-ignored (and skips the drill phases); with no server configured a test run that way fails naming the variable.
| Path | Contents |
|---|---|
crates/nexus-address-policy/src/ | lib.rs: WebhookUrl, Host, non_public/NonPublic, METADATA, ALLOWED_PORTS, TestDestinations, DeniedAddresses; the API's behaviour tests stay in api-umbra-nexus tests/ssrf.rs |
crates/nexus-licence/src/ | The client crate: jws, document, keys (compact JWS over Ed25519, v1 claims, keys and key sets), verifier (the offline verifier), tenancy, ids, edge (signing input, bodies, answers, EdgeClient, InstallationKey), problem (RFC 9457 documents and kinds); tests/edge_vector.rs; examples/edge_activation.rs |
src/licensing/{keys,seats,commerce,legacy,records}.rs | Key handles, the offline root and the key lifecycle; licences, seats, revocation and updates; payment events; the legacy-authority port |
src/{ports,memory,engine,events,export}.rs | Ports, in-memory reference implementations with crash points, the engine, outbox and consumers, tenant export |
contracts/licensing/v1/ | Language-neutral contract: schemas, 121 fixtures, 18 server scenarios |
tests/ | Conformance, negative corpus and tamper sweep; tests/store_cases/ holds the store scenarios (offline, rotation, seats, commerce, events, export and restore, legacy), generic over the store, which tests/*.rs run in memory |
crates/nexus-release/src/ | minisign (keys, prehashed signatures, strict parsing, verification), comment (the trusted comment), version (SemVer 2.0.0), bucket (rollout); tests/interop.rs against minisign-verify; vectors in contracts/release/ |
crates/nexus-server/src/ | pg (Postgres store), custody (wrapped keys, escrow, KEK rotation), kek, edge (axum API, /readyz), health (the healthcheck client), role (the app role's password), worker (outbox relay task), sealed (signed, encrypted exports), config, main.rs (the binary) |
crates/nexus-server-support/src/ | config, role, health, kek, sealed (primitives and key types only), backoff, limiter (fixed windows), problem (engine_problem); nexus-server's modules of the same names are thin wrappers that name its variables, role, KEK identifier and export labels |
crates/nexus-server/migrations/ | 0001 tenant tables and row-level security, 0002 the worker's identifier-only function, 0003 wrapped signing keys |
crates/nexus-server/tests/ | The store scenarios on Postgres, isolation (ACC-ARC-01), custody, edge (in process), worker, sealed exports, the binary, the restore drill |
scripts/ | test-postgres.sh, restore-drill.sh |
sdk/typescript/ | The TypeScript SDK: verifier, edge request signing, store mode, its tests and the nexus-verify example |
sdk/swift/ | The Swift SDK (NexusLicensing): verifier with Ed25519 strictness checks over CryptoKit, Keychain installation keys, watermark state, edge request signing, store mode, and the nexus-verify executable |
sdk/vectors/, sdk/compare-consumers.py | The shared edge request vector (also checked, and rebuilt by the Rust client, in crates/nexus-licence/tests/edge_vector.rs), the strictness vectors, and the three-consumer comparison |
examples/ | fixture_consumer (the corpus through the public API) and nexus_verify (the shared command-line contract in Rust) |
Dockerfile, .dockerignore | The nexus-server image |
.env.example | The server's environment variables, placeholders only |
docs/ | scope.md (N1 answers and findings), evidence.md (N1 and N2-local receipts), p3-2.md (the verifier SDKs), p3-3.md (the client crate and the engine exports), dependency-review.md, limitations.md, n2-proposal.md (status and what remains) |
nexus-server#
nexus-server migrate # as the owner role (NEXUS_MIGRATE_DATABASE_URL); with
# NEXUS_APP_DB_PASSWORD also sets the nexus_app password
nexus-server issue-test-tenant --label demo --root-escrow-out FILE
nexus-server serve # edge API on NEXUS_BIND (127.0.0.1 unless NEXUS_ALLOW_NON_LOOPBACK_BIND=1) + outbox worker
nexus-server healthcheck # GET /readyz on 127.0.0.1 at the port of NEXUS_BIND; exit 0 or 1
nexus-server check --org ORG --env ENV
nexus-server export --org ORG --env ENV --recipient X25519_PUBLIC --out FILE
nexus-server import --in FILE
nexus-server escrow-export --out FILE / escrow-import --in FILE
nexus-server rotate-kek
nexus-server keygen kek|operator|recipient --out FILEConfiguration comes from the environment only (.env.example); every secret can be a value or a 0600 file (<NAME>_FILE), never a command-line argument. A missing or wrong KEK stops every command before it does anything.
Edge routes under /v1/orgs/{org}/envs/{env}: POST nonce, POST activate, POST refresh, POST deactivate (the last three signed by the installation key over method, path, nonce and body digest), and GET keysets?after=<seq>. Outside that prefix: GET /healthz (the process is up) and GET /readyz (the database answers SELECT 1 within 2 s: 200, or 503 with a fixed body that says nothing about the cause; the verdict is reused for 1 s). Errors are RFC 9457 problem documents: their kinds, statuses and titles are nexus-licence's problem module, and engine refusals are mapped by nexus-server-support's engine_problem, which the Nexus API shares.
Database roles#
migrate runs as the owner role and creates nexus_app as NOLOGIN. Give it NEXUS_APP_DB_PASSWORD (or NEXUS_APP_DB_PASSWORD_FILE; at least 16 printable ASCII characters, such as openssl rand -hex 24) and it also enables login for the role and sets or rotates its password; the owner role needs CREATEROLE. The password is hashed in the process and the server is sent a SCRAM-SHA-256 verifier, so a statement in Postgres's log never holds it, and it is never printed. NEXUS_DATABASE_URL must name that role and that password (postgres://nexus_app:<password>@host:5432/nexus). Without NEXUS_APP_DB_PASSWORD the role is left as it was, which suits a role created by hand.
Container#
docker build --platform linux/amd64 \
--build-arg GIT_REVISION=$(git rev-parse HEAD) -t nexus-server:local .Builder rust:1.98-slim-bookworm (cargo build --locked --release -p nexus-server), runtime debian:bookworm-slim (the same Debian release, so the glibc matches). The image holds the binary only: ENTRYPOINT ["nexus-server"], CMD ["serve"], user nexus (uid 1001), EXPOSE 8480, the org.opencontainers.image.revision label from GIT_REVISION, and a HEALTHCHECK that runs nexus-server healthcheck, so there is no curl. The migrations are embedded in the binary: docker run IMAGE migrate applies them.
A container cannot use the loopback-only bind rule, because the published port reaches the container's own interface, so it sets both of:
environment:
NEXUS_BIND: 0.0.0.0:8480
NEXUS_ALLOW_NON_LOOPBACK_BIND: "1"
ports:
- "127.0.0.1:8480:8480" # the deployment keeps the port on loopbackOnly 1 enables the opt-in (0 or unset keeps the rule, anything else is an error), serve logs a non-loopback-bind warning on start-up, and the 127.0.0.1: in the port mapping is what keeps the service private: the edge has no TLS of its own. Secret files (<NAME>_FILE) must be owned by uid 1001 and mode 0400 or 0600, or be passed as environment values instead. The health check works with the 0.0.0.0 bind because it only uses the port; a bind to one specific non-loopback address cannot be checked over loopback.
Regenerate the fixtures after a deliberate contract change with NEXUS_WRITE_FIXTURES=1 cargo test --test conformance fixtures_on_disk.