role permissions and attribute 'register'

33 views
Skip to first unread message

David Ford

unread,
Mar 8, 2016, 12:52:26 PM3/8/16
to Crossbar
something changed in master recently that altered role setup for realms.

this used to work:

         "realms": [
            {
               "name": "authentication",
               "roles": [
                  {
                     "name": "authenticator",
                     "permissions": [
                        {
                           "uri": "com.example.authenticate",
                           "register": true
                        }
                     ]
                  }
               ]
            },

now we get an error:

2016-03-08T04:05:56+0000 [Controller  27940] Controller process starting (CPython-EPollReactor) ..
2016-03-08T04:05:56+0000 [Controller  27940] Invalid node configuration
2016-03-08T04:05:56+0000 [Controller  27940] invalid grant in role permissions - encountered unknown attribute 'register'

[non-root@gen4-lab MS]$ grep register .crossbar/config.json
                                    "register": true

how are we supposed to set this up now?

יוסי אברהם

unread,
Mar 26, 2016, 11:45:01 AM3/26/16
to Crossbar
Hey friend, I encountered the same error. It seems like the newest version of crossbar using a new version (2) for it's config file. after digging into the source code of crossbar, I found that instead of having a flat object of permission, you know should use the sub-key "allow".
so, in your case, this should do:
                "roles": [
                  {
                     "name": "authenticator",
                     "permissions": [
                        {
                           "uri": "com.example.authenticate",
                           "allow": {
                             "register": true
                           }
                        }
                     ]
                  }
               ]

Good luck pal, here for any further questions.

David Ford

unread,
Mar 27, 2016, 7:09:39 PM3/27/16
to cross...@googlegroups.com
thank you very much! i'll go try it right now

--
You received this message because you are subscribed to the Google Groups "Crossbar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to crossbario+...@googlegroups.com.
To post to this group, send email to cross...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/crossbario/0114d0d5-3a39-4c26-90c4-4a693c8e87ab%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Gay/FireRescue/Geek in 33484, USA
It's the ideals of Linux and Open Source that are amazing, it embodies what WE want, not what is marketed

David Ford

unread,
Mar 27, 2016, 7:39:33 PM3/27/16
to cross...@googlegroups.com
it works, thank you again :D
Reply all
Reply to author
Forward
0 new messages