Skip to content

feat(relay): add relay-verified identity binding - #1476

Open
fsola-sq wants to merge 10 commits into
mainfrom
fsola/corporate-identity
Open

feat(relay): add relay-verified identity binding#1476
fsola-sq wants to merge 10 commits into
mainfrom
fsola/corporate-identity

Conversation

@fsola-sq

@fsola-sq fsola-sq commented Jul 2, 2026

Copy link
Copy Markdown

Why

Add a provider-neutral relay-side identity foundation that binds a verified JWT principal to a NIP-proven Nostr key.

What

  • Add configurable JWT validation for JWKS URI, issuer, audience, header, subject, display-name, and optional pubkey claims.
  • Persist issuer-qualified (community, issuer, uid) bindings with fail-closed conflict handling and durable revocation tombstones.
  • Make direct-JWT versus delegated-owner precedence explicit and configurable instead of inferring it from the presence of a NIP-OA owner declaration.
  • Enforce the verified identity consistently across WebSocket, HTTP bridge, media, Git, and audio transports.
  • Publish relay-signed NIP-85 assertions without disclosing the upstream identity-provider issuer, and present them as relay-verified identity in the desktop UI.
  • Run the ignored PostgreSQL identity-binding and relay identity lifecycle tests in hosted CI.

Risk Assessment

Medium. This touches every relay authentication transport, but the feature is disabled by default behind BUZZ_REQUIRE_CORPORATE_IDENTITY and fails closed when enabled.

Follow-ups

  • Add client-held OIDC with system-browser PKCE.
  • Add operator revocation, rotation, offboarding, and bad-binding repair workflows.
  • Add bounded authorization sessions, lease expiry and renewal, and live connection and delegated-agent eviction.
  • Add an optional startup JWKS reachability probe.

Notes

When enabled, the configured JWT acts as an enrollment authority: first use binds the verified issuer-qualified principal to the NIP-proven pubkey. A compromised valid JWT can therefore create an incorrect binding until an operator repairs it; automated recovery remains follow-up lifecycle work.

Trusted deployments must overwrite the configured identity header at the relay boundary. JWKS failures fail closed, and configured display-name claims may result in stored personal information.

Update — 2026-07-28

  • Qualified persisted principals by issuer.
  • Removed upstream issuer disclosure from public assertions.
  • Made direct-versus-delegated authentication precedence provider-neutral and configurable.
  • Replaced deployment-specific terminology and fixtures with generic relay/proxy/identity-provider terminology.
  • Renamed user-facing verification language to “Relay-verified identity.”
  • Preserved revoked-binding tombstones and added hosted lifecycle coverage.

Generated with Codex

@cea-block
cea-block force-pushed the fsola/corporate-identity branch 2 times, most recently from 9b7bf58 to 419e851 Compare July 28, 2026 19:53
Signed-off-by: Cea Stapleton Cordasco <[email protected]>
@cea-block
cea-block force-pushed the fsola/corporate-identity branch from 419e851 to 7cd8b9e Compare July 28, 2026 23:03
@cea-block cea-block changed the title feat(relay): add corporate identity binding feat(relay): add relay-verified identity binding Jul 28, 2026
Signed-off-by: Cea Stapleton Cordasco <[email protected]>
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.

2 participants