Documentation
¶
Overview ¶
Package azure is a generated GoMock package.
Index ¶
- Constants
- type AuthConfig
- type Config
- type Keyvault
- func (a Keyvault) CheckHealth() map[string]core.Health
- func (a Keyvault) DeletePrivateKey(ctx context.Context, keyName string) error
- func (a Keyvault) GetPrivateKey(ctx context.Context, keyName string, version string) (crypto.Signer, error)
- func (a Keyvault) ListPrivateKeys(ctx context.Context) []spi.KeyNameVersion
- func (a Keyvault) Name() string
- func (a Keyvault) NewPrivateKey(ctx context.Context, keyName string) (crypto.PublicKey, string, error)
- func (a Keyvault) PrivateKeyExists(ctx context.Context, keyName string, version string) (bool, error)
- func (a Keyvault) SavePrivateKey(ctx context.Context, kid string, key crypto.PrivateKey) error
- type MockkeyVaultClient
- func (m *MockkeyVaultClient) CreateKey(ctx context.Context, name string, parameters azkeys.CreateKeyParameters, ...) (azkeys.CreateKeyResponse, error)
- func (m *MockkeyVaultClient) DeleteKey(ctx context.Context, name string, options *azkeys.DeleteKeyOptions) (azkeys.DeleteKeyResponse, error)
- func (m *MockkeyVaultClient) EXPECT() *MockkeyVaultClientMockRecorder
- func (m *MockkeyVaultClient) GetKey(ctx context.Context, name, version string, options *azkeys.GetKeyOptions) (azkeys.GetKeyResponse, error)
- func (m *MockkeyVaultClient) NewListKeyPropertiesPager(options *azkeys.ListKeyPropertiesOptions) *runtime.Pager[azkeys.ListKeyPropertiesResponse]
- func (m *MockkeyVaultClient) Sign(ctx context.Context, name, version string, parameters azkeys.SignParameters, ...) (azkeys.SignResponse, error)
- type MockkeyVaultClientMockRecorder
- func (mr *MockkeyVaultClientMockRecorder) CreateKey(ctx, name, parameters, options any) *gomock.Call
- func (mr *MockkeyVaultClientMockRecorder) DeleteKey(ctx, name, options any) *gomock.Call
- func (mr *MockkeyVaultClientMockRecorder) GetKey(ctx, name, version, options any) *gomock.Call
- func (mr *MockkeyVaultClientMockRecorder) NewListKeyPropertiesPager(options any) *gomock.Call
- func (mr *MockkeyVaultClientMockRecorder) Sign(ctx, name, version, parameters, options any) *gomock.Call
Constants ¶
const ( DefaultChainCredentialType string = "default" ManagedIdentityCredentialType string = "managed_identity" )
const StorageType = "azure-keyvault"
StorageType is the name of this storage type, used in health check reports and configuration.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶
type AuthConfig struct {
// Type specifies the type of credential to use for authentication to the Azure Key Vault.
Type string `koanf:"type"`
}
AuthConfig contains the config options to configure the credential to use for authentication to the Azure Key Vault.
type Config ¶
type Config struct {
// Token to authenticate to the Vault cluster.
URL string `koanf:"url"`
// Timeout specifies the Vault client timeout.
Timeout time.Duration `koanf:"timeout"`
// UseHSM specifies whether to store the key in a hardware security module (HSM).
// If true, the Azure Key Vault must be configured for HSM usage.
UseHSM bool `koanf:"hsm"`
// Auth specifies the credential to use for authentication to the Azure Key Vault.
Auth AuthConfig `koanf:"auth"`
}
Config contains the config options to configure the vaultKVStorage backend
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns the default configuration for the Azure Key Vault storage backend.
type Keyvault ¶
type Keyvault struct {
// contains filtered or unexported fields
}
func New ¶
New creates a new Azure Key Vault storage backend. If useHSM is true, the key type will be azkeys.KeyTypeECHSM, otherwise azkeys.KeyTypeEC.
func (Keyvault) DeletePrivateKey ¶
func (Keyvault) GetPrivateKey ¶
func (Keyvault) ListPrivateKeys ¶
func (a Keyvault) ListPrivateKeys(ctx context.Context) []spi.KeyNameVersion
func (Keyvault) NewPrivateKey ¶
func (a Keyvault) NewPrivateKey(ctx context.Context, keyName string) (crypto.PublicKey, string, error)
NewPrivateKey creates a new EC key in Azure Key Vault. Azure Key Vault EC keys can only be used for signing, they can't be used for decryption/ECDH.
func (Keyvault) PrivateKeyExists ¶
func (Keyvault) SavePrivateKey ¶
type MockkeyVaultClient ¶
type MockkeyVaultClient struct {
// contains filtered or unexported fields
}
MockkeyVaultClient is a mock of keyVaultClient interface.
func NewMockkeyVaultClient ¶
func NewMockkeyVaultClient(ctrl *gomock.Controller) *MockkeyVaultClient
NewMockkeyVaultClient creates a new mock instance.
func (*MockkeyVaultClient) CreateKey ¶
func (m *MockkeyVaultClient) CreateKey(ctx context.Context, name string, parameters azkeys.CreateKeyParameters, options *azkeys.CreateKeyOptions) (azkeys.CreateKeyResponse, error)
CreateKey mocks base method.
func (*MockkeyVaultClient) DeleteKey ¶
func (m *MockkeyVaultClient) DeleteKey(ctx context.Context, name string, options *azkeys.DeleteKeyOptions) (azkeys.DeleteKeyResponse, error)
DeleteKey mocks base method.
func (*MockkeyVaultClient) EXPECT ¶
func (m *MockkeyVaultClient) EXPECT() *MockkeyVaultClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockkeyVaultClient) GetKey ¶
func (m *MockkeyVaultClient) GetKey(ctx context.Context, name, version string, options *azkeys.GetKeyOptions) (azkeys.GetKeyResponse, error)
GetKey mocks base method.
func (*MockkeyVaultClient) NewListKeyPropertiesPager ¶
func (m *MockkeyVaultClient) NewListKeyPropertiesPager(options *azkeys.ListKeyPropertiesOptions) *runtime.Pager[azkeys.ListKeyPropertiesResponse]
NewListKeyPropertiesPager mocks base method.
func (*MockkeyVaultClient) Sign ¶
func (m *MockkeyVaultClient) Sign(ctx context.Context, name, version string, parameters azkeys.SignParameters, options *azkeys.SignOptions) (azkeys.SignResponse, error)
Sign mocks base method.
type MockkeyVaultClientMockRecorder ¶
type MockkeyVaultClientMockRecorder struct {
// contains filtered or unexported fields
}
MockkeyVaultClientMockRecorder is the mock recorder for MockkeyVaultClient.
func (*MockkeyVaultClientMockRecorder) CreateKey ¶
func (mr *MockkeyVaultClientMockRecorder) CreateKey(ctx, name, parameters, options any) *gomock.Call
CreateKey indicates an expected call of CreateKey.
func (*MockkeyVaultClientMockRecorder) DeleteKey ¶
func (mr *MockkeyVaultClientMockRecorder) DeleteKey(ctx, name, options any) *gomock.Call
DeleteKey indicates an expected call of DeleteKey.
func (*MockkeyVaultClientMockRecorder) GetKey ¶
func (mr *MockkeyVaultClientMockRecorder) GetKey(ctx, name, version, options any) *gomock.Call
GetKey indicates an expected call of GetKey.
func (*MockkeyVaultClientMockRecorder) NewListKeyPropertiesPager ¶
func (mr *MockkeyVaultClientMockRecorder) NewListKeyPropertiesPager(options any) *gomock.Call
NewListKeyPropertiesPager indicates an expected call of NewListKeyPropertiesPager.