Documentation
¶
Index ¶
- type ConnectionInfo
- func (cinfo ConnectionInfo) Dial(ctx context.Context, l *zap.Logger) (*grpc.ClientConn, error)
- func (cinfo ConnectionInfo) DialPubKeys(ctx context.Context, l *zap.Logger) (*grpc.ClientConn, map[string]struct{}, error)
- func (cinfo ConnectionInfo) TransportCredentials(l *zap.Logger) (*TransportCredentials, error)
- type TransportCredentials
- func (c *TransportCredentials) ClientHandshake(ctx context.Context, authority string, rawConn net.Conn) (net.Conn, credentials.AuthInfo, error)
- func (c *TransportCredentials) Clone() credentials.TransportCredentials
- func (c *TransportCredentials) Info() credentials.ProtocolInfo
- func (c *TransportCredentials) OverrideServerName(serverNameOverride string) error
- func (c *TransportCredentials) ServerHandshake(rawConn net.Conn) (net.Conn, credentials.AuthInfo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionInfo ¶
type ConnectionInfo struct {
HostPort string `yaml:"hostPort" flags:"server,host:port of kmgm server to connect to"`
CACertificateFile string `yaml:"caCertificateFile" flags:"cacert,Path to a CA certificate to verify the kmgm server,,path"`
PinnedPubKey string `yaml:"pinnedPubKey" flags:"pinnedpubkey,SHA256 hash of the kmgm server publickey"`
AllowInsecure bool `yaml:"allowInsecure,omitempty" flags:"insecure,skip kmgm server certificate verification (hidden),,hidden"`
ClientCertificateFile string `yaml:"clientCertificateFile" flags:"client-cert,Path to a client certificate to present to the kmgm server,,path"`
ClientPrivateKeyFile string `yaml:"clientPrivateKeyFile" flags:"client-priv,Path to the private key corresponding to the client certificate,,path"`
AccessToken string `yaml:"accessToken,omitempty" flags:"token,Token string to use for server authentication when bootstrapping"`
}
func (ConnectionInfo) Dial ¶
func (cinfo ConnectionInfo) Dial(ctx context.Context, l *zap.Logger) (*grpc.ClientConn, error)
func (ConnectionInfo) DialPubKeys ¶ added in v0.3.0
func (cinfo ConnectionInfo) DialPubKeys(ctx context.Context, l *zap.Logger) (*grpc.ClientConn, map[string]struct{}, error)
func (ConnectionInfo) TransportCredentials ¶
func (cinfo ConnectionInfo) TransportCredentials(l *zap.Logger) (*TransportCredentials, error)
type TransportCredentials ¶
type TransportCredentials struct {
PinnedPubKey string
PeerPubKeys map[string]struct{}
// contains filtered or unexported fields
}
TransportCredentials is grpc.tlsCreds + pubkey pinning support.
func NewTransportCredentials ¶
func NewTransportCredentials(c *tls.Config, pinnedpubkey string) *TransportCredentials
func (*TransportCredentials) ClientHandshake ¶
func (*TransportCredentials) Clone ¶
func (c *TransportCredentials) Clone() credentials.TransportCredentials
func (*TransportCredentials) Info ¶
func (c *TransportCredentials) Info() credentials.ProtocolInfo
func (*TransportCredentials) OverrideServerName ¶
func (c *TransportCredentials) OverrideServerName(serverNameOverride string) error
func (*TransportCredentials) ServerHandshake ¶
func (c *TransportCredentials) ServerHandshake(rawConn net.Conn) (net.Conn, credentials.AuthInfo, error)
Click to show internal directories.
Click to hide internal directories.