infra-sync: render /etc/centralis.env from the vault #147
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Jinemi/thermograph#147
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/sync-centralis-env"
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?
render_centralis_secretshas existed since the OpenBao work and has no caller on any deploy path — onlyverify-centralis-render.sh, which is a check. A renderer nothing calls is not a migration, it is a file./etc/centralis.envhas stayed hand-maintained the whole time, with the vault holding a copy nothing consumed.That gap is why turning on Google sign-in for Centralis had no safe home: the only way to set
CENTRALIS_GOOGLE_CLIENT_IDwas to hand-edit the live file, which is exactly whatrender-secrets.sh's own header warns against.The guard is the point
On 2026-07-24 this estate lost Centralis' token registry by writing a file that was missing a key the live one had. The renderer proves its own output round-trips through bash, but it cannot know about a key that exists only in the live file — someone hand-editing
/etc/centralis.envis invisible to it.So this job renders to a scratch path first, compares key sets (names only; both files sourced under
env -iso the comparison is over what bash actually ends up with, not over text), and refuses to write, failing loudly, if the live file has anything the vault does not:That inverts the hazard: rendering stops being a way to lose a hand-edit and becomes the thing that catches one.
Verified against a live file carrying a hand-added
CENTRALIS_GOOGLE_CLIENT_ID— correctly flagged, write refused — and against the empty/unreadable-live-file path, which needs|| trueto survivepipefail.Why this job recreates a container when the other three deliberately do not
This workflow's header says it never rolls a service, because image tags are the app domains' axis. Centralis differs in kind: its compose file interpolates
/etc/centralis.envat parse time (set -a && . /etc/centralis.env && docker compose up -d), so rendering without recreating changes nothing at all — the silent no-op this estate keeps getting bitten by.docker restartwould not do it either, for the same reason. It is one container with no replicas: a two-second recreate, not a deploy.It also skips the recreate entirely when the rendered file is byte-identical to the live one, so a no-op push does not bounce a healthy container.
Sequencing note
Once this is live, the OAuth keys go in the vault, not in
/etc/centralis.env:Adding them to the live file instead will now fail this job rather than being silently overwritten on the next infra push.