แก้ไข

Create a user-assigned managed identity

Create a user-assigned managed identity to grant least-privilege access to a specific service, for actions such as encryption at rest.

In this article, you:

  • Create a user-assigned managed identity from the service catalog or the Azure portal, and assign it a role on a key vault.

Prerequisites

  • To access Azure Enclave, you need an Azure subscription. If you don't already have a subscription, create a free account before you begin.
  • You need a workload and a workload resource group in which to create the managed identity.

Create from the service catalog (quick)

  1. Quickly deploy a user-assigned or system-assigned managed identity from the Common Dependencies service catalog template. You can also create a key vault from this template if you don't already have one.
  2. Assign a role to the managed identity.

Create from the portal

  1. In the Azure portal, enter Managed Identity in the search bar at the top of the portal.
  2. Select Managed Identities.
  3. Select Create.
  4. Enter the workload resource group (RG) where you want to store the managed identity resource.

Screenshot that shows the Create User-assigned Managed Identity pane.

  1. Confirm the Region and enter a name for the managed identity resource.
  2. Select Review + create and then select Create.
  3. Copy the managed identity name into the service catalog deployment parameter, or paste it into Notepad temporarily for use during deployment.

Assign a role to the managed identity

  1. In the Azure portal, go to the managed identity you created.
  2. Select Azure Role Assignments in the left pane.
  3. Select +Add Role Assignment.
  4. For Scope, select Key Vault.
  5. Confirm the subscription.
  6. For Resource, enter the name of your key vault. The Common Dependencies template is a good quickstart for creating a key vault. You can also use the Key Vault template for more customizations.
  7. The key vault must use Azure role-based access control (Azure RBAC). Then select the Key Vault Crypto Service Encryption User role.

References