-
Notifications
You must be signed in to change notification settings - Fork 204
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
Update usage of MSAL in Workload Identity sample. See .NET for guidance (currently in PR). https://github.com/Azure/azure-workload-identity/tree/main/examples #636
Comments
Investigation result:
|
Agreed with the bump of MSAL Py version of course. I do not understand your point about MI. There are 2 types of FIC:
For 1, we have no way of understanding the lifetime of the token from the external IdP. Not sure we assume it's valid for 1h, I think in AKV case it might be, but in general case it is not. Have a look at the .NET implementation - https://github.com/Azure/azure-workload-identity/blob/main/examples/msal-net/akvdotnet/TokenCredential.cs#L33 - notice how the assertion is not read once and fed to MSAL. Instead, MSAL is fed a callback (a function pointer) which is invoked every time it needs to make the client_credentials flow. |
Thanks for clarifying the "(1) federation with external IdP (such as AKV)" and "(2) federation with AAD". Now I realize that my experiment in my previous message was only good for "(2) federation with AAD". Even so, it seems still valuable to have that syntactic sugar, which was not that straightforward to write and test on-the-fly. It even hides the That syntactic sugar probably won't help in scenario "(1) federation with external IdP (such as AKV)". But then it won't make it any worse. In that sense, perhaps it is still OK to keep the With regard to the file I/O, it is probably insignificant here, because the |
Great, if file I/O happens when token expires, this is perfect. With some MSALs (.NET in particular) we had to make some changes to accommodate this - i.e. MSAL used to accept user assertion as a string only, but then we added a callback option, so that the app developer can provide a fresh user assertion whenever MSAL needs it. |
A new PR was created in that repo. Perhaps we can close this issue here, and follow up subsequent conversation there? |
No description provided.
The text was updated successfully, but these errors were encountered: