Repository navigation
fix(compute): refuse a padded plugin secret input reference no binding sets - #4315
Merged
Merged
Conversation
…g sets
OpenClaw trims a secret-input value before it reads a whole ${NAME} as an
environment SecretRef (parseEnvTemplateSecretRef), so ' ${NAME} ' with
NAME unset stops the Gateway at every start ('required secrets are
unavailable'). Deployment admission compared the untrimmed value and let it
through; Configuration save accepts it at a header whose name marks no
credential. Trim before matching, as the $NAME shorthand already does
(finding 3046).
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
OpenClaw reads a whole
${NAME}at a plugin secret input as an environment SecretRef after it trims the value (parseEnvTemplateSecretRefat the pinned commit). The deployment admission rule from #4309/#4310 (requirePluginSecretInputs) matched the untrimmed value, so a padded reference such as" ${SEARCH_HEADER} "atplugins.entries.google.config.webSearch.headers.<name>passed admission withSEARCH_HEADERunbound. The Gateway then exited at every start ("required secrets are unavailable") and the deployment waited for its convergence deadline, the crash loop #4309 set out to refuse.Configuration save accepts such a value at a header whose name marks no credential (for example
X-Goog-User-Projectunder GooglewebSearch.headers, or a CodexappServer.headersentry). The$NAMEshorthand was already trimmed, so only the${NAME}form slipped through.Change
secretInputVariableinapps/controller/src/drivers/compute/kubernetes/configuration-rules.tstrims the value beforewholeEnvironmentReferenceName, as OpenClaw does. All topologies share this rule.Verification
webSearch.headers.X-Key: " ${SEARCH_HEADER} "with the variable unset exits at about 29 s with "Startup failed: required secrets are unavailable". In the same probe,"Bearer ${SEARCH_HEADER}"and an unset GooglewebSearch.apiKey(a capability owner) both serve, which confirms those exclusions.tests/conformance/kubernetes-compute.test.mjs): new row" ${RELAY_TOKEN}\n"in the unbound-name loop.tests/integration/configuration-controller.test.mjs): the paddedX-Goog-User-Projectheader saves with 200, and deployment now returns 400 with the unbound-binding refusal. On main the deployment returned 202.trimStart,trimEnd) are each killed by both tests.Risks
Low. The change can only refuse more: a padded whole
${NAME}that no binding, launch hook, Compute or the image sets. That value already stopped the Gateway, and the refusal names the binding to add.