]> Entropealabs - wampex.git/commitdiff
adds crossbar.io config
authorChristopher <chris@entropealabs.com>
Fri, 21 Feb 2020 22:11:31 +0000 (16:11 -0600)
committerChristopher <chris@entropealabs.com>
Fri, 21 Feb 2020 22:11:31 +0000 (16:11 -0600)
README.md
crossbar_config/config.json [new file with mode: 0644]

index be53c9a47942a73d543d7544862d952c3c48bbe0..3ddaf9a67f2ecf5adf186140b3b3e8ec26409b0b 100644 (file)
--- 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 (file)
index 0000000..a733245
--- /dev/null
@@ -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
+                    }
+                  }
+                }
+              }
+            }
+          }
+        }
+      ]
+    }
+  ]
+}