Documentation ¶
Index ¶
- Variables
- func RegisterKeyManagerServer(s *grpc.Server, srv KeyManagerServer)
- type BuiltIn
- func (b BuiltIn) Configure(ctx context.Context, req *plugin.ConfigureRequest) (*plugin.ConfigureResponse, error)
- func (b BuiltIn) FetchPrivateKey(ctx context.Context, req *FetchPrivateKeyRequest) (*FetchPrivateKeyResponse, error)
- func (b BuiltIn) GenerateKeyPair(ctx context.Context, req *GenerateKeyPairRequest) (*GenerateKeyPairResponse, error)
- func (b BuiltIn) GetPluginInfo(ctx context.Context, req *plugin.GetPluginInfoRequest) (*plugin.GetPluginInfoResponse, error)
- type ConfigureRequest
- type ConfigureRequest_GlobalConfig
- type ConfigureResponse
- type FetchPrivateKeyRequest
- func (*FetchPrivateKeyRequest) Descriptor() ([]byte, []int)
- func (*FetchPrivateKeyRequest) ProtoMessage()
- func (m *FetchPrivateKeyRequest) Reset()
- func (m *FetchPrivateKeyRequest) String() string
- func (m *FetchPrivateKeyRequest) XXX_DiscardUnknown()
- func (m *FetchPrivateKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *FetchPrivateKeyRequest) XXX_Merge(src proto.Message)
- func (m *FetchPrivateKeyRequest) XXX_Size() int
- func (m *FetchPrivateKeyRequest) XXX_Unmarshal(b []byte) error
- type FetchPrivateKeyResponse
- func (*FetchPrivateKeyResponse) Descriptor() ([]byte, []int)
- func (m *FetchPrivateKeyResponse) GetPrivateKey() []byte
- func (*FetchPrivateKeyResponse) ProtoMessage()
- func (m *FetchPrivateKeyResponse) Reset()
- func (m *FetchPrivateKeyResponse) String() string
- func (m *FetchPrivateKeyResponse) XXX_DiscardUnknown()
- func (m *FetchPrivateKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *FetchPrivateKeyResponse) XXX_Merge(src proto.Message)
- func (m *FetchPrivateKeyResponse) XXX_Size() int
- func (m *FetchPrivateKeyResponse) XXX_Unmarshal(b []byte) error
- type GRPCClient
- func (c *GRPCClient) Configure(ctx context.Context, req *plugin.ConfigureRequest) (*plugin.ConfigureResponse, error)
- func (c *GRPCClient) FetchPrivateKey(ctx context.Context, req *FetchPrivateKeyRequest) (*FetchPrivateKeyResponse, error)
- func (c *GRPCClient) GenerateKeyPair(ctx context.Context, req *GenerateKeyPairRequest) (*GenerateKeyPairResponse, error)
- func (c *GRPCClient) GetPluginInfo(ctx context.Context, req *plugin.GetPluginInfoRequest) (*plugin.GetPluginInfoResponse, error)
- type GRPCPlugin
- type GRPCServer
- func (s *GRPCServer) Configure(ctx context.Context, req *plugin.ConfigureRequest) (*plugin.ConfigureResponse, error)
- func (s *GRPCServer) FetchPrivateKey(ctx context.Context, req *FetchPrivateKeyRequest) (*FetchPrivateKeyResponse, error)
- func (s *GRPCServer) GenerateKeyPair(ctx context.Context, req *GenerateKeyPairRequest) (*GenerateKeyPairResponse, error)
- func (s *GRPCServer) GetPluginInfo(ctx context.Context, req *plugin.GetPluginInfoRequest) (*plugin.GetPluginInfoResponse, error)
- type GenerateKeyPairRequest
- func (*GenerateKeyPairRequest) Descriptor() ([]byte, []int)
- func (*GenerateKeyPairRequest) ProtoMessage()
- func (m *GenerateKeyPairRequest) Reset()
- func (m *GenerateKeyPairRequest) String() string
- func (m *GenerateKeyPairRequest) XXX_DiscardUnknown()
- func (m *GenerateKeyPairRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *GenerateKeyPairRequest) XXX_Merge(src proto.Message)
- func (m *GenerateKeyPairRequest) XXX_Size() int
- func (m *GenerateKeyPairRequest) XXX_Unmarshal(b []byte) error
- type GenerateKeyPairResponse
- func (*GenerateKeyPairResponse) Descriptor() ([]byte, []int)
- func (m *GenerateKeyPairResponse) GetPrivateKey() []byte
- func (m *GenerateKeyPairResponse) GetPublicKey() []byte
- func (*GenerateKeyPairResponse) ProtoMessage()
- func (m *GenerateKeyPairResponse) Reset()
- func (m *GenerateKeyPairResponse) String() string
- func (m *GenerateKeyPairResponse) XXX_DiscardUnknown()
- func (m *GenerateKeyPairResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *GenerateKeyPairResponse) XXX_Merge(src proto.Message)
- func (m *GenerateKeyPairResponse) XXX_Size() int
- func (m *GenerateKeyPairResponse) XXX_Unmarshal(b []byte) error
- type GetPluginInfoRequest
- type GetPluginInfoResponse
- type KeyManager
- type KeyManagerClient
- type KeyManagerServer
- type Plugin
Constants ¶
This section is empty.
Variables ¶
var Handshake = go_plugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: "KeyManager",
MagicCookieValue: "KeyManager",
}
Functions ¶
func RegisterKeyManagerServer ¶
func RegisterKeyManagerServer(s *grpc.Server, srv KeyManagerServer)
Types ¶
type BuiltIn ¶
type BuiltIn struct {
// contains filtered or unexported fields
}
func NewBuiltIn ¶
func (BuiltIn) Configure ¶
func (b BuiltIn) Configure(ctx context.Context, req *plugin.ConfigureRequest) (*plugin.ConfigureResponse, error)
func (BuiltIn) FetchPrivateKey ¶
func (b BuiltIn) FetchPrivateKey(ctx context.Context, req *FetchPrivateKeyRequest) (*FetchPrivateKeyResponse, error)
func (BuiltIn) GenerateKeyPair ¶
func (b BuiltIn) GenerateKeyPair(ctx context.Context, req *GenerateKeyPairRequest) (*GenerateKeyPairResponse, error)
func (BuiltIn) GetPluginInfo ¶
func (b BuiltIn) GetPluginInfo(ctx context.Context, req *plugin.GetPluginInfoRequest) (*plugin.GetPluginInfoResponse, error)
type ConfigureRequest ¶
type ConfigureRequest = plugin.ConfigureRequest
ConfigureRequest from public import github.com/spiffe/spire/proto/common/plugin/plugin.proto
type ConfigureRequest_GlobalConfig ¶
type ConfigureRequest_GlobalConfig = plugin.ConfigureRequest_GlobalConfig
GlobalConfig from public import github.com/spiffe/spire/proto/common/plugin/plugin.proto
type ConfigureResponse ¶
type ConfigureResponse = plugin.ConfigureResponse
ConfigureResponse from public import github.com/spiffe/spire/proto/common/plugin/plugin.proto
type FetchPrivateKeyRequest ¶
type FetchPrivateKeyRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
* Represents an empty request
func (*FetchPrivateKeyRequest) Descriptor ¶
func (*FetchPrivateKeyRequest) Descriptor() ([]byte, []int)
func (*FetchPrivateKeyRequest) ProtoMessage ¶
func (*FetchPrivateKeyRequest) ProtoMessage()
func (*FetchPrivateKeyRequest) Reset ¶
func (m *FetchPrivateKeyRequest) Reset()
func (*FetchPrivateKeyRequest) String ¶
func (m *FetchPrivateKeyRequest) String() string
func (*FetchPrivateKeyRequest) XXX_DiscardUnknown ¶
func (m *FetchPrivateKeyRequest) XXX_DiscardUnknown()
func (*FetchPrivateKeyRequest) XXX_Marshal ¶
func (m *FetchPrivateKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FetchPrivateKeyRequest) XXX_Merge ¶
func (dst *FetchPrivateKeyRequest) XXX_Merge(src proto.Message)
func (*FetchPrivateKeyRequest) XXX_Size ¶
func (m *FetchPrivateKeyRequest) XXX_Size() int
func (*FetchPrivateKeyRequest) XXX_Unmarshal ¶
func (m *FetchPrivateKeyRequest) XXX_Unmarshal(b []byte) error
type FetchPrivateKeyResponse ¶
type FetchPrivateKeyResponse struct { // * Priavte key PrivateKey []byte `protobuf:"bytes,1,opt,name=privateKey,proto3" json:"privateKey,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
* Represents a private key
func (*FetchPrivateKeyResponse) Descriptor ¶
func (*FetchPrivateKeyResponse) Descriptor() ([]byte, []int)
func (*FetchPrivateKeyResponse) GetPrivateKey ¶
func (m *FetchPrivateKeyResponse) GetPrivateKey() []byte
func (*FetchPrivateKeyResponse) ProtoMessage ¶
func (*FetchPrivateKeyResponse) ProtoMessage()
func (*FetchPrivateKeyResponse) Reset ¶
func (m *FetchPrivateKeyResponse) Reset()
func (*FetchPrivateKeyResponse) String ¶
func (m *FetchPrivateKeyResponse) String() string
func (*FetchPrivateKeyResponse) XXX_DiscardUnknown ¶
func (m *FetchPrivateKeyResponse) XXX_DiscardUnknown()
func (*FetchPrivateKeyResponse) XXX_Marshal ¶
func (m *FetchPrivateKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FetchPrivateKeyResponse) XXX_Merge ¶
func (dst *FetchPrivateKeyResponse) XXX_Merge(src proto.Message)
func (*FetchPrivateKeyResponse) XXX_Size ¶
func (m *FetchPrivateKeyResponse) XXX_Size() int
func (*FetchPrivateKeyResponse) XXX_Unmarshal ¶
func (m *FetchPrivateKeyResponse) XXX_Unmarshal(b []byte) error
type GRPCClient ¶
type GRPCClient struct {
// contains filtered or unexported fields
}
func (*GRPCClient) Configure ¶
func (c *GRPCClient) Configure(ctx context.Context, req *plugin.ConfigureRequest) (*plugin.ConfigureResponse, error)
func (*GRPCClient) FetchPrivateKey ¶
func (c *GRPCClient) FetchPrivateKey(ctx context.Context, req *FetchPrivateKeyRequest) (*FetchPrivateKeyResponse, error)
func (*GRPCClient) GenerateKeyPair ¶
func (c *GRPCClient) GenerateKeyPair(ctx context.Context, req *GenerateKeyPairRequest) (*GenerateKeyPairResponse, error)
func (*GRPCClient) GetPluginInfo ¶
func (c *GRPCClient) GetPluginInfo(ctx context.Context, req *plugin.GetPluginInfoRequest) (*plugin.GetPluginInfoResponse, error)
type GRPCPlugin ¶
type GRPCPlugin struct {
ServerImpl KeyManagerServer
}
func (GRPCPlugin) GRPCClient ¶
func (p GRPCPlugin) GRPCClient(c *grpc.ClientConn) (interface{}, error)
func (GRPCPlugin) GRPCServer ¶
func (p GRPCPlugin) GRPCServer(s *grpc.Server) error
type GRPCServer ¶
type GRPCServer struct {
Plugin Plugin
}
func (*GRPCServer) Configure ¶
func (s *GRPCServer) Configure(ctx context.Context, req *plugin.ConfigureRequest) (*plugin.ConfigureResponse, error)
func (*GRPCServer) FetchPrivateKey ¶
func (s *GRPCServer) FetchPrivateKey(ctx context.Context, req *FetchPrivateKeyRequest) (*FetchPrivateKeyResponse, error)
func (*GRPCServer) GenerateKeyPair ¶
func (s *GRPCServer) GenerateKeyPair(ctx context.Context, req *GenerateKeyPairRequest) (*GenerateKeyPairResponse, error)
func (*GRPCServer) GetPluginInfo ¶
func (s *GRPCServer) GetPluginInfo(ctx context.Context, req *plugin.GetPluginInfoRequest) (*plugin.GetPluginInfoResponse, error)
type GenerateKeyPairRequest ¶
type GenerateKeyPairRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
* Represents an empty request
func (*GenerateKeyPairRequest) Descriptor ¶
func (*GenerateKeyPairRequest) Descriptor() ([]byte, []int)
func (*GenerateKeyPairRequest) ProtoMessage ¶
func (*GenerateKeyPairRequest) ProtoMessage()
func (*GenerateKeyPairRequest) Reset ¶
func (m *GenerateKeyPairRequest) Reset()
func (*GenerateKeyPairRequest) String ¶
func (m *GenerateKeyPairRequest) String() string
func (*GenerateKeyPairRequest) XXX_DiscardUnknown ¶
func (m *GenerateKeyPairRequest) XXX_DiscardUnknown()
func (*GenerateKeyPairRequest) XXX_Marshal ¶
func (m *GenerateKeyPairRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenerateKeyPairRequest) XXX_Merge ¶
func (dst *GenerateKeyPairRequest) XXX_Merge(src proto.Message)
func (*GenerateKeyPairRequest) XXX_Size ¶
func (m *GenerateKeyPairRequest) XXX_Size() int
func (*GenerateKeyPairRequest) XXX_Unmarshal ¶
func (m *GenerateKeyPairRequest) XXX_Unmarshal(b []byte) error
type GenerateKeyPairResponse ¶
type GenerateKeyPairResponse struct { // * Public key PublicKey []byte `protobuf:"bytes,1,opt,name=publicKey,proto3" json:"publicKey,omitempty"` // * Private key PrivateKey []byte `protobuf:"bytes,2,opt,name=privateKey,proto3" json:"privateKey,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
* Represents a public and private key pair
func (*GenerateKeyPairResponse) Descriptor ¶
func (*GenerateKeyPairResponse) Descriptor() ([]byte, []int)
func (*GenerateKeyPairResponse) GetPrivateKey ¶
func (m *GenerateKeyPairResponse) GetPrivateKey() []byte
func (*GenerateKeyPairResponse) GetPublicKey ¶
func (m *GenerateKeyPairResponse) GetPublicKey() []byte
func (*GenerateKeyPairResponse) ProtoMessage ¶
func (*GenerateKeyPairResponse) ProtoMessage()
func (*GenerateKeyPairResponse) Reset ¶
func (m *GenerateKeyPairResponse) Reset()
func (*GenerateKeyPairResponse) String ¶
func (m *GenerateKeyPairResponse) String() string
func (*GenerateKeyPairResponse) XXX_DiscardUnknown ¶
func (m *GenerateKeyPairResponse) XXX_DiscardUnknown()
func (*GenerateKeyPairResponse) XXX_Marshal ¶
func (m *GenerateKeyPairResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenerateKeyPairResponse) XXX_Merge ¶
func (dst *GenerateKeyPairResponse) XXX_Merge(src proto.Message)
func (*GenerateKeyPairResponse) XXX_Size ¶
func (m *GenerateKeyPairResponse) XXX_Size() int
func (*GenerateKeyPairResponse) XXX_Unmarshal ¶
func (m *GenerateKeyPairResponse) XXX_Unmarshal(b []byte) error
type GetPluginInfoRequest ¶
type GetPluginInfoRequest = plugin.GetPluginInfoRequest
GetPluginInfoRequest from public import github.com/spiffe/spire/proto/common/plugin/plugin.proto
type GetPluginInfoResponse ¶
type GetPluginInfoResponse = plugin.GetPluginInfoResponse
GetPluginInfoResponse from public import github.com/spiffe/spire/proto/common/plugin/plugin.proto
type KeyManager ¶
type KeyManager interface { GenerateKeyPair(context.Context, *GenerateKeyPairRequest) (*GenerateKeyPairResponse, error) FetchPrivateKey(context.Context, *FetchPrivateKeyRequest) (*FetchPrivateKeyResponse, error) }
KeyManager is the interface used by all non-catalog components.
type KeyManagerClient ¶
type KeyManagerClient interface { // * Creates a key pair that is bound to hardware. GenerateKeyPair(ctx context.Context, in *GenerateKeyPairRequest, opts ...grpc.CallOption) (*GenerateKeyPairResponse, error) // * Returns previously generated private key. For use after node restarts. FetchPrivateKey(ctx context.Context, in *FetchPrivateKeyRequest, opts ...grpc.CallOption) (*FetchPrivateKeyResponse, error) // * Applies the plugin configuration and returns configuration errors. Configure(ctx context.Context, in *plugin.ConfigureRequest, opts ...grpc.CallOption) (*plugin.ConfigureResponse, error) // * Returns the version and related metadata of the plugin. GetPluginInfo(ctx context.Context, in *plugin.GetPluginInfoRequest, opts ...grpc.CallOption) (*plugin.GetPluginInfoResponse, error) }
KeyManagerClient is the client API for KeyManager service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewKeyManagerClient ¶
func NewKeyManagerClient(cc *grpc.ClientConn) KeyManagerClient
type KeyManagerServer ¶
type KeyManagerServer interface { // * Creates a key pair that is bound to hardware. GenerateKeyPair(context.Context, *GenerateKeyPairRequest) (*GenerateKeyPairResponse, error) // * Returns previously generated private key. For use after node restarts. FetchPrivateKey(context.Context, *FetchPrivateKeyRequest) (*FetchPrivateKeyResponse, error) // * Applies the plugin configuration and returns configuration errors. Configure(context.Context, *plugin.ConfigureRequest) (*plugin.ConfigureResponse, error) // * Returns the version and related metadata of the plugin. GetPluginInfo(context.Context, *plugin.GetPluginInfoRequest) (*plugin.GetPluginInfoResponse, error) }
KeyManagerServer is the server API for KeyManager service.
type Plugin ¶
type Plugin interface { GenerateKeyPair(context.Context, *GenerateKeyPairRequest) (*GenerateKeyPairResponse, error) FetchPrivateKey(context.Context, *FetchPrivateKeyRequest) (*FetchPrivateKeyResponse, error) Configure(context.Context, *plugin.ConfigureRequest) (*plugin.ConfigureResponse, error) GetPluginInfo(context.Context, *plugin.GetPluginInfoRequest) (*plugin.GetPluginInfoResponse, error) }
Plugin is the interface implemented by plugin implementations