Application Realms


ApplicationRealm


class ApplicationRealm(oid: UUID | None = None, label: str | None = None, description: str | None = None, tags: List[str] | None = None, name: str | None = None, status: int | None = None, workergroup_oid: UUID | None = None, webcluster_oid: UUID | None = None, datamarket_oid: UUID | None = None, changed: datetime64 | None = None, owner_oid: UUID | None = None, _unknown: Any | None = None)[source]

Bases: ConfigurationElement

Application realm database configuration object.

copy(other: ApplicationRealm, overwrite: bool = False)[source]

Copy over other object.

Parameters:
  • other – Other application realm to copy data from.

  • overwrite – Overwrite members already set.

marshal() Dict[str, Any][source]

Marshal this object to a generic host language object.

static parse(data: Dict[str, Any]) ApplicationRealm[source]

Parse generic host language object into an object of this class.

Parameters:

data – Generic host language object

Returns:

New instance of this class.

class ApplicationRealms(slot=None, compress=None, marshal=None, unmarshal=None)[source]

Bases: MapUuidCbor

Application realms defined for user application routing (arealm_oid -> arealm).

class IndexApplicationRealmByName(slot=None, compress=None)[source]

Bases: MapStringUuid

Index of application realms by realm name (arealm_name -> arealm_oid).

class IndexApplicationRealmByWebCluster(slot=None, compress=None)[source]

Bases: MapUuidStringUuid

Index of application realms by webclusters and realm names ((webcluster_oid, arealm_name) -> arealm_oid).

class ApplicationRealmRoleAssociation(arealm_oid: UUID | None = None, role_oid: UUID | None = None, _unknown=None)[source]

Bases: object

Association of a role with an application realm.

marshal()[source]

Marshal this object to a generic host language object.

Returns:

dict

static parse(data)[source]

Parse generic host language object into an object of this class.

Parameters:

data (dict) – Generic host language object

Returns:

instance of WebService

class ApplicationRealmRoleAssociations(slot=None, compress=None, marshal=None, unmarshal=None)[source]

Bases: MapUuidUuidCbor

Association of a role with an application realm ((arealm_oid, role_oid) -> arealm_role_association).

Principal


class Principal(oid: UUID | None = None, label: str | None = None, description: str | None = None, tags: List[str] | None = None, modified: int | None = None, arealm_oid: UUID | None = None, authid: str | None = None, role_oid: UUID | None = None, authextra: dict | None = None, _unknown=None)[source]

Bases: ConfigurationElement

Principals created for use with WAMP authentication. A principal represents the identity an application client is authenticated to the application realm joined.

A principal must have at least one cfxdb.mrealmschema.Credential added. When an application client connects, it will offer an authmethod and request a realm and (usually) authid. When a matching cfxdb.mrealmschema.Credential is found, and authentication succeeds using that, the client will be authenticated under the cfxdb.mrealmschema.Principal associated with the credential.

Note

It is important to note that while the realm and authid requested by the client (and defined in the respective cfxdb.mrealmschema.Credential) will usually be identical to the realm and authid actually assigned (as defined in the cfxdb.mrealmschema.Principal associated with the credential), this is allowed to differ in general.

copy(other, overwrite=False)[source]

Copy over other object.

Parameters:

other (instance of cfxdb.mrealm.Principal) – Other principal to copy data from.

Returns:

marshal()[source]

Marshal this object to a generic host language object.

Returns:

dict

static parse(data)[source]

Parse generic host language object into an object of this class.

Parameters:

data (dict) – Generic host language object

Returns:

instance of ManagementRealm

class Principals(slot=None, compress=None, marshal=None, unmarshal=None)[source]

Bases: MapUuidCbor

Principals created for use with WAMP authentication (principal_oid -> principal).

class IndexPrincipalByName(slot=None, compress=None)[source]

Bases: MapUuidStringUuid

Index of principals by application realms and principal names ((arealm_oid, principal_name) -> principal_oid).

Credential


class Credential(oid: UUID | None = None, created: datetime64 | None = None, authmethod: str | None = None, authid: str | None = None, realm: str | None = None, authconfig: dict | None = None, principal_oid: UUID | None = None, _unknown=None)[source]

Bases: object

Credentials created for use with WAMP authentication.

copy(other, overwrite=False)[source]

Copy over other object.

Parameters:

other (instance of ManagementRealm) – Other credential to copy data from.

Returns:

marshal()[source]

Marshal this object to a generic host language object.

Returns:

dict

static parse(data)[source]

Parse generic host language object into an object of this class.

Parameters:

data (dict) – Generic host language object

Returns:

instance of ManagementRealm

class Credentials(slot=None, compress=None, marshal=None, unmarshal=None)[source]

Bases: MapUuidCbor

Credentials created for use with WAMP authentication (credential_oid -> credential).

class IndexCredentialsByAuth(slot=None, compress=None)[source]

Bases: MapStringStringStringUuid

Index of credentials by authentication method, realm name and authentication ID ((authmethod, realm_name, authid) -> credential_oid).

class IndexCredentialsByPrincipal(slot=None, compress=None)[source]

Bases: MapUuidTimestampUuid

Index of credentials by principals and modification date ((principal_oid, modified) -> credential_oid).

Role


class Role(oid: UUID | None = None, label: str | None = None, description: str | None = None, tags: List[str] | None = None, name: str | None = None, created: datetime64 | None = None, owner: UUID | None = None, _unknown=None)[source]

Bases: ConfigurationElement

Roles created for use with application-level authorization and permissions in application realms.

copy(other, overwrite=False)[source]

Copy over other object.

Parameters:

other (instance of ManagementRealm) – Other role to copy data from.

Returns:

marshal()[source]

Marshal this object to a generic host language object.

Returns:

dict

static parse(data)[source]

Parse generic host language object into an object of this class.

Parameters:

data (dict) – Generic host language object

Returns:

instance of ManagementRealm

class Roles(slot=None, compress=None, marshal=None, unmarshal=None)[source]

Bases: MapUuidCbor

Roles created for use with application-level authorization and permissions in application realms (role_oid -> role).

class IndexRoleByName(slot=None, compress=None)[source]

Bases: MapStringUuid

Index of roles by role names (role_name -> role_oid).

Permission


class Permission(oid: UUID | None = None, label: str | None = None, description: str | None = None, tags: List[str] | None = None, role_oid: UUID | None = None, uri: str | None = None, uri_check_level: int | None = None, match: int | None = None, allow_call: bool | None = None, allow_register: bool | None = None, allow_publish: bool | None = None, allow_subscribe: bool | None = None, disclose_caller: bool | None = None, disclose_publisher: bool | None = None, cache: bool | None = None, created: datetime64 | None = None, owner: UUID | None = None, _unknown=None)[source]

Bases: ConfigurationElement

Role permission database object.

copy(other, overwrite=False)[source]

Copy over other object.

Parameters:

other (instance of ManagementRealm) – Other permission to copy data from.

Returns:

marshal()[source]

Marshal this object to a generic host language object.

Returns:

dict

static parse(data)[source]

Parse generic host language object into an object of this class.

Parameters:

data (dict) – Generic host language object

Returns:

instance of ManagementRealm

class Permissions(slot=None, compress=None, marshal=None, unmarshal=None)[source]

Bases: MapUuidCbor

Role permission database object (permission_oid -> permission).

class IndexPermissionByUri(slot=None, compress=None)[source]

Bases: MapUuidStringUuid

Index of role permissions by roles and URIs ((role_oid, uri) -> permission_oid).