Skip to content

Conversation

@aldy505
Copy link
Contributor

@aldy505 aldy505 commented Nov 17, 2024

Support self-hosted users better by providing auth mechanism for Kafka connections. Introduces a few environment variables:

  • SENTRY_KAFKA_SASL_MECHANISM (valid values: "PLAIN", "SCRAM-SHA-256", "SCRAM-SHA-512", "")
  • SENTRY_KAFKA_SASL_USERNAME
  • SENTRY_KAFKA_SASL_PASSWORD
  • SENTRY_KAFKA_SSL_CA_PATH
  • SENTRY_KAFKA_SSL_CERT_PATH
  • SENTRY_KAFKA_SSL_KEY_PATH
    If the mechanism is not provided, it will default to a nil kafka.RoundTripper, which is the default already.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@aldy505 aldy505 requested a review from a team as a code owner November 17, 2024 08:08
@aldy505
Copy link
Contributor Author

aldy505 commented Dec 12, 2024

Any updates? @Zylphrex @viglia

}
}

return &kafka.Transport{
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't you need to set a Dialer as well here?

If writer Transport is nil DefaultTransport is used, but in this case it won't as we're explicitly setting it with createKafkaRoundTripper.

I think here we should first create a Transport like here and then set the SASL and TLS?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

@aldy505 aldy505 requested a review from viglia December 15, 2024 11:51
@phacops phacops merged commit 84dcfa0 into getsentry:main Dec 23, 2024
11 checks passed
@aldy505 aldy505 deleted the feat/kafka-with-auth branch December 23, 2024 21:53
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