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

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

Open
1 of 6 tasks
b-abderrahmane opened this issue Oct 1, 2024 · 2 comments
Open
1 of 6 tasks

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

b-abderrahmane opened this issue Oct 1, 2024 · 2 comments
Assignees
Labels
bug Something isn't working needs-triage Indicates that issue is not yet triaged and assigned

Comments

@b-abderrahmane
Copy link

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

@b-abderrahmane b-abderrahmane added bug Something isn't working needs-triage Indicates that issue is not yet triaged and assigned labels Oct 1, 2024
@ramanan-ravi ramanan-ravi self-assigned this Oct 3, 2024
@ramanan-ravi
Copy link
Collaborator

ramanan-ravi commented Oct 3, 2024

Hello @b-abderrahmane, is the registry URL configured in ThreatMapper in this format?
https://<registry-name>.azurecr.io

@b-abderrahmane
Copy link
Author

Hi @ramanan-ravi,
Yes it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage Indicates that issue is not yet triaged and assigned
Projects
None yet
Development

No branches or pull requests

2 participants