crossbario / crossbar

Crossbar.io - WAMP application router
https://crossbar.io/
Other
2.05k stars 275 forks source link

Complement type "function" authenticators #1807

Closed oberstet closed 2 years ago

oberstet commented 4 years ago

currently only wamp-cryptosign authenticator have the function type feature (besides static and dynamic), eg:

"websocket": {
    {
        "type": "websocket",
        "auth": {
            "anonymous": {
                "type": "static",
                "role": "anonymous"
            },
            "cryptosign": {
                "type": "function",
                "create": "authenticator.create_authenticator",
                "expose_controller": true,
                "config": {
                    "dbname": "foo"
                }
            }
        },
        "serializers": [
            "cbor", "msgpack", "json"
        ],
        "options": {
            "allowed_origins": ["*"],
            "allow_null_origin": true,
            "enable_webstatus": true,
            "max_frame_size": 1048576,
            "max_message_size": 1048576,
            "auto_fragment_size": 65536,
            "fail_by_drop": true,
            "open_handshake_timeout": 2500,
            "close_handshake_timeout": 1000,
            "auto_ping_interval": 10000,
            "auto_ping_timeout": 5000,
            "auto_ping_size": 4,
            "compression": {
                "deflate": {
                    "request_no_context_takeover": false,
                    "request_max_window_bits": 13,
                    "no_context_takeover": false,
                    "max_window_bits": 13,
                    "memory_level": 5
                }
            }
        }
    }
},

we should have the same option for all other authenticator types (ticket, wamp-cra, scram, ..)

oberstet commented 4 years ago

ok, this PR https://github.com/crossbario/crossbar/pull/1809 has added support for function-based auth providers for a bunch of authmethods.

this PR https://github.com/crossbario/crossbar-examples/pull/146 has added corresponding examples.

the current status is documented here: https://github.com/crossbario/crossbar-examples/tree/master/authentication#status

oberstet commented 2 years ago

fixed