Skip to content

Commit b1ca3e9

Browse files
authored
Merge pull request #231581 from tejaswikolli-web/17201017
Identity expiry error
2 parents a8b7338 + 5b7c073 commit b1ca3e9

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

articles/container-registry/tutorial-troubleshoot-customer-managed-keys.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ If you try to remove a user-assigned or system-assigned managed identity that yo
1919
Azure resource '/subscriptions/xxxx/resourcegroups/myGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry' does not have access to identity 'xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx' Try forcibly adding the identity to the registry <registry name>. For more information on bring your own key, please visit 'https://aka.ms/acr/cmk'.
2020
```
2121

22-
You also won't be able to change (rotate) the encryption key. The resolution steps depend on the type of identity that you used for encryption.
22+
You're unable to change (rotate) the encryption key. The resolution steps depend on the type of identity that you used for encryption.
2323

2424
### Removing a user-assigned identity
2525

@@ -48,9 +48,24 @@ If you enable a key vault firewall or virtual network after creating an encrypte
4848

4949
If the problem persists, contact Azure Support.
5050

51+
## Identity expiry error
52+
53+
The identity attached to a registry is set for autorenewal to avoid expiry. If you disassociate an identity from a registry, an error message occurs explaining to you can't remove the identity in use for CMK. Attempting to remove the identity jeopardizes the autorenewal of identity. The artifact pull/push operations work until the identity expires (Usually three months). After the identity expiration, you'll see the HTTP 403 with an error message "The identity associated with the registry is inactive. This could be due to attempted removal of the identity. Reassign the identity manually".
54+
55+
You have to reassign the identity back to registry explicitly.
56+
57+
1. Run the [az acr identity assign](/cli/azure/acr/identity/#az-acr-identity-assign) command to reassign the identity manually.
58+
59+
- For example,
60+
61+
```azurecli-interactive
62+
az acr identity assign -n myRegistry \
63+
--identities "/subscriptions/mysubscription/resourcegroups/myresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity"
64+
```
65+
5166
## Accidental deletion of a key vault or key
5267
53-
Deletion of the key vault, or the key, that's used to encrypt a registry with a customer-managed key will make the registry's content inaccessible. If [soft delete](../key-vault/general/soft-delete-overview.md) is enabled in the key vault (the default option), you can recover a deleted vault or key vault object and resume registry operations.
68+
Deletion of the key vault, or the key, that's used to encrypt a registry with a customer-managed key makes the registry's content inaccessible. If [soft delete](../key-vault/general/soft-delete-overview.md) is enabled in the key vault (the default option), you can recover a deleted vault or key vault object and resume registry operations.
5469
5570
## Next steps
5671

0 commit comments

Comments
 (0)