Skip to content

ACR Integration not working due to basic-auth authentication #2325

@b-abderrahmane

Description

@b-abderrahmane

Describe the bug
Authenticating to ACR is not working, see the logs below. very likely due to attempting to authenticate to acr directly through basic-auth instead implementing an oauth2 authentication flow.

│ Tue, 01 Oct 2024 19:52:40 +0000 ERR acr/client.go:144 invalid character '<' looking for beginning of value                                                                        │
│ Tue, 01 Oct 2024 19:52:40 +0000 ERR acr/client.go:48 invalid character '<' looking for beginning of value                                                                         │
│ Tue, 01 Oct 2024 19:52:40 +0000 ERR cronjobs/registry.go:89 (skipping) unable to sync registry: azure_container_registry (registry): invalid character '<' looking for beginn │
│ 

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Registries'
  2. Click on 'Add registry'
  3. Add an ACR registry with a valid ACR account
  4. Try to sync and scan the registry
  5. See error above

Expected behavior
It should succeed and be able to authenticate and scan the repositories.
And even in case of a failure, I would expect something to appear on the front-end.

Screenshots
If applicable, add screenshots to help explain your problem.

Components/Services affected

  • UI/Frontend
  • API/Backend
  • Agent
  • Deployment/YAMLs
  • CI/CD Integration
  • Other (specify)

Additional context
The acr/client.go client should implement the following flow

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingneeds-triageIndicates that issue is not yet triaged and assigned

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions