Skip to content

Commit

Permalink
feat: Add another example constraint for CPA user managed keys. (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
chuyang-deng authored Oct 31, 2024
1 parent 5da3883 commit ee400f9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: organizations/${ORG_ID}/customConstraints/custom.controlPlaneUserManagedKeys
resource_types: container.googleapis.com/Cluster
method_types:
- CREATE
- UPDATE
condition: resource.userManagedKeysConfig.clusterCa != "" && resource.userManagedKeysConfig.etcdApiCa != "" && resource.userManagedKeysConfig.etcdPeerCa != "" && resource.userManagedKeysConfig.aggregationCa != "" && resource.userManagedKeysConfig.controlPlaneDiskEncryptionKey != "" && resource.userManagedKeysConfig.gkeopsEtcdBackupEncryptionKey != "" && size(resource.userManagedKeysConfig.serviceAccountSigningKeys) != 0 && size(resource.userManagedKeysConfig.serviceAccountVerificationKeys) != 0
action_type: ALLOW
display_name: GKE Control Plane Authority CMEK
description: Only allow Clusters to be created and updated with GKE Control Plane Authority features, namely inputting the Cluster CA, etcd-API CA, etcd-peer CA, service account signing & verification key, etcd backup encryption key, and the control plane boot disk & etcd storage key.
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ condition: resource.userManagedKeysConfig.clusterCa.startsWith("projects/${PROJE
action_type: ALLOW
display_name: GKE Control Plane Authority CMEK
description: Only allow Clusters to be created and updated with GKE Control Plane Authority features, namely inputting the Cluster CA, etcd-API CA, etcd-peer CA, service account signing & verification key, etcd backup encryption key, and the control plane boot disk & etcd storage key housed in Certificate Authority Service and Cloud KMS from specific project.

0 comments on commit ee400f9

Please sign in to comment.