You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am opening this issue as a channel to discuss with docker team the best way forward with the Azure scenario. This issue is an extension of a closed PR. #105
To reiterate, we want to enable to user to take advantage of our AAD device login feature for docker. We are also hoping that the user would not need to install azure cli for this scenario. Namely, we want to user to be able to call "docker login" to login to an Azure Container Registry, but the login process would be Azure specific.
Azure credential helper should freely support any credential helper as its backend for storing the credentials. Since information can be written to the active docker config file, we need a way for the credential helper to know which config file is currently active. We could do this by setting the current cli config location in a DOCKER_CONFIG variable in the shell session when we invoke the credential helper
This is the most intrusive change: https://github.com/shhsu/cli-1/blob/v2_credhelper/cli/command/registry.go#L86-L103. When given no -p and -u during login, ConfigureAuth method currently always prompt user for username and password. The username retrieved from the cred store is only used as the default value during prompt and password is not used. This will not work for us because our credential helper has already produced a pair of username and password and prompting again breaks our scenario.
We'll like to open a conversation with docker team and see if you guys are open to allow Azure Container team make these 3 changes.
Alternatively, we are also thinking of introduce a new component of docker called docker-login-manager. Similar to docker-credential-helper, this login manager would be a plugin component. However, the only active that this login manager would perform is to get the AuthConfig object. The ConfigureAuth method would first go to the user configured login manager to login. If for any reason the login manager fails to retrieve the username and password, cli would then step in and prompt for username and password.
Please let us know what's the most suitable path forward.
Hi Docker team:
I am opening this issue as a channel to discuss with docker team the best way forward with the Azure scenario. This issue is an extension of a closed PR. #105
To reiterate, we want to enable to user to take advantage of our AAD device login feature for docker. We are also hoping that the user would not need to install azure cli for this scenario. Namely, we want to user to be able to call "docker login" to login to an Azure Container Registry, but the login process would be Azure specific.
Following suggestions from @friism, I created an azure credential helper prototype which can be wrapped around any credential helper. https://github.com/shhsu/docker-acr-cred-helper/blob/master/program.go
In order for this component to work properly though, there are 3 changes that need to be made on the docker cli side:
-pand-uduring login, ConfigureAuth method currently always prompt user for username and password. The username retrieved from the cred store is only used as the default value during prompt and password is not used. This will not work for us because our credential helper has already produced a pair of username and password and prompting again breaks our scenario.We'll like to open a conversation with docker team and see if you guys are open to allow Azure Container team make these 3 changes.
Alternatively, we are also thinking of introduce a new component of docker called docker-login-manager. Similar to docker-credential-helper, this login manager would be a plugin component. However, the only active that this login manager would perform is to get the AuthConfig object. The ConfigureAuth method would first go to the user configured login manager to login. If for any reason the login manager fails to retrieve the username and password, cli would then step in and prompt for username and password.
Please let us know what's the most suitable path forward.
Thanks
Peter