Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Kafka tutorial - change remaining topic names to mytopic #83

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/quick-tutorials/k8s-kafka-mtls.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,15 @@ kubectl apply -f https://docs.otterize.com/code-examples/kafka-mtls/kafkaserverc
</Tabs>
</details>

Upon applying the KafkaServerConfig, an ACL will configure Kafka to allow only authenticated access to the *transactions* topic by denying all anonymous access.
Upon applying the KafkaServerConfig, an ACL will configure Kafka to allow only authenticated access to the *mytopic* topic by denying all anonymous access.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Upon applying the KafkaServerConfig, an ACL will configure Kafka to allow only authenticated access to the *mytopic* topic by denying all anonymous access.
Upon applying the KafkaServerConfig, an ACL will configure Kafka to allow only authenticated access to the *transactions* topic by denying all anonymous access.

This will be the base state, from which we will gradually roll out secure access to Kafka.

```bash
kubectl logs -n kafka statefulset/kafka | grep "Processing Acl change" | grep ANONYMOUS | tail -n 1
```
You should see the following output:
```
[2023-05-18 11:49:14,230] INFO Processing Acl change notification for ResourcePattern(resourceType=TOPIC, name=transactions, patternType=LITERAL), versionedAcls : Set(User:ANONYMOUS has DENY permission for operations: ALL from hosts: *, User:* has ALLOW permission for operations: ALL from hosts: *), zkVersion : 0 (kafka.security.authorizer.AclAuthorizer)
[2023-05-18 11:49:14,230] INFO Processing Acl change notification for ResourcePattern(resourceType=TOPIC, name=mytopic, patternType=LITERAL), versionedAcls : Set(User:ANONYMOUS has DENY permission for operations: ALL from hosts: *, User:* has ALLOW permission for operations: ALL from hosts: *), zkVersion : 0 (kafka.security.authorizer.AclAuthorizer)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[2023-05-18 11:49:14,230] INFO Processing Acl change notification for ResourcePattern(resourceType=TOPIC, name=mytopic, patternType=LITERAL), versionedAcls : Set(User:ANONYMOUS has DENY permission for operations: ALL from hosts: *, User:* has ALLOW permission for operations: ALL from hosts: *), zkVersion : 0 (kafka.security.authorizer.AclAuthorizer)
[2023-05-18 11:49:14,230] INFO Processing Acl change notification for ResourcePattern(resourceType=TOPIC, name=transactions, patternType=LITERAL), versionedAcls : Set(User:ANONYMOUS has DENY permission for operations: ALL from hosts: *, User:* has ALLOW permission for operations: ALL from hosts: *), zkVersion : 0 (kafka.security.authorizer.AclAuthorizer)

```

## Deploy clients
Expand Down Expand Up @@ -311,7 +311,7 @@ kubectl logs -f --tail 1 -n otterize-tutorial-kafka-mtls deploy/client-authentic
```
Loading mTLS certificates
Connecting to Kafka
Creating a producer for - transactions
Creating a producer for - mytopic
Sending messages
Sent message - Message 1 [sent by client-authenticated]
Sent message - Message 2 [sent by client-authenticated]
Expand Down Expand Up @@ -348,7 +348,7 @@ client in namespace otterize-tutorial-kafka-mtls calls:
- Kafka topic: mytopic, operations: [produce]
client-authenticated in namespace otterize-tutorial-kafka-mtls calls:
- kafka in namespace kafka
- Kafka topic: transactions, operations: [produce]
- Kafka topic: mytopic, operations: [produce]
client-other in namespace otterize-tutorial-kafka-mtls calls:
- kafka in namespace kafka
- Kafka topic: mytopic, operations: [produce]
Expand Down Expand Up @@ -416,7 +416,7 @@ kubectl logs -f --tail 1 -n otterize-tutorial-kafka-mtls deploy/client-authentic
```
Loading mTLS certificates
Connecting to Kafka
Creating a producer for - transactions
Creating a producer for - mytopic
Sending messages
Sent message - Message 263 [sent by client-authenticated]
Sent message - Message 264 [sent by client-authenticated]
Expand Down
2 changes: 1 addition & 1 deletion static/code-examples/kafka-mtls/all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ data:

const (
kafkaAddr = "kafka.kafka:9092"
testTopicName = "transactions"
testTopicName = "mytopic"
certFile = "/var/otterize/credentials/cert.pem"
keyFile = "/var/otterize/credentials/key.pem"
rootCAFile = "/var/otterize/credentials/ca.pem"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ data:

const (
kafkaAddr = "kafka.kafka:9092"
testTopicName = "transactions"
testTopicName = "mytopic"
certFile = "/var/otterize/credentials/cert.pem"
keyFile = "/var/otterize/credentials/key.pem"
rootCAFile = "/var/otterize/credentials/ca.pem"
Expand Down
2 changes: 1 addition & 1 deletion static/code-examples/kafka-mtls/kafkaserverconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
keyFile: /etc/otterize-spire/key.pem
rootCAFile: /etc/otterize-spire/ca.pem
topics:
- topic: "transactions"
- topic: "mytopic"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- topic: "mytopic"
- topic: "transactions"

pattern: literal
clientIdentityRequired: true
intentsRequired: false
Loading