-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[ContainerRegistry] Fix -ExposeToken only print token as secure string without login in Connect-AzContainerRegistry
#29007
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,7 @@ | |
| // limitations under the License. | ||
| // ---------------------------------------------------------------------------------- | ||
|
|
||
| using Microsoft.WindowsAzure.Commands.Common; | ||
| using Microsoft.WindowsAzure.Commands.Utilities.Common; | ||
| using Newtonsoft.Json; | ||
| using System; | ||
|
|
@@ -67,9 +68,8 @@ public override void ExecuteCmdlet() { | |
| WriteWarning("You can perform manual login using the provided access token, for example: 'docker login <loginServer> -u 00000000-0000-0000-0000-000000000000 -p <accessToken>'"); | ||
| var cred = new | ||
| { | ||
| status = this.ExecuteScript<object>(LoginScript), | ||
| loginServer = Name + ".azurecr.io", | ||
| accessToken = this.RegistryDataPlaneClient.Authenticate() | ||
| accessToken = this.Password.ConvertToSecureString() | ||
| }; | ||
|
Comment on lines
69
to
73
|
||
| WriteObject(cred); | ||
| } else | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| "Module","Cmdlet","Example","Line","RuleName","ProblemId","Severity","Description","Extent","Remediation" | ||
| "Az.ContainerRegistry","Connect-AzContainerRegistry","4","4","Capitalization_Conventions_Violated","5101","1","docker doesn't follow the Capitalization Conventions.","docker login $loginServer -u 00000000-0000-0000-0000-000000000000 --password $token","Check the Capitalization Conventions. Suggest format: docker.exe" |
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 ChangeLog entry needs to be more descriptive and user-facing. It should explain what the issue was and how it affects users, not just state that something was fixed. Additionally, it should reference the related GitHub issue if one exists. For example: "Fixed
-ExposeTokenparameter inConnect-AzContainerRegistryto properly return the access token without performing docker login" or similar.