15 A lost secret

What was lostWhat to doWhat you lose
SETTINGS_ENCRYPTION_KEY, or AUTH_SECRET when that is unsetSet a new one. Re-enter each integration secret under Settings → Integrations, and each webhook's address and secret under its notification rule. An administrator resets two-step verification for each enrolled user under Settings → UsersThe stored secrets, which read as empty, with settings.decrypt_failed in the log. Every webhook's address and signing secret. All two-step enrollments and recovery codes
AUTH_SECRET, with SETTINGS_ENCRYPTION_KEY setSet a new oneSessions and SAML sign-ins in progress. Nothing else
POSTGRES_PASSWORDThe password is kept in the database volume, and a local connection inside the db container needs none. Put a new value in .env, then run docker compose exec db sh -c 'psql -U "$POSTGRES_USER" -d "$POSTGRES_DB"' and type \password grc with your owner's name, entering the same value. On a new deployment, choose any value before restoringNothing
APP_DB_PASSWORDSet a new one in .env, and run docker compose up -dNothing
The age private keyCreate a new key, and take a new backup at onceEvery backup encrypted to the old key

If every administrator is locked out by two-step verification, no one can reset the others, as nobody can reset their own. Clear it for one administrator from the server, then have them reset the rest under Settings → Users:

docker compose run --rm --no-deps worker ./node_modules/.bin/tsx --tsconfig tsconfig.worker.json src/lib/jobs/mfa-recover.ts --email [email protected] --confirm

Off Docker, run ./node_modules/.bin/tsx --tsconfig tsconfig.worker.json src/lib/jobs/mfa-recover.ts --email [email protected] --confirm wherever the worker runs, with its settings. The command:

It refuses, and changes nothing, for a person who isn't an administrator, a deactivated administrator, an administrator with no two-step set up, and one who signs in through SSO. SSO never asks for this code, so clearing it wouldn't help. With SSO-only sign-in on, use a break-glass administrator. It can't be run on a demo instance.

Who can run it: anyone who can run commands on the server or in its containers. No password or code is asked for. Host access is the trust boundary here, as it is for the database itself, so keep it as tightly held as an administrator's account. The audit entry and the alert are how the others find out.