@@ -83,6 +83,25 @@ service EkmService {
8383 };
8484 option (google.api.method_signature ) = "ekm_connection,update_mask" ;
8585 }
86+
87+ // Returns the [EkmConfig][google.cloud.kms.v1.EkmConfig] singleton resource
88+ // for a given project and location.
89+ rpc GetEkmConfig (GetEkmConfigRequest ) returns (EkmConfig ) {
90+ option (google.api.http ) = {
91+ get : "/v1/{name=projects/*/locations/*/ekmConfig}"
92+ };
93+ option (google.api.method_signature ) = "name" ;
94+ }
95+
96+ // Updates the [EkmConfig][google.cloud.kms.v1.EkmConfig] singleton resource
97+ // for a given project and location.
98+ rpc UpdateEkmConfig (UpdateEkmConfigRequest ) returns (EkmConfig ) {
99+ option (google.api.http ) = {
100+ patch : "/v1/{ekm_config.name=projects/*/locations/*/ekmConfig}"
101+ body : "ekm_config"
102+ };
103+ option (google.api.method_signature ) = "ekm_config,update_mask" ;
104+ }
86105}
87106
88107// Request message for
@@ -187,6 +206,30 @@ message UpdateEkmConnectionRequest {
187206 [(google.api.field_behavior ) = REQUIRED ];
188207}
189208
209+ // Request message for
210+ // [EkmService.GetEkmConfig][google.cloud.kms.v1.EkmService.GetEkmConfig].
211+ message GetEkmConfigRequest {
212+ // Required. The [name][google.cloud.kms.v1.EkmConfig.name] of the
213+ // [EkmConfig][google.cloud.kms.v1.EkmConfig] to get.
214+ string name = 1 [
215+ (google.api.field_behavior ) = REQUIRED ,
216+ (google.api.resource_reference ) = {
217+ type : "cloudkms.googleapis.com/EkmConfig"
218+ }
219+ ];
220+ }
221+
222+ // Request message for
223+ // [EkmService.UpdateEkmConfig][google.cloud.kms.v1.EkmService.UpdateEkmConfig].
224+ message UpdateEkmConfigRequest {
225+ // Required. [EkmConfig][google.cloud.kms.v1.EkmConfig] with updated values.
226+ EkmConfig ekm_config = 1 [(google.api.field_behavior ) = REQUIRED ];
227+
228+ // Required. List of fields to be updated in this request.
229+ google.protobuf.FieldMask update_mask = 2
230+ [(google.api.field_behavior ) = REQUIRED ];
231+ }
232+
190233// A [Certificate][google.cloud.kms.v1.Certificate] represents an X.509
191234// certificate used to authenticate HTTPS connections to EKM replicas.
192235message Certificate {
@@ -274,6 +317,44 @@ message EkmConnection {
274317 [(google.api.field_behavior ) = REQUIRED ];
275318 }
276319
320+ // [KeyManagementMode][google.cloud.kms.v1.EkmConnection.KeyManagementMode]
321+ // describes who can perform control plane cryptographic operations using this
322+ // [EkmConnection][google.cloud.kms.v1.EkmConnection].
323+ enum KeyManagementMode {
324+ // Not specified.
325+ KEY_MANAGEMENT_MODE_UNSPECIFIED = 0 ;
326+
327+ // EKM-side key management operations on
328+ // [CryptoKeys][google.cloud.kms.v1.CryptoKey] created with this
329+ // [EkmConnection][google.cloud.kms.v1.EkmConnection] must be initiated from
330+ // the EKM directly and cannot be performed from Cloud KMS. This means that:
331+ // * When creating a
332+ // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] associated with
333+ // this
334+ // [EkmConnection][google.cloud.kms.v1.EkmConnection], the caller must
335+ // supply the key path of pre-existing external key material that will be
336+ // linked to the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
337+ // * Destruction of external key material cannot be requested via the
338+ // Cloud KMS API and must be performed directly in the EKM.
339+ // * Automatic rotation of key material is not supported.
340+ MANUAL = 1 ;
341+
342+ // All [CryptoKeys][google.cloud.kms.v1.CryptoKey] created with this
343+ // [EkmConnection][google.cloud.kms.v1.EkmConnection] use EKM-side key
344+ // management operations initiated from Cloud KMS. This means that:
345+ // * When a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
346+ // associated with this [EkmConnection][google.cloud.kms.v1.EkmConnection]
347+ // is
348+ // created, the EKM automatically generates new key material and a new
349+ // key path. The caller cannot supply the key path of pre-existing
350+ // external key material.
351+ // * Destruction of external key material associated with this
352+ // [EkmConnection][google.cloud.kms.v1.EkmConnection] can be requested by
353+ // calling [DestroyCryptoKeyVersion][EkmService.DestroyCryptoKeyVersion].
354+ // * Automatic rotation of key material is supported.
355+ CLOUD_KMS = 2 ;
356+ }
357+
277358 // Output only. The resource name for the
278359 // [EkmConnection][google.cloud.kms.v1.EkmConnection] in the format
279360 // `projects/*/locations/*/ekmConnections/*`.
@@ -295,4 +376,46 @@ message EkmConnection {
295376 // Optional. Etag of the currently stored
296377 // [EkmConnection][google.cloud.kms.v1.EkmConnection].
297378 string etag = 5 [(google.api.field_behavior ) = OPTIONAL ];
379+
380+ // Optional. Describes who can perform control plane operations on the EKM. If
381+ // unset, this defaults to
382+ // [MANUAL][google.cloud.kms.v1.EkmConnection.KeyManagementMode.MANUAL].
383+ KeyManagementMode key_management_mode = 6
384+ [(google.api.field_behavior ) = OPTIONAL ];
385+
386+ // Optional. Identifies the EKM Crypto Space that this
387+ // [EkmConnection][google.cloud.kms.v1.EkmConnection] maps to. Note: This
388+ // field is required if
389+ // [KeyManagementMode][google.cloud.kms.v1.EkmConnection.KeyManagementMode] is
390+ // [CLOUD_KMS][google.cloud.kms.v1.EkmConnection.KeyManagementMode.CLOUD_KMS].
391+ string crypto_space_path = 7 [(google.api.field_behavior ) = OPTIONAL ];
392+ }
393+
394+ // An [EkmConfig][google.cloud.kms.v1.EkmConfig] is a singleton resource that
395+ // represents configuration parameters that apply to all
396+ // [CryptoKeys][google.cloud.kms.v1.CryptoKey] and
397+ // [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] with a
398+ // [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of
399+ // [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC] in a given
400+ // project and location.
401+ message EkmConfig {
402+ option (google.api.resource ) = {
403+ type : "cloudkms.googleapis.com/EkmConfig"
404+ pattern : "projects/{project}/locations/{location}/ekmConfig"
405+ };
406+
407+ // Output only. The resource name for the
408+ // [EkmConfig][google.cloud.kms.v1.EkmConfig] in the format
409+ // `projects/*/locations/*/ekmConfig`.
410+ string name = 1 [(google.api.field_behavior ) = OUTPUT_ONLY ];
411+
412+ // Optional. Resource name of the default
413+ // [EkmConnection][google.cloud.kms.v1.EkmConnection]. Setting this field to
414+ // the empty string removes the default.
415+ string default_ekm_connection = 2 [
416+ (google.api.field_behavior ) = OPTIONAL ,
417+ (google.api.resource_reference ) = {
418+ type : "cloudkms.googleapis.com/EkmConnection"
419+ }
420+ ];
298421}
0 commit comments