You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add redact option for env block when pushing an app with a manifest.yml (#2763)
* duplicate test cases to enable testing redact feature
[#186767925]
IF the app is pushed with a manifest
AND the app needs secrets set via environment variables
THEN currently there is no way to avoid leaking secrets in the output of
cf push commands.
technically this could be avoided by not using a manifest and running:
```cf push --no-start
cf set-env ...
cf set-env ...
cf set-env ...
...
`
but that escalates quickly if the APP contains many secret things in it's
env requirements.
We face this in an errand where:
- the bosh release renders the application.yml
- the application.yml contains secrets in the env block
- the errand VM streams it's logs to a logging server
This can be remediated by the suggested redacttion.
`--redact-env` to indiscriminately change all values
to `<redacted>` if they're contained within an apps `env` block.
* implement redact to avoid leaking secrets from `env`
[#186767925]
IF the app is pushed with a manifest
AND the app needs secrets set via environment variables
THEN currently there is no way to avoid leaking secrets in the output of
cf push commands.
technically this could be avoided by not using a manifest and running:
```cf push --no-start
cf set-env ...
cf set-env ...
cf set-env ...
...
`
but that escalates quickly if the APP contains many secret things in it's
env requirements.
We face this in an errand where:
- the bosh release renders the application.yml
- the application.yml contains secrets in the env block
- the errand VM streams it's logs to a logging server
This can be remediated by the suggested redacttion.
`--redact-env` to indiscriminately change all values
to `<redacted>` if they're contained within an apps `env` block.
* add integration tests for --redact-env flag
[#186767925]
Copy file name to clipboardExpand all lines: command/v7/apply_manifest_command.go
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@ type ApplyManifestCommand struct {
20
20
PathToManifest flag.ManifestPathWithExistenceCheck`short:"f" description:"Path to app manifest"`
21
21
Vars []template.VarKV`long:"var" description:"Variable key value pair for variable substitution, (e.g., name=app1); can specify multiple times"`
22
22
PathsToVarsFiles []flag.PathWithExistenceCheck`long:"vars-file" description:"Path to a variable substitution file for manifest; can specify multiple times"`
23
+
RedactEnvbool`long:"redact-env" description:"Do not print values for environment vars set in the application manifest"`
0 commit comments