Saltar al contenido

app.api_keys

TablaSeguridad a nivel de fila activa

Org-scoped API keys for servers (ADR 0003): hashed, capability-scoped and expiring. The secret is shown once at creation; only its SHA-256 hash is stored.

Clave primaria: id

Columnas de app.api_keys
ColumnaTipoAdmite nulosDescripción
iduuidNoPrimary key, UUID v7.
org_iduuidNoOwning org. A row never moves to another org.Hace referencia a app.organizations.id
nametextNoKey name shown in Settings, for example Accounting Sync.
service_account_iduuidSíService account the key acts for, once service accounts exist; null for an org key.Hace referencia a app.service_accounts.id
scopestext[]NoCapability groups (the first segment of capability codes in the registry) the key may use.
expires_attimestamp with time zoneNoWhen the key stops working. At most one year after it is set.
prefixtextNoVisible start of the secret (xos_live_ and 8 hex digits), so people can tell keys apart.
secret_hashbyteaNoSHA-256 of the full secret. Never readable by signed-in callers.
last_used_attimestamp with time zoneSíWhen the key last authenticated a request, to the minute.
revoked_attimestamp with time zoneSíWhen the key was revoked; a revoked key never works again.
revoked_byuuidSíPerson who revoked the key.Hace referencia a app.people.id
created_attimestamp with time zoneNoWhen the row was inserted. Set by the database.
created_byuuidSíPerson who inserted the row, or null for a platform process. Set by the database.Hace referencia a app.people.id
updated_attimestamp with time zoneNoWhen the row last changed. Set by the database.
updated_byuuidSíPerson who last changed the row, or null for a platform process. Set by the database.Hace referencia a app.people.id
deleted_attimestamp with time zoneSíSoft delete time. A row with deleted_at set is ignored by every access helper.