package crypto

import "github.com/vmware/govmomi/crypto"

Package crypto provides access to CryptoManagerKmip methods used to manage cryptographic key providers. For creating and delete native providers, see package vapi/crypto.

Index

Constants

const (
	CheckKeyAvailable   = int32(0x01)
	CheckKeyUsedByVms   = int32(0x02)
	CheckKeyUsedByHosts = int32(0x04)
	CheckKeyUsedByOther = int32(0x08)
)

Types

type ManagerKmip

type ManagerKmip struct {
	object.Common
}

func GetManagerKmip

func GetManagerKmip(c *vim25.Client) (*ManagerKmip, error)

GetManagerKmip wraps NewManager, returning ErrNotSupported when the client is not connected to a vCenter instance.

func NewManagerKmip

func NewManagerKmip(c *vim25.Client) *ManagerKmip

func (ManagerKmip) GenerateKey

func (m ManagerKmip) GenerateKey(
	ctx context.Context,
	providerID string) (string, error)

func (ManagerKmip) GetClusterStatus

func (m ManagerKmip) GetClusterStatus(
	ctx context.Context,
	providerID string) (*types.CryptoManagerKmipClusterStatus, error)

func (ManagerKmip) GetDefaultKmsClusterID

func (m ManagerKmip) GetDefaultKmsClusterID(
	ctx context.Context,
	entity *types.ManagedObjectReference,
	defaultsToParent bool) (string, error)

func (ManagerKmip) GetServerStatus

func (m ManagerKmip) GetServerStatus(
	ctx context.Context,
	providerID, serverName string) (*types.CryptoManagerKmipServerStatus, error)

func (ManagerKmip) GetStatus

func (ManagerKmip) IsDefaultProviderNative

func (m ManagerKmip) IsDefaultProviderNative(
	ctx context.Context,
	entity *types.ManagedObjectReference,
	defaultsToParent bool) (bool, error)

func (ManagerKmip) IsNativeProvider

func (m ManagerKmip) IsNativeProvider(
	ctx context.Context,
	providerID string) (bool, error)

func (ManagerKmip) IsValidKey

func (m ManagerKmip) IsValidKey(
	ctx context.Context,
	providerID,
	keyID string) (bool, error)

IsValidKey returns true if QueryCryptoKeyStatus results indicate the key is available or unavailable reason is `KeyStateNotActiveOrEnabled`. This method is only valid for standard providers and will always return false for native providers.

func (ManagerKmip) IsValidProvider

func (m ManagerKmip) IsValidProvider(
	ctx context.Context,
	providerID string) (bool, error)

func (ManagerKmip) IsValidServer

func (m ManagerKmip) IsValidServer(
	ctx context.Context,
	providerID, serverName string) (bool, error)

func (ManagerKmip) ListKeys

func (m ManagerKmip) ListKeys(
	ctx context.Context,
	limit *int32) ([]types.CryptoKeyId, error)

func (ManagerKmip) ListKmipServers

func (m ManagerKmip) ListKmipServers(
	ctx context.Context,
	limit *int32) ([]types.KmipClusterInfo, error)

func (ManagerKmip) MarkDefault

func (m ManagerKmip) MarkDefault(
	ctx context.Context,
	providerID string) error

func (ManagerKmip) QueryCryptoKeyStatus

func (m ManagerKmip) QueryCryptoKeyStatus(
	ctx context.Context,
	ids []types.CryptoKeyId,
	check int32) ([]types.CryptoManagerKmipCryptoKeyStatus, error)

func (ManagerKmip) RegisterKmipServer

func (m ManagerKmip) RegisterKmipServer(
	ctx context.Context,
	server types.KmipServerSpec) error

func (ManagerKmip) RegisterKmsCluster

func (m ManagerKmip) RegisterKmsCluster(
	ctx context.Context,
	providerID string,
	managementType types.KmipClusterInfoKmsManagementType) error

func (ManagerKmip) RemoveKeys

func (m ManagerKmip) RemoveKeys(
	ctx context.Context,
	ids []types.CryptoKeyId,
	force bool) error

func (ManagerKmip) RemoveKmipServer

func (m ManagerKmip) RemoveKmipServer(
	ctx context.Context,
	providerID, serverName string) error

func (ManagerKmip) SetDefaultKmsClusterId

func (m ManagerKmip) SetDefaultKmsClusterId(
	ctx context.Context,
	providerID string,
	entity *types.ManagedObjectReference) error

func (ManagerKmip) UnregisterKmsCluster

func (m ManagerKmip) UnregisterKmsCluster(
	ctx context.Context,
	providerID string) error

func (ManagerKmip) UpdateKmipServer

func (m ManagerKmip) UpdateKmipServer(
	ctx context.Context,
	server types.KmipServerSpec) error

Source Files

doc.go manager_kmip.go

Version
v0.48.1 (latest)
Published
Feb 11, 2025
Platform
linux/amd64
Imports
6 packages
Last checked
2 months ago

Tools for package owners.