[WIP] feat: add controller that calculates Cluster Data Plane Identities extra information#4193
[WIP] feat: add controller that calculates Cluster Data Plane Identities extra information#4193miguelsorianod wants to merge 4 commits intomainfrom
Conversation
As part of it, we also introduce types to deserialize the azure runtime configuration file, as well as types to interact with the ResourceProviders azure client and read the FPA identity provided to the backend component.
We introduce inflight check that verifies that the Azure Resource Group part of the hcpcluster resourceid of the cluster being created exists. To create an hcpcluster the resource group where is to be created must exist beforehand.
…ation This commit also introduces the ability to authenticate as the cluster's service managed identity, which is required to be able to instantiate a user-assigned identities client that uses it, which has enough permissions to check the existence of the cluster-scoped user-provided azure managed identities associated to the cluster's operators. The service managed identity (SMI) is a cluster-scoped azure user-assigned managed identity. This identity is used to interact with Azure resources that are created and provided by the end-user. To get be able to authenticate as the cluster's managed identity, credentials need to be retrieved for them. To achieve that, this commit also introduces the ability to interact with Microsoft's Managed Identities Data Plane service. This service is only available in environments where Microsoft's First Party Application integration is available. For the environments where the First Party Application integration is not available we cannot communicate with the Managed Identities Data Plane service, so instead we use a mock implementation of the ManagedIdentitiesDataplaneClient that always returns a single Azure Service Principal identity representing a Managed Identity. This commit also introduces this mock client implementation.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: miguelsorianod The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@miguelsorianod: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
This PR builds on top of #3820.
We add a controller that retrieves the Client ID and Principal ID associated to the Data Plane operators identities associated to the ARO-HCP Cluster.
We leverage the Service Managed Identity associated to the ARO-HCP Cluster to retrieve the Data Plane operators identities information. We use Azure Go SDK's UserAssignedIdentities API to retrieve it. This is a different method than what's done for MSI based identities where the Managed Identities Data Plane service is used instead (#3820). This is because for data plane identities we can leverage the actual identities on the data plane side whereas for control plane and service managed identity we cannot as it is not possible to retrieve credentials associated to them.