Skip to content

spike(identity): prototype cross-server brokerage - #1512

Draft
hmans wants to merge 6 commits into
mainfrom
hmans/cross-server-identity-factors
Draft

spike(identity): prototype cross-server brokerage#1512
hmans wants to merge 6 commits into
mainfrom
hmans/cross-server-identity-factors

Conversation

@hmans

@hmans hmans commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Why

Chatto needs a concrete way to evaluate whether accounts on independent servers
can self-verify as the same user without exposing email addresses, trusting a
shared broker, or asking users to manage a persistent identity key. This spike
turns the protocol discussion into an adversarial, executable proof of concept.

What changed

  • Add an isolated cli/internal/identitybroker Go package; it is not connected
    to production APIs, persistence, or the frontend.
  • Model two-server genesis and later joins requiring a target plus two current
    sponsors on distinct server origins.
  • Use origin-pinned Ed25519 server keys, challenge-bound disposable ceremony
    keys, exact length-prefixed canonical signing bytes, genesis-derived group
    IDs, bounded credential lifetimes, and idempotent approval/finalization.
  • Make self-revocation atomic with its sole approval and validate the credential
    against verified local group state before committing it.
  • Reconstruct the membership DAG and revocations from public certificates on a
    clean client, including an HTTP integration test spanning 20 server origins.
  • Document the demonstrated security boundary, the intended RUNTIME_STATE /
    EVT production mapping, and unresolved recovery, rotation, privacy, and API
    questions.

The adversarial review loop fixed discovery-origin poisoning, post-revocation
backdating and selective disclosure, parallel-genesis aliasing, ceremony-key
substitution, unbounded lifetimes, and invalid revocation poisoning. The final
review found no remaining high- or medium-severity issues.

Compatibility and rollout

  • No protobuf, public API, persisted event, NATS resource, configuration, or
    user-facing behavior changes.
  • The package is deliberately in-memory and must not be used as production
    state. An ADR/FDR and production key/storage design are required before
    integration.

Test plan

  • mise test-cli
  • mise license-check
  • mise x -- go test ./internal/identitybroker -count=1 -timeout 60s
  • mise x -- go test -race ./internal/identitybroker -count=1 -timeout 90s
  • mise x -- go vet ./internal/identitybroker
  • mise x -- go test ./internal/identitybroker -shuffle=on -count=20 -timeout 90s
  • mise x -- go test -race ./internal/identitybroker -shuffle=on -count=5 -timeout 120s

Closes #1508.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

spike(identity): prototype secure cross-server identity brokerage

1 participant