class documentation

class DASManager(object): (source)

View In Hierarchy

Dynamic Authorization Service (DAS) Manager plugin class.

Method consultDAS Consult the DAS for the given originator and resource at the specified URI.
Method getACTRfromDAS Consult the DAS for the given originator and resource at the specified URI.
Method getDACIforResource Get the list of DACI resource IDs for a given resource. If no DACI is found for a resource, the parent resources are also considered until a DACI is found or the CSEBase is reached.
Method restart Restart the DASManager services.
Method retrieveACTRfromDAS Retrieve the access control policy rules (ACRs) for a given resource and originator by consulting the DAS.
Method start Initialize the DASManager.
Method stop Shutdown the DASManager.
Class Variable dispatcher Injected Dispatcher instance.
Class Variable notification Injected NotificationManager instance.
def consultDAS(self, ae: Resource, resource: Resource, originator: str, proposedLifetime: str | None = None, request: CSERequest | None = None) -> bool: (source)

Consult the DAS for the given originator and resource at the specified URI.

Parameters
ae:ResourceThe AE resource representing the DAS.
resource:ResourceThe resource to check.
originator:strThe originator to check.
proposedLifetime:str | NoneThe proposed lifetime for the granted privileges. This is optional, but can be used to provide additional information to the DAS.
request:CSERequest | NoneThe original request to check. This is optional, but can be used to provide additional information to the DAS.
Returns
boolBoolean, True if access is granted by the DAS, False otherwise.
def getACTRfromDAS(self, ae: Resource, resource: Resource, originator: str, proposedLifetime: str | None = None, request: CSERequest | None = None) -> list[JSON]: (source)

Consult the DAS for the given originator and resource at the specified URI.

Returns:

Parameters
ae:ResourceThe AE resource representing the DAS.
resource:ResourceThe resource to check.
originator:strThe originator to check.
proposedLifetime:str | NoneThe proposed lifetime for the granted privileges. This is optional, but can be used to provide additional information to the DAS.
request:CSERequest | NoneThe original request to check. This is optional, but can be used to provide additional information to the DAS.
Returns
list[JSON]Undocumented
def getDACIforResource(self, resource: Resource) -> list[str]: (source)

Get the list of DACI resource IDs for a given resource. If no DACI is found for a resource, the parent resources are also considered until a DACI is found or the CSEBase is reached.

Parameters
resource:ResourceThe resource to get the DACI resource IDs for.
Returns
list[str]A list of DACI resource IDs, or an empty list if no DACI is found in the resource's hierarchy.
def restart(self): (source)

Restart the DASManager services.

def retrieveACTRfromDAS(self, daciRi: str, resource: Resource, originator: str, request: CSERequest | None = None) -> Generator[dict, None, None]: (source)

Retrieve the access control policy rules (ACRs) for a given resource and originator by consulting the DAS.

This is a generator function that yields the access control policy rules (ACRs). ACRs are retrieved from the DAS as needed. Each request to this function call may result in a call to a DAS server.

Parameters
daciRi:strThe resource ID of the DAC instance.
resource:ResourceThe resource to check.
originator:strThe originator to check.
request:CSERequest | NoneThe original request to check. This is optional, but can be used to provide additional information to the DAS.
Returns
Generator[dict, None, None]Undocumented
Yields
Each access control policy rule (ACTR) as a dictionary.
def start(self): (source)

Initialize the DASManager.

def stop(self) -> bool: (source)

Shutdown the DASManager.

Returns
boolBoolean, always True.

Injected Dispatcher instance.

Injected NotificationManager instance.