Give a plugin a Postgres database of its own #78
Reference in New Issue
Block a user
Delete Branch "plugin-storage"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A plugin sets
storage: trueand gets a Postgres database and login role of its own, both namedplugin_<id>, with the credentials handed toonBoot.The host hands over credentials, not a client — a plugin depends on whichever driver it likes, so no driver shape enters the contract. Passwords are derived (
HMAC-SHA256(PLUGIN_DB_SECRET, id)) rather than stored, keeping the host free of state. Onlybootstrapgets the superuser DSN, since plugin code runs insideweband can read that process' environment.HOST_API_VERSIONstays at 1.0.0 per the recorded freeze — the change is additive and a zero-argumentonBootremains valid.