liveBook · Manning

Principal

As explained in Kafka for Architects

A principal is an identity representing a client, broker, user, or service in a security system.

A principal is the authenticated identity of a participant in a secure Kafka system. It can represent a client, broker, user, or service, and it becomes the identity used for authorization and resource governance. section 9.3.3 section 9.3.4

Kafka derives and uses principals in several security workflows:

  • Derives an mTLS principal from a TLS certificate, using the full distinguished name by default or mapped fields such as the common name. section 9.3.3
  • Associates a user principal with authenticated client requests, allowing quotas to be assigned consistently at the user level. section 3.1.5
  • Places the principal in ACL rules that grant or deny operations on topics, consumer groups, clusters, transactions, and other resources. section 9.3.4

Authentication establishes the principal; authorization evaluates what that identity may do. ACLs combine the principal with a resource, operation, permission, pattern, and host. Deny rules take precedence over allow rules, and consumer permissions may include offset commits, group operation, and metadata access in addition to reading. section 9.3.3 section 9.3.4

Constraining a service principal

An ACL can allow User:card-service to write to resources beginning with the CARDS topic pattern, while also granting Create. The authenticated principal provides a stable identity for this rule; client.id alone is less reliable because applications or frameworks can choose it arbitrarily. section 3.1.5 section 9.3.4

Table 9.1 Security protocols supported by Kafka

Security protocol

Encryption

Authentication

Description

PLAINTEXT

No

No

Unencrypted communication with no authentication

SASL_PLAINTEXT

No

Yes (via SASL)

Uses SASL for authentication but does not encrypt data

SSL

Yes (TLS)

Yes (via TLS)

Encrypts communication and supports
TLS-based authentication

SASL_SSL

Yes (TLS)

Yes (via SASL)

Uses SASL for authentication and TLS for encryption

Compare Kafka security protocols to distinguish authentication through SASL or TLS from transport encryption. section 9.3.3

How Kafka for Architects covers it

How deep it goes
Connects identity derivation, SASL authentication, ACL structure, and quota targeting, with configuration examples but no implementation internals.
Examples
Uses TLS certificate identities, SASL clients, quota assignments, and a card-service producer ACL as concrete examples.
What you can do after
Configure authentication identities, assign quotas, and write ACLs that govern Kafka resource operations.
How it connects
Connects principals to authentication, authorization, ACLs, quotas, SASL, mTLS, TLS, and consumer groups.

Also explained in

Compare how 5 books explain principal →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kafka for Architects. The section links point to the parts of the book it draws on.