Secure Azure AI Services
Overview
Ensuring the security of
Azure AI services can assist in preventing data breaches and violations of user
privacy related to the data involved in the solution. Azure AI services offer
several layers of security that should be taken into account when developing a
solution.
Consider Authentication
By default, access to
resources within Azure AI services is limited through the use of subscription
keys. Managing access to these keys is a crucial aspect of ensuring security.
Regenerate Keys
Regularly updating keys
is essential to mitigate the risk of unauthorized users gaining access to or
sharing those keys. Key regeneration can be performed through the Azure portal
or by using the Azure command-line interface (CLI) command az
cognitiveservices account keys regenerate. Each AI service is provided with
two keys, enabling you to regenerate keys without service interruption. To
accomplish this:
- If you're using both keys in production, change your code so that only one key is in use. For example, configure all production applications to use key 1.
- Regenerate key 2.
- Switch all production applications to use the newly regenerated key 2.
- Regenerate key 1.
- Finally, update your production code to use the new key 1.
Protect Keys With Azure
Key Vault
You may safely store
secrets (such passwords and keys) with Azure Key Vault. Security principals,
which can be thought of as user identities that are verified with Microsoft
Entra ID, are given access to the key vault.
To create a controlled
identity for an application, administrators might choose a security principal
(sometimes referred to as a service principal). This identity can then be used
by the program to get access to the key vault and extract a secret. This method
of limiting access to the secret reduces the possibility that it may be
compromised by being stored in a configuration file or hard-coded in an
application.
An AI services resource's
subscription keys can be kept in Azure Key Vault, and client apps that require
the service can be given controlled identities. Without running the danger of
disclosing the key to unauthorized users, the applications can then get the key
from the key vault as needed.
Conclusion
We have successfully learnt
about protecting keys with Azure Key Vault.
Comments
Post a Comment