Skip to content

feat(auth): add Hive and Google provisioning foundation - #4

Merged
mcfarhat merged 2 commits into
developfrom
feature/25-auth-provisioning
Jul 22, 2026
Merged

mcfarhat merged 2 commits into
developfrom
feature/25-auth-provisioning

Conversation

@mhmdibrahimm

Copy link
Copy Markdown
Collaborator

What changed

  • implements single-use Keychain/HiveAuth-compatible Hive login challenges, compact-signature recovery, and current posting-authority verification
  • adds short-lived access/onboarding JWTs, rotating hashed refresh credentials, logout, one-open-session enforcement, and real session-backed Nakama issuance
  • exchanges Google authorization-code + PKCE results through Google's maintained library and maps only the verified issuer/subject HMAC (never email)
  • adds the permanent-public-record disclosure endpoints and blocks realtime play until the current version is acknowledged
  • adds username onboarding plus a durable, retry-safe Google→Hive provisioning coordinator for claim_account/create_claimed_account, initial RC delegation, authority verification, and final identity linking
  • adds a provider-neutral non-exportable custody-key contract and player signer adapter; no AWS-specific dependency or raw-key path is introduced
  • removes the fixed development realtime principal and upgrades the full API→Nakama smoke test to use a real PostgreSQL-backed session

External production gates

This repository deliberately does not claim that a signup sponsor or production custody provider has been selected. Google→Hive account creation returns a safe unavailable state until approved adapters and policy metadata are configured. Hetzner remains the hosting environment; it is not treated as a custody provider.

Validation

  • npm run verify
  • npm run realtime:smoke
  • 35 API tests plus the existing database, Hive gateway, HAF, Go race, OpenAPI/DBML, clean-migration, and dependency-audit checks

Trello: https://trello.com/c/XtJCtMKg

@mcfarhat mcfarhat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mohammadibrahim3 Approved — auth + custodial provisioning. Reviewed + CI green; 102 tests pass. WAX-native, single-use nonce challenge on posting-least-privilege, PKCE Google OIDC with no PII, claimable custodial provisioning behind an isolated no-HTTP-surface signer, fail-closed secrets, idempotent evidence-gated provisioning. Also removes a prior dev auth-bypass. Excellent, security-conscious work. 🎉

@mcfarhat
mcfarhat marked this pull request as ready for review July 22, 2026 23:59
@mcfarhat
mcfarhat merged commit 8b8f2d0 into develop Jul 22, 2026
5 checks passed
@mcfarhat
mcfarhat deleted the feature/25-auth-provisioning branch July 22, 2026 23:59
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