esgf_core_utils.models.auth
Models relating to Authorisation for the ESGF Next Gen Core Architecture.
Attributes
Exceptions
Authorization Exception |
|
Missing Permission Exception |
Classes
Model describing |
|
Model describing Node auth info of a ESGF publisher. |
|
Model describing Project auth info of a ESGF publisher. |
|
Model describing Project auth info of a ESGF publisher. |
|
Model describing Project auth info of a ESGF publisher. |
|
Model describing Authentication information of a ESGF publisher. |
Package Contents
- exception esgf_core_utils.models.auth.AuthorizationException(instance: str)
Bases:
RFC9457ExceptionAuthorization Exception
- status_code = 403
- type = 'https://esgf.io/publication/errors/missing-permission'
- title = 'You do not have permission'
- detail = 'You do not have the required permission to perform that operation -- please check with your...
- instance
- exception esgf_core_utils.models.auth.MissingPermissionException(permission_type: str, target: str, role: str = '')
Bases:
ExceptionMissing Permission Exception
- type
- role = ''
- target
- class esgf_core_utils.models.auth.RequesterData(/, **data: Any)
Bases:
pydantic.BaseModelModel describing
Requests Datafor theAuthcomponent of a Kafka message in more detail.- client_id: str
- iss: str
- sub: str
- esgf_core_utils.models.auth.logger
- esgf_core_utils.models.auth.Role
- class esgf_core_utils.models.auth.Node(/, **data: Any)
Bases:
pydantic.BaseModelModel describing Node auth info of a ESGF publisher.
- id: str
- class esgf_core_utils.models.auth.Project(/, **data: Any)
Bases:
pydantic.BaseModelModel describing Project auth info of a ESGF publisher.
- id: str
- class esgf_core_utils.models.auth.Nodes(/, **data: Any)
Bases:
pydantic.BaseModelModel describing Project auth info of a ESGF publisher.
- class esgf_core_utils.models.auth.Projects(/, **data: Any)
Bases:
pydantic.BaseModelModel describing Project auth info of a ESGF publisher.
- class esgf_core_utils.models.auth.Authorizer(/, **data: Any)
Bases:
pydantic.BaseModelModel describing Authentication information of a ESGF publisher.
- requester_data: esgf_core_utils.models.kafka.events.RequesterData
- regex: str
- authorize(collection_id: str, item: stac_pydantic.item.Item | stac_fastapi.extensions.transaction.request.PartialItem, role: Role, request_id: str, event_id: str) None
Check for appropriate authorisation.
- Args:
collection_id: collection id of request item (Item): item to be authorised role (Role): required role for auhroisation
- Raises:
AuthorizationException: Raised if either node or role permission is missing
- add(entitlements: list[str]) None
add entitlements to Authorizer.
- Args:
entitlements (list[str]): list of entitlements to be added