Skip to content
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

Add object ID option for Managed Identity #854

Merged
merged 1 commit into from
Aug 20, 2024
Merged

Conversation

Avery-Dunn
Copy link
Contributor

Adds support for object IDs, as per #853. Object IDs will now be accepted in IMDS, App Service, and Service Fabric scenarios, matching the support in .NET

This PR also does some minor code cleanup (remove unused code, move common code to parent classes, etc.)

@Avery-Dunn Avery-Dunn requested a review from a team as a code owner August 19, 2024 23:28
@Avery-Dunn Avery-Dunn merged commit 07d67b7 into dev Aug 20, 2024
5 checks passed
LOG.info("[Managed Identity] Adding user assigned resource id to the request for Service Fabric Managed Identity.");
managedIdentityRequest.queryParameters.put(Constants.MANAGED_IDENTITY_RESOURCE_ID, Collections.singletonList(userAssignedId));
if (this.idType != null && !StringHelper.isNullOrBlank(this.userAssignedId)) {
LOG.info("[Managed Identity] Adding user assigned ID to the request for Service Fabric Managed Identity.");
Copy link

Choose a reason for hiding this comment

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

This does reduce the visibility in logs as to which user assigned is being used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Have a look at the changes in the ManagedIdentityRequest class: the new addUserAssignedIdToQuery method called right after this log has the same sort of "Adding [this type of ID] to the request" log message that these classes used to have.

You'll still get the same information about the MI source type and ID type being used, it's just that they will be in two info logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants