blog by OSO

Apache Kafka Security using OAuth

Sion Smith 21 August 2023
apache-kafka-security

In the evolving landscape of distributed systems, Apache Kafka security has emerged as an essential component ensuring data integrity, reliability, and safe data streaming. A multi-tenanted platform, Apache Kafka security is fundamental to organisations that deal or process sensitive data and any personal identifiable information. 

Recognising the increasing importance of Apache Kafka security, we’ve pulled together some lessons learnt while working with 30+ Enterprise clients. In our last piece, we touched upon how to migrate Kafka clusters with limited downtime. As we move forward, we will delve even deeper, unearthing the core tenets and advanced features that make Apache Kafka security truly stand out in the world of event streaming.

Apache Kafka Security: OAuth OIDC tokens for Kafka

With the production rollout of KIP-768 (Secured OAuth support in Kafka)  It is now possible to secure the connection between Kafka and identity providers. Tokens, acting as short-lived credentials, have to be renewed at regular intervals. This approach guarantees that even if a token is compromised, its utility is restricted to its expiry duration. To accommodate token renewal, Kafka clients come equipped with a callback handler, renewing the token before its expiry, ensuring uninterrupted sessions with Kafka.

It’s essential to note that the token isn’t renewed exactly at its expiration but preemptively, around 75 or 80% of its lifespan. This strategy reduces latency risks near the token’s expiry, ensuring token availability consistently.

Apache Kafka Security: Using a centralised identity provider

The objective behind the discovery endpoint established by the identity provider is to allow multiple applications to share the same endpoint. Centralising identity and access management across varied development teams simplifies audit log management and allows for efficient incident management.

Apache Kafka Security: Advice for transitioning to centralised identity

For enterprises contemplating the move to centralised identity and access management, it’s imperative to:

  • Embrace industry standards, use where possible out of the box solutions and avoid the complexities of crafting bespoke solutions, or deploying custom OAuth providers.
  • Start by updating non business critical Kafka clients, like reporting or analytic workloads.
  • Acknowledge that during the transitional phase, both OAuth and another authentication provider might coexist.
  • Connect dashboards and track the usage metrics of provider endpoints.

As the distributed systems landscape continues to advance and become more intricate, Apache Kafka security has unquestionably solidified its position as the backbone of data protection, integrity, and streaming reliability. With OAuth integration, Apache Kafka security demonstrates its adaptability and forward-thinking approach in embracing contemporary security measures.

For organisations that are entrusted with safeguarding sensitive and personal data, investing time and resources into understanding and implementing Apache Kafka security is paramount. Drawing from extensive experience with numerous enterprise clients, it is evident that the lessons and nuances of Apache Kafka security are ever-evolving. Therefore, as we navigate the future of event streaming, one thing remains crystal clear: the significance of Apache Kafka security will only continue to grow.

Stay updated with further content on Kafka and event systems, as we unravel more insights and features in the upcoming articles. On the 20th September at Big Data LDN, we are hosting Kafka Meetup London, where we will talk about how to move from slow to fast data with batch to real-time. You are all invited! Sign up from here.

Fore more content:

How to take your Kafka projects to the next level with a Confluent preferred partner

Event driven Architecture: A Simple Guide

Watch Our Kafka Summit Talk: Offering Kafka as a Service in Your Organisation

Successfully Reduce AWS Costs: 4 Powerful Ways

Protecting Kafka Cluster

Apache Kafka Common Mistakes

Kafka Cruise Control 101

Kafka performance best practices for monitoring and alerting

How to build a custom Kafka Streams Statestores

Get started with OSO professional services for Apache Kafka

Have a conversation with a Kafka expert to discover how we help your adopt of Apache Kafka in your business.

Contact Us