{
    "version": 2,
    "workers": [
        {
            "type": "router",
            "realms": [
                {
                    "name": "crossbardemo",
                    "roles": [
                        {
                            "name": "anonymous",
                            "permissions": [
                                {
                                    "uri": "",
                                    "match": "prefix",
                                    "allow": {
                                        "call": true,
                                        "register": true,
                                        "publish": true,
                                        "subscribe": true
                                    },
                                    "disclose": {
                                        "caller": false,
                                        "publisher": false
                                    },
                                    "cache": true
                                }
                            ]
                        },
                        {
                            "name": "authenticated",
                            "permissions": [
                                {
                                    "uri": "",
                                    "match": "prefix",
                                    "allow": {
                                        "call": true,
                                        "register": true,
                                        "publish": true,
                                        "subscribe": true
                                    },
                                    "disclose": {
                                        "caller": false,
                                        "publisher": false
                                    },
                                    "cache": true
                                }
                            ]
                        }
                    ]
                }
            ],
            "transports": [
                {
                    "type": "universal",
                    "endpoint": {
                        "type": "tcp",
                        "port": 8080
                    },
                    "rawsocket": {
                        "serializers": [
                            "cbor", "msgpack", "ubjson", "json"
                        ]
                    },
                    "websocket": {
                        "ws": {
                            "type": "websocket",
                            "serializers": [
                                "cbor", "msgpack", "ubjson", "json"
                            ],
                            "options": {
                                "compression": {
                                    "deflate": {
                                        "request_no_context_takeover": false,
                                        "request_max_window_bits": 13,
                                        "no_context_takeover": false,
                                        "max_window_bits": 13,
                                        "memory_level": 5
                                    }
                                }
                            }
                        },
                        "auth_ws": {
                            "type": "websocket",
                            "auth": {
                                "wampcra": {
                                    "type": "static",
                                    "users": {
                                        "username": {
                                            "secret": "p4ssw0rd",
                                            "role": "authenticated"
                                        }
                                    }
                                },
                                "anonymous": {
                                    "type": "static",
                                    "role": "anonymous"
                                }
                            }
                        }
                    },
                    "web": {
                        "paths": {
                            "/": {
                                "type": "static",
                                "directory": ".",
                                "options": {
                                    "enable_directory_listing": true,
                                    "mime_types": {
                                        ".md": "text/plain",
                                        ".py": "text/plain"
                                    }
                                }
                            }
                        }
                    }
                }
            ]
        }
    ]
}
