CP-25962: Correct the sendSecretValues chart comment - #836
Conversation
The chart's comment said "the actual values of Secrets are not sent by default" while the value below it was `true`. Tracing it: the sentence was accurate when written, when the default was `false`. The default was later flipped to `true`, and whoever did it removed the adjacent "will default to true in a future release" line but missed this one. So it is comment rot, not a disagreement about intent -- corrected the comment rather than changing the default. README and values.schema.json are generated from values.yaml, so they follow.
|
|
||
| # Enable sending of Secret values to CyberArk in addition to metadata. | ||
| # Metadata is always sent, but the actual values of Secrets are not sent by default. | ||
| # Metadata is always sent, and Secret values are sent by default too. |
There was a problem hiding this comment.
The chart's own template does not agree with the default this comment now documents. templates/deployment.yaml:89 renders {{ .Values.config.sendSecretValues | default "false" | quote }}, so the template-level fallback is false, not true.
Today the two only disagree when the key is absent: helm template --set config.sendSecretValues=null renders ARK_SEND_SECRET_VALUES="false" while the README says values are sent by default. More to the point, this is the same rot trap you are fixing here. If anyone later drops the sendSecretValues: true line from values.yaml on the assumption that the template fallback covers it, the behaviour silently flips and the docs stay wrong.
Helm's default also treats a genuine false as empty, so the pipeline buys nothing even in the normal case. Changing line 89 to value: {{ .Values.config.sendSecretValues | quote }} would make the template say what the docs now say. Optional for this PR if you would rather keep the diff docs-only, but worth a follow-up.
There was a problem hiding this comment.
Confirmed via helm template: unset renders "false" today while the docs now say true — same rot class. Dropped default "false" (f368c94); unset now renders "true" (values.yaml's default), explicit false still renders "false".
|
|
||
| Enable sending of Secret values to CyberArk in addition to metadata. Metadata is always sent, but the actual values of Secrets are not sent by default. When enabled, Secret data is encrypted using envelope encryption using a key managed by CyberArk, fetched from the Discovery and Context service. | ||
| Enable sending of Secret values to CyberArk in addition to metadata. Metadata is always sent, and Secret values are sent by default too. | ||
| Set this to false to send metadata only. |
There was a problem hiding this comment.
There is one more copy of the same stale claim, and it is stronger than the one you fixed. docs/datagatherers/k8s-dynamic.md:80 still says:
Before Secrets are sent to the Preflight backend, they are redacted so no secret data is transmitted.
With sendSecretValues defaulting to true, pkg/agent/run.go:170 sets encryptSecrets, redactList keeps the data field and adds _encryptedData, so secret data is transmitted (encrypted). A reader who checks the docs to answer "does the agent send my Secret data?" gets opposite answers depending on which file they open.
That line also points at pkg/datagatherer/k8s/fieldfilter.go, which no longer exists — the file moved to pkg/datagatherer/k8sdynamic/fieldfilter.go.
Out of scope if you want to keep this PR to the chart, but it is the same comment rot and worth sweeping in the same pass.
There was a problem hiding this comment.
Confirmed both — the file did move, and the claim contradicts run.go's encryptSecrets/_encryptedData path once sendSecretValues defaults true. Fixed in f368c94: corrected the redact-by-default / encrypt-when-enabled description, fixed the fieldfilter.go link, and pointed at the chart's sendSecretValues doc instead of restating it.
wallrj-cyberark flagged two more instances of the same class of bug this PR fixes. deployment.yaml's ARK_SEND_SECRET_VALUES rendered `| default "false"`, disagreeing with the `true` default this PR documents whenever the value is unset; dropped the `default "false"` so the template says what the docs say. Verified via `helm template`: unset now renders "true" (matches values.yaml's default), explicit `false` still renders "false". docs/datagatherers/k8s-dynamic.md said Secret data is never transmitted and linked a file that moved (`pkg/datagatherer/k8s/fieldfilter.go` -> `pkg/datagatherer/k8sdynamic/fieldfilter.go`). Corrected both: describes the redact-by-default / encrypt-when-enabled behavior and points at the chart's sendSecretValues doc.
|
The three red e2e checks here are my doing, and they are not telling you anything about your change. I added the
Nothing to fix on your side. I am leaving the labels in place and will run the suites against On the change itself, both points I raised earlier are addressed, and I have checked the new wording against the code:
|
wallrj-cyberark
left a comment
There was a problem hiding this comment.
Verified rather than eyeballed: regenerated the chart docs and schema in a clean checkout of the head and got byte-identical output, confirmed the comment rot with git log -L, and checked the new wording against SecretSelectedFields and pkg/agent/run.go:170. Both review points are addressed.
The e2e checks are red only because fork pull requests do not receive secrets. I will run those suites against master after merge.
Summary
The chart comment for
config.sendSecretValuessaid "the actual values of Secrets are not sent by default," but the value below it defaults totrue. The sentence was accurate when the default wasfalse; when the default was flipped totrue, an adjacent line was updated but this one was missed. Fixing the comment, not the default — no behavior change.README.mdandvalues.schema.jsonare generated fromvalues.yaml(make ark-generate), so they're regenerated to match.Test plan
make ark-generaterun, diff limited to the corrected text