package v2

import "k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/v2"

Package v2 contains definition of kms-plugin's serialized types.

Index

Variables

var (
	EncryptedDEKSourceType_name = map[int32]string{
		0: "AES_GCM_KEY",
		1: "HKDF_SHA256_XNONCE_AES_GCM_SEED",
	}
	EncryptedDEKSourceType_value = map[string]int32{
		"AES_GCM_KEY":                     0,
		"HKDF_SHA256_XNONCE_AES_GCM_SEED": 1,
	}
)

Enum value maps for EncryptedDEKSourceType.

var File_staging_src_k8s_io_apiserver_pkg_storage_value_encrypt_envelope_kmsv2_v2_api_proto protoreflect.FileDescriptor

Types

type EncryptedDEKSourceType

type EncryptedDEKSourceType int32
const (
	// AES_GCM_KEY means that the plaintext of encryptedDEKSource is the DEK itself, with AES-GCM as the encryption algorithm.
	EncryptedDEKSourceType_AES_GCM_KEY EncryptedDEKSourceType = 0
	// HKDF_SHA256_XNONCE_AES_GCM_SEED means that the plaintext of encryptedDEKSource is the pseudo random key
	// (referred to as the seed throughout the code) that is fed into HKDF expand.  SHA256 is the hash algorithm
	// and first 32 bytes of encryptedData are the info param.  The first 32 bytes from the HKDF stream are used
	// as the DEK with AES-GCM as the encryption algorithm.
	EncryptedDEKSourceType_HKDF_SHA256_XNONCE_AES_GCM_SEED EncryptedDEKSourceType = 1
)

func (EncryptedDEKSourceType) Descriptor

func (EncryptedDEKSourceType) Enum

func (EncryptedDEKSourceType) EnumDescriptor

func (EncryptedDEKSourceType) EnumDescriptor() ([]byte, []int)

Deprecated: Use EncryptedDEKSourceType.Descriptor instead.

func (EncryptedDEKSourceType) Number

func (EncryptedDEKSourceType) String

func (x EncryptedDEKSourceType) String() string

func (EncryptedDEKSourceType) Type

type EncryptedObject

type EncryptedObject struct {

	// EncryptedData is the encrypted data.
	EncryptedData []byte `protobuf:"bytes,1,opt,name=encryptedData,proto3" json:"encryptedData,omitempty"`
	// KeyID is the KMS key ID used for encryption operations.
	// keyID must satisfy the following constraints:
	// 1. The keyID is not empty.
	// 2. The size of keyID is less than 1 kB.
	KeyID string `protobuf:"bytes,2,opt,name=keyID,proto3" json:"keyID,omitempty"`
	// EncryptedDEKSource is the ciphertext of the source of the DEK used to encrypt the data stored in encryptedData.
	// encryptedDEKSourceType defines the process of using the plaintext of this field to determine the aforementioned DEK.
	// encryptedDEKSource must satisfy the following constraints:
	// 1. The encrypted DEK source is not empty.
	// 2. The size of encrypted DEK source is less than 1 kB.
	EncryptedDEKSource []byte `protobuf:"bytes,3,opt,name=encryptedDEKSource,proto3" json:"encryptedDEKSource,omitempty"`
	// Annotations is additional metadata that was provided by the KMS plugin.
	// Annotations must satisfy the following constraints:
	//  1. Annotation key must be a fully qualified domain name that conforms to the definition in DNS (RFC 1123).
	//  2. The size of annotations keys + values is less than 32 kB.
	Annotations map[string][]byte `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
	// encryptedDEKSourceType defines the process of using the plaintext of encryptedDEKSource to determine the DEK.
	EncryptedDEKSourceType EncryptedDEKSourceType `protobuf:"varint,5,opt,name=encryptedDEKSourceType,proto3,enum=v2.EncryptedDEKSourceType" json:"encryptedDEKSourceType,omitempty"`
	// contains filtered or unexported fields
}

EncryptedObject is the representation of data stored in etcd after envelope encryption.

func (*EncryptedObject) Descriptor

func (*EncryptedObject) Descriptor() ([]byte, []int)

Deprecated: Use EncryptedObject.ProtoReflect.Descriptor instead.

func (*EncryptedObject) GetAnnotations

func (x *EncryptedObject) GetAnnotations() map[string][]byte

func (*EncryptedObject) GetEncryptedDEKSource

func (x *EncryptedObject) GetEncryptedDEKSource() []byte

func (*EncryptedObject) GetEncryptedDEKSourceType

func (x *EncryptedObject) GetEncryptedDEKSourceType() EncryptedDEKSourceType

func (*EncryptedObject) GetEncryptedData

func (x *EncryptedObject) GetEncryptedData() []byte

func (*EncryptedObject) GetKeyID

func (x *EncryptedObject) GetKeyID() string

func (*EncryptedObject) ProtoMessage

func (*EncryptedObject) ProtoMessage()

func (*EncryptedObject) ProtoReflect

func (x *EncryptedObject) ProtoReflect() protoreflect.Message

func (*EncryptedObject) Reset

func (x *EncryptedObject) Reset()

func (*EncryptedObject) String

func (x *EncryptedObject) String() string

Source Files

api.pb.go v2.go

Version
v0.35.0-alpha.0
Published
Aug 6, 2025
Platform
js/wasm
Imports
5 packages
Last checked
2 hours ago

Tools for package owners.