Secure Kafka with Keycloak: SASL OAuth Bearer

Abhishek koserwal
Keycloak
Published in
6 min readJun 7, 2021

--

This post will do a step-by-step configuration of the strimzi-operator (Apache Kafka) on Openshift. Expose an external listener on the Openshift platform as a route over TLS and Secure the Kafka Cluster using Keycloak using SASL OAuth Bearer.

Suppose you don’t want to do a bunch of configurations. An easy option for you would be Openshift Streams for Apache Kafka https://www.redhat.com/en/blog/introducing-red-hat-openshift-streams-apache-kafka.

Let’s begin the Journey of securing the Kafka kittens.

Suppose you aren’t familiar with the concepts like SASL for OAuth. Let’s go over the details of how SASL OAuth Bearer works.

SASL OAuth Bearer:

https://datatracker.ietf.org/doc/html/rfc7628 [Simple Authentication and Security Layer (SASL) Mechanisms for OAuth]

OAuth 2.0 Protocol Flow

Overview

Running Apache Kafka deployed using the Strimzi Operator and Keycloak Operator on Openshift. Two Quarkus-based Clients: producer and consumer applications running on an external local system.

  • During the…

--

--

Abhishek koserwal
Keycloak

#redhatter #opensource #developer #kubernetes #keycloak #golang #openshift #quarkus #spring