# Ignore .fetch files in case you like to edit your project deps locally.
/.fetch
+bondy_config/*
+
+!bondy_config/bondy.conf
+!bondy_config/security_config.json
+
# If the VM crashes, it generates a dump, let's ignore it too.
erl_crash.dump
```
You can copy and paste this snippet into the JSON input at https://citybaseinc.github.io/states-language-editor/ to edit and visualize the state machine.
+
+## Local Development
+
+You'll need compliant WAMP Router to run the tests, and do development in general. I recommend the [Bondy Router](https://gitlab.com/leapsight/bondy), it's written in Erlang.
+
+There's a Docker image available, so we'll use that to get up and running quickly.
+
+Make sure you are in the `WAMPex` directory before running this command.
+
+```bash
+docker run \
+ -p 18080:18080 \
+ -p 18081:18081 \
+ -p 18082:18082 \
+ -p 18086:18086 \
+ -v $PWD/bondy_config:/bondy/etc \
+ -d leapsight/bondy:0.8.8-slim
+```
+
+This will setup a default realm `com.myrealm`.
+
+This config allows anonymous users as well as authenticated ones. In reality you wouldn't want to enable both, but for testing, it's useful.
+
+Now we need to add our user for testing authentication.
+
+```bash
+curl -X "POST" "http://localhost:18081/realms/com.myrealm/users" \
+ -H 'Content-Type: application/json; charset=utf-8' \
+ -H 'Accept: application/json; charset=utf-8' \
+ -d $'{
+ "username": "entone",
+ "password": "test1234"
+}'
+```
--- /dev/null
+distributed_cookie = bondy
+nodename = bondy@127.0.0.1
+aae.data_exchange_timeout = 1m
+aae.enabled = on
+security.allow_anonymous_user = on
+security.automatically_create_realms = off
+security.config_file = $(platform_etc_dir)/security_config.json
--- /dev/null
+[
+ {
+ "uri": "com.myrealm",
+ "description": "A test realm",
+ "authmethods": [
+ "wampcra"
+ ],
+ "security_enabled": true,
+ "users": [],
+ "sources": [
+ {
+ "usernames": "all",
+ "authmethod": "password",
+ "cidr": "0.0.0.0/0",
+ "meta": {
+ "description": "Allows all users from any network authenticate using password credentials."
+ }
+ }
+ ],
+ "grants": [
+ {
+ "permissions": [
+ "wamp.register",
+ "wamp.unregister",
+ "wamp.subscribe",
+ "wamp.unsubscribe",
+ "wamp.call",
+ "wamp.cancel",
+ "wamp.publish"
+ ],
+ "uri": "*",
+ "roles": "all"
+ }
+ ]
+ }
+]