Adventure Labs Logo
Scout Docs

Credentials

User-scoped credentials (same shape as certificates)

Column NameData TypeConstraints
idbigintNOT NULL
created_attimestamp with time zoneDEFAULT now() NOT NULL
updated_attimestamp with time zoneDEFAULT now()
user_iduuidNOT NULL
issuertextNOT NULL
expirationtimestamp with time zone
typetextNOT NULL
tracking_numbertext

Security Policies (RLS)

RLS enabled. Herd scope: Herd from each users_roles_per_herd.herd_id where user_id matches the credential owner.

Operationhas_herd_ability ability keyOther paths
SELECTcredentials.readRow owner (user_id = auth.uid()); no ability on write ops
INSERT—Row owner only
UPDATE—Row owner only
DELETE—Row owner only

Platform superadmin: FOR ALL bypass where defined.

On this page