feat: one-way trust + require hardware-backed key storage - #5
Merged
Conversation
Final sweep across protocol-spec, architecture-decisions, why-amesh, sitemap, keystore package.json, and nonce.ts. Replaces Lambda examples with generic server names, removes Tier 4 fallback from spec diagrams, and updates all stale references.
…ets only Enforce asymmetric trust: after pairing, controllers can authenticate to targets but targets cannot authenticate back. Limits blast radius of a compromised server. Default single-controller per target. - Add `role` field to AllowListDevice (controller | target) - Middleware rejects devices with role "target" (Step 3b) - `amesh listen` sets peer role to controller, enforces maxControllers - `amesh invite` sets peer role to target - `amesh list` shows [controller]/[target] role tags - `amesh init --max-controllers N` configures limit - Legacy allow lists migrate role to "controller" on first read - ADR-010 documents the design decision - All docs, landpage, and sitemap updated
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
One-way trust directionality (new)
AllowListDevice(controller|target), enforced in verification middleware (Step 3b)amesh init --max-controllers Namesh listnow shows[controller]/[target]role tagscontrolleron first readHardware-only key storage
AUTH_MESH_PASSPHRASEplumbing from CLI, SDK, detection chain, and all documentation.Files changed (22 files, +357/-92 in latest commit)
Code
packages/keystore/src/allow-list.ts—rolefield,countByRole(),replaceByRole(), legacy migrationpackages/sdk/src/middleware.ts— Step 3b directionality check (rejectsrole: "target")packages/sdk/src/amesh.ts— Same directionality check in simple verify APIpackages/cli/src/commands/listen.ts— Sets peer role tocontroller, enforcesmaxControllerslimit with replace promptpackages/cli/src/commands/invite.ts— Sets peer role totargetpackages/cli/src/commands/init.ts—--max-controllersflagpackages/cli/src/commands/list.ts— Shows[controller]/[target]tagspackages/cli/src/identity.ts—maxControllersoptional fieldpackages/sdk/src/bootstrap.ts— Sets role tocontrollerfor bootstrap flowpackages/keystore/src/detect.ts— Hardware-only detectionTests
packages/keystore/src/__tests__/allow-list.test.ts— 4 new tests (role storage, countByRole, replaceByRole, legacy migration)packages/sdk/src/__tests__/middleware.test.ts— 1 new test (rejects target-role device)Documentation
README.md— One-way trust in architecture diagram and "How It Works"docs/protocol-spec.md— Step 3b, role field in allow list schema, security considerationsdocs/architecture-decisions.md— ADR-010: One-way trust directionalitydocs/guide.md— Role tags inamesh list, pairing section explains one-way trustdocs/integration-guide.md— Architecture diagrams, setup comments, microservices recipedocs/self-hosting.md— Architecture diagram with controller/target labelsdocs/why-amesh.md— Security model sentenceLanding page
landpage/src/routes/+page.svelte— CLI output, feature card, step descriptionslandpage/src/routes/docs/integration/+page.svelte— Architecture overview, setup commentslandpage/src/routes/use-cases/microservices/+page.svelte— Terminal tablandpage/static/sitemap.xml— Updated lastmod datesTest plan
bun run buildpasses (all packages + landing page)bun run testpasses (all existing + 5 new tests)role: "target"(401)rolefield migrate tocontrolleron readreplaceByRole()correctly swaps controllers and preserves targetsamesh listshows correct roles🤖 Generated with Claude Code