Skip to content

fix(kafka): support insecure TLS skip verify config - #7022

Merged
atzoum merged 2 commits into
rudderlabs:masterfrom
ashkangoleh:fix/kafka-tls-insecure-skip-verify-env
Jul 20, 2026
Merged

atzoum merged 2 commits into
rudderlabs:masterfrom
ashkangoleh:fix/kafka-tls-insecure-skip-verify-env

Conversation

@ashkangoleh

Copy link
Copy Markdown
Contributor

Description

This PR adds an optional config-driven way to set InsecureSkipVerify on the TLS configuration used by regular Kafka destinations.

Supported config keys:

  • Router.KAFKA.tlsInsecureSkipVerify
  • Router.kafkaTLSInsecureSkipVerify
  • KAFKA_TLS_INSECURE_SKIP_VERIFY

Default value: false.

Why

rudder-go-kit/kafkaclient.TLS already supports InsecureSkipVerify, and the Kafka client already applies it when building the underlying tls.Config.

However, Rudder Server was not exposing a config/env-driven way to pass this value when creating the Kafka client for regular Kafka destinations.

This is useful for controlled self-hosted, internal, or test Kafka environments where TLS is enabled but the broker certificate cannot be validated through the configured CA certificate or the system certificate pool.

Scope

This change is intentionally limited to the regular Kafka destination path in NewProducer.

It only applies when destConfig.SslEnabled is true.

This PR does not change:

  • Kafka destinations with SSL disabled
  • SASL behavior
  • SSH behavior
  • Azure Event Hubs
  • Confluent Cloud
  • producer batching/compression behavior
  • rudder-go-kit

Backward Compatibility

Backward compatible.

The new flag defaults to false, so existing Kafka TLS verification behavior remains unchanged unless the operator explicitly enables the new flag.

Test Plan

  • Ran gofmt on services/streammanager/kafka/kafkamanager.go
  • Verified the new flag defaults to false
  • Verified the flag is only read and applied when Kafka SSL is enabled
  • Verified the existing CA certificate path is preserved
  • Verified the existing system certificate pool path is preserved
  • Verified SASL remains scoped to the SSL-enabled path

Linear Ticket

No Linear ticket. Small config plumbing fix for Kafka TLS client configuration.

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

This PR does not change the default security posture because the new flag defaults to false.

When explicitly enabled, KAFKA_TLS_INSECURE_SKIP_VERIFY=true disables Kafka broker certificate chain and hostname verification for regular Kafka destinations. This is an operator-controlled escape hatch intended only for controlled internal, self-hosted, or test Kafka deployments where proper certificate validation is not available.

Go's crypto/tls documentation warns that InsecureSkipVerify=true accepts any certificate and hostname, making TLS susceptible to machine-in-the-middle attacks unless custom verification is used.

@contributor-support

Copy link
Copy Markdown

Thank you @ashkangoleh for contributing this PR.
Please sign the Contributor License Agreement (CLA) before merging.

@khoramism

Copy link
Copy Markdown

I mean we've been having the same problem and tried to just circle around it. This addition would really simplify our infrastructure.

@github-actions

Copy link
Copy Markdown
Contributor

This PR is considered to be stale. It has been open 20 days with no further activity thus it is going to be closed in 7 days. To avoid such a case please consider removing the stale label manually or add a comment to the PR.

@github-actions github-actions Bot added the Stale label Jul 14, 2026
@atzoum atzoum removed the Stale label Jul 20, 2026
@atzoum
atzoum merged commit d01574f into rudderlabs:master Jul 20, 2026
5 checks passed
@atzoum atzoum mentioned this pull request Jul 20, 2026
1 task done
atzoum added a commit that referenced this pull request Jul 20, 2026
# Description

regression caused by #7022

## Security

- [x] The code changed/added as part of this pull request won't create
any security issues with how the software is being used.
This was referenced Jul 20, 2026
mihir20 pushed a commit that referenced this pull request Jul 20, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.81.0-rc.1](v1.80.0...v1.81.0-rc.1)
(2026-07-20)


### Features

