Describe the bug
Sensitive credentials are not consistently redacted from Terraform deployment logs when a deployment fails.
Some occurrences of the Terraform command are masked, while others expose values passed as command-line arguments, for example:
-var auth_client_secret=<value>
-var client_secret=<value>
Expected behavior
Sensitive values should be redacted consistently in Porter, Terraform, shell, and pipeline logs.
This requires assigning sensitive: true in the porter.yaml of each template for the azure credentials to prevent leakage in to logs.
Or ideally handling secrets differently (Out of scope of this issue). Will log a separate issue to investigate whether secrets can avoid command-line arguments entirely in future, for example by using:
- Azure Key Vault references
- Protected environment variables such as
TF_VAR_*
- A protected temporary variables file
- Managed identity or OIDC authentication instead of client secrets
Steps to reproduce
- Configure a deployment with sensitive credentials.
- Start a Terraform deployment.
- Cause Terraform to fail.
- Review all generated deployment and pipeline logs.
- Compare repeated Terraform command/error entries.
Azure TRE release version (e.g. v0.14.0 or main):
main
Deployed Azure TRE components - click the (i) in the UI:
latest
Related issues
#2247
Describe the bug
Sensitive credentials are not consistently redacted from Terraform deployment logs when a deployment fails.
Some occurrences of the Terraform command are masked, while others expose values passed as command-line arguments, for example:
Expected behavior
Sensitive values should be redacted consistently in Porter, Terraform, shell, and pipeline logs.
This requires assigning
sensitive: truein theporter.yamlof each template for the azure credentials to prevent leakage in to logs.Or ideally handling secrets differently (Out of scope of this issue). Will log a separate issue to investigate whether secrets can avoid command-line arguments entirely in future, for example by using:
TF_VAR_*Steps to reproduce
Azure TRE release version (e.g. v0.14.0 or main):
main
Deployed Azure TRE components - click the (i) in the UI:
latest
Related issues
#2247