-
Notifications
You must be signed in to change notification settings - Fork 0
/
scenario3.yaml
73 lines (73 loc) · 2.52 KB
/
scenario3.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
title: Simple test with SASL_SSL and Dynamic Header Injection
docker:
kafka:
version: latest
environment:
KAFKA_AUTO_CREATE_TOPICS_ENABLE: false
gateway:
version: 2.0.0-amd64
environment:
GATEWAY_SECURITY_PROTOCOL: SASL_SSL
plugins:
franklx:
inject-header-1:
pluginClass: "io.conduktor.gateway.interceptor.DynamicHeaderInjectionPlugin"
"priority": 1
"config":
"topic": ".*"
"headers":
"X-RAW_KEY": "a value"
inject-header-2:
pluginClass: "io.conduktor.gateway.interceptor.DynamicHeaderInjectionPlugin"
"priority": 100
"config":
"topic": ".*"
"headers":
"X-USERNAME": "{{user}}"
actions:
- type: CREATE_TOPIC
target: GATEWAY
properties:
security.protocol: SASL_SSL
sasl.mechanism: PLAIN
sasl.jaas.config: "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"franklx\" password=\"eyJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6ImZyYW5rbHgiLCJ2Y2x1c3RlciI6ImZyYW5rbHgiLCJleHAiOjExNjkyMDg4MjI0fQ.RaDEBfXwUJHKYiDeOGQ8HgLT7K9yCnNa6SckSvHZuCw\";"
topic: topic1
- type: PRODUCE
target: GATEWAY
properties:
security.protocol: SASL_SSL
sasl.mechanism: PLAIN
sasl.jaas.config: "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"franklx\" password=\"eyJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6ImZyYW5rbHgiLCJ2Y2x1c3RlciI6ImZyYW5rbHgiLCJleHAiOjExNjkyMDg4MjI0fQ.RaDEBfXwUJHKYiDeOGQ8HgLT7K9yCnNa6SckSvHZuCw\";"
topic: topic1
messages:
- key: "key3"
value: "value3"
headers:
header_key1: "headerValue5"
header_key2: "headerValue5"
- type: FETCH
target: KAFKA
topic: franklxtopic1
messages:
- key: "key3"
value: "value3"
headers:
header_key1: "headerValue5"
header_key2: "headerValue5"
X-RAW_KEY: "a value"
X-USERNAME: "franklx"
- type: FETCH
target: GATEWAY
properties:
security.protocol: SASL_SSL
sasl.mechanism: PLAIN
sasl.jaas.config: "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"franklx\" password=\"eyJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6ImZyYW5rbHgiLCJ2Y2x1c3RlciI6ImZyYW5rbHgiLCJleHAiOjExNjkyMDg4MjI0fQ.RaDEBfXwUJHKYiDeOGQ8HgLT7K9yCnNa6SckSvHZuCw\";"
topic: topic1
messages:
- key: "key3"
value: "value3"
headers:
header_key1: "headerValue5"
header_key2: "headerValue5"
X-RAW_KEY: "a value"
X-USERNAME: "franklx"