* run python transformation tests on ephemeral per-request pyt
deployments
([#7177](#7177))
([1008ae7](1008ae7))
* support partition migration job fanout per jobsdb
([#7141](#7141))
([be42e48](be42e48))


### Bug Fixes

* abort snowpipe events on channel bad request
([#7118](#7118))
([6c08584](6c08584))
* avoid redundant transformer statTags unmarshalling
([#7182](#7182))
([c3c283c](c3c283c))
* classify reverse-ETL sources from config for MAR metering
([#7159](#7159))
([fa7870f](fa7870f))
* detect server-side snowpipe channel failures via per-channel status at
stuck threshold
([#7166](#7166))
([581410c](581410c))
* kafkamanager compilation error
([#7189](#7189))
([1fb7f6e](1fb7f6e))
* **kafka:** support insecure TLS skip verify config
([#7022](#7022))
([d01574f](d01574f))
* preserve order when overflowing snowpipe insert batches
([#7178](#7178))
([9c01fa0](9c01fa0))
* quote postgres warehouse ddl identifiers
([#7127](#7127))
([5aeb481](5aeb481))
* **router:** emit invalid payload metric
([#7168](#7168))
([6e2009a](6e2009a))
* update null to #N/A for salesforce bulk upload
([#7151](#7151))
([1dffd93](1dffd93))
* **warehouse:** use pod identity for rudder-storage flow; keep S3-copy
user fallback for user S3 destinations
([#7167](#7167))
([3f9aa32](3f9aa32))


### Miscellaneous

* add contract tests for test endpoints in pytransformer
([#7147](#7147))
([3b210ec](3b210ec))
* bump compose-test to v0.1.5 to remediate pgx CVE-2026-33815
([#7162](#7162))
([7672f96](7672f96))
* **deps:** bump actions/checkout from 6.0.3 to 7.0.0
([#7132](#7132))
([d453c93](d453c93))
* **deps:** bump actions/setup-go from 6.4.0 to 6.5.0
([#7150](#7150))
([75d9648](75d9648))
* **deps:** bump aws-actions/amazon-ecr-login from 2.1.5 to 2.1.6
([#7109](#7109))
([7b2a859](7b2a859))
* **deps:** bump aws-actions/configure-aws-credentials from 6.2.0 to
6.2.2 ([#7152](#7152))
([c984268](c984268))
* **deps:** bump golangci/golangci-lint-action from 9.2.1 to 9.3.0
([#7170](#7170))
([4565d25](4565d25))
* **deps:** bump the frequent group across 1 directory with 4 updates
([#6891](#6891))
([88a0ddf](88a0ddf))
* support compression in bqstream destinations
([#7142](#7142))
([0694f12](0694f12))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com>
mihir20 pushed a commit that referenced this pull request Jul 21, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.81.0](v1.80.0...v1.81.0)
(2026-07-20)


### Features

* run python transformation tests on ephemeral per-request pyt
deployments
([#7177](#7177))
([1008ae7](1008ae7))
* support partition migration job fanout per jobsdb
([#7141](#7141))
([be42e48](be42e48))


### Bug Fixes

* abort snowpipe events on channel bad request
([#7118](#7118))
([6c08584](6c08584))
* avoid redundant transformer statTags unmarshalling
([#7182](#7182))
([c3c283c](c3c283c))
* classify reverse-ETL sources from config for MAR metering
([#7159](#7159))
([fa7870f](fa7870f))
* detect server-side snowpipe channel failures via per-channel status at
stuck threshold
([#7166](#7166))
([581410c](581410c))
* kafkamanager compilation error
([#7189](#7189))
([1fb7f6e](1fb7f6e))
* **kafka:** support insecure TLS skip verify config
([#7022](#7022))
([d01574f](d01574f))
* preserve order when overflowing snowpipe insert batches
([#7178](#7178))
([9c01fa0](9c01fa0))
* quote postgres warehouse ddl identifiers
([#7127](#7127))
([5aeb481](5aeb481))
* **router:** emit invalid payload metric
([#7168](#7168))
([6e2009a](6e2009a))
* update null to #N/A for salesforce bulk upload
([#7151](#7151))
([1dffd93](1dffd93))
* **warehouse:** use pod identity for rudder-storage flow; keep S3-copy
user fallback for user S3 destinations
([#7167](#7167))
([3f9aa32](3f9aa32))


### Miscellaneous

* add contract tests for test endpoints in pytransformer
([#7147](#7147))
([3b210ec](3b210ec))
* bump compose-test to v0.1.5 to remediate pgx CVE-2026-33815
([#7162](#7162))
([7672f96](7672f96))
* **deps:** bump actions/checkout from 6.0.3 to 7.0.0
([#7132](#7132))
([d453c93](d453c93))
* **deps:** bump actions/setup-go from 6.4.0 to 6.5.0
([#7150](#7150))
([75d9648](75d9648))
* **deps:** bump aws-actions/amazon-ecr-login from 2.1.5 to 2.1.6
([#7109](#7109))
([7b2a859](7b2a859))
* **deps:** bump aws-actions/configure-aws-credentials from 6.2.0 to
6.2.2 ([#7152](#7152))
([c984268](c984268))
* **deps:** bump golangci/golangci-lint-action from 9.2.1 to 9.3.0
([#7170](#7170))
([4565d25](4565d25))
* **deps:** bump the frequent group across 1 directory with 4 updates
([#6891](#6891))
([88a0ddf](88a0ddf))
* support compression in bqstream destinations
([#7142](#7142))
([0694f12](0694f12))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com>
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.

3 participants