exp”. The ACL itself never leaves your database.
Example scenario: a course platform. Teachers author lesson documents (the
creation flow, unchanged); enrolled
students read them.
1. Backend — the data model
We will track lessons (which contain Qirtaas documents) and student enrollments.2. Backend — gated signature endpoint
We will add a signing helper function …4. Frontend — render with getSignature
Give the renderer getSignature instead of getToken. The renderer sends
the pair as ?sig=&exp= query parameters on its read:
src/LessonView.tsx
Security checklist
- The signing secret lives in backend env/config only.
- Check access before signing, and sign only the specific document the check covered. Never sign ids taken from the request unchecked.
- Signatures grant read-only access to one document. There is no
wildcard signature, so a leaked one is contained to a single document until
its
exp.
