Keys and secrets
Where keys and secrets are kept
The keys a connection holds, the tokens QuickBooks and Xero hand back, a company's sign in secret and every two step secret are sealed before they are stored, with keys kept in the server configuration rather than the database. A copy of the database alone does not give them up. Feed keys and provisioning tokens are kept only as a hash and shown once.
A language model key is the exception. A key for the whole service is kept in the application settings, and a member key, where bring your own key is switched on, is kept against that account. Both are stored as they are, without that extra layer, and saying otherwise would be inventing a control that is not there.
What follows from that is practical. Give every key the smallest scope the provider offers: a restricted Stripe key that can only read, a HubSpot private app with read access, a model key with a low spend cap. Rotate on the provider side when somebody leaves. With no model key at all the product still works, because the simulation never calls a model.
Where a language model is used