question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Release of MSI version 2022-01-31-preview

See original GitHub issue

Related command

az identity

Resource Provider

Microsoft.ManagedIdentity

Description of Feature or Work Requested

MSI has added a new resource Federated Identity Credentials (FIC) as a sub-resource of existing User Assigned Identities “userAssignedIdentities/federatedIdentityCredentials”

CLI is expected to provide CRUD operation for the given sub-resource. Take a look Request example.

high-level documentation: https://aka.ms/ami/wif/docs

FIC object looks like this:

{
        "issuer": "https://oidc.prod-aks.azure.com/IssuerGUID",
        "subject": "system:serviceaccount:ns:svcaccount",
        "audiences": ["api://AzureADTokenExchange"],
}

In AAD context Audiences array is supposed to have exactly one element in most of the cases. Is it possible to make “audiences”: [“api://AzureADTokenExchange”] a default value with the ability to override?

Minimum API Version Required

2022-01-31-preview

Swagger PR link

https://github.com/Azure/azure-rest-api-specs/pull/19548

Request Example

Existing command to create managed identity

az identity create --name $uaId --resource-group $rg --location $location --subscription $subscription

then this managed identity can be used for FIC CRUD operations below. Those 4 operations are expected to become available in CLI.

create/update FIC

az rest --method put `
--url "/subscriptions/$subscription/resourceGroups/$rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/$uaId/federatedIdentityCredentials/$ficId?api-version=2022-01-31-PREVIEW" `
--headers "Content-Type=application/json" `
--body "{'properties': { 'issuer': 'https://kubernetes-oauth.azure.com/', 'subject': 'system:serviceaccount:ns:svcaccount', 'audiences': ['api://AzureADTokenExchange'] }}"

read FIC

az rest --method get --url "/subscriptions/$subscription/resourceGroups/$rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/$uaId/federatedIdentityCredentials/$ficId?api-version=2022-01-31-PREVIEW"

read all FICs associated with the user-assigned identity

supports paging

az rest --method get --url "/subscriptions/$subscription/resourceGroups/$rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/$uaId/federatedIdentityCredentials?api-version=2022-01-31-PREVIEW"

delete fic

az rest --method delete --url "/subscriptions/$subscription/resourceGroups/$rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/$uaId/federatedIdentityCredentials/$ficId?api-version=2022-01-31-PREVIEW"

Target Date

July

Additional context

pypi link: https://pypi.org/project/azure-mgmt-msi/6.1.0/ Given API version “2022-01-31-PREVIEW” is available in public cloud, mooncake, fairfax, but not air-gapped clouds

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:21 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
isolenovcommented, Aug 2, 2022

Hey @yanzhudd thank you for providing CLI commands.

Have one proposal from the team. In our impression ‘–name’ is quite confusing in this context. User is creating federated-credential object and name should refer to this object name.

Would it be possible to change commands this way?

az identity federated-credential --name myFicName  --identity-name myIdentityName 
1reaction
isolenovcommented, Aug 9, 2022

this basically means that body cant be deserialized. it should not be “properties”: {} object inside

body should look like this

{ “issuer”: “https://oidc.prod-aks.azure.com/IssuerGUID”, “subject”: “system:serviceaccount:ns:svcaccount”, “audiences”: [“api://AzureADTokenExchange”], }

Read more comments on GitHub >

github_iconTop Results From Across the Web

Latest updates for versions of Office that use Windows Installer ...
Latest updates for versions of Office that use Windows Installer (MSI). Article; 12/13/2022; 2 minutes to read; 9 contributors.
Read more >
TEXT OF H.R. 4521, THE AMERICA COMPETES 1 This Act ...
Subtitle C—MSI STEM Achievement. Sec. 10531. Findings. ... Trailer cycles. Sec. 108326. ... Source described in the publication approved by.
Read more >
MSI 2022 Latest Gaming Laptops – A New Start with 12th Gen!
One of the MSI top-selling laptops – Raider GE Series, now launching with the deluxe edition. Get extra gears and start a gorgeous...
Read more >
v4-preview.0 build action does not generate an .msi file #6473
Bugs If this issue is a bug: Which version of WiX are you building with? WiX Toolset Core version 4.0.0.0 (preview 0) Which...
Read more >
Microsoft.TestPlatform 17.4.1 - NuGet
Version Downloads Last updated 17.5.0‑preview‑20221003‑04 694,504 3 months ago 17.4.1 62,481 5 days ago 17.4.0 802,103 a month ago
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found