Skip to content

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

Closed
Miguel Soriano (miguelsorianod) wants to merge 1 commit into
mainfrom
msoriano-fetchinfo-controlplaneoperators-and-smi-mis
Closed

[WIP] feat: add controller that retrieves information about MSI based identities#4192
Miguel Soriano (miguelsorianod) wants to merge 1 commit into
mainfrom
msoriano-fetchinfo-controlplaneoperators-and-smi-mis

Conversation

@miguelsorianod

@miguelsorianod Miguel Soriano (miguelsorianod) commented Feb 24, 2026

Copy link
Copy Markdown
Collaborator

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 otherwise we would return the information of clientid+principalid of the passed identities in the payload instead of the actual clientid+principalid that ends up being used in the management cluster side.

@openshift-ci

openshift-ci Bot commented Feb 24, 2026

Copy link
Copy Markdown

[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

Comment on lines +137 to +142
// TODO at some point we will also have to implement logic that retrieves the initial set of credentials for the
// control plane operators managed identities and for the service managed identity and store it in the Managed
// Identities Key Vault (a Management Cluster scoped resource). Do we want to do it here at the same time because
// we are already calling the Managed Identities Data Plane Service and getting credentials here? As relevant context,
// these set of initial credentials should be stored in the Managed Identities Key Vault before creating the HostedCluster
// and those credentials have a limited lifespan (unknown which without investigating further).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some things to consider while thinking about this: CS for now uses the OCM clusterID to generate the KV name information.
We'll need a coordinated handover of how the KV name is generated and for the RP to pass the info to CS

Comment on lines +148 to +150
if len(fpaMIDataplaneCredentials.ExplicitIdentities) != len(identitiesToSync) {
return utils.TrackError(fmt.Errorf("unexpected number of Managed Identities Data Plane Credentials. Expected: %d, Received: %d", len(identitiesToSync), len(fpaMIDataplaneCredentials.ExplicitIdentities)))
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, can we still backfill the information we've found and only errors out for those MIs that we've not found the info?

@miguelsorianod
Miguel Soriano (miguelsorianod) force-pushed the msoriano-fetchinfo-controlplaneoperators-and-smi-mis branch from 83e208a to 38fcbc1 Compare March 18, 2026 12:20
@openshift-ci

openshift-ci Bot commented Mar 22, 2026

Copy link
Copy Markdown

PR needs rebase.

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.

@openshift-ci

openshift-ci Bot commented Apr 16, 2026

Copy link
Copy Markdown

Miguel Soriano (@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/periodic-images 83e208a link true /test periodic-images
ci/prow/e2e-parallel 898324b link true /test e2e-parallel
ci/prow/e2e-images 898324b link true /test e2e-images
ci/prow/baseimage-generator-images 898324b link true /test baseimage-generator-images
ci/prow/cspr 898324b link true /test cspr
ci/prow/images-push 898324b link true /test images-push

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.

@raelga
Rael Garcia (raelga) marked this pull request as draft April 30, 2026 13:39
@miguelsorianod

Copy link
Copy Markdown
Collaborator Author

Superseded by #6301

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.

2 participants