Secure Azure AI Services : Authentication (Part 2)
Token-based Authentication
Certain AI systems
support (or even require) token-based authentication when utilizing the REST
interface. In these situations, the initial request for an authentication token,
which has a 10-minute validity period, presents the subscription key. To
confirm that the caller has been authenticated, the token must be presented in
subsequent requests.
Note- When
using an SDK, the calls to obtain and present a token are handled for you by
the SDK.
Microsoft Entra ID Authentication
You may give access to
particular service principals or managed identities for apps and services
operating in Azure due to the support of Azure AI services for Microsoft Entra
ID authentication. A cloud-based
identification and access management system is called Microsoft Entra ID.
There are different ways
you can authenticate against Azure AI services using Microsoft Entra ID:
Authenticate Using Service
Principals
The overall process to
authenticate against Azure AI services using service principals is as follows:
- Create a custom subdomain-
You
can create a custom subdomain in different ways including through the Azure
portal, Azure CLI, or PowerShell. After that, you can create your Azure AI
services resource specifying a custom subdomain. Once created, your subdomain
name will be returned in the response.
- Assign a role to a
service principal- You've created an Azure AI resource that
is linked with a custom subdomain. Next, you assign a role to a service
principal. To start, you'll need to register an application. This
creates the application resource. Then you use the New-AzADServicePrincipal command
to create a service principal and provide your application's ID. Finally,
you can assign the Cognitive Services Users role to your service principal.
Authenticate Using Managed
Identities
Managed identities are
two types:
- System-assigned managed
identity- A virtual machine that requires access to Azure AI
services is an example of a resource to which a managed identity is generated
and associated. The identity gets erased along with the resource.
- User-assigned managed
identity- Instead of being restricted to a single resource, the
managed identity is designed to be utilized by several. It is not dependent on
any one resource.
You can assign each type
of managed identity to a resource either during creation of the resource, or
after it has already been created.
Conclusion
We have successfully
learnt about various types of authentication.
Comments
Post a Comment