Commit fd12a5a
authored
feat(zupass): complete GPC proof verification system (#416)
Implements complete Zupass event ticket verification using GPC (General
Purpose Circuits) proofs with nullifier-based identity tracking. This enables
privacy-preserving event ticket gating for conversations while supporting
guest accounts, soft login, and account merging.
Backend (API):
- Add GPC proof verification with GPCBoundConfig and GPCRevealedClaims
- Implement watermark-based proof validation using event-specific secrets
- Create zupass_nullifier table with composite unique constraint on
(nullifier_hash, event_slug) to track event-specific identities
- Add merge service for account consolidation during ticket verification
- Implement guest user recovery via nullifier matching
- Add auto-guest-creation during ticket verification for unknown users
- Refactor auth service: split monolithic service into core types and state
helpers modules for maintainability
- Update Rarimo integration to use consistent watermark pattern
- Add nullifier-based authentication type detection helpers
- Implement dynamic import workaround for @pcd/gpc broken ESM exports
- Add shared Zupass event configuration (eventId, signerPublicKey, productIds)
- Update event_ticket schema: replace ticketId with nullifier_hash column
Frontend (Agora):
- Add EventTicketRequirementBanner component with inline verification flow
- Implement auto-trigger Zupass verification on gated interactions (voting,
commenting) with automatic retry after successful verification
- Update authentication store with ticket verification state management
- Add poll voting and comment submission ticket gating with optimistic UI
updates and proper error rollback
- Add settings UI for viewing verified tickets and managing authentication
methods
- Implement guest/soft-login upgrade flow with account merge confirmation
- Add Node.js crypto/fs/path stubs for @pcd/gpc packages in Quasar webpack
build (required for browser compatibility)
- Use Parcnet API with ticketProofRequest() helper for proof generation
- Add event-specific external nullifiers: agora-{eventSlug}-v1
Database:
- New table: zupass_nullifier (nullifier_hash, user_id, event_slug,
created_at, updated_at, deleted_at)
- Composite unique constraint on (nullifier_hash, event_slug)
- Index on user_id for efficient reverse lookups
- Migration V0028: add zupass_nullifier table
Legal & Documentation:
- Update privacy policy (last updated 2025/11/11):
- Add guest account explanation (DID-based device identifier)
- Document soft login vs hard login distinction
- Explain Zupass event ticket verification using GPC proofs
- Add account upgrade/merge policy (guest→soft→hard progression)
- Clarify data retention: only cryptographic proofs stored, never raw
identity documents or ticket details
- Update terms of service:
- Add Zupass alongside Rarimo as ZKP verification method
- Update account deletion flow for Rarimo users (nullifier-only proof)
- Fix typo: "RariMe" → "Rarimo" throughout
- Update AUTHORS: fix "RariMe SDK" → "Rarimo SDK"
Infrastructure:
- Add @pcd/gpc, @pcd/pod, @pcd/pod-pcd packages for proof verification
- Add @parcnet-js/client-rpc for Parcnet API integration
- Add ZUPASS_SERVER_URL and ZUPASS_EVENT_* config variables to env.example
- Update .gitignore to exclude CLAUDE_*.md analysis files
- Add Quasar webpack configuration for Node.js polyfill stubs
Architecture:
- Update all architecture diagrams (drawio files) to reflect new auth flows
- Add CLAUDE_AUTHENTICATION_SECURITY_ANALYSIS.md documenting security model
- Add CLAUDE_PLAN_MERGE_AND_RECOVERY.md documenting account merge logic
- Add CLAUDE_REFACTORING_SUMMARY.md documenting auth service refactoring
Security model:
- GPC proofs use 2-tuple classification (signerPublicKey + eventId only)
- Nullifiers are event-specific via externalNullifier = agora-{eventSlug}-v1
- Backend validates ALL tuples in membershipLists match expected values
- Watermark prevents replay attacks across different event contexts
- Account merging only allowed: guest→verified or soft→hard (never verified→verified)
- Nullifier tracking prevents double-verification with soft-deleted users
This implementation enables seamless privacy-preserving event ticket
requirements with automatic verification flows and guest account management.
Users can browse as guests, verify for specific events (soft login), or
create permanent verified accounts (hard login) with all content preserved
during upgrades.1 parent 035b269 commit fd12a5a
119 files changed
Lines changed: 18400 additions & 2683 deletions
File tree
- doc
- script/rarimo/config
- services
- agora
- .claude
- src
- api
- components
- newConversation
- dialog
- post
- comments
- group/item
- display
- poll
- composables/opinion
- pages
- conversation
- new
- create
- review
- legal
- privacy
- terms
- notification
- onboarding
- step1-login
- step3-passport
- step3-phone-2
- settings
- stores
- stubs
- utils
- api
- comment
- ui
- api
- database/flyway
- drizzle
- meta
- src
- service
- auth/core
- load-testing/src
- api
- math-updater
- src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
0 commit comments