0

I had seen in the Crossbar.io documentation, that we can set role to publish only to specific topic. But how can I set a role to publish exactly matching two topics rather than pattern based matching.

Emile Cormier
  • 28,391
  • 15
  • 94
  • 122
Kamalakannan J
  • 2,818
  • 3
  • 23
  • 51

1 Answers1

1

You can use a configuration like this (see Static Authorization in the docs):

"realms": [
   {
      "name": "realm1",
      "roles": [
         {
            "name": "role1",
            "permissions": [
               {
                  "uri": "com.example.topic1",
                  "publish": true
               },
               {
                  "uri": "com.example.topic2",
                  "publish": true
               }
            ]
         }
      ]
   }
]
oberstet
  • 21,353
  • 10
  • 64
  • 97