1

my company uses Docker Desktop and we want to use this cool JFrog extension: https://github.com/jfrog/jfrog-docker-desktop-extension

We also have an JFrog XRay server, so all pre-requisites are fullfilled.

In order to establish a connection, I need to provide a so called 'access token' (AND NOT 'identity token') to the extension. Does someone know how to create such an 'access token' via REST API? All what I found deal with 'identity token'....

Best Valentin

I am expecting a simple http request with curl or whatever to generate such a personal access token.

V. Pravi
  • 13
  • 4

2 Answers2

1

use:

POST <your platform url>/access/api/v1/tokens

example:

curl -H "Authorization: Bearer <valid access token>" -XPOST "http://localhost:8082/access/api/v1/tokens" -d "scope=applied-permissions/user"

For more information, you can take a look at the documentation here.

James Risner
  • 5,451
  • 11
  • 25
  • 47
  • Thanks @YuvalOhayon .. but one problem remains. I do not have an 'access token' so far, so what can I provide as ??? – V. Pravi Mar 07 '23 at 06:49
  • You can always create the first one via the UI under Administration -> User Management -> Generate Token – Yuval Ohayon Mar 12 '23 at 08:38
0

To generate an access token via a REST API, use the below cURL command:-

curl -H "Authorization: Bearer <valid access token>" -XPOST "https://<ART-URL>/access/api/v1/tokens" -d "scope=applied-permissions/user"

The above command will generate an access token and we can use this for configuring our docker-desktop extension. For more information regarding access tokens please refer to the Access Tokens documentation.