-
Notifications
You must be signed in to change notification settings - Fork 203
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
allow MI endpoint changing through environment variable #754
Conversation
Your use case is meaningful. We would love to support that.
The name choice would potentially be problematic here, because there are many flavors of managed identity (MI) and those popular env vars would likely be used by some of them. Let's go with a new env var name which is unlikely to be used by something other than MSAL library. Let's use Lastly, it would be great if you can also document this new behavior as a new Note (such as "If you want your local development to use a managed identity on your remote Azure VM, you can ..."), add it into line 136, so that it will be rendered into our docs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need a different env var name, and documentation.
Actually I forgot I already to use Submitted an update, let me know if you want the comment wording amended or anything else. Thanks for the prompt and useful feedback! |
useful during development where you are using SSH tunnelling to utilise the credentials assigned to an actual instance
@microsoft-github-policy-service agree company="coreMem Limited" |
This is a very useful feature. However, even though the public doc already contains it: https://msal-python.readthedocs.io/en/latest/#managed-identity it is still not available in any MSAL releases. |
@jiasli @jimdigriz - SSH tunnelling will not work with the new improvements we are making to managed identity. Instead, we are looking at a different approach for testing. |
@bgavrilMS I hope part of that work is for real instances the SDK(s) is updated to check On a side note, saying "this will not work" is somewhat concerning when then it is left up in the air hanging on what the actual alternative is likely to look like...when it will happen...what I need to do.... Mostly as it makes things in-actionable at my end other than "panic! panic! panic!" until an announcement is made...whenever that may be. |
@jimdigriz , sorry, there is not much detail available at this moment, but we will have to revert this change, at least for now. We will provide more updates when the new solution becomes available. Meanwhile, since this previously merged PR has become part of this repository's permanent history, you could still use that change from its commit 7db6c2c or its branch, should you choose to do so. In any case, this situation shall not "make things in-actionable" at your end, because this PR was meant to be used in some one-off testing only. It is not meant to be a foundation to build your in-production system upon. On a side note, the future change - if any - will NOT be about check /sys/devices/virtual/dmi/id/chassis_asset_tag. That check requires Thanks again for your willingness to contribute. We hope this new inconvenience will not prevent you from continue using MSAL library. P.S.: Feel free to reach out to me on my email for further explanations. |
Unless something has changed since between kernel 6.1 (what I am using) and the latest 6.11 which makes this no longer viable? I have used this handy check in my own code for a while now, I assumed Azure offered this as a standard "root not needed" method to determine if running on an Azure instance (or Function) similarly to how GCP/AWS do too? |
The link - which was quoted from your earlier message - brought me to a page mentioning something like |
Update:
|
Proposal to make local development work easier, for example where you are using SSH tunnelling to utilise the credentials assigned to an actual instance.
This allows the developer to run their code with something like this in one terminal point to a real Azure instance with an identity:
Then their code could run using:
IMDS_ENDPOINT
looks to make sense and I am hoping will not clash with anything; inspection ofazure.identity
looks likeIDENTITY_ENDPOINT
would also need to be set before anything goes off piste.Let me know if this looks like it is something you would accept and what else it needs to be made suitable for inclusion.