From e55f56afc2f8aecd0bad38b47dec394e12b22b2c Mon Sep 17 00:00:00 2001 From: Christopher Date: Fri, 21 Feb 2020 16:11:31 -0600 Subject: [PATCH] adds crossbar.io config --- README.md | 6 +++ crossbar_config/config.json | 74 +++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 crossbar_config/config.json diff --git a/README.md b/README.md index be53c9a..3ddaf9a 100644 --- a/README.md +++ b/README.md @@ -187,3 +187,9 @@ curl -X "POST" "http://localhost:18081/realms/com.myrealm/users" \ "password": "test1234" }' ``` + +### Crossbar.io + +```bash +docker run -v $PWD/crossbar_config/config.json:/node/.crossbar/config.json -u 0 --rm --name=crossbar -it -p 18080:18080 crossbario/crossbar +``` diff --git a/crossbar_config/config.json b/crossbar_config/config.json new file mode 100644 index 0000000..a733245 --- /dev/null +++ b/crossbar_config/config.json @@ -0,0 +1,74 @@ +{ + "version": 2, + "controller": {}, + "workers": [ + { + "type": "router", + "realms": [ + { + "name": "com.myrealm", + "roles": [ + { + "name": "user", + "permissions": [ + { + "uri": "", + "match": "prefix", + "allow": { + "call": true, + "register": true, + "publish": true, + "subscribe": true + }, + "disclose": { + "caller": false, + "publisher": false + }, + "cache": true + } + ] + } + ] + } + ], + "transports": [ + { + "type": "web", + "endpoint": { + "type": "tcp", + "port": 18080 + }, + "paths": { + "/": { + "type": "static", + "directory": "../web", + "options": { + "enable_directory_listing": true + } + }, + "info": { + "type": "nodeinfo" + }, + "ws": { + "type": "websocket", + "auth": { + "wampcra": { + "type": "static", + "users": { + "entone": { + "secret": "test1234", + "role": "user", + "salt": "salt123", + "iterations": 1000, + "keylen": 32 + } + } + } + } + } + } + } + ] + } + ] +} -- 2.45.3