-
Notifications
You must be signed in to change notification settings - Fork 0
/
zilla.yaml
287 lines (287 loc) · 9.21 KB
/
zilla.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
---
name: chat
guards:
jwt0:
type: jwt
options:
issuer: https://aklivity.us.auth0.com/
audience: http://localhost:8080/chat
keys:
- alg: RS256
kty: RSA
use: sig
n: xpUpx4ytuhi0Tz4_l7qqigo_CleAGBs7zalBLHR68tRz3EM2rf6JZapeT7vA6FcdGJskcqNSEYZJsbX0RWsqH_2WwXKOV8HOJJ_XrUmWy1Eeeco8nqM7NoImvubQ_3pxwGq2RaW4Ll3jZ90tWEWoGlk9qo_oJc2WKfnHSjpzuQxX0v5xKxJ3qJN9-SzJ-hit89Uj67o9aC5qOYbZTNgYDOyuawhAN3MlVF_twj7iqogpJprQEeLZTMpsmQbx0DvAju4Za_edJXAkVQeAeQq04SgLU0cagEmk7raNAuk19mWjPAPDq8OldVoecx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AQH/BAUwAwEB/zAdBgNVHQ4EFgQUt/86Q4B1Xalsr8077ehQ9iqi3rkwDgYDVR0PAQH/BAQDAgKEMA0GCSqGSIb3DQEBCwUAA4IBAQBC6ejNbo9u7+qFvh+j1Zh7YZW+uz06Gd4WnwCU+926JP6U7NMNt3guvPVPYtFXSpKhdAom2t/UjBVZh3l7DATU48rE4E/9pzLu8Urg9AVkfRHhLQi+6JZv7ZXDyEcUPtl6jENYZhT1CS2lPsDQ35Ap4BUgWVV8AOOacLVsomHRtS8Q1MtKbNvR+7tJeUEqRxCE7RNXM+FXMDPtwtn5DeKgdDF1HJh95G2Pw4m2W0ZtV1h6NtTuMZMgJtQSqF2IDwaPghLCqdznecLtwuUrVZxjxpuxX2vdYlmtLi2SPf1coKhRHYb4AMj8NNKmBZs9hgPOJxkvQxu8sh7XFbKSQ0gY
bindings:
tcp_server0:
type: tcp
kind: server
options:
host: 0.0.0.0
port: 8080
exit: http_server0
http_server0:
type: http
kind: server
options:
access-control:
policy: cross-origin
authorization:
jwt0:
credentials:
headers:
authorization: Bearer {credentials}
query:
access_token: "{credentials}"
routes:
- when:
- headers:
:method: GET
:path: /channels/*/messages
- headers:
:method: GET
:path: /channels/*/members
- headers:
:method: GET
:path: /channels
exit: sse_server0
- when:
- headers:
:method: POST
:path: /channels
- headers:
:method: POST
:path: /channels/*
- headers:
:method: GET
:path: /channels/*
- headers:
:method: POST
:path: /subscription/subscribe
- headers:
:method: POST
:path: /users
- headers:
:method: GET
:path: /users
- headers:
:method: PUT
:path: /users/*
- headers:
:method: GET
:path: /users/*
exit: http_kafka_proxy0
exit: http_filesystem_proxy0
http_filesystem_proxy0:
type: http-filesystem
kind: proxy
routes:
- when:
- path: /
exit: filesystem_server0
with:
path: index.html
- when:
- path: /{path}
exit: filesystem_server0
with:
path: ${params.path}
filesystem_server0:
type: filesystem
kind: server
options:
location: /app/dist/
http_kafka_proxy0:
type: http-kafka
kind: proxy
routes:
- guarded:
jwt0:
- write:channels
when:
- method: POST
path: /channels/{id}/messages
exit: kafka_cache_client0
with:
capability: produce
topic: messages
key: ${idempotencyKey}
overrides:
channel-id: ${params.id}
- guarded:
jwt0:
- write:channels
when:
- method: POST
path: /channels
exit: kafka_cache_client0
with:
capability: produce
topic: channels
key: ${idempotencyKey}
- guarded:
jwt0:
- read:channels
when:
- method: GET
path: /channels
exit: kafka_cache_client0
with:
capability: fetch
topic: channels
merge:
content-type: application/json
- guarded:
jwt0:
- read:channels
when:
- method: GET
path: /channels/{id}
exit: kafka_cache_client0
with:
capability: fetch
topic: channels
merge:
content-type: application/json
filters:
- key: ${params.id}
- guarded:
jwt0:
- write:subscriptions
when:
- method: POST
path: /subscription/subscribe
exit: kafka_cache_client0
with:
capability: produce
topic: commands
key: ${idempotencyKey}
overrides:
domain-model: SubscribeCommand
- guarded:
jwt0:
- write:users
when:
- method: POST
path: /users
exit: kafka_cache_client0
with:
capability: produce
topic: users
key: ${idempotencyKey}
- guarded:
jwt0:
- write:users
when:
- method: PUT
path: /users/{id}
exit: kafka_cache_client0
with:
capability: produce
topic: users
key: ${params.id}
- guarded:
jwt0:
- read:users
when:
- method: GET
path: /users
exit: kafka_cache_client0
with:
capability: fetch
topic: users
merge:
content-type: application/json
- guarded:
jwt0:
- read:users
when:
- method: GET
path: /users/{id}
exit: kafka_cache_client0
with:
capability: fetch
topic: users
merge:
content-type: application/json
filters:
- key: ${params.id}
sse_server0:
type: sse
kind: server
exit: sse_kafka_proxy0
sse_kafka_proxy0:
type: sse-kafka
kind: proxy
routes:
- guarded:
jwt0:
- read:channels
when:
- path: /channels/{id}/messages
exit: kafka_cache_client0
with:
topic: messages
filters:
- headers:
channel-id: ${params.id}
- guarded:
jwt0:
- read:channels
when:
- path: /channels/{id}/members
exit: kafka_cache_client0
with:
topic: subscriptions
filters:
- headers:
channel-id: ${params.id}
event:
id: '["${base64(key)}","${etag}"]'
- guarded:
jwt0:
- read:channels
when:
- path: /channels
exit: kafka_cache_client0
with:
topic: channels
event:
id: '["${base64(key)}","${etag}"]'
kafka_cache_client0:
type: kafka
kind: cache_client
exit: kafka_cache_server0
kafka_cache_server0:
type: kafka
kind: cache_server
options:
bootstrap:
- channels
exit: kafka_client0
kafka_client0:
type: kafka
kind: client
exit: tcp_client0
tcp_client0:
type: tcp
kind: client
options:
host: kafka.internal.net
port: 29092
routes:
- when:
- cidr: 0.0.0.0/0