Security and secrets
Every integration in MAIA Plus needs a credential: a provider key, a database password, an SDP token, a webhook secret. They live in one inventory, they are never readable after they are written, and replacing one is a normal operation rather than an emergency.

Rows show the key name and when it was last updated. Stored values are never rendered.
What it is
Section titled “What it is”| Object | Purpose |
|---|---|
| Secret | A named credential consumed by the server: provider key, database password, API token |
| Group | Security, Database, Providers — organisation only |
| State | Set or missing, with the last update time |
| Webhook key | A separate credential type with its own lifecycle — see Webhook keys |
The inventory deliberately shows names and timestamps, never values. That is not a UI limitation; the API does not return them either.
How it works
Section titled “How it works”- Configuration that needs a credential stores a reference in the form
${secret:KEY}, not the value. - The value itself lives in the
config_secretstable of the MAIA database. - At runtime the service resolves the reference on the server and uses the value in memory; the browser, the workflow graph and audit payloads only ever see the reference.
- Replacing a secret writes a new value; the old one is gone.
- Every replacement writes an audit record that records that the value changed, never what it changed to.
Where secrets physically live
Section titled “Where secrets physically live”This is the part worth understanding before you schedule a backup.
| Location | What it holds | Encrypted? |
|---|---|---|
config_secrets table | Managed secrets: JWT signing keys, SDP credential, provider headers, database password | No — stored as text in the database |
ai_provider_secrets table | AI provider credentials written through the provider editor | Yes — AES-256 with PROVIDER_SECRET_ENCRYPTION_KEY (or JWT_SECRET until rotated) |
.env | Bootstrap values: database connection, JWT secrets, portal binding | No — plain text |
ssl/ | The certificate and key the service presents | No — the key file is plain text |
Installer handout (MAIA-INSTALL-PRZEWODNIK.txt) | The values generated during installation | No — plain text |
Two conclusions follow, and both are operational requirements rather than cautions:
- A database dump contains managed secrets in clear text. Treat every
pg_dumpof the MAIA database as a credential store, not as ordinary data. - No backup is safe to email, share or store on an unencrypted volume. Encrypt the archive, restrict who can read it, and rotate the secrets it contains if it was ever exposed.
What the product does guarantee is narrower than “secrets never leave”: secret values are not returned by the API, not rendered in the UI, and not written into audit payloads by reference-resolved configuration. It does not guarantee that a dump of the database is free of them, because it is not.
Replace a secret
Section titled “Replace a secret”- Open Administration → Secrets.
- Use Search secret keys… to find the name, then select the row to open its editor.
- Enter the new value. The field is write-only: what you type is what is saved, and it is not shown again.
- Save, then verify the consumer:
- a provider secret → run a provider test, or a simulator run;
- a database secret → restart or wait for reconnection, then check Diagnostics;
- an SDP secret → read one ticket through the Copilot or a workflow step.
A replacement without verification is how a rotation becomes an outage discovered hours later.
Rotation discipline
Section titled “Rotation discipline”| Rule | Why |
|---|---|
| Rotate on a schedule, not only on suspicion | A leaked key used once looks like normal traffic |
| Rotate one credential at a time | Two simultaneous changes make the failure unattributable |
| Keep the old value until the new one is proven | Rollback without a stored old value means reissuing at the vendor |
| Record the rotation in the audit | “Who changed what, when” is the only durable answer |
What must never leave the installation
Section titled “What must never leave the installation”- Secret values, in tickets, chat messages, screenshots or support bundles.
- Cookie values, tokens and session identifiers.
- Raw stack traces, which frequently embed connection strings.
- Full provider payloads — logs are trimmed for this reason.
The support bundle exports diagnostics; review it before sending. See Diagnostics.
Boundaries specific to MAIA Plus
Section titled “Boundaries specific to MAIA Plus”- Secrets are per installation, not per tenant; every portal shares them.
- A provider secret is used by every profile of that provider — replacing it affects all routed workloads at once.
- Webhook keys are separate and scoped per target; revoking one does not touch the secret inventory.
- The NER service API key is a secret too: without it, detection falls back to regex only.
Limits and failure modes
Section titled “Limits and failure modes”- Secret missing → the consumer fails closed; a provider call errors instead of using a default.
- Wrong value saved → indistinguishable from a missing one until a call is attempted.
- Rotation without restart → some consumers cache the resolved value until restart; Diagnostics shows a pending-restart state.
- Shared secret → a leak in one integration forces a change everywhere it is used.
Related topics
Section titled “Related topics”Webhook keys · Managed environment · AI providers · Data flow and privacy