package alts

Import Path
	google.golang.org/grpc/credentials/alts (on go.dev)

Dependency Relation
	imports 23 packages, and imported by one package

Involved Source Files Package alts implements the ALTS credential support by gRPC library, which encapsulates all the state needed by a client to authenticate with a server using ALTS and make various assertions, e.g., about the client's identity, role, or whether it is authorized to make a particular call. This package is experimental. utils.go
Package-Level Type Names (total 5, in which 3 are exported)
/* sort exporteds by: | */
AuthInfo exposes security information from the ALTS handshake to the application. This interface is to be implemented by ALTS. Users should not need a brand new implementation of this interface. For situations like testing, any new implementation should embed this interface. This allows ALTS to add new methods to this interface. ApplicationProtocol returns application protocol negotiated for the ALTS connection. LocalServiceAccount returns the local service account. PeerRPCVersions returns the RPC version supported by the peer. PeerServiceAccount returns the peer service account. RecordProtocol returns the record protocol negotiated for the ALTS connection. SecurityLevel returns the security level of the created ALTS secure channel. func AuthInfoFromContext(ctx context.Context) (AuthInfo, error) func AuthInfoFromPeer(p *peer.Peer) (AuthInfo, error)
ClientOptions contains the client-side options of an ALTS channel. These options will be passed to the underlying ALTS handshaker. HandshakerServiceAddress represents the ALTS handshaker gRPC service address to connect to. TargetServiceAccounts contains a list of expected target service accounts. func DefaultClientOptions() *ClientOptions func NewClientCreds(opts *ClientOptions) credentials.TransportCredentials
ServerOptions contains the server-side options of an ALTS channel. These options will be passed to the underlying ALTS handshaker. HandshakerServiceAddress represents the ALTS handshaker gRPC service address to connect to. func DefaultServerOptions() *ServerOptions func NewServerCreds(opts *ServerOptions) credentials.TransportCredentials
Package-Level Functions (total 12, in which 7 are exported)
AuthInfoFromContext extracts the alts.AuthInfo object from the given context, if it exists. This API should be used by gRPC server RPC handlers to get information about the communicating peer. For client-side, use grpc.Peer() CallOption.
AuthInfoFromPeer extracts the alts.AuthInfo object from the given peer, if it exists. This API should be used by gRPC clients after obtaining a peer object using the grpc.Peer() CallOption.
ClientAuthorizationCheck checks whether the client is authorized to access the requested resources based on the given expected client service accounts. This API should be used by gRPC server RPC handlers. This API should not be used by clients.
DefaultClientOptions creates a new ClientOptions object with the default values.
DefaultServerOptions creates a new ServerOptions object with the default values.
NewClientCreds constructs a client-side ALTS TransportCredentials object.
NewServerCreds constructs a server-side ALTS TransportCredentials object.
Package-Level Variables (total 8, in which 1 are exported)
ErrUntrustedPlatform is returned from ClientHandshake and ServerHandshake is running on a platform where the trustworthiness of the handshaker service is not guaranteed.
Package-Level Constants (total 11, none are exported)