crossbario / crossbar

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

client requested valid, but unconfigured authentication method #1758

Open oberstet opened 4 years ago

oberstet commented 4 years ago

When a client requests a valid but unconfigured authmethod on rawsocket, the respective log message ("client requested valid, but unconfigured authentication method cryptosign") is only printed at log level "debug", and the client is never notified of the failed auth (but hangs):

2020-04-26T16:45:06+0200 [Proxy       24841 crossbar.worker.proxy.ProxyController] ProxyController.get_service_session(realm="cosmotron-auth") -> cached service session None
2020-04-26T16:45:06+0200 [Proxy       24841 crossbar.router.auth.cryptosign.PendingAuthCryptosign] Dynamic authenticator session None connected with authrole "None" on realm "None"
2020-04-26T16:45:06+0200 [Router      24820 crossbar.router.protocol.WampRawSocketServerProtocol] WampRawSocketServerProtocol.connectionMade()
2020-04-26T16:45:06+0200 [Router      24820 crossbar.router.protocol.WampRawSocketServerProtocol] WampRawSocketServerProtocol: opening handshake received - 0x7ff30000
2020-04-26T16:45:06+0200 [Router      24820 crossbar.router.protocol.WampRawSocketServerProtocol] WampRawSocketServerProtocol: client requests us to send out most 16777216 bytes per message
2020-04-26T16:45:06+0200 [Router      24820 crossbar.router.protocol.WampRawSocketServerProtocol] WampRawSocketServerProtocol: client wants to use serializer '3'
2020-04-26T16:45:06+0200 [Router      24820 crossbar.router.session.RouterSession] Client session connected - transport: {'type': 'rawsocket', 'protocol': 'wamp.2.cbor', 'peer': 'unix:None', 'channel_id': '0000000000000000000000000000000000000000000000000000000000000000'}
2020-04-26T16:45:06+0200 [Router      24820 crossbar.router.protocol.WampRawSocketServerProtocol] ApplicationSession started.
2020-04-26T16:45:06+0200 [Router      24820 crossbar.router.protocol.WampRawSocketServerProtocol] WampRawSocketServerProtocol: opening handshake completed: <autobahn.wamp.serializer.CBORSerializer object at 0x7fca770d9cd0>
2020-04-26T16:45:06+0200 [Proxy       24841 autobahn.twisted.rawsocket.WampRawSocketProtocol] WampRawSocketClientProtocol: opening handshake received - 7fb30000
2020-04-26T16:45:06+0200 [Proxy       24841 autobahn.twisted.rawsocket.WampRawSocketProtocol] WampRawSocketClientProtocol: server requests us to send out most 1048576 bytes per message
2020-04-26T16:45:06+0200 [Proxy       24841 autobahn.twisted.rawsocket.WampRawSocketProtocol] ApplicationSession started.
2020-04-26T16:45:06+0200 [Proxy       24841 autobahn.twisted.rawsocket.WampRawSocketProtocol] WampRawSocketClientProtocol: opening handshake completed (using serializer <autobahn.wamp.serializer.CBORSerializer object at 0x7faa7bd8d2b0>)
2020-04-26T16:45:06+0200 [Router      24820 crossbar.router.session.RouterSession] onHello: ['cryptosign'] {'pubkey': '0016fc6b9a18e0a909de44031add657a771138e905cda7565e0c3fff79d6ee61'}
2020-04-26T16:45:06+0200 [Router      24820 crossbar.router.session.RouterSession] client requested valid, but unconfigured authentication method cryptosign
2020-04-26T16:45:06+0200 [Proxy       24841 autobahn.twisted.rawsocket.WampRawSocketProtocol] WampRawSocketClientProtocol.connectionLost(reason="[Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionDone'>: Connection was closed cleanly.
]"
2020-04-26T16:45:06+0200 [Router      24820 crossbar.router.protocol.WampRawSocketServerProtocol] WampRawSocketServerProtocol.connectionLost(reason="[Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionDone'>: Connection was closed cleanly.
]"
zrckr commented 2 years ago

Is there any way around this problem?

oberstet commented 2 years ago

you could change log level to "info" here https://github.com/crossbario/crossbar/blob/71787f9eae220966e6be4a608cc049e336f9a85b/crossbar/router/session.py#L924