jfrog / jfrog-cli

JFrog CLI is a client that provides a simple interface that automates access to the JFrog products.
https://www.jfrog.com/confluence/display/CLI/JFrog+CLI
Apache License 2.0
533 stars 234 forks source link

jf audit-gradle and jf audit-npm suddenly started to report 401 Unauthorized "error": "Bad Credentials" #1520

Open ToniA opened 2 years ago

ToniA commented 2 years ago

Starting from April 20th 2022, all runs of jf audit-gradle and jf audit-npm in our environment have failed with this error message:

Scanning ..... failed with error: Server response: 401 Unauthorized
{
  "error": "Bad Credentials"
}
06:23:26 [Error] Audit command failed due to Xray internal error

We first noticed this on Azure Devops build pipelines, and I double-check that the Service Connection (of type 'JFrog Platform V2') used by the task JfrogCliV2@1 looks fine, the credentials are OK and 'Verify' shows OK. Azure Devops uses version 2.15.0 of the JFrog CLI.

I can reproduce the same issue using my own JFrog cloud credentials (with admin access) on command line, using version 2.16.1. Azure Devops builds up to April 19th have been OK.

eyalbe4 commented 2 years ago

Thanks for reporting this @ToniA, but it doesn't look like something that can cause this changed on jfrog-cli's side. You can verify this by reproducing the issue locally, and then switching to an older version of jfrog-cli. Please ket us know if you need further assistance with this issue.