Skip to main content
Quick navigation

What is OAuth

You can be using OAuth instead of SASL_SSL

View the full demo in realtime

You can either follow all the steps manually, or watch the recording

Review the docker compose environment

As can be seen from docker-compose.yaml the demo environment consists of the following services:

  • gateway1
  • gateway2
  • kafka-client
  • kafka1
  • kafka2
  • kafka3
  • keycloack
  • schema-registry
cat docker-compose.yaml

Starting the docker environment

Start all your docker processes, wait for them to be up and ready, then run in background

  • --wait: Wait for services to be running|healthy. Implies detached mode.
  • --detach: Detached mode: Run containers in the background
docker compose up --detach --wait

Review the kafka properties to connect using OAuth

Review the kafka properties to connect using OAuth

cat user-1.properties

Creating topic cars on gateway1

Creating on gateway1:

  • Topic cars with partitions:1 and replication-factor:1
kafka-topics \
--bootstrap-server localhost:6969 \
--command-config user-1.properties \
--replication-factor 1 \
--partitions 1 \
--create --if-not-exists \
--topic cars

Listing topics in gateway1

kafka-topics \
--bootstrap-server localhost:6969 \
--command-config user-1.properties \
--list

Tearing down the docker environment

Remove all your docker processes and associated volumes

  • --volumes: Remove named volumes declared in the "volumes" section of the Compose file and anonymous volumes attached to containers.
docker compose down --volumes

Conclusion

OAuth is your next security protocol!