crossbar.router.auth.cryptosign

Classes

PendingAuthCryptosign

Pending Cryptosign authentication.

PendingAuthCryptosignProxy

Pending Cryptosign authentication with additions for proxy

Module Contents

class PendingAuthCryptosign(pending_session_id: int, transport_details: autobahn.wamp.types.TransportDetails, realm_container: crossbar.interfaces.IRealmContainer, config: Dict[str, Any])[source]

Bases: crossbar.router.auth.pending.PendingAuth

Pending Cryptosign authentication.

AUTHMETHOD = 'cryptosign'[source]
_challenge: bytes | None = None[source]
_channel_id[source]
_compute_challenge(requested_channel_binding: str | None) Dict[str, Any][source]
_expected_signed_message: bytes | None = None[source]
_pubkey_to_authid = None[source]
_realms_to_trustroots = None[source]
_verify_key: nacl.signing.VerifyKey | None = None[source]
authenticate(signature: str) autobahn.wamp.types.Accept | autobahn.wamp.types.Deny[source]

Verify the signed message sent by the client. With WAMP-cryptosign, this must be 96 bytes (as a string in HEX encoding): the concatenation of the Ed25519 signature (64 bytes) and the 32 bytes we sent as a challenge previously, XORed with the 32 bytes transport channel ID (if available).

hello(realm: str, details: autobahn.wamp.types.HelloDetails) autobahn.wamp.types.Accept | autobahn.wamp.types.Deny | autobahn.wamp.types.Challenge[source]

When a HELLO message is received, this gets called to open the pending authentication.

Parameters:
  • realm – The realm to client wishes to join (if the client did announce a realm).

  • details – The details of the client provided for HELLO.

Returns:

Either return a challenge, or immediately accept or deny session.

log[source]
class PendingAuthCryptosignProxy(pending_session_id: int, transport_details: autobahn.wamp.types.TransportDetails, realm_container: crossbar.interfaces.IRealmContainer, config: Dict[str, Any])[source]

Bases: PendingAuthCryptosign

Pending Cryptosign authentication with additions for proxy

AUTHMETHOD = 'cryptosign-proxy'[source]
hello(realm, details)[source]

When a HELLO message is received, this gets called to open the pending authentication.

Parameters:
  • realm – The realm to client wishes to join (if the client did announce a realm).

  • details – The details of the client provided for HELLO.

Returns:

Either return a challenge, or immediately accept or deny session.

log[source]