-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ACR] az acr tasks create | update
, az acr build | run
: Add ABAC support for ACR Tasks
#31069
base: dev
Are you sure you want to change the base?
Conversation
…support for ACR Tasks
❌AzureCLI-FullTest
|
Hi @lizMSFT, |
❌AzureCLI-BreakingChangeTest
Please submit your Breaking Change Pre-announcement ASAP if you haven't already. Please note:
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
az acr tasks create | update
, az acr build | run
: Add ABAC support for ACR Tasksaz acr tasks create | update
, az acr build | run
: Add ABAC support for ACR Tasks
az acr tasks create | update
, az acr build | run
: Add ABAC support for ACR Tasksaz acr tasks create | update
, az acr build | run
: Add ABAC support for ACR Tasks
elif source_registry_auth_id == IDENTITY_LOCAL_ID and identity is None: | ||
identity = _build_identities_info(cmd, [source_registry_auth_id]) | ||
|
||
if source_registry_auth_id: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have warning logic in multiple places: here, check_auth_mode_for_abac
and get_custom_registry_credentials
. We may consider consolidate them to one place for maintainability.
operation_group='runs') | ||
|
||
registry_abac_enabled = registry.role_assignment_mode == RoleAssignmentMode.ABAC_REPOSITORY_PERMISSIONS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we consider a warning if user enabled abac but source identity is not specified? Similar to task.py:225
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The user will still be able to create the task successfully if ABAC is enabled but the source identity is not specified. They will encounter an error when they execute az acr task run
, so a warning message could be useful.
However, for az acr build
or az acr run
, an error will be thrown directly if the user doesn't have the correct source registry credential. I'm not sure if a warning message would also be useful in this case.
Related command
az acr tasks create | update
az acr build | run
Description
Added the new optional
--source-registry-auth-id
flagThis PR is not ready because the 2025-03-01-preview version hasn't been rolled out yet.
Testing Guide
This checklist is used to make sure that common guidelines for a pull request are followed.