Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

We want to limit subscription rights of user tutorial  to a certain topic. Let´s log into Keycloak Admin Console again and change the value of key bgw_rules  to

Code Block
languagetext
HTTPS/+/bgw-ssl/8443/sc/main_broker MQTT/CON/mosquitto/1883/# MQTT/SUB/mosquitto/1883/tutorial

...

There is no standard way of telling a publisher that his publication is not allowed so from the publisher´s perspective, everything looks fine. Note though that the subscriber will not receive the message as it is not actually published but dropped by the Border Gateway. Now allow any MQTT method for the topic and user tutorial:

Code Block
languageyamltext
HTTPS/+/bgw-ssl/8443/sc/main_broker MQTT/CON/mosquitto/1883/# MQTT/+/mosquitto/1883/tutorial

...

Just for demonstrating this, give the following rule to user tutorial in Keycloak:

Code Block
languageymltext
HTTPS/# MQTT/# WS/#

Restart the Border Gateway and Redis for the change to take effect:

...