Skip to content
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

A better error message describing general class of auth problems #434

Closed
vlada-shubina opened this issue May 10, 2023 · 1 comment
Closed

Comments

@vlada-shubina
Copy link
Member

vlada-shubina commented May 10, 2023

Related to #314 and #418

Current error message is as following:
/opt/azure_repos/home_dir_tgw_user/.nuget/packages/microsoft.net.build.containers/0.4.0/build/Microsoft.NET.Build.Containers.targets(195,5): error CONTAINER1013: Failed to push to the output registry: System.ApplicationException: CONTAINER1001: Failed to upload blob to POST****

Consider improving it and providing possible generic CTA.

A message like the following should be emitted instead:

  • No credentials found for registry:
Unable to authenticate to registry <REGISTRYNAME>. No credentials were found locally - you may need to login to the registry using `docker login <REGISTRYNAME> -u <USERNAME> -p <PASSWORD>.`
  • Credentials present, but incorrect when a Token was used:
Unable to authenticate to registry <REGISTRYNAME>. Credentials were found locally but were not accepted by the registry. Check the permissions for the Bearer token associated with the registry.
  • Credentials present, but incorrect when a Basic (username/password) was used:
Unable to authenticate to registry <REGISTRYNAME>. Credentials were found locally but were not accepted by the registry. Check the permissions for the user <USERNAME> associated with the registry.

Potential questions:

  • Is it ok to expose <USERNAME> in the message?
  • Is it ok to try to find the sub claim in the Bearer token and emit it, since tokens are often tracked/inventoried by the 'subject' (user id) that they were created for?
@baronfel
Copy link
Member

baronfel commented Oct 9, 2024

We have better auth messages now.

@baronfel baronfel closed this as completed Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants