Skip to content

fix(common/redis): stop unconditionally skipping TLS certificate verification#4261

Open
JoshVanL wants to merge 2 commits intodapr:mainfrom
JoshVanL:redis-fix-tls-no-verify
Open

fix(common/redis): stop unconditionally skipping TLS certificate verification#4261
JoshVanL wants to merge 2 commits intodapr:mainfrom
JoshVanL:redis-fix-tls-no-verify

Conversation

@JoshVanL
Copy link
Contributor

@JoshVanL JoshVanL commented Mar 9, 2026

Previously, enableTLS was passed directly to InsecureSkipVerify, meaning enabling TLS always disabled certificate verification, a security vulnerability. This adds a separate insecureSkipTLSVerify metadata field (defaulting to false) so that TLS connections now perform proper certificate verification by default.

…fication

Previously, `enableTLS` was passed directly to `InsecureSkipVerify`,
meaning enabling TLS always disabled certificate verification,  a
security vulnerability. This adds a separate `insecureSkipTLSVerify`
metadata field (defaulting to false) so that TLS connections now perform
proper certificate verification by default.

Signed-off-by: joshvanl <me@joshvanl.dev>
Copilot AI review requested due to automatic review settings March 9, 2026 16:34
@JoshVanL JoshVanL requested review from a team as code owners March 9, 2026 16:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a security vulnerability in the Dapr Redis component where enabling TLS (enableTLS: true) was unconditionally passing true to tls.Config.InsecureSkipVerify, disabling certificate verification entirely. The fix adds a separate insecureSkipTLSVerify metadata field (defaulting to false) so that TLS connections now use proper certificate verification by default.

Changes:

  • Adds InsecureSkipTLSVerify bool field to the shared Settings struct and wires it to tls.Config.InsecureSkipVerify in all six TLS configuration sites across both the v8 and v9 Redis clients
  • Adds insecureSkipTLSVerify metadata field (with default: "false") to all five Redis component metadata YAML files (state, pubsub, bindings, configuration, lock)

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
common/component/redis/settings.go Adds InsecureSkipTLSVerify field to Settings struct with corrected EnableTLS comment
common/component/redis/v8client.go Replaces s.EnableTLS with s.InsecureSkipTLSVerify in all three TLS config sites
common/component/redis/v9client.go Replaces s.EnableTLS with s.InsecureSkipTLSVerify in all three TLS config sites
state/redis/metadata.yaml Adds insecureSkipTLSVerify metadata field
pubsub/redis/metadata.yaml Adds insecureSkipTLSVerify metadata field
bindings/redis/metadata.yaml Adds insecureSkipTLSVerify metadata field
configuration/redis/metadata.yaml Adds insecureSkipTLSVerify metadata field; fixes trailing whitespace in enableTLS description
lock/redis/metadata.yaml Adds insecureSkipTLSVerify metadata field

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

JoshVanL added a commit to JoshVanL/dapr-docs that referenced this pull request Mar 9, 2026
Based on dapr/components-contrib#4261

Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: joshvanl <me@joshvanl.dev>
Copy link
Contributor

@cicoyle cicoyle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, did you open a docs PR for the metadata change?

@JoshVanL
Copy link
Contributor Author

@cicoyle yep! dapr/docs#5065

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants