crossbar.master.node.authenticator¶
Classes¶
Central CFC dynamic authenticator. This component is responsible for all |
|
Module Contents¶
- class Authenticator(config)[source]¶
Bases:
autobahn.twisted.wamp.ApplicationSessionCentral CFC dynamic authenticator. This component is responsible for all frontend WAMP connections to CFC, for both CF nodes, CFC UI and user CFC scripts.
- ERROR_AUTH_NODE_ALREADY_CONNECTED_MSG = 'A node with this pubkey/node_id/authid is already connected.'[source]¶
- ERROR_AUTH_NODE_UNPAIRED_MSG = 'This node is unpaired. Please pair the node with management realm first.'[source]¶
- ERROR_AUTH_NO_PENDING_ACT_MSG = 'There is no (pending) activation for this user/pubkey, but an activation code was provided'[source]¶
- ERROR_AUTH_PENDING_ACT_MSG = 'There is a pending activation (from {} ago) - please check your email inbox, or request a new code'[source]¶
- GLOBAL_USER_REALM_USER_ROLE = 'user'[source]¶
The WAMP authrole regular users get on the Crossbar.io domain (global) users realm. A role different from this only makes sense for Crossbar.io admins.
- MREALM_CREATOR_DEFAULT_ROLES = ['owner'][source]¶
THe set of roles a user creating a new management realm gets by default.
- MREALM_NODE_ROLE = 'node'[source]¶
The (fixed) role a user node gets when joining the management realm it is paired to.
- MREALM_USER_ROLES = ['guest', 'developer', 'operator', 'admin', 'owner'][source]¶
All permissible roles a user can take on a management realm. This is a fixed set hardwired into Crossbar.io!
- _auth_node(pubkey)[source]¶
Authenticate a Crossbar.io node.
A user node is purely authenticated based on the node’s public key, MUST request the authrole=”node”, and MUST NOT request a specific realm (the management realm of a node is automatically assigned by Crossbar.io).
- async _auth_user(realm, authid, authrole, pubkey, activation_code=None, request_new_activation_code=False)[source]¶
Authenticate a Crossbar.io user.
For a user that is not yet registered, or a user key not yet associated with a user, this will raise an ApplicationError signaling the state of the registration process.
- async _authenticate(realm, authid, details)[source]¶
Main authenticator for Crossbar.io. This authenticates both users and user nodes to Crossbar.io by authenticating against information stored in controller database.
- async onJoin(details)[source]¶
Authenticator has joined the global realm (“com.crossbario.fabric”).
- Parameters:
details (
autobahn.wamp.types.SessionDetails) – Session details.