feat(example-doc-vault): configure Supabase Auth, RBAC Field-Level Security and S3 presigned storage #12

Open
opened 2026-10-27 14:51:23 +00:00 by crapougnax · 0 comments
Owner

Migrated from GitHub https://github.com/Quatrain/Core/issues/39 (opened by @crapougnax on 2026-09-18).

Part of parent story #9.

🎯 Goal

Implement identity verification, role-based Field-Level Security, and cloud object storage for the Document Vault tutorial.

📋 Specification

  1. Authentication with @quatrain/auth-supabase:
    • Register SupabaseAuthAdapter into Auth.addProvider(supabaseAdapter, 'supabase', true).
    • Validate JWT tokens and resolve user identities into RbacUserContext.
  2. Granular Field-Level Security (FLS) with @quatrain/auth-rbac:
    • Role definitions: viewer, author, approver, admin-finance.
    • Protect financialAmount field using rbac.sanitizeRead('documents', payload, userContext) (hidden for non-finance users).
  3. S3 Storage with @quatrain/storage-s3:
    • Register S3StorageAdapter with MinIO / Scaleway S3 / AWS S3.
    • Generate secure presigned upload and download URLs for PDF documents.
> Migrated from GitHub https://github.com/Quatrain/Core/issues/39 (opened by @crapougnax on 2026-09-18). Part of parent story #9. ### 🎯 Goal Implement identity verification, role-based Field-Level Security, and cloud object storage for the Document Vault tutorial. ### 📋 Specification 1. Authentication with `@quatrain/auth-supabase`: - Register `SupabaseAuthAdapter` into `Auth.addProvider(supabaseAdapter, 'supabase', true)`. - Validate JWT tokens and resolve user identities into `RbacUserContext`. 2. Granular Field-Level Security (FLS) with `@quatrain/auth-rbac`: - Role definitions: `viewer`, `author`, `approver`, `admin-finance`. - Protect `financialAmount` field using `rbac.sanitizeRead('documents', payload, userContext)` (hidden for non-finance users). 3. S3 Storage with `@quatrain/storage-s3`: - Register `S3StorageAdapter` with MinIO / Scaleway S3 / AWS S3. - Generate secure presigned upload and download URLs for PDF documents.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
quatrain/core#12
No description provided.