Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyManager ¶
type KeyManager interface { catalog.PluginInfo // GenerateKey generates a key with the given ID and key type. If a key // with that ID already exists, it is overwritten. GenerateKey(ctx context.Context, id string, keyType KeyType) (Key, error) // GetKey returns the key with the given ID. If a key with that ID does // not exist, a status of codes.NotFound is returned. GetKey(ctx context.Context, id string) (Key, error) // GetKeys returns all keys managed by the KeyManager. GetKeys(ctx context.Context) ([]Key, error) }
KeyManager provides either a single or multi-key key manager
type KeyType ¶ added in v1.0.0
type KeyType int
KeyType represents the types of keys that are supported by the KeyManager.
func (KeyType) GenerateSigner ¶ added in v1.0.0
GenerateSigner generates a new key for the given key type
type Repository ¶ added in v1.0.0
type Repository struct {
KeyManager KeyManager
}
func (*Repository) Clear ¶ added in v1.0.0
func (repo *Repository) Clear()
func (*Repository) GetKeyManager ¶ added in v1.0.0
func (repo *Repository) GetKeyManager() KeyManager
func (*Repository) SetKeyManager ¶ added in v1.0.0
func (repo *Repository) SetKeyManager(keyManager KeyManager)
type SVIDKeyManager ¶ added in v1.0.0
type SVIDKeyManager interface { // GenerateKey generates a new key. The current key is passed, if available // so the key manager can determine which which "slot" to occupy (i.e. // which key ID to use for the new key). GenerateKey(ctx context.Context, currentKey Key) (Key, error) // GetKeys returns all keys managed by the KeyManager. GetKeys(ctx context.Context) ([]Key, error) }
SVIDKeyManager is a wrapper around the key manager specifically used for managing the agent SVID.
func ForSVID ¶ added in v1.0.0
func ForSVID(km KeyManager) SVIDKeyManager
Returns an SVIDKeyManager over the given KeyManager
type V1 ¶ added in v1.0.0
type V1 struct { plugin.Facade keymanagerv1.KeyManagerPluginClient }
func (V1) GenerateKey ¶ added in v1.0.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.