GafaelfawrStorage#
- class mobu.storage.gafaelfawr.GafaelfawrStorage(config, gafaelfawr_client, logger)#
Bases:
objectManage users and authentication tokens.
mobu uses bot users to run its tests. Those users may be pre-existing or manufactured on the fly by mobu. Either way, mobu creates new service tokens for the configured users, and then provides those usernames and tokens to monkeys to use for executing their business.
This class handles the call to Gafaelfawr to create the service token.
- Parameters:
config (
Config) – mobu configuration.gafaelfawr_client (
GafaelfawrClient) – Shared Gafaelfawr client.logger (
BoundLogger) – Logger to use.
Methods Summary
create_service_token(user, scopes)Create a service token for a user.
Methods Documentation
- async create_service_token(user, scopes)#
Create a service token for a user.
- Parameters:
- Returns:
Authenticated user with their metadata, scopes, and token.
- Return type:
- Raises:
rubin.gafaelfawr.GafaelfawrError – Raised if the request to Gafaelfawr failed.