Adventure Labs Logo
Scout Docs

Providers

Table for storing external service providers with API keys and configuration per herd

Column NameData TypeConstraints
idbigintNOT NULL
created_attimestamp with time zoneDEFAULT now() NOT NULL
typetextNOT NULL
keytext
sourcetextNOT NULL
herd_idbigintNOT NULL
sensitivity_tierinteger
timestamp_expirationtimestamp with time zone

Security Policies (RLS)

RLS enabled. Herd scope: Herd from providers.herd_id.

Operationhas_herd_ability ability keyOther paths
SELECTproviders.readDevice API keys in herd
INSERTproviders.write—
UPDATEproviders.write—
DELETEproviders.write—

Platform superadmin: FOR ALL bypass where defined.

key is not selectable by the authenticated role (column-level grant), so signed-in users, superadmins included, read every column except the credential; scout-core selects PROVIDER_COLUMNS and returns IProviderRow. Inserting and updating key is still allowed. Only the service role and device API keys read it; platform superadmins can fetch a single key through get_provider_key(provider_id) (get_provider_key in scout-core).

On this page