crossbar.master.node.authenticator

Classes

Authenticator

Central CFC dynamic authenticator. This component is responsible for all

Principal

Module Contents

class Authenticator(config)[source]

Bases: autobahn.twisted.wamp.ApplicationSession

Central 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_EMAIL_FAILURE = 'fabric.auth-failed.email-failure'[source]
ERROR_AUTH_INVALID_ACT_CODE = 'fabric.auth-failed.invalid-activation-code'[source]
ERROR_AUTH_INVALID_ACT_CODE_MSG = 'This activation code is invalid: {}'[source]
ERROR_AUTH_INVALID_PARAMETERS = 'fabric.auth-failed.invalid-parameters'[source]
ERROR_AUTH_INVALID_PARAMETERS_MSG = 'Invalid parameters in authentication: {}'[source]
ERROR_AUTH_NEW_USER = 'fabric.auth-failed.new-user-auth-code-sent'[source]
ERROR_AUTH_NEW_USER_MSG = 'We have sent an authentication code to {email}.'[source]
ERROR_AUTH_NODE_ALREADY_CONNECTED = 'fabric.auth-failed.node-already-connected'[source]
ERROR_AUTH_NODE_ALREADY_CONNECTED_MSG = 'A node with this pubkey/node_id/authid is already connected.'[source]
ERROR_AUTH_NODE_UNPAIRED = 'fabric.auth-failed.node-unpaired'[source]
ERROR_AUTH_NODE_UNPAIRED_MSG = 'This node is unpaired. Please pair the node with management realm first.'[source]
ERROR_AUTH_NO_PENDING_ACT = 'fabric.auth-failed.no-pending-activation'[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 = 'fabric.auth-failed.pending-activation'[source]
ERROR_AUTH_PENDING_ACT_MSG = 'There is a pending activation (from {} ago) - please check your email inbox, or request a new code'[source]
ERROR_AUTH_REGISTERED_USER = 'fabric.auth-failed.registered-user-auth-code-sent'[source]
ERROR_AUTH_REGISTERED_USER_MSG = 'We have sent an authentication code to {email}.'[source]
GLOBAL_USER_REALM = 'com.crossbario.fabric'[source]

Global users realm on Crossbar.io.

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.

_connected_nodes[source]
_send_user_login_mail(receiver, activation_code)[source]
_send_user_registration_mail(receiver, activation_code)[source]
_superusers = [][source]
async onJoin(details)[source]

Authenticator has joined the global realm (“com.crossbario.fabric”).

Parameters:

details (autobahn.wamp.types.SessionDetails) – Session details.

class Principal(realm, authid, role, extra)[source]

Bases: object

authid[source]
extra[source]
static parse(obj)[source]
realm[source]
role[source]