Skip to content

Comments

[WIP] feat: add controller that retrieves information about MSI based identities#4192

Open
miguelsorianod wants to merge 4 commits intomainfrom
msoriano-fetchinfo-controlplaneoperators-and-smi-mis
Open

[WIP] feat: add controller that retrieves information about MSI based identities#4192
miguelsorianod wants to merge 4 commits intomainfrom
msoriano-fetchinfo-controlplaneoperators-and-smi-mis

Conversation

@miguelsorianod
Copy link
Collaborator

@miguelsorianod miguelsorianod commented Feb 24, 2026

This PR builds on top of #3820.

We add a controller that retrieves the Client ID and Principal ID associated to the following identities associated to an ARO-HCP Cluster:

  • The Control Plane operators identities
  • The Service Managed Identity

We leverage Microsoft's Managed Identities Data Plane service to retrieve the information. When the service is not available (outside of AME tenants) the fake managed identities data plane client is leveraged which returns the information associated to the mock msi identity for all requests/responses to it. We do not directly use Azure Go SDK's UserAssignedIdentities client because on non AME tenants we cannot obtain credentials associated to them because of the Managed Identities Data Plane service not being available and us using the mock msi identity instead, whose information is returned by the fake managed identities data plane client.

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.
@openshift-ci
Copy link

openshift-ci bot commented Feb 24, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: miguelsorianod
Once this PR has been reviewed and has the lgtm label, please assign janboll for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci
Copy link

openshift-ci bot commented Feb 24, 2026

@miguelsorianod: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/image-updater-images 83e208a link true /test image-updater-images
ci/prow/lint 83e208a link true /test lint
ci/prow/verify 83e208a link true /test verify
ci/prow/config-change-detection 83e208a link true /test config-change-detection
ci/prow/test-unit 83e208a link true /test test-unit
ci/prow/integration 83e208a link true /test integration
ci/prow/mega-linter 83e208a link true /test mega-linter
ci/prow/baseimage-generator-images 83e208a link true /test baseimage-generator-images
ci/prow/images 83e208a link true /test images
ci/prow/e2e-parallel 83e208a link true /test e2e-parallel
ci/prow/periodic-images 83e208a link true /test periodic-images

Full PR test history. Your PR dashboard.

Details

Instructions 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant