feat(e2ee): build a deployment-test Node daemon that trusts the hosted witness - #436
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
…d witness A daemon cannot pair through the hosted deployment-test stack: the production Node binding names no replica trust and no supported key store exists on hosts such as WSL, and the configured endpoints added for tests keep their envelope keys in memory, so they lose a paired session on restart. `build.mjs deployment-test` (with AXL_E2EE_DEPLOYMENT_TEST_TRUST_FILE) now builds dist/deployment-test: the production binding plus exactly one export, deploymentTestDaemonEndpoint(root, account, installation, session). - Trust is pinned at build time: build.rs copies the named trust file into OUT_DIR and the endpoint decodes it with ReplicaTrustSet::decode_config. Without a file (unit tests, lint) the pinned trust is empty and every endpoint fails closed with rollback_anchor_unavailable. - Envelope keys persist in one owner-only file under root/keys. Each change is written to a sibling, synced, and renamed into place before it becomes visible; a damaged file fails closed. It is not a secure store and ships in no production artifact. - The loader is the production loader plus one appended export. - check-abi forbids every deployment-test name in production and checks that the deployment-test binary carries no test identifiers and that its loader is exactly production plus the appended export. - artifact-policy treats deployment-test items as neither production nor test, so deployment_test_daemon_endpoint cannot hide the test-only test_daemon_endpoint it contains. - CI runs the key store tests and clippy with the deployment-test feature. Checked live against the AWS deployment-test stack: a daemon endpoint built with the trust from witness-trust.sh registered through the hosted witness, read, reopened from its file keys, completed recovery, and returned the same invitation. Signed-off-by: Lokesh <lokeshselvam7025@gmail.com>
Signed-off-by: Lokesh <lokeshselvam7025@gmail.com>
115b0e8 to
4004563
Compare
Summary
#435 is merged and this branch is rebased on
RC. It has two commits:feat(e2ee): build a deployment-test Node daemon that trusts the hosted witness, andchore(e2ee): license the deployment-test loader additions, which annotates the appended loader file inREUSE.toml(a header inside it would change the byte-exact loader).A daemon cannot pair through the hosted deployment-test stack today:
build.mjs deployment-test(withAXL_E2EE_DEPLOYMENT_TEST_TRUST_FILE) buildsdist/deployment-test. It is the production binding plus exactly one export,deploymentTestDaemonEndpoint(root, account, installation, session).build.rscopies the named file intoOUT_DIR, and the endpoint decodes it withReplicaTrustSet::decode_config. Without a file (unit tests, lint) the pinned trust is empty and endpoints fail closed withrollback_anchor_unavailable.root/keys. Each change is written to a sibling file, synced, and renamed into place before it becomes visible. A damaged file fails closed. This is not a secure store, and it ships in no production artifact.artifact-policytreats deployment-test items as neither production nor test, sodeployment_test_daemon_endpointcan't hide the test-onlytest_daemon_endpointit contains.Test plan
cargo fmt --check; clippy-D warningsfor the Node crate withdeployment-test,test-fixtures, and default featurescargo test -p axl-e2ee-node --features deployment-test deployment_store: 2 passed (persistence across reopen, store contract, owner-only mode, damaged file fails closed)production,test, anddeployment-testbuilds; Node and browsercheck-abipnpm --filter @axl/e2ee-node test: 16 passed, 1 skipped (Windows DPAPI on Linux)witness-trust.sh:readyrecover_acceptedexchangeNext: the daemon remote host and
/remote(invitation link, claim and Welcome rendezvous,pair_activationover the relay).