grpc: google.golang.org/grpc/credentials/alts/internal/handshaker Index | Files | Directories

package handshaker

import "google.golang.org/grpc/credentials/alts/internal/handshaker"

Package handshaker provides ALTS handshaking functionality for GCP.

Index

Package Files

handshaker.go

func NewClientHandshaker Uses

func NewClientHandshaker(ctx context.Context, conn *grpc.ClientConn, c net.Conn, opts *ClientHandshakerOptions) (core.Handshaker, error)

NewClientHandshaker creates a ALTS handshaker for GCP which contains an RPC stub created using the passed conn and used to talk to the ALTS Handshaker service in the metadata server.

func NewServerHandshaker Uses

func NewServerHandshaker(ctx context.Context, conn *grpc.ClientConn, c net.Conn, opts *ServerHandshakerOptions) (core.Handshaker, error)

NewServerHandshaker creates a ALTS handshaker for GCP which contains an RPC stub created using the passed conn and used to talk to the ALTS Handshaker service in the metadata server.

type ClientHandshakerOptions Uses

type ClientHandshakerOptions struct {
    // ClientIdentity is the handshaker client local identity.
    ClientIdentity *altspb.Identity
    // TargetName is the server service account name for secure name
    // checking.
    TargetName string
    // TargetServiceAccounts contains a list of expected target service
    // accounts. One of these accounts should match one of the accounts in
    // the handshaker results. Otherwise, the handshake fails.
    TargetServiceAccounts []string
    // RPCVersions specifies the gRPC versions accepted by the client.
    RPCVersions *altspb.RpcProtocolVersions
}

ClientHandshakerOptions contains the client handshaker options that can provided by the caller.

func DefaultClientHandshakerOptions Uses

func DefaultClientHandshakerOptions() *ClientHandshakerOptions

DefaultClientHandshakerOptions returns the default client handshaker options.

type ServerHandshakerOptions Uses

type ServerHandshakerOptions struct {
    // RPCVersions specifies the gRPC versions accepted by the server.
    RPCVersions *altspb.RpcProtocolVersions
}

ServerHandshakerOptions contains the server handshaker options that can provided by the caller.

func DefaultServerHandshakerOptions Uses

func DefaultServerHandshakerOptions() *ServerHandshakerOptions

DefaultServerHandshakerOptions returns the default client handshaker options.

Directories

PathSynopsis
servicePackage service manages connections between the VM application and the ALTS handshaker service.

Package handshaker imports 13 packages (graph) and is imported by 2 packages. Updated 2019-03-02. Refresh now. Tools for package owners.