buildgrid.server.auth.config module
- class buildgrid.server.auth.config.Acl(*, actor: str | None = None, requests: list[str] | None = None, subject: str | None = None, workflow: str | None = None)
Bases:
BaseModel
- actor: str | None
- requests: list[str] | None
- subject: str | None
- workflow: str | None
- is_authorized(request_name: str, actor: str | None = None, subject: str | None = None, workflow: str | None = None) bool
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class buildgrid.server.auth.config.InstanceAuthorizationConfig(*, allow: Literal['all'] | list[Acl])
Bases:
BaseModel
- is_authorized(request_name: str, actor: str | None = None, subject: str | None = None, workflow: str | None = None) bool
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- buildgrid.server.auth.config.parse_auth_config(path: str | bytes | PathLike[str]) dict[str, InstanceAuthorizationConfig]