-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
AzureMLOnBehalfOfCredential
does not work with keyvault
#39793
Comments
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/azure-ml-sdk @azureml-github. |
@jonaslb - Can you please confirm which compute you are using; from code snippet it looks like serverless? ![]() |
Hi @jonaslb. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue. |
@achauhan-scc that's correct, the snippet starts a serverless job. Where is it documented that this doesn't work? In any case the error ( |
Hi @jonaslb, not an expert on our ML SDKs but I do know that Azure Identity on its own has an OnBehalfOfCredential that might be useful. cc @xiangyan99 who can speak more on Azure Identity q's |
Thanks for looking for alternatives! That credential still looks like it requires a client secret that I don't have on azure ml. I think I need either a managed identity or an "identity forward" solution. I thought azureml-on-behalf-of was the easiest, since it was mentioned in the examples, but it might be not for serverless, as achauhan says. If that turns out to be the case, I'll need to dig into assigning a managed identity to the serverless job - or maybe if there was another intended way of using auth on serverless, then I'm certainly all ears :) |
@jonaslb - Can you please explain your scenario, so that I look around for better suggestions. |
Hi @jonaslb. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue. |
The scenario is almost as simple as the reproducer snippet in the issue. We use the jobs to perform some ad-hoc "data engineering"/transforms/reduction tasks in preparation for other tasks. It's often submitted from a laptop, although it can also be from an app that uses a managed identity. But anyway, one of the things these jobs do, is access some external APIs. For this, secrets are needed, and they are in an Azure Vault. We use environment variables currently, but these are not actually considered secret, and hence viewable on e.g. ml studio, so we want to stop doing that. I should say that we might be in a situation where Azure ML serverless is "overkill" for some of the jobs. So we are considering other products, such as Azure Batch or other orchestration tools. But for now, things are on Azure ML. |
Describe the bug
Azure AI ML describes in its documentation that
AzureMLOnBehalfOfCredential
can be used to access for example keyvault. Due to what seems to be a programming error (TypeError: Session.request() got an unexpected keyword argument 'claims'
), that is however not possible.To Reproduce
Here's a minimal reproducer:
And
hello.py kv
locally is "Successfully accessed key vault".hello.py submit
to submit to Azure MLTypeError: Session.request() got an unexpected keyword argument 'claims'
Expected behavior
I expected the "on behalf of" credential to work essentially the same as the default credential, with my identity.
This is also how documentation in the examples repository thinks it should work.
The text was updated successfully, but these errors were encountered: