Skip to content

Commit

Permalink
Fix Kafka tutorial - change remaining topic names to mytopic
Browse files Browse the repository at this point in the history
  • Loading branch information
orishavit committed May 18, 2023
1 parent 73cd70f commit ac07a42
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
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.
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-04-12 20:05:32,344] 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: *), zkVersion : 0 (kafka.security.authorizer.AclAuthorizer)
[2023-04-12 20:05:32,344] 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: *), 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"
pattern: literal
clientIdentityRequired: true
intentsRequired: false

0 comments on commit ac07a42

Please sign in to comment.