Subscribe to the Non-Human & AI Identity Journal
Architecture & Implementation Patterns

KRaft

← Back to Glossary
By NHI Mgmt Group Updated June 23, 2026 Domain: Architecture & Implementation Patterns

KRaft is Kafka's built-in metadata and coordination layer based on Raft consensus. It replaces ZooKeeper, reducing operational complexity while placing authentication, authorisation, and controller governance closer to the core Kafka control plane.

Expanded Definition

KRaft is Kafka’s native metadata quorum and controller coordination model, built on Raft consensus rather than an external ZooKeeper dependency. In NHI and platform-security terms, that matters because the control plane that governs brokers, topic metadata, and authorization state becomes part of the same operational trust boundary as the Kafka cluster itself.

Definitions vary across vendors when they discuss “Kafka security,” but KRaft specifically changes where governance decisions live, how controllers are elected, and how administrative privileges are enforced. That shifts the security conversation from “protect the dependency” to “protect the cluster’s own coordination layer.” For a standards-oriented view of governance and risk management, the NIST Cybersecurity Framework 2.0 is useful for mapping identification, protection, and recovery responsibilities onto the Kafka control plane.

KRaft does not eliminate identity risk. It concentrates it. Administrative APIs, controller access, certificates, service accounts, and ACL decisions all become more consequential because compromise can affect metadata integrity, topic creation, and cluster-wide policy enforcement. The most common misapplication is treating KRaft as a pure infrastructure upgrade, which occurs when teams migrate off ZooKeeper without redesigning controller access, credential governance, and audit boundaries.

Examples and Use Cases

Implementing KRaft rigorously often reduces operational sprawl, but it also concentrates authority in fewer components, requiring organisations to weigh simpler architecture against a sharper control-plane blast radius.

  • Replacing ZooKeeper in a new Kafka deployment so controller election, metadata quorum, and broker coordination are managed inside Kafka itself.
  • Hardening service accounts used by operators and automation so only narrowly scoped administrative actions can reach cluster metadata and controller functions.
  • Using certificate-based authentication and tightly scoped ACLs to prevent a compromised CI/CD pipeline from altering Kafka topics or controller state.
  • Reviewing migration plans with the guidance in Ultimate Guide to NHIs so Kafka identities, secrets, and rotation workflows are treated as first-class assets.
  • Aligning Kafka administrative controls with NIST Cybersecurity Framework 2.0 functions to ensure access control, monitoring, and recovery are designed into the cluster from day one.

In practice, KRaft is most visible during cluster bootstrap, controller failover testing, and security reviews that validate whether automation, service principals, and human operators can separate duties cleanly.

Why It Matters in NHI Security

KRaft matters because the Kafka control plane often depends on non-human identities with broad, persistent authority. When those identities are weakly governed, attackers can exploit them to create unauthorized topics, alter retention settings, disrupt consumers, or tamper with metadata that downstream services trust. NHIMG research shows that Ultimate Guide to NHIs reports 97% of NHIs carry excessive privileges, and that 80% of identity breaches involved compromised non-human identities such as service accounts and API keys. Those risks map directly onto Kafka’s operator, broker, and controller roles.

KRaft also narrows the margin for error during incident response. If controller credentials, certs, or ACLs are mismanaged, recovery can become a governance problem, not just a platform problem. The architectural simplification is real, but it does not replace secret rotation, privileged access management, or auditability. It demands them more urgently. Organisations typically encounter the impact only after a controller compromise, metadata corruption, or failed migration, at which point KRaft governance becomes operationally unavoidable to address.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-02KRaft governance depends on secure handling of NHI secrets and privileges.
NIST CSF 2.0PR.AC-4KRaft control-plane access must enforce least privilege and strong identity checks.
NIST Zero Trust (SP 800-207)SC-3KRaft fits Zero Trust by treating cluster coordination as a protected trust boundary.

Authenticate every controller and broker interaction before trusting metadata operations.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on June 23, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org