1

We have a Kafka cluster in production without any security. We plan to turn on security (SASL/OAUTHBEARER) on the broker side. But looks like as soon as we turn on broker side security all the insecure client will be dropped immediately. For smooth transition from insecure to secure cluster, without any downtime, we want Kafka clients to first enable security. And once all our clients have migrated, we can turn on security on the broker level. However I do not find a way secure clients can talk to an insecure broker. Has anyone done this? Any ideas on smooth migration to security in production?

Giorgos Myrianthous
  • 36,235
  • 20
  • 134
  • 156
KafkaNoob
  • 21
  • 3

2 Answers2

0

In Kafka 2.0, the following protocol combinations are allowed:

+------------------+-------+-----------+
|                  |  SSL  |  Kerberos |
+------------------+-------+-----------+
| PLAINTEXT        |  No   |    No     |
| SSL              |  Yes  |    No     |
| SASL_PLAINTEXT   |  No   |    Yes    |
| SASL_SSL         |  Yes  |    Yes    |
+------------------+-------+-----------+

Those combinations are applicable for both broker-to-broker and broker-to-client but the key config here is security.inter.broker.protocol that does not have to be the same for broker-to-broker and broker-to-client. This means that we can enable security in a Kafka Cluster without having any downtime.


Enabling Kerberos

  • Step 1: Disable security for broker-to-broker
security.inter.broker.protocol=PLAINTEXT
security.inter.broker.protocol=SASL_PLAINTEXT

Enabling SSL

  • Step 1: Disable security for broker-to-broker
security.inter.broker.protocol=PLAINTEXT
security.inter.broker.protocol=SSL
Giorgos Myrianthous
  • 36,235
  • 20
  • 134
  • 156
  • The clients will still have downtime... You would need to generate, distribute, and setup certs. Also, these settings are different from oauth bearer – OneCricketeer Feb 26 '20 at 07:42
0

Setting the following property in server.properites will allow insecure clients to connect to port 9097 and secure clients to connect to port 9096.

listeners=SASL_PLAINTEXT://:9096,PLAINTEXT://:9097

KafkaNoob
  • 21
  • 3