Skip to content

The reader secret is the owner's, as the other keys are - #136

Merged
robertblust merged 1 commit into
mainfrom
the-reader-secret-is-the-owners
Oct 24, 2026
Merged

robertblust merged 1 commit into
mainfrom
the-reader-secret-is-the-owners

Conversation

@robertblust

Copy link
Copy Markdown
Contributor

robertblust/mcp-blust-ch's chat deploy (run 40124879800) stopped at terraform apply with Error 403: Permission 'secretmanager.secrets.create' denied on module.chat.google_secret_manager_secret.reader_secret[0]. The hosts' deploy identity comes from companygraph/mcp-server's shared bootstrap and holds no Secret Manager admin role by design, and every other secret the module reads, chat-anthropic-key and typesafe-key, is the owner's, made by hand and only mounted here. This makes chat-reader-secret the owner's in the same way.

deploy/google/terraform/signin.tf, which held only the random_password, the secret, its version and the accessor grant, is removed, and with it hashicorp/random from required_providers, which nothing else used. run.tf still mounts CHAT_READER_SECRET from secret chat-reader-secret, version latest, only when sign_in is set, with a comment in the style of the Anthropic key's. The Secret Manager API stays enabled, since the module enabled it for the two older secrets. The module's sign-in tests now assert the mount by name with sign_in and its absence without; each assertion fails when the mount's name or its condition is broken. The README's deploy section gains a sign_in paragraph with the owner's three commands, run once per project before a host's first deploy with sign_in, the value generated on the machine and never shown, and says that rotating it gives every reader a fresh month. The design's ruling in section 11 now says the owner makes the key. docs/INTERFACE.md said nothing about where the secret comes from and is unchanged. package.json is not bumped; the release is a separate PR.

A host that already ran a failed 0.38.0 apply has a random_password.reader_secret in its state; 0.38.1's plan removes it, a local-only resource with nothing in Google Cloud.

Verified: npm test (391 pass), npm run typecheck, npm run build:check, terraform init -backend=false and validate for deploy/google/terraform and deploy/azure/terraform, terraform fmt -check -recursive deploy, terraform test in deploy/google/terraform (7 pass), sh conventions/conventions-check and sh conventions/conventions-format passed.

🤖 Generated with Claude Code

The 0.38.0 module made chat-reader-secret itself, a random password into Secret Manager with an accessor grant for chat-run, and the first host to deploy with sign_in stopped at terraform apply: the hosts' deploy identity, from the MCP host's shared bootstrap, holds no Secret Manager admin role by design, so it may not create a secret. The module now treats the reader secret as it treats chat-anthropic-key and typesafe-key. signin.tf, which held only the password, the secret, its version and the grant, is gone, and with it hashicorp/random, which nothing else used; run.tf still mounts CHAT_READER_SECRET from chat-reader-secret, latest version, only with sign_in, and says why the secret is the owner's.

The README's deploy section gains the sign_in paragraph with the owner's three commands, once per project before the first deploy with sign_in, the value generated on the machine and never shown, and says that rotating it gives every reader a fresh month. The design's ruling now says the owner makes the key. The module's sign-in tests assert the mount by name with sign_in and its absence without; the Secret Manager API stays enabled, since the two older secrets need it.

Verified: npm test (391 pass), typecheck, build:check, terraform init -backend=false and validate for google and azure, terraform fmt -check -recursive deploy, terraform test in deploy/google/terraform (7 pass, and each new assertion fails when the mount's name or its condition is broken), conventions-check and conventions-format pass.

Process: Delivery
Phase: Implement
Track: Code
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@robertblust
robertblust merged commit 2febbd0 into main Oct 24, 2026
3 checks passed
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.

1 participant