Create Pairing Token

JFrog REST APIs

Products
JFrog Xray
Content Type
REST API
ft:sourceType
Paligo

This endpoint can be per use case or one for all (or some) use cases. The decision should be made based on service and use case requirements. The following definition is for an endpoint that serves several use cases.

Description: Creates a pairing token for a specific use case.

Since: 7.29.7

Authorization: Requires admin permissions.

Usage: POST /<svc>/api/v1/service_trust/pairing/{use-case}

Note

The use-case in the usage above is per service, per use case, where <svc> should hold the service type. For example::

  • mission-control- for pairing an edge with Mission Control

  • artifactory-cold- for establishing trust between "warm" and "cold" instances

  • artifactory-cold/<ns> - re-establish a revoked trust with a given namespace

Content-Type:application/json

Produces: application/json

Sample Usage:

Sample Usage for Federated Repository

POST /artifactory/api/v1/service_trust/pairing/{federated-repo/*}
200
{
  "pairing_token": "<pairing-token>"
}

Sample Usage for Mission Control

POST /access/api/v1/service_trust/pairing/mission-control
200
{
  "pairing_token": "<pairing-token>"
}

Sample Response:

{
  "ext": "{\"base_url\":\"http://localhost:9092\",\"exchange_url\":\"http://localhost:9092/artifactory/api/v1/service_trust/exchange\",\"revocable\":true}",
  "sub": "jfrt@01fnba8awk5na51pmjmjhm15qk/users/admin",
  "scp": "internal:service-trust/pairing/federated-repo/*:x",
  "aud": "jfrt@01fnba8awk5na51pmjmjhm15qk",
  "iss": "jfrt@01fnba8awk5na51pmjmjhm15qk/users/admin",
  "exp": 1637836575,
  "iat": 1637836275,
  "jti": "4be13896-2fef-418d-b07c-951cbd05ba71"
}

Error Response Codes:

404 Not found - the specified use case is unknown to the service