Authentication
“Who are you?”
Supabase Auth handles email/password sign-in and sessions. The user's role rides in the JWT as a signed claim.
Supabase AuthVitaSecure encrypts every clinical record with AES-256-GCM, anchors a SHA-256 fingerprint on a permissioned blockchain, and lets an on-chain RBAC contract — not a database flag — decide who may act. Integrity becomes something you can verify, not just trust.
Integrity
Verified on-chain
At rest
Encrypted record
3
Enforcement layers
6
Least-privilege roles
256
Bit AES-GCM keys
∞
Immutable versions
Authentication, authorization and integrity are deliberately kept separate — each enforced by a different mechanism. The on-chain layers are authoritative; the database is a backstop.
“Who are you?”
Supabase Auth handles email/password sign-in and sessions. The user's role rides in the JWT as a signed claim.
Supabase Auth“Can this row be returned?”
Postgres Row-Level Security, deny-by-default on every table, keyed on the authenticated user id and role claim.
RLS · backstop“May this role do this?”
An on-chain RBAC smart contract makes the real permit/deny decision for every privileged clinical operation. The contract wins on conflict.
On-chain RBAC“Has it been altered?”
A SHA-256 hash of each record is anchored on a permissioned EVM chain. Re-hash any time and compare — tampering is mathematically detectable.
SHA-256 anchorRecords never go on the chain — only their fingerprint does. Updates never overwrite: each change is a new version, re-hashed and re-anchored, while the prior anchor stands.
On-chain RBAC checkAccess before any action.
Stable field ordering so equal records hash equally.
AES-256-GCM on sensitive fields; the key never leaves the server.
SHA-256 over the canonical record produces its fingerprint.
Hash + metadata anchored on-chain; the event is audited.
The verify path re-hashes the stored record and compares it to the on-chain anchor. The result is binary and provable — surfaced everywhere clinical data is shown.
VERIFIED — the record's hash matches its anchor. Untouched since it was written.
TAMPERED — the hashes diverge. The stored record no longer matches what was anchored.
Encounter · v3
Hash matches on-chain anchor
Lab result · v1
Stored hash ≠ anchored hash
Prescription · v1
Awaiting on-chain anchor
Every role sees exactly what its duty requires — and nothing more. Even the Administrator is denied all clinical-content operations. This is enforced technically, not by convention.
Manages users, roles and system health. Denied all clinical content.
Creates and reads encounters, lab orders and prescriptions for their patients.
Records vitals and notes; reads results within assigned care.
Processes lab orders, enters results and runs integrity verification.
Registers patients and manages appointments. No clinical content.
Views own records, manages consent and sees a full access log.
Create an account to explore the role dashboards, or sign in to your clinical node.