buildgrid.server.client.authentication module

class buildgrid.server.client.authentication.ClientCredentials

Bases: dict

buildgrid.server.client.authentication.load_tls_channel_credentials(client_key: str | None = None, client_cert: str | None = None, server_cert: str | None = None) tuple[grpc.ChannelCredentials, tuple[str | None, str | None, str | None]]

Looks-up and loads TLS gRPC client channel credentials.

Parameters:
  • client_key (str, optional) – Client certificate chain file path.

  • client_cert (str, optional) – Client private key file path.

  • server_cert (str, optional) – Serve root certificate file path.

Returns:

Credentials to be used for a TLS-encrypted gRPC

client channel.

Return type:

ChannelCredentials

class buildgrid.server.client.authentication.AuthMetadataClientInterceptorBase(auth_token_loader: AuthTokenLoader | None = None, auth_secret: bytes | None = None)

Bases: object

amend_call_details(client_call_details, grpc_call_details_class: Any)

Appends an authorization field to given client call details.