Credentials
User-scoped credentials (same shape as certificates)
| Column Name | Data Type | Constraints |
|---|---|---|
| id | bigint | NOT NULL |
| created_at | timestamp with time zone | DEFAULT now() NOT NULL |
| updated_at | timestamp with time zone | DEFAULT now() |
| user_id | uuid | NOT NULL |
| issuer | text | NOT NULL |
| expiration | timestamp with time zone | |
| type | text | NOT NULL |
| tracking_number | text |
Security Policies (RLS)
RLS enabled. Herd scope: Herd from each users_roles_per_herd.herd_id where user_id matches the credential owner.
| Operation | has_herd_ability ability key | Other paths |
|---|---|---|
| SELECT | credentials.read | Row 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.