Security Flashcards

(67 cards)

1
Q

What are the three main pillars of Kafka security?

A

Authentication, authorization, and encryption in transit.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the purpose of ACLs in Kafka?

A

ACLs define which principal may perform which operation on which resource.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Are ACLs used for authentication or authorization?

A

Authorization.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the difference between SSL/TLS and SASL in Kafka?

A

SSL/TLS provides transport encryption and optionally certificate-based auth; SASL is an authentication framework.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a principal in Kafka?

A

The identity Kafka derives after successful authentication and uses internally for authorization decisions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Is a principal an active network component?

A

No. It is an identity, not a network actor.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Where are authentication and authorization mainly enforced in Kafka?

A

At the broker.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the usual high-level flow for a secured client request?

A

Connection established -> authentication -> principal derived -> ACL/authorization check -> request processed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does PLAINTEXT mean in Kafka?

A

No TLS and no SASL security on the connection.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does SSL mean in Kafka?

A

TLS-encrypted transport, optionally with certificate-based client authentication.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does SASL_PLAINTEXT mean in Kafka?

A

SASL authentication over an unencrypted connection.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does SASL_SSL mean in Kafka?

A

SASL authentication over a TLS-encrypted connection.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Does SASL itself encrypt traffic?

A

No. SASL is for authentication, not transport encryption.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Which Kafka security protocol gives both authentication and encryption when used with SASL?

A

SASL_SSL.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the difference between PLAIN and PLAINTEXT?

A

PLAIN is a SASL mechanism; PLAINTEXT is an unencrypted transport mode.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Is PLAIN the same thing as SASL_PLAINTEXT?

A

No. PLAIN is the auth mechanism; SASL_PLAINTEXT is the connection protocol.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is SASL/PLAIN conceptually?

A

A simple SASL username/password authentication mechanism.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is SCRAM in Kafka security?

A

A SASL authentication mechanism, stronger than PLAIN.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Is SCRAM a replacement for SASL?

A

No. SCRAM is a mechanism within SASL.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Does SCRAM encrypt network traffic by itself?

A

No. You still need TLS for encryption in transit.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Which is generally safer: PLAIN or SCRAM?

A

SCRAM.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is GSSAPI in Kafka?

A

The SASL mechanism Kafka uses for Kerberos authentication.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is OAUTHBEARER in Kafka?

A

A SASL authentication mechanism based on bearer tokens.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

In Kafka, is OAUTHBEARER used on the authentication or authorization side?

A

Authentication.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Which combination is secure for username/password-style auth with encryption?
SASL_SSL with a SASL mechanism such as PLAIN or SCRAM.
26
Why is SASL_PLAINTEXT + PLAIN usually a bad idea?
It authenticates, but traffic is not encrypted.
27
Which main ACL resource types should you know for Kafka?
Topic, Group, Cluster, TransactionalId, DelegationToken.
28
What ACL does a plain producer typically need?
Write on the Topic resource.
29
What ACLs does a plain consumer typically need?
Read on the Topic and Read on the Group.
30
Why does a consumer need permissions on Group as well as Topic?
Because consuming involves consumer-group operations, not just reading topic data.
31
What ACL resource becomes important for transactional producers?
TransactionalId.
32
What does a Kafka Streams application act like from a security perspective?
Both a producer and a consumer, plus it may need internal-topic and admin-related permissions.
33
Why can a Streams app need ACLs on internal topics?
Because it may create and use internal repartition and changelog topics derived from application.id.
34
From Kafka’s perspective, what is a source connector most like?
A producer.
35
From Kafka’s perspective, what is a sink connector most like?
A consumer.
36
What Kafka permissions does a source connector minimally need?
Typically Write on the Kafka topics it writes to.
37
What Kafka permissions does a sink connector minimally need?
Typically Read on the Kafka topics it consumes from and Read on the Group.
38
What does a literal ACL pattern mean?
The ACL applies only to the exact resource name.
39
What does a prefixed ACL pattern mean?
The ACL applies to all resource names starting with the given prefix.
40
What are super.users in Kafka?
Special privileged principals that bypass normal ACL restrictions.
41
By default, what happens if no ACL matches a resource?
Access is denied, except for super users.
42
Is successful authentication alone enough to allow an action?
No. The action must also be authorized.
43
What kinds of Kafka clients are relevant in security questions besides producers and consumers?
AdminClient, Kafka Streams applications, and Kafka Connect workers.
44
Can a broker act as both a server and a client?
Yes. It serves client requests and also acts as a client when talking to other brokers.
45
Why may a broker need to authenticate to another broker?
Because broker-to-broker communication is also secured and authenticated.
46
What is inter.broker.listener.name used for?
It selects the listener used exclusively for broker-to-broker communication.
47
What is controller.listener.names used for?
It defines the listener(s) used for controller-plane communication in KRaft.
48
What is the difference between broker-to-broker traffic and controller traffic?
Broker-to-broker traffic is internal cluster/data communication; controller traffic is control-plane/metadata communication in KRaft.
49
In KRaft, can the controller listener be the same as the inter-broker listener?
No.
50
What is the purpose of listeners?
It defines where the broker binds and listens for incoming connections.
51
What is the purpose of advertised.listeners?
It defines the address(es) the broker tells clients to use.
52
Why can advertised.listeners differ from listeners?
Because the address clients must use may differ from the local bind address, for example with Docker, Kubernetes, NAT, or load balancers.
53
Why might a cluster expose multiple listeners?
To separate client traffic, broker traffic, controller traffic, addresses, and security settings.
54
Can different listeners use different security configurations?
Yes.
55
What is the main security advantage of separate client and internal listeners?
External clients and internal cluster communication can use different protocols, credentials, and network exposure.
56
In KRaft, do clients normally talk directly to the controller?
No. They usually talk to a broker first.
57
What happens to controller-owned admin requests in KRaft?
A broker receives them and may forward them to the active controller.
58
When a broker forwards a controller-owned request, which two principals matter at the controller side?
The broker principal and the forwarded client principal.
59
In forwarded KRaft requests, what is the broker principal used for?
Authorization of the outer forwarded/envelope request.
60
In forwarded KRaft requests, what is the forwarded client principal used for?
Authorization of the inner client request.
61
Which communication path do producers, consumers, Streams, Connect, and AdminClient primarily use?
Client <-> broker.
62
Which communication path is used for replication and internal broker traffic?
Broker <-> broker.
63
Which communication path is used for KRaft control-plane communication?
Broker <-> controller.
64
What is the difference between a mechanism and a security protocol in Kafka?
A mechanism is how identity is proven within SASL; a security protocol is the overall connection mode such as SSL or SASL_SSL.
65
Give examples of SASL mechanisms in Kafka.
PLAIN, SCRAM, GSSAPI, OAUTHBEARER.
66
Give examples of Kafka security protocols.
PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL.
67
What is the simplest exam-safe mental model for Kafka security?
TLS/SSL protects the channel, SASL authenticates the client, Kafka derives a principal, and ACLs authorize operations on resources.