Movatterモバイル変換


[0]ホーム

URL:


alts

package
v1.77.0Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2025 License:Apache-2.0Imports:17Imported by:280

Details

Repository

github.com/grpc/grpc-go

Links

Documentation

Overview

Package alts implements the ALTS credential support by gRPC library, whichencapsulates all the state needed by a client to authenticate with a serverusing 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.

Index

Constants

This section is empty.

Variables

View Source
var (// ErrUntrustedPlatform is returned from ClientHandshake and// ServerHandshake is running on a platform where the trustworthiness of// the handshaker service is not guaranteed.ErrUntrustedPlatform =errors.New("ALTS: untrusted platform. ALTS is only supported on GCP"))

Functions

funcClientAuthorizationCheckadded inv1.27.0

func ClientAuthorizationCheck(ctxcontext.Context, expectedServiceAccounts []string)error

ClientAuthorizationCheck checks whether the client is authorized to accessthe requested resources based on the given expected client service accounts.This API should be used by gRPC server RPC handlers. This API should not beused by clients.

funcNewClientCreds

NewClientCreds constructs a client-side ALTS TransportCredentials object.

funcNewServerCreds

NewServerCreds constructs a server-side ALTS TransportCredentials object.

Types

typeAuthInfo

type AuthInfo interface {// ApplicationProtocol returns application protocol negotiated for the// ALTS connection.ApplicationProtocol()string// RecordProtocol returns the record protocol negotiated for the ALTS// connection.RecordProtocol()string// SecurityLevel returns the security level of the created ALTS secure// channel.SecurityLevel()altspb.SecurityLevel// PeerServiceAccount returns the peer service account.PeerServiceAccount()string// LocalServiceAccount returns the local service account.LocalServiceAccount()string// PeerRPCVersions returns the RPC version supported by the peer.PeerRPCVersions() *altspb.RpcProtocolVersions}

AuthInfo exposes security information from the ALTS handshake to theapplication. This interface is to be implemented by ALTS. Users should notneed a brand new implementation of this interface. For situations liketesting, any new implementation should embed this interface. This allowsALTS to add new methods to this interface.

funcAuthInfoFromContextadded inv1.13.0

func AuthInfoFromContext(ctxcontext.Context) (AuthInfo,error)

AuthInfoFromContext extracts the alts.AuthInfo object from the given context,if it exists. This API should be used by gRPC server RPC handlers to getinformation about the communicating peer. For client-side, use grpc.Peer()CallOption.

funcAuthInfoFromPeeradded inv1.15.0

func AuthInfoFromPeer(p *peer.Peer) (AuthInfo,error)

AuthInfoFromPeer extracts the alts.AuthInfo object from the given peer, if itexists. This API should be used by gRPC clients after obtaining a peer objectusing the grpc.Peer() CallOption.

typeClientOptions

type ClientOptions struct {// TargetServiceAccounts contains a list of expected target service// accounts.TargetServiceAccounts []string// HandshakerServiceAddress represents the ALTS handshaker gRPC service// address to connect to.HandshakerServiceAddressstring}

ClientOptions contains the client-side options of an ALTS channel. Theseoptions will be passed to the underlying ALTS handshaker.

funcDefaultClientOptionsadded inv1.12.0

func DefaultClientOptions() *ClientOptions

DefaultClientOptions creates a new ClientOptions object with the defaultvalues.

typeServerOptionsadded inv1.12.0

type ServerOptions struct {// HandshakerServiceAddress represents the ALTS handshaker gRPC service// address to connect to.HandshakerServiceAddressstring}

ServerOptions contains the server-side options of an ALTS channel. Theseoptions will be passed to the underlying ALTS handshaker.

funcDefaultServerOptionsadded inv1.12.0

func DefaultServerOptions() *ServerOptions

DefaultServerOptions creates a new ServerOptions object with the defaultvalues.

Source Files

View all Source files

Directories

PathSynopsis
Package internal contains common core functionality for ALTS.
Package internal contains common core functionality for ALTS.
authinfo
Package authinfo provide authentication information returned by handshakers.
Package authinfo provide authentication information returned by handshakers.
conn
Package conn contains an implementation of a secure channel created by gRPC handshakers.
Package conn contains an implementation of a secure channel created by gRPC handshakers.
handshaker
Package handshaker provides ALTS handshaking functionality for GCP.
Package handshaker provides ALTS handshaking functionality for GCP.
handshaker/service
Package service manages connections between the VM application and the ALTS handshaker service.
Package service manages connections between the VM application and the ALTS handshaker service.
testutil
Package testutil include useful test utilities for the handshaker.
Package testutil include useful test utilities for the handshaker.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp