ARTIFACTORY: How to remove Federated Deployment Bindings when they cannot be removed in UI

ARTIFACTORY: How to remove Federated Deployment Bindings when they cannot be removed in UI

AuthorFullName__c
Sun Jinlong
articleNumber
000006321
FirstPublishedDate
2025-01-08T12:47:40Z
lastModifiedDate
2025-08-01

Issue 

After enabling the Mission Control service, Artifactory supports setting up binding tokens for Federated Repositories between multiple clusters. Once the bindings between the multiple Artifactory clusters are completed, we can quickly create Federated Repositories across these clusters.
However, after we delete a registered deployment from the JPD list, we may encounter a problem where we cannot delete the deployments' bindings through the Artifactory UI.

User-added image

Resolution

 

  1. You can use the Remove Bindings method to delete abnormal bindings.
  2. Use the following Artifactory API to remove abnormal bindings.
    • First, GET the JPD member information that has been added by using the GET JPD List API:
# example request:
curl  --location 'http://<art_url>/mc/api/v1/jpds'--header 'Authorization: Bearer <token>'

# example resopnse:
    {
        "id": "JPD-2",
        "name": "7.90.10",
        "url": "http://<art_target>:8082/",
        "base_url": "http://<art_target>:8082/",
        "location": {
            "city_name": "Shanghai",
            "country_code": "CN",
            "latitude": 31.22222,
            "longitude": 121.45806
        },
......
      "id": "JPD-1",
        "name": "HOME",
        "url": "http://jpd.local/",
        "base_url": "http://<art_home>:8082/",
        "location": {
            "city_name": "Nuuk",
            "country_code": "GL",
            "latitude": 64.18347,
            "longitude": -51.72157
        },
......


Second, request the unpair API to remove Deployments Bindings, as shown in the following example:

# example request:
curl --location 'http://<art_home>/mc/api/ui/v1/service_trust/proxy/unpair' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{
  "source_service_type": "ARTIFACTORY",
  "target_service_type": "ARTIFACTORY",
  "use_case": "federated-repo/*",
  "pairs": [
    {
      "source_jpd_id": "JPD-1",
      "target_jpd_id": "JPD-2"
    },
    {
      "source_jpd_id": "JPD-2",
      "target_jpd_id": "JPD-1"
    }
  ]
}


# example resopnse:
{
    "pairing_results": [
        {
            "result": true,
            "source_jpd_id": "JPD-1",
            "target_jpd_id": "JPD-2"
        },
        {
            "result": true,
            "source_jpd_id": "JPD-2",
            "target_jpd_id": "JPD-1"
        }
    ]
}