Description
Several systems can use the same Azure Container Registry admin credentials to pull or push images anywhere in the registry.
Potential impact
If a password is exposed, images can be changed. The shared account’s activity alone does not identify which system made a change.
Remediation
Grant each workload’s managed identity or service principal only the access it needs. Switch each pipeline or app from the shared password to its new identity and test its usual pulls or pushes. Then apply admin_user_enabled: false and verify that the registry’s admin account is disabled.
Examples
The two Ansible tasks change only the admin setting on the same Premium registry in myResourceGroup. Supply the replacement identities and role assignments separately.
Before
- name: Container Registry 생성
azure.azcollection.azure_rm_containerregistry:
name: myRegistry
location: eastus
resource_group: myResourceGroup
admin_user_enabled: true
sku: Premium
After
- name: Container Registry 생성
azure.azcollection.azure_rm_containerregistry:
name: myRegistry
location: eastus
resource_group: myResourceGroup
admin_user_enabled: false
sku: Premium