How to maintain a static key for azure managed endpoints ?

Anonymous
2023-05-24T19:30:09.4633333+00:00

Every time i deploy my model on the azure managed endpoint the primary key changes every time which is causing problems for us as I have to send new credentials to the backend developer.

The website is deployed on AWS. I'd like to have such a setup for my azure endpoint so that I could just make changes and push it. It shouldn't regenerate keys so that I don't have to reach out to him for every time i make changes to the model.

My setup:
I'm using azure managed endpoints to deploy the model and sending over the rest endpoint and the primary key to the backend developer to make inference calls.

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
2,577 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sedat SALMAN 13,165 Reputation points
    2023-05-25T05:25:20.44+00:00

    Azure Managed Endpoints in Azure Machine Learning automatically manage keys for security. As you've noticed, these keys can change when you redeploy your models, which can cause complications when you need to share these keys with others, such as backend developers. Azure does not provide a way to set or maintain static keys for Azure Machine Learning endpoints. The system is designed to automatically generate new keys when you deploy a new version of your model for security reasons.

    Maybe you can do the following as a workaround

    Use Azure Active Directory (AD) to create a service principal, which is an identity that you can use for automated tasks and app integrations. You can grant this service principal the necessary permissions to access the Azure Machine Learning endpoint. The backend developer can then use the service principal's credentials to authenticate with Azure AD and access the endpoint, eliminating the need for keys.

    or

    Azure Key Vault is a service that lets you securely store and manage keys, secrets, and certificates. You could potentially use this service to store the keys for your Azure Machine Learning endpoint. Then, whenever you redeploy your model and a new key is generated, you can update the key in Azure Key Vault. Your backend developer could then access the key from Azure Key Vault instead of needing to receive it from you directly each time.