buildgrid.server.auth.service module
- class buildgrid.server.auth.service.AuthService(token_parser: JwtParser, acls: Mapping[str, InstanceAuthorizationConfig] | None = None)
Bases:
AuthServicer,UninstancedServicer- SERVICE_NAME = 'Auth'
- REGISTER_METHOD(server)
- FULL_NAME: ClassVar[str] = 'build.buildgrid.Auth'
The full name of the servicer, used to match instances to the servicer and configure reflection. This value should be declared on the class of any Servicer implementations.
- start() None
- Authorize(request: AuthorizeRequest, context: ServicerContext) ClientIdentity
Validate the token from a request made to BuildGrid, and check that the identity it resolves to may call method on instance_name. On success, returns the identity.
Errors: * UNAUTHENTICATED: When the token is invalid * PERMISSION_DENIED: When the token is valid, but the identity is not permitted to call method on instance_name