Repository navigation
Conversation
Template authors can mark a coder_parameter as sensitive so Coder redacts its value wherever it is displayed, logged, or exported. The contract mirrors template variables: redacted in the API, provisioner logs, notifications, CLI, and dashboard; excluded from insights, the Prometheus insights collector, and autofill; still stored in the database and in Terraform state. Submitting the redacted sentinel back for a sensitive parameter keeps the previous build's value so clients can round-trip build parameters. The preview and terraform-provider-coder changes land separately; the seams that depend on them are marked TODO(preview) and TODO(provider).
Contributor
Docs previewCheck off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Refs RELAY-7.
Adds a
sensitiveattribute tocoder_parameterso Coder redacts the value wherever it is displayed, logged, or exported.*redacted*from the build parameters API, provisioner debug logs, workspace notifications, and CLI output, and render masked in the dashboard.coderd_insights_parametersPrometheus metric, and autofill suggestions.*redacted*back for a sensitive parameter keeps the previous build's value, so clients can round-trip build parameters unchanged.sensitivetemplate variables.Note
This PR lands first so the shape can be reviewed. The
coder/previewandterraform-provider-coderchanges follow; the two seams that depend on them are markedTODO(preview)andTODO(provider). Until then, a template cannot setsensitive = trueand dynamic-parameter responses do not yet carry the flag.Plan and decision log
Contract
Mirrors Terraform variables and
template_version_variables.sensitive: redacted where Coder displays, logs, or exports; still plaintext in the database and Terraform state. A build-scoped secret transport was considered and deferred; this is the hygiene layer that protects any template using a parameter as a credential today.Decisions
sensitive, matching Terraform andTemplateVariable.sensitive.*redacted*, defined once inprovisionersdk/protoand aliased ascodersdk.RedactedValueand the generated TSRedactedValue. The existing variables path now uses the same constant.*redacted*bucket is noise.template_version_parameters.sensitiveviadb2sdk.RedactedWorkspaceBuildParameters. The raw converter is documented as internal-only for wsbuilder.RichParameterValue.sensitive(proto field 3), mirroringVariableValue.sensitive, so the daemon can redact logs without definitions.valueschema is left alone. Terraform sensitivity is schema-wide in SDKv2, so per-instance marking is not possible; docs recommendsensitive(data.coder_parameter.x.value)in HCL.Touchpoints
RichParameter.sensitive = 19,RichParameterValue.sensitive = 3,proto.Redact*Valueshelpers.000599_sensitive_parameters; insert query;tvp.sensitive = falsefilters inGetTemplateParameterInsightsandGetUserWorkspaceBuildParameters.provisioner/terraform/resources.go:terraformParameterwrapper decodessensitivefrom state ahead of the provider release.provisionerdserver: inserts the flag and sets it on outgoing values for builds and dry runs.wsbuilder.stripRedactedSensitiveValues: sentinel guard.redactedNotificationParametersfor workspace created and manually updated.Secret: trueprompt, no default echo, preset and auto-default echo redacted,--copy-parameters-fromskips sensitive and sentinel values.parameters.md.Follow-ups
coder/preview:ParameterData.Sensitive, extract from HCL block and state.terraform-provider-coder:Parameter.Sensitiveand schema attribute.go.mod, remove the two TODO seams, add a dynamic-response redaction test.Known gaps
/workspacebuilds/{id}/stateandcached_plancontain values by design.--debug-httpbody logging is opt-in and unfiltered.Coder Agents on behalf of @Emyrk.