k8s.io/apiserver@v0.31.1/pkg/storage/value/encrypt/envelope/kmsv2/v2/api.pb.go (about) 1 /* 2 Copyright The Kubernetes Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 // Code generated by protoc-gen-gogo. DO NOT EDIT. 18 // source: api.proto 19 20 package v2 21 22 import ( 23 fmt "fmt" 24 proto "github.com/gogo/protobuf/proto" 25 math "math" 26 ) 27 28 // Reference imports to suppress errors if they are not otherwise used. 29 var _ = proto.Marshal 30 var _ = fmt.Errorf 31 var _ = math.Inf 32 33 // This is a compile-time assertion to ensure that this generated file 34 // is compatible with the proto package it is being compiled against. 35 // A compilation error at this line likely means your copy of the 36 // proto package needs to be updated. 37 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 38 39 type EncryptedDEKSourceType int32 40 41 const ( 42 // AES_GCM_KEY means that the plaintext of encryptedDEKSource is the DEK itself, with AES-GCM as the encryption algorithm. 43 EncryptedDEKSourceType_AES_GCM_KEY EncryptedDEKSourceType = 0 44 // HKDF_SHA256_XNONCE_AES_GCM_SEED means that the plaintext of encryptedDEKSource is the pseudo random key 45 // (referred to as the seed throughout the code) that is fed into HKDF expand. SHA256 is the hash algorithm 46 // and first 32 bytes of encryptedData are the info param. The first 32 bytes from the HKDF stream are used 47 // as the DEK with AES-GCM as the encryption algorithm. 48 EncryptedDEKSourceType_HKDF_SHA256_XNONCE_AES_GCM_SEED EncryptedDEKSourceType = 1 49 ) 50 51 var EncryptedDEKSourceType_name = map[int32]string{ 52 0: "AES_GCM_KEY", 53 1: "HKDF_SHA256_XNONCE_AES_GCM_SEED", 54 } 55 56 var EncryptedDEKSourceType_value = map[string]int32{ 57 "AES_GCM_KEY": 0, 58 "HKDF_SHA256_XNONCE_AES_GCM_SEED": 1, 59 } 60 61 func (x EncryptedDEKSourceType) String() string { 62 return proto.EnumName(EncryptedDEKSourceType_name, int32(x)) 63 } 64 65 func (EncryptedDEKSourceType) EnumDescriptor() ([]byte, []int) { 66 return fileDescriptor_00212fb1f9d3bf1c, []int{0} 67 } 68 69 // EncryptedObject is the representation of data stored in etcd after envelope encryption. 70 type EncryptedObject struct { 71 // EncryptedData is the encrypted data. 72 EncryptedData []byte `protobuf:"bytes,1,opt,name=encryptedData,proto3" json:"encryptedData,omitempty"` 73 // KeyID is the KMS key ID used for encryption operations. 74 // keyID must satisfy the following constraints: 75 // 1. The keyID is not empty. 76 // 2. The size of keyID is less than 1 kB. 77 KeyID string `protobuf:"bytes,2,opt,name=keyID,proto3" json:"keyID,omitempty"` 78 // EncryptedDEKSource is the ciphertext of the source of the DEK used to encrypt the data stored in encryptedData. 79 // encryptedDEKSourceType defines the process of using the plaintext of this field to determine the aforementioned DEK. 80 // encryptedDEKSource must satisfy the following constraints: 81 // 1. The encrypted DEK source is not empty. 82 // 2. The size of encrypted DEK source is less than 1 kB. 83 EncryptedDEKSource []byte `protobuf:"bytes,3,opt,name=encryptedDEKSource,proto3" json:"encryptedDEKSource,omitempty"` 84 // Annotations is additional metadata that was provided by the KMS plugin. 85 // Annotations must satisfy the following constraints: 86 // 1. Annotation key must be a fully qualified domain name that conforms to the definition in DNS (RFC 1123). 87 // 2. The size of annotations keys + values is less than 32 kB. 88 Annotations map[string][]byte `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 89 // encryptedDEKSourceType defines the process of using the plaintext of encryptedDEKSource to determine the DEK. 90 EncryptedDEKSourceType EncryptedDEKSourceType `protobuf:"varint,5,opt,name=encryptedDEKSourceType,proto3,enum=v2.EncryptedDEKSourceType" json:"encryptedDEKSourceType,omitempty"` 91 XXX_NoUnkeyedLiteral struct{} `json:"-"` 92 XXX_unrecognized []byte `json:"-"` 93 XXX_sizecache int32 `json:"-"` 94 } 95 96 func (m *EncryptedObject) Reset() { *m = EncryptedObject{} } 97 func (m *EncryptedObject) String() string { return proto.CompactTextString(m) } 98 func (*EncryptedObject) ProtoMessage() {} 99 func (*EncryptedObject) Descriptor() ([]byte, []int) { 100 return fileDescriptor_00212fb1f9d3bf1c, []int{0} 101 } 102 func (m *EncryptedObject) XXX_Unmarshal(b []byte) error { 103 return xxx_messageInfo_EncryptedObject.Unmarshal(m, b) 104 } 105 func (m *EncryptedObject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 106 return xxx_messageInfo_EncryptedObject.Marshal(b, m, deterministic) 107 } 108 func (m *EncryptedObject) XXX_Merge(src proto.Message) { 109 xxx_messageInfo_EncryptedObject.Merge(m, src) 110 } 111 func (m *EncryptedObject) XXX_Size() int { 112 return xxx_messageInfo_EncryptedObject.Size(m) 113 } 114 func (m *EncryptedObject) XXX_DiscardUnknown() { 115 xxx_messageInfo_EncryptedObject.DiscardUnknown(m) 116 } 117 118 var xxx_messageInfo_EncryptedObject proto.InternalMessageInfo 119 120 func (m *EncryptedObject) GetEncryptedData() []byte { 121 if m != nil { 122 return m.EncryptedData 123 } 124 return nil 125 } 126 127 func (m *EncryptedObject) GetKeyID() string { 128 if m != nil { 129 return m.KeyID 130 } 131 return "" 132 } 133 134 func (m *EncryptedObject) GetEncryptedDEKSource() []byte { 135 if m != nil { 136 return m.EncryptedDEKSource 137 } 138 return nil 139 } 140 141 func (m *EncryptedObject) GetAnnotations() map[string][]byte { 142 if m != nil { 143 return m.Annotations 144 } 145 return nil 146 } 147 148 func (m *EncryptedObject) GetEncryptedDEKSourceType() EncryptedDEKSourceType { 149 if m != nil { 150 return m.EncryptedDEKSourceType 151 } 152 return EncryptedDEKSourceType_AES_GCM_KEY 153 } 154 155 func init() { 156 proto.RegisterEnum("v2.EncryptedDEKSourceType", EncryptedDEKSourceType_name, EncryptedDEKSourceType_value) 157 proto.RegisterType((*EncryptedObject)(nil), "v2.EncryptedObject") 158 proto.RegisterMapType((map[string][]byte)(nil), "v2.EncryptedObject.AnnotationsEntry") 159 } 160 161 func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) } 162 163 var fileDescriptor_00212fb1f9d3bf1c = []byte{ 164 // 329 bytes of a gzipped FileDescriptorProto 165 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xe1, 0x4b, 0xc2, 0x40, 166 0x18, 0xc6, 0xdb, 0xcc, 0xc0, 0xd3, 0x72, 0x1c, 0x21, 0xc3, 0x2f, 0x8d, 0xf2, 0xc3, 0xe8, 0xc3, 167 0x0e, 0x16, 0x85, 0x44, 0x08, 0xe6, 0xce, 0x0c, 0x49, 0x61, 0xeb, 0x43, 0xf5, 0x65, 0x9c, 0xf6, 168 0x22, 0x6b, 0xb6, 0x1b, 0xb7, 0xf3, 0x60, 0x7f, 0x6a, 0xff, 0x4d, 0x38, 0x13, 0xd3, 0xec, 0xdb, 169 0xbd, 0xef, 0xfd, 0xde, 0xe7, 0xb9, 0x7b, 0x5e, 0x54, 0x61, 0x69, 0xe4, 0xa4, 0x82, 0x4b, 0x8e, 170 0x75, 0xe5, 0x9e, 0x7f, 0xe9, 0xa8, 0x4e, 0x93, 0xa9, 0xc8, 0x53, 0x09, 0xef, 0xe3, 0xc9, 0x07, 171 0x4c, 0x25, 0x6e, 0xa1, 0x63, 0x58, 0xb7, 0x3c, 0x26, 0x99, 0xa9, 0x59, 0x9a, 0x5d, 0xf3, 0xb7, 172 0x9b, 0xf8, 0x14, 0x95, 0x63, 0xc8, 0x1f, 0x3d, 0x53, 0xb7, 0x34, 0xbb, 0xe2, 0xaf, 0x0a, 0xec, 173 0x20, 0xbc, 0xc1, 0xe8, 0x30, 0xe0, 0x0b, 0x31, 0x05, 0xb3, 0x54, 0x08, 0xec, 0xb9, 0xc1, 0x7d, 174 0x54, 0x65, 0x49, 0xc2, 0x25, 0x93, 0x11, 0x4f, 0x32, 0xf3, 0xd0, 0x2a, 0xd9, 0x55, 0xb7, 0xe5, 175 0x28, 0xd7, 0xd9, 0x79, 0x95, 0xd3, 0xdd, 0x60, 0x34, 0x91, 0x22, 0xf7, 0x7f, 0x0f, 0x62, 0x1f, 176 0x35, 0xfe, 0xaa, 0x3f, 0xe7, 0x29, 0x98, 0x65, 0x4b, 0xb3, 0x4f, 0xdc, 0xe6, 0x96, 0xe4, 0x16, 177 0xe1, 0xff, 0x33, 0xd9, 0xec, 0x20, 0x63, 0xd7, 0x14, 0x1b, 0xa8, 0x14, 0x43, 0x5e, 0x24, 0x52, 178 0xf1, 0x97, 0xc7, 0x65, 0x0e, 0x8a, 0xcd, 0x17, 0x50, 0xe4, 0x50, 0xf3, 0x57, 0xc5, 0xad, 0xde, 179 0xd6, 0x2e, 0x47, 0xa8, 0xb1, 0xdf, 0x11, 0xd7, 0x51, 0xb5, 0x4b, 0x83, 0xf0, 0xa1, 0xf7, 0x14, 180 0x0e, 0xe9, 0xab, 0x71, 0x80, 0x2f, 0xd0, 0xd9, 0x60, 0xe8, 0xf5, 0xc3, 0x60, 0xd0, 0x75, 0xaf, 181 0x6f, 0xc2, 0x97, 0xd1, 0x78, 0xd4, 0xa3, 0xe1, 0x9a, 0x09, 0x28, 0xf5, 0x0c, 0xed, 0xbe, 0xf3, 182 0x76, 0x17, 0xb7, 0x33, 0x27, 0xe2, 0x84, 0xa5, 0x51, 0x06, 0x42, 0x81, 0x20, 0x69, 0x3c, 0x23, 183 0x99, 0xe4, 0x82, 0xcd, 0x80, 0x14, 0xce, 0xe4, 0xe7, 0x33, 0x04, 0x12, 0x05, 0x73, 0x9e, 0x02, 184 0x89, 0x3f, 0x33, 0xe5, 0x12, 0xe5, 0x4e, 0x8e, 0x8a, 0xb5, 0x5f, 0x7d, 0x07, 0x00, 0x00, 0xff, 185 0xff, 0xcc, 0x0f, 0x2b, 0x2e, 0x03, 0x02, 0x00, 0x00, 186 }