Skip to content

apps: owned by the account key, deploy/secrets/logs from any machine #375

Done

Description

@ralyodio

Follow-up to the hosting change in feat/hosting-account-owner (v0.3.73): sites are now owned by an account key derived from the producer's c0mpute identity (chat.key, HKDF c0mpute-hosting-owner-v1), so the same name is the same site from any machine and only the producer can change it.

Apps still use the machine key, and three things block switching them:

  1. AppRecord::sign / app_id_for(owner, name) use hosting::publisher_keypair() (apps/deploy.rs:181,349, apps/record.rs:124,199-229). Switching the signer is easy, but existing apps need the same keep-legacy-id + --move path hosting got.
  2. Secrets hand-off (apps/mod.rs:649) and logs (apps/mod.rs:1987) check that the connecting libp2p peer is owner_peer(). Proposal: for owner-only calls, the CLI boots its swarm with the account keypair as its libp2p identity, so peer == owner_peer() holds with no protocol change on holders.
  3. Owner state (app key + secrets) lives only in <data_dir>/apps/owner/<name>.json on the deploying machine (apps/deploy.rs:65-81). Derive the app key from the account seed (HKDF per app name) so any machine with the identity can rebuild it; secrets stay sealed to holders and are re-set from wherever you deploy.

Also worth doing: the c0mpute.com cloud node signs every account's pushes with one shared key (apps/web/src/lib/chat/push.ts:214-222), so cloud-pushed names clash across accounts. That path is custodial by nature; producer-only control needs the producer's own node.

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions