class documentation
class DASManager(object): (source)
Dynamic Authorization Service (DAS) Manager plugin class.
| Method | consult |
Consult the DAS for the given originator and resource at the specified URI. |
| Method | get |
Consult the DAS for the given originator and resource at the specified URI. |
| Method | get |
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 | retrieve |
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:Resource | The AE resource representing the DAS. |
resource:Resource | The resource to check. |
originator:str | The originator to check. |
proposedstr | None | The proposed lifetime for the granted privileges. This is optional, but can be used to provide additional information to the DAS. |
request:CSERequest | None | The original request to check. This is optional, but can be used to provide additional information to the DAS. |
| Returns | |
bool | Boolean, 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:Resource | The AE resource representing the DAS. |
resource:Resource | The resource to check. |
originator:str | The originator to check. |
proposedstr | None | The proposed lifetime for the granted privileges. This is optional, but can be used to provide additional information to the DAS. |
request:CSERequest | None | The original request to check. This is optional, but can be used to provide additional information to the DAS. |
| Returns | |
list[ | Undocumented |
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:Resource | The resource to get the DACI resource IDs for. |
| Returns | |
list[ | A list of DACI resource IDs, or an empty list if no DACI is found in the resource's hierarchy. |
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 | |
dacistr | The resource ID of the DAC instance. |
resource:Resource | The resource to check. |
originator:str | The originator to check. |
request:CSERequest | None | The original request to check. This is optional, but can be used to provide additional information to the DAS. |
| Returns | |
Generator[ | Undocumented |
| Yields | |
| Each access control policy rule (ACTR) as a dictionary. |