You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add new auth type: UserAssignedIdentityCredentials
This commit adds a new authentication type,
UserAssignedIdentityCredentials. This allows a 1st party Microsoft
application to authenticate using a managed identity's certificate,
which is accessed through the MSI data plane. More information on this
authentication type can be found here - https://github
.com/Azure/msi-dataplane/blob/63fb37d3a1aaac130120624674df795d2e088083
/pkg/dataplane/reloadCredentials.go#L60.
Signed-off-by: Bryan Cox <[email protected]>
Copy file name to clipboardExpand all lines: api/v1beta1/azureclusteridentity_types.go
+11-1Lines changed: 11 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ type AllowedNamespaces struct {
44
44
// AzureClusterIdentitySpec defines the parameters that are used to create an AzureIdentity.
45
45
typeAzureClusterIdentitySpecstruct {
46
46
// Type is the type of Azure Identity used.
47
-
// ServicePrincipal, ServicePrincipalCertificate, UserAssignedMSI, ManualServicePrincipal or WorkloadIdentity.
47
+
// ServicePrincipal, ServicePrincipalCertificate, UserAssignedMSI, ManualServicePrincipal, UserAssignedIdentityCredential, or WorkloadIdentity.
48
48
TypeIdentityType`json:"type"`
49
49
// ResourceID is the Azure resource ID for the User Assigned MSI resource.
50
50
// Only applicable when type is UserAssignedMSI.
@@ -62,6 +62,16 @@ type AzureClusterIdentitySpec struct {
62
62
// CertPath is the path where certificates exist. When set, it takes precedence over ClientSecret for types that use certs like ServicePrincipalCertificate.
63
63
// +optional
64
64
CertPathstring`json:"certPath,omitempty"`
65
+
// UserAssignedIdentityCredentialsPath is the path where an existing JSON file exists containing the JSON format of
66
+
// a UserAssignedIdentityCredentials struct.
67
+
// See the msi-dataplane for more details on UserAssignedIdentityCredentials - https://github.com/Azure/msi-dataplane/blob/main/pkg/dataplane/internal/client/models.go#L125
allErrs=append(allErrs, field.Forbidden(field.NewPath("spec", "userAssignedIdentityCredentialsPath"), fmt.Sprintf("%s can only be set when AzureClusterIdentity is of type UserAssignedIdentityCredential", c.Spec.UserAssignedIdentityCredentialsPath)))
34
+
allErrs=append(allErrs, field.Forbidden(field.NewPath("spec", "userAssignedIdentityCredentialsCloudType"), fmt.Sprintf("%s can only be set when AzureClusterIdentity is of type UserAssignedIdentityCredential ", c.Spec.UserAssignedIdentityCredentialsCloudType)))
Copy file name to clipboardExpand all lines: config/crd/bases/infrastructure.cluster.x-k8s.io_azureclusteridentities.yaml
+14-1Lines changed: 14 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -159,13 +159,26 @@ spec:
159
159
type:
160
160
description: |-
161
161
Type is the type of Azure Identity used.
162
-
ServicePrincipal, ServicePrincipalCertificate, UserAssignedMSI, ManualServicePrincipal or WorkloadIdentity.
162
+
ServicePrincipal, ServicePrincipalCertificate, UserAssignedMSI, ManualServicePrincipal, UserAssignedIdentityCredential, or WorkloadIdentity.
163
163
enum:
164
164
- ServicePrincipal
165
165
- UserAssignedMSI
166
166
- ManualServicePrincipal
167
167
- ServicePrincipalCertificate
168
168
- WorkloadIdentity
169
+
- UserAssignedIdentityCredential
170
+
type: string
171
+
userAssignedIdentityCredentialsCloudType:
172
+
description: |-
173
+
UserAssignedIdentityCredentialsCloudType is used with UserAssignedIdentityCredentialsPath to specify the Cloud
174
+
type. Can only be one of the following values: public, china, or usgovernment
175
+
If a value is not specified, defaults to public
176
+
type: string
177
+
userAssignedIdentityCredentialsPath:
178
+
description: |-
179
+
UserAssignedIdentityCredentialsPath is the path where an existing JSON file exists containing the JSON format of
180
+
a UserAssignedIdentityCredentials struct.
181
+
See the msi-dataplane for more details on UserAssignedIdentityCredentials - https://github.com/Azure/msi-dataplane/blob/main/pkg/dataplane/internal/client/models.go#L125
0 commit comments