Repository navigation
Description
What
charly config persists a resolved secret into the deployment's unit as Environment=. That is state, and D-SEC-1 forbids it.
D-SEC-1 (
DESIGN.md:2511): "Secrets come only from the configured backend; they never enter the store, artifacts, labels, IR, state or output."
state is listed separately from the IR, and the config-time seam plugin-deploy-pod#74 adds satisfies only the IR limb.
The contract's own answer, and it is already in the merged wire
#BindInput { need!: #BindNeed, provided_by!: #Ref, deployment!: #Ref }
#BindOutput { binding!: #Opaque }
// `binding` is the HANDLE the type owner mints for this pairing: opaque to core, and the only
// thing later `unbind` can name. Core never inspects it -- that is what makes the type the owner
// of its own capability rather than a lookup table core reads. (spec/schema/bind.cue:48-52)binding is #Opaque. Core never inspects it. So what enters state is a HANDLE, not a value — and DESIGN.md:685 says when:
| capability | when | how |
|---|---|---|
env, secret, endpoint, network, harness |
at realize | delivered by the type owner's bind |
binding being opaque is not an implementation detail — it is the enforcement. A core that can inspect a binding can leak it; a core that cannot, cannot.
Why this is filed rather than fixed in-tree
#74 cannot fix it, because the mechanism it needs does not exist yet: there is no type:secret owner with a bind. Building that owner is a cutover of its own (a new provider class, its schema row, its bind/unbind, and the four consumers migrating onto it), and #74 is the ordering step that removes the value from the IR — a strict narrowing (plan + state → state), not a compliance claim.
Per R1 this is filed because the change is correct and complete without the fix, and the finding is genuinely separable. It is not parked: it is the named successor and it must land before D-SEC-1 can be said to hold end to end.
The work
plugin-secretsgainstype:secret— a capability-type owner withbind/unbind, returning#BindOutput{binding: <opaque handle>}perspec/schema/bind.cue.- Core stores the handle, never the value: the deployment's state carries
binding, and the config writer emits a reference the owner can resolve at realize. - The type owner resolves the handle at realize and delivers the bytes to the consumer —
DESIGN.md:387: asecretuse delivers bytes. - The four consumers migrate:
layer-qdrant,pod-openwebui,vm-k3s-agent,vm-k3s-server(grep -rn 'secret_require:' --include='*.yml' | grep -v '/.build/'→ 4, with the colon). - Then
InjectSecretsIntoPlans(sdk/deploykit/secret_declare.go) is deleted, and its two call sites are gone:plugin-deploy-pod/overlay.goandplugin-fleet/secrets_artifacts.go:61.
The evidence that this is real, not theoretical
plugin-deploy-pod#74's bed (check-seam-proof) PASSES with:
$ grep 'seam-proof-token' .check/check-seam-proof/2026.321.1729/config.log
charly-check-seam-proof-seam-proof-token → created (from config)That line is the exposure: the value reached the unit's environment at config time. The bed proves the delivery; this issue is the proof that the delivery still lands in state.
Acceptance
git -C <repo> grep -rn 'Environment=' <the rendered unit>names a reference, never a value.- A check asserts the rendered unit contains none of the secret's bytes (the absence assertion, not the transport one).
- The four consumers still receive their variables, proven live.
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (analysed on a live system)
Activity
chore(review): re-trigger after filing #75 in the body's Filed issues
feat(config): deliver a secret to a service's ENV at config time, wit…
aitrawog commentedon Nov 17, 2026
CLAIM — lead's agent is taking this.
Scope: the
type:secretowner'sbindreturning an#Opaquehandle, so the value leavesstateas well as the IR. The wire already exists (spec/schema/bind.cue:48-52); the owner does not.Order (RDD first): a spike answering ONE question — can a
type:secretprovider'sbindreturn a handle core stores, and can that handle be resolved back to bytes at realize? — before anything ships.Measured starting facts:
spec/schema/capability.cue:153:secret: {key: #Name, need: {}, use: #SecretUse}— noprovide:row.plugin-secrets/candy/plugin-secrets/charly.yml:40-42declaresverb:credentialandcommand:secrets, nottype:secret.layer-qdrant/charly.yml:33,pod-openwebui/charly.yml:128,vm-k3s-agent/charly.yml:19,vm-k3s-server/charly.yml:67.Already landed:
plugin-deploy-pod#76(the IR limb, merged) andcharly#1193(the bed, merged, PASSsteps=16).Blocking: nothing.
Agent: lead
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash
fix(config): keep a secret's value out of the pod unit — the duplicat…
aitrawog commentedon Nov 17, 2026
RESOLVED — landed as #80 (merge commit
7d09b528).D-SEC-1's
statelimb is closed — and not by the mechanism the issue (and my own brief) said it would need.A spike answered the question before anything was written: the
bindwire has no host side (spec#370now tracks it). What the leak actually was, measured on the rendered artifact:The unit carried both.
Secret=is the handle-shaped delivery that already worked.Environment=was #76's duplicate — a second copy whose only effect was to persist the value.The fix is the return shape:
PodEnvVarsWithSecrets→EnsureBoxChainSecrets, returning secret names, never values. A function returningmap[string]stringhas somewhere to put a value; this one did.The container still receives the token (
check-livePASS); the unit no longer carries it. A duplicate delivery is not a redundancy — here it was the leak.Agent: lead
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash