Skip to content

feat(lab): give golem its own token at the ingest proxy (#485) - #896

Merged
Gerrrt merged 6 commits into
mainfrom
gerrrt/golem-ingest-token
Oct 4, 2026
Merged

Gerrrt merged 6 commits into
mainfrom
gerrrt/golem-ingest-token

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Oct 4, 2026

Copy link
Copy Markdown
Owner

What

deploy-agent.sh refused golem because, since #834, each lab client pushes to alexander's ingest proxy with its own token, and golem had none. This wires INGEST_TOKEN_GOLEM through the same places INGEST_TOKEN_FENRIR lives:

  • stacks/lab/Caddyfile (the map line, and the clients comment), stacks/lab/compose.yaml, stacks/lab/README.md
  • scripts/render-config.sh COMPOSE_VARS, scripts/seed-validation-env.sh
  • secrets/lab.example.yaml, plus a documented slot for PBS_ENCRYPTION_KEY (build-the-backup-guest §7). It isn't a compose var, so it never reaches .env.
  • build-the-backup-guest.md §10: export the token before deploy-agent.sh.

Before merging (draft until then)

compose requires INGEST_TOKEN_GOLEM, so the real value has to land in secrets/lab.sops.yaml on this branch first. On alexander, check out this branch, run make secrets-edit STACK=lab, and add:

  • INGEST_TOKEN_GOLEM: openssl rand -hex 32
  • PBS_ENCRYPTION_KEY: the whole contents of Saruman's /etc/pve/priv/storage/golem.enc

Commit and push to this branch. After merge and the lab's redeploy, export INGEST_TOKEN (= INGEST_TOKEN_GOLEM) and INGEST_TOKEN_READER on the Mac and rerun deploy-agent.sh for root@10.0.30.80.

Refs #485.

🤖 Generated with Claude Code

Gerrrt and others added 3 commits October 3, 2026 20:39
deploy-agent.sh refused golem because, since #834, every client pushes
with its own token and golem had none. INGEST_TOKEN_GOLEM joins the
Caddy map, compose, render-config.sh's list, the validation env and
lab.example.yaml, which also documents §7's PBS_ENCRYPTION_KEY.

The real value lands in secrets/lab.sops.yaml on this branch before it
merges: compose requires it, so merging first would fail the lab's next
render on alexander.

Refs #485

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gerrrt
Gerrrt marked this pull request as ready for review October 4, 2026 04:43
Copilot AI balanced review requested due to automatic review settings October 4, 2026 04:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The nested PBS key breaks lab secret parsing, and deployment documentation remains incorrectly ordered and incomplete.

Review effort: Balanced
Findings: 1 High severity · 2 Medium severity

Open (3)
What changed in this PR

Adds a dedicated lab ingest token for golem and records its PBS recovery key.

Changes:

  • Wires INGEST_TOKEN_GOLEM through Caddy, compose, rendering, and validation.
  • Documents deployment and secret handling.
  • Adds encrypted production secrets.
File Description
stacks/​lab/​README.md Documents golem as an ingest client.
stacks/​lab/​compose.yaml Passes the token to Caddy.
stacks/​lab/​Caddyfile Authorizes golem writes.
secrets/​lab.sops.yaml Adds encrypted token and PBS key.
secrets/​lab.example.yaml Documents new secret slots.
scripts/​seed-validation-env.sh Seeds validation token.
scripts/​render-config.sh Renders the token into .env.
docs/​runbooks/​build-the-backup-guest.md Documents agent token export.
docs/​changelog.md Records the change.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread secrets/lab.sops.yaml Resolved
Comment thread docs/runbooks/build-the-backup-guest.md Resolved
Comment thread stacks/lab/README.md Resolved
…t runs (#485)

The key pasted as multi-line JSON became a nested YAML map, which
secrets-env.sh refuses, so make render STACK=lab would fail. The example
and §7 now say one line of compact JSON in single quotes. §10's token
step moves above the command, and the lab README generates five tokens.

Refs #485

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gerrrt
Gerrrt marked this pull request as draft October 4, 2026 04:47
@Gerrrt
Gerrrt marked this pull request as ready for review October 4, 2026 04:56
@Gerrrt
Gerrrt merged commit 59ad3ba into main Oct 4, 2026
8 checks passed
@Gerrrt
Gerrrt deleted the gerrrt/golem-ingest-token branch October 4, 2026 05:05
Gerrrt added a commit that referenced this pull request Oct 4, 2026
Step 1 of the lab ingest-proxy rollout (stacks/lab/README.md), run on
alexander with make secrets-edit STACK=lab. It adds INGEST_TOKEN_ODIN,
_PHOENIX, _FENRIR and _READER beside #896's INGEST_TOKEN_GOLEM. compose
requires all five, so main could not render the lab without this.

Committed on alexander as f272db3, which has no push credentials and should
not have any: it sits on VLAN 30. The patch came through delta, so it was
rebuilt from main's file and the diff. Its blob is 31293ba, and alexander's
git rev-parse HEAD:secrets/lab.sops.yaml printed the same. The deploy it
carries is already live and proven: three 401s from the proxy on 2026-10-04.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants