-
Notifications
You must be signed in to change notification settings - Fork 522
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 Wizard fix, Please allow me to set --admin-enabled to true as part of creating a ACR through Docker Extension wizard #1668
Comments
Admin user is generally not recommended, there are better options for authenticating to ACR https://docs.microsoft.com/en-us/azure/container-registry/container-registry-authentication#authentication-options Also, admin user can be enabled after the ACR has been created https://docs.microsoft.com/en-us/azure/container-registry/container-registry-authentication#admin-account Suggest "won't fix" |
@karolz-ms Isn't admin user required to make our extension work? |
@bwateratmsft nope, I have an ACR that does not have admin user enabled and it works just fine |
Ah, I see. It is needed for deploy app service though, which is the scenario the user was talking about. https://github.com/microsoft/vscode-docker/blob/master/src/commands/registries/azure/deployImageToAzure.ts#L95 |
@bwateratmsft What you showed here is probably a bug in our code--I would be surprised if an AAD service principal with pull authorization would not work equally well as admin user. For more on service principal authN with ACR see https://docs.microsoft.com/en-us/azure/container-registry/container-registry-auth-kubernetes (disregard the K8s aspect and just note that all it is necessary to pull images is registry URL, service principal ID and password) |
Can we please have that as quick info on how to fix the ACR after you have created it then?. I mean on hover. Right now it says something like admin is not enabled, tough luck. I appreciate the link above but I couldn't find how to fix it so I'm really grateful you were able to provide the link above inside of VS Code, just to avoid the user feels like they got a "go fish" answer? |
https://docs.microsoft.com/en-us/azure/container-registry/container-registry-authentication#admin-account describes how to enable admin account after ACR is created. Does this help? |
@karolz-ms if the extension can facilitate the following admin-enabled won't be necessary
Example for my own app and registry using the CLI:
References: |
@karolz-ms by the way I think what @softchris is getting at is that you need to use the CLI to modify the ACR created through the extension, when the extension should allow it or guide the correct choices for this use case supported by the extension. Of course using the CLI If you implement the AAD approach I outlined in my previous comment we won't need to insecurely enable admin everywhere. |
For better tracking I created #1685 |
@berndverst thank you and yes, agreed. The manual admin mode enablement was just a workaround till we fix the ACR creation scenario comprehensively. |
I want to deploy an image:
To do that from scratch I need to
This won't work as --admin-enabled is false when you create it through the Docker Extension
Suggestion:
Now:
I remove the ACR created through the Docker Extension
I recreate an ACR through azure-cli
This is a really bad UX experience in my mind, please fix
The text was updated successfully, but these errors were encountered: