package crypto

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

Package vapi/crypto provides access to the Crypto Manager REST APIs that are not available in the SOAP API. Currently for creating and deleting native providers only. See the top-level package crypto for getting provider details via crypto.ManagerKmip. See also: https://blogs.vmware.com/code/2023/07/30/automate-vsphere-native-key-providers/

Index

Types

type KmsProviderConstraints

type KmsProviderConstraints struct {
	TpmRequired bool `json:"tpm_required"`
}

type KmsProviderCreateSpec

type KmsProviderCreateSpec struct {
	Provider    string                 `json:"provider"`
	Constraints KmsProviderConstraints `json:"constraints"`
}

type KmsProviderDownloadToken

type KmsProviderDownloadToken struct {
	Token  string `json:"token"`
	Expiry string `json:"expiry"`
}

type KmsProviderExport

type KmsProviderExport struct {
	Type     string                     `json:"type"`
	Location *KmsProviderExportLocation `json:"location,omitempty"`
}

type KmsProviderExportLocation

type KmsProviderExportLocation struct {
	URL           string                   `json:"url"`
	DownloadToken KmsProviderDownloadToken `json:"download_token"`
}

type KmsProviderExportSpec

type KmsProviderExportSpec struct {
	Provider string `json:"provider"`
	Password string `json:"password,omitempty"`
}

type Manager

type Manager struct {
	*rest.Client
}

Manager extends rest.Client, adding crypto related methods. Currently providing create, delete and export only. See crypto.ManagerKmip for getting provider details.

func NewManager

func NewManager(client *rest.Client) *Manager

NewManager creates a new Manager instance with the given client.

func (*Manager) KmsProviderCreate

func (c *Manager) KmsProviderCreate(ctx context.Context, spec KmsProviderCreateSpec) error

func (*Manager) KmsProviderDelete

func (c *Manager) KmsProviderDelete(ctx context.Context, provider string) error

func (*Manager) KmsProviderExport

func (c *Manager) KmsProviderExport(ctx context.Context, spec KmsProviderExportSpec) (*KmsProviderExport, error)

func (*Manager) KmsProviderExportRequest

func (c *Manager) KmsProviderExportRequest(ctx context.Context, export *KmsProviderExportLocation) (*http.Request, error)

Source Files

crypto.go doc.go

Directories

PathSynopsis
vapi/crypto/internal
vapi/crypto/simulator
Version
v0.48.1 (latest)
Published
Feb 11, 2025
Platform
linux/amd64
Imports
5 packages
Last checked
2 months ago

Tools for package owners.