2026-06-12 — demarkus-library in-cluster deploy
Added the Universe Library to the cluster (PR #70, merged to main):
apps/demarkus-library/applicationset.yaml— chartdemarkus-library0.1.0 from ghcr.io/latebit-io/charts, sync-wave 2, broker transport, ingresslibrary.<domain>(letsencrypt-prod), home worldroot, replica 1 (in-memory sessions).apps/demarkus-library/external-secret.yaml— ESOlibrary-oauth-clientfrom OpenBaosecret/library/oauth-client(propertyclient_secret), reusing the cluster-scopedopenbaoClusterSecretStore.deployment.yaml—library-webredirectURI swapped from local-e2elibrary.dev.test:8443tohttps://library.knowledge.demarkus.io/auth/callback.docs/runbook-library.md— manual OpenBao steps: widenexternal-secretspolicy withsecret/data/library/*, seed the plaintext client secret (sha256 must equal deployment.yaml'sclientSecretHash).
Key gotcha: the library's broker.url must be the MCP gateway origin (https://knowledge.demarkus.io, i.e. https://<domain>), NOT broker.<domain> — RFC 8414 metadata is served only on the gateway host (verified live; broker.<domain>/.well-known/oauth-authorization-server 404s), and the metadata routes authorize/token to broker.<domain> itself.
Validated: helm template render with interpolated prod values (env/secretKeyRef/ingress/Certificate correct), scripts/smoke-broker-web-clients.sh green, image+chart 0.1.0 confirmed on ghcr.
OpenBao seed + secret rotation (post-merge)
Original library-web plaintext was unrecoverable locally (hash-scanned shell history, Claude transcripts, ~/latebit — zero matches against the registered clientSecretHash), so took the runbook's rotation path instead of waiting on the password manager:
- Widened
external-secretspolicy withsecret/data/library/*(now 4 paths). - Generated fresh secret, seeded
secret/library/oauth-clientv1. - Updated
deployment.yamlclientSecretHash toe44adb5a…(merged as a0a02bc; broker config re-rendered + pod rolled within ~15s of ArgoCD pickup). - ESO synced, pod Running 1/1, TLS cert Ready.
Verified live ✅
- Front-channel:
/login/start→ broker/oauth/authorize(client_id=library-web, PKCE S256, registered redirect) → 302 to Google. Broker accepts the registration. - Back-channel: user logged in through a real browser — token exchange with the rotated secret succeeded, reading room renders. demarkus-library is in production at https://library.knowledge.demarkus.io.
Security note for cleanup: the OpenBao root token is in plain shell history (~/.zsh_history, export BAO_TOKEN=… — one live with root policy). Runbook says password-manager only; should be rotated/scrubbed.
Side finding — local soul (demarkus-memory plugin, localhost:6309) is broken: server binary predates LOOKUP verb, and plugin token (sha256-d5002dbb…) isn't in the server's tokens.toml (expects sha256-a905094e…); writes failing since ~June 10. The repo .mcp.json demarkus-soul server (soul.demarkus.io) is the working write path.
Related documents
- Knowledge system GKE deploy: cluster deploy plan this library rollout extends
- Universe library: the library product deployed here
- Universe deployment: broker and gateway topology the library binds to
- ADR 0001 broker confidential web clients: library-web client secret model used