<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: SRK</title>
    <description>The latest articles on DEV Community by SRK (@sreejesh).</description>
    <link>https://dev.to/sreejesh</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2965387%2F68d0937d-8453-4d8e-a07d-f5e3b5fa2037.png</url>
      <title>DEV Community: SRK</title>
      <link>https://dev.to/sreejesh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sreejesh"/>
    <language>en</language>
    <item>
      <title>Custom User AUTH/Z for Strimzi Kafka: Integrating Your Corporate CERTIFICATE AUTHORITY Certs with Strimzi KAFKA</title>
      <dc:creator>SRK</dc:creator>
      <pubDate>Sat, 22 Mar 2025 07:48:39 +0000</pubDate>
      <link>https://dev.to/sreejesh/custom-user-authz-for-strimzi-kafka-integrating-your-corporate-certificate-authority-certs-with-1amk</link>
      <guid>https://dev.to/sreejesh/custom-user-authz-for-strimzi-kafka-integrating-your-corporate-certificate-authority-certs-with-1amk</guid>
      <description>&lt;p&gt;Integrating your organization’s Certificate Authority (CA) with Strimzi Kafka is essential for enforcing user-level authentication and authorization (AUTH/Z) in corporate environments. Strimzi’s default self-signed certificates may not align with corporate security policies that require internal CAs. To address this, you can implement a custom principal builder to validate user certificates against your corporate CA.&lt;/p&gt;

&lt;p&gt;Steps to Integrate Corporate CA with Strimzi Kafka:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Develop a Custom Principal Builder Class:
• Create a class that overrides Kafka’s default Common Name (CN) validation logic, ensuring user certificates are validated against your corporate CA.&lt;/li&gt;
&lt;li&gt;Create a Custom Kafka Docker Image:
• Incorporate the compiled custom principal builder class into a Kafka Docker image. This ensures the custom class is available within the Kafka brokers.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Configure Strimzi Kafka Manifest:&lt;br&gt;
• Modify the Strimzi Kafka resource definition to specify the custom principal builder class by adding:&lt;br&gt;
principal.builder.class: CustomCNPrincipalBuilder&lt;br&gt;
Replace CustomCNPrincipalBuilder with your actual class name.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Generate Corporate User Certificates:&lt;br&gt;
• Use your organization’s CA to generate client certificates for Kafka consumers and producers. Ensure these certificates are distributed appropriately.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deploy and Verify:&lt;br&gt;
• Deploy the modified Strimzi Kafka cluster. Configure Kafka clients to use the corporate-signed certificates. Verify that only users with valid corporate-signed certificates can connect and perform operations.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For a practical implementation, refer to the GitHub repository:&lt;/p&gt;

&lt;p&gt;This repository provides:&lt;br&gt;
• Source code for the custom principal builder class.&lt;br&gt;
• A Dockerfile for building the custom Kafka image.&lt;br&gt;
• An example Strimzi Kafka manifest with the principal.builder.class configuration.&lt;br&gt;
• Instructions on applying the manifests and verifying the setup.&lt;/p&gt;

&lt;p&gt;Using the Repository:&lt;/p&gt;

&lt;p&gt;Prerequisites:&lt;br&gt;
• Kubernetes cluster&lt;br&gt;
• Strimzi installation&lt;br&gt;
• Docker environment&lt;/p&gt;

&lt;p&gt;Steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Clone the repository:&lt;br&gt;
git clone &lt;a href="https://github.com/sreejesh123/custom_certificate_strimzi_kafka.git" rel="noopener noreferrer"&gt;https://github.com/sreejesh123/custom_certificate_strimzi_kafka.git&lt;/a&gt;&lt;br&gt;
cd custom_certificate_strimzi_kafka&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Build the custom Kafka image following the instructions in the README.md file.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Apply the necessary Kubernetes manifests as detailed in the README.md.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Verify the setup by configuring Kafka clients with the corporate-signed certificates and ensuring proper AUTH/Z enforcement.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Conclusion &lt;br&gt;
By following these steps, you can integrate your corporate CA with Strimzi Kafka, ensuring compliance with organizational security policies and enhancing user authentication and authorization mechanisms.&lt;/p&gt;

</description>
      <category>kafka</category>
      <category>security</category>
      <category>kubernetes</category>
    </item>
  </channel>
</rss>
