-
Notifications
You must be signed in to change notification settings - Fork 495
CNTRLPLANE-3070: Support KMS on self-managed Azure without affecting ARO HCP #8088
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
3f801ea
9a21610
76de18b
bdd7f5d
c71936f
165c790
c313825
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -810,6 +810,9 @@ const ( | |
| // AzureKMSSpec defines metadata about the configuration of the Azure KMS Secret Encryption provider using Azure key vault | ||
| // | ||
| // +kubebuilder:validation:XValidation:rule="!has(self.backupKey) || self.backupKey.keyVaultName == self.activeKey.keyVaultName",message="backupKey.keyVaultName must match activeKey.keyVaultName; both keys must reside in the same Key Vault" | ||
| // +kubebuilder:validation:XValidation:rule="!(has(self.kms) && has(self.workloadIdentity))",message="kms and workloadIdentity are mutually exclusive" | ||
| // +kubebuilder:validation:XValidation:rule="has(self.kms) || has(self.workloadIdentity)",message="one of kms or workloadIdentity must be set" | ||
| // +kubebuilder:validation:XValidation:rule="has(self.kms) == has(oldSelf.kms)",message="the KMS authentication mode is immutable once set" | ||
| type AzureKMSSpec struct { | ||
| // activeKey defines the active key used to encrypt new secrets | ||
| // | ||
|
|
@@ -821,9 +824,19 @@ type AzureKMSSpec struct { | |
| BackupKey *AzureKMSKey `json:"backupKey,omitempty"` | ||
|
|
||
| // kms is a pre-existing managed identity used to authenticate with Azure KMS. | ||
| // This is used for managed Azure (ARO HCP) clusters. | ||
| // kms and workloadIdentity are mutually exclusive. | ||
| // | ||
| // +required | ||
| KMS ManagedIdentity `json:"kms"` | ||
| // +optional | ||
| KMS ManagedIdentity `json:"kms,omitzero"` | ||
|
|
||
| // workloadIdentity contains the workload identity used to authenticate | ||
| // with Azure Key Vault for KMS encryption via a token-minter sidecar. | ||
| // This identity must have "Key Vault Crypto User" role on the Key Vault. | ||
| // kms and workloadIdentity are mutually exclusive. | ||
| // | ||
| // +optional | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd rather don't introduce this naming pattern until we decide if we want to introduce a semantic for product and have a detailed plan for it.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. Renamed to |
||
| WorkloadIdentity WorkloadIdentity `json:"workloadIdentity,omitzero"` | ||
|
|
||
| // keyVaultAccess specifies how the Key Vault should be accessed. | ||
| // When set to "Private", the control plane routes Key Vault traffic through | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this field was added before, but why is it called
kms? with the new field, it should be calledmanagedIdentityor smthThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.spec.secretEncryption.kms.azure.kmsdoesn't sound correct.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how we can change this now since ARO HCP is in flight other than introducing a new field and trying to deprecated this.