Rotate the CRAFT_SECURITY_KEY committed in .env.docker.example #44
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Symptom
.env.docker.exampleis tracked in git and carries a realCRAFT_SECURITY_KEYandCRAFT_APP_IDwhere placeholders belong. The same key is in the untracked.env/.env.production, so what is in the repository is the key production actually runs on.Craft derives cookie and CSRF token signing, and the encryption of stored secrets, from this key. Anyone with read access to the repo — or to any clone, fork, backup or CI cache of it — holds it.
Found while deploying an unrelated site to the same host; not caused by that work.
What needs to happen
.env.docker.examplewith obvious placeholders.Also worth a look while in there:
.env/.env.productioncarry aMATOMO_API_TOKENin plain text. That one is untracked, so it is not in git, but it is a full-access Matomo token sitting in the working tree.Acceptance criteria
.env.docker.examplecontains no real credential