zilla
zilla copied to clipboard
Support `mqtt` topics scoped by trusted identity
Introduce with
clause to mqtt
routing supporting reference to ${guarded['...'].identity}
to implicitly scope topic and reply topic names as needed.
mqtt_server0:
type: mqtt
kind: server
routes:
- when:
- publish:
- topic: event
exit: mqtt_kafka_proxy0
with:
topic: event/${guarded['jwt'].identity}
- when:
- publish:
- topic: command
reply-to: reply
exit: mqtt_kafka_proxy0
with:
topic: command/${guarded['jwt'].identity}
reply-to: reply/${guarded['jwt'].identity}
- when:
- subscribe:
- topic: reply
exit: mqtt_kafka_proxy0
with:
topic: reply/${guarded['jwt'].identity}
- when:
- session:
- client-id: *
exit: mqtt_kafka_proxy0
Note: depends on #420