ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 191 - DAS-C01 discussion

Report
Export

A central government organization is collecting events from various internal applications using Amazon Managed Streaming for Apache Kafka (Amazon MSK). The organization has configured a separate Kafka topic for each application to separate the data. For security reasons, the Kafka cluster has been configured to only allow TLS encrypted data and it encrypts the data at rest.

A recent application update showed that one of the applications was configured incorrectly, resulting in writing data to a Kafka topic that belongs to another application. This resulted in multiple errors in the analytics pipeline as data from different applications appeared on the same topic. After this incident, the organization wants to prevent applications from writing to a topic different than the one they should write to.

Which solution meets these requirements with the least amount of effort?

A.
Create a different Amazon EC2 security group for each application. Configure each security group to have access to a specific topic in the Amazon MSK cluster. Attach the security group to each application based on the topic that the applications should read and write to.
Answers
A.
Create a different Amazon EC2 security group for each application. Configure each security group to have access to a specific topic in the Amazon MSK cluster. Attach the security group to each application based on the topic that the applications should read and write to.
B.
Install Kafka Connect on each application instance and configure each Kafka Connect instance to write to a specific topic only.
Answers
B.
Install Kafka Connect on each application instance and configure each Kafka Connect instance to write to a specific topic only.
C.
Use Kafka ACLs and configure read and write permissions for each topic. Use the distinguished name of the clients' TLS certificates as the principal of the ACL.
Answers
C.
Use Kafka ACLs and configure read and write permissions for each topic. Use the distinguished name of the clients' TLS certificates as the principal of the ACL.
D.
Create a different Amazon EC2 security group for each application. Create an Amazon MSK cluster and Kafka topic for each application. Configure each security group to have access to the specific cluster.
Answers
D.
Create a different Amazon EC2 security group for each application. Create an Amazon MSK cluster and Kafka topic for each application. Configure each security group to have access to the specific cluster.
Suggested answer: C

Explanation:

Kafka ACLs are a way to control access to Kafka resources, such as topics, consumer groups, or clusters, based on the principal of the client1. A principal is an identity that can be authenticated by Kafka.In this case, since the Kafka cluster only allows TLS encrypted data, the principal can be derived from the distinguished name of the clients' TLS certificates2.For example, if a client has a TLS certificate with the subject name CN=app1.example.com,OU=IT,O=Org,L=City,ST=State,C=US, then the principal name will be in the form of CN=app1.example.com,OU=IT,O=Org,L=City,ST=State,C=US3.

The organization can use Kafka ACLs to configure read and write permissions for each topic. For example, to allow only app1 to write to topic1, the organization can use the following command:

kafka-acls --authorizer-properties zookeeper.connect=zookeeper:2181 --add --allow-principal User:CN=app1.example.com,OU=IT,O=Org,L=City,ST=State,C=US --operation Write --topic topic1

Similarly, to allow only app2 to read from topic2, the organization can use the following command:

kafka-acls --authorizer-properties zookeeper.connect=zookeeper:2181 --add --allow-principal User:CN=app2.example.com,OU=IT,O=Org,L=City,ST=State,C=US --operation Read --topic topic2

By using Kafka ACLs, the organization can prevent applications from writing to a topic different than the one they should write to. If an application tries to write to a topic that it does not have permission for, it will get an authorization error.

asked 16/09/2024
Jyoti Gupta
40 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first