version-checker icon indicating copy to clipboard operation
version-checker copied to clipboard

Wrong url path for token in selfhosted client

Open kashtan404 opened this issue 3 years ago • 2 comments

Hello,

I deployed version-checker with enabled self hosted registry (artifactory), but I got 405 error in the log (sensitive info replaced with stars): error: failed to setup image registry clients: failed to create selfhosted client "https://*****": failed to setup token auth (405): { "errors" : [ { "status" : 405, "message" : "Method Not Allowed" } ] }

It seems that selfhosted client in the version-checker has wrong token url path for artifactory because in official documentation it is different.

I tested it with curl and got the same result: $ curl -u*** -XPOST "https://***/v2/token" -d "username=***" { "errors" : [ { "status" : 405, "message" : "Method Not Allowed" } ] }

With correct url path it works: $ curl -u*** -XPOST "https://***/artifactory/api/security/token" -d "username=***" { "scope" : "applied-permissions/groups:*** api:*", "access_token" : "***", "expires_in" : 3600, "token_type" : "Bearer" }

kashtan404 avatar Dec 02 '20 07:12 kashtan404

Thanks @kashtan404,

Is this using a selfhosted instance of Jfrog, or the cloud hosted solution?

JoshVanL avatar Dec 07 '20 09:12 JoshVanL

Hi @JoshVanL, It's self-hosted instance of Jfrog.

kashtan404 avatar Dec 07 '20 15:12 kashtan404

@kashtan404 did you manage to integrate the JFrog Artifactory with the version checker?

theodore86 avatar May 08 '24 07:05 theodore86