Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-18764

API Docs Permission Target Version Mismatch

    XMLWordPrintable

    Details

    • Severity:
      Medium

      Description

      The Artifactory API docs for the creation/modification of permission targets reference the V2 API JSON payload format but dictate the V1 endpoint URL. Despite implying compatibility with both formats, an error is thrown, whose message is not helpful:

      # my-permission.json
      {
        "name":"my-permission",
        "repo": {
          "repositories":["repo-local"],
          "actions": {
            "users": {
              "my-user":["read"]
            }
          }
        },
        "build": {
          "repositories":["artifactory-build-info"],
          "actions": {
            "users": {
              "my-user":["read"]
            }
          }
        }
      }
      # Steps to reproduce
      $ curl -d @my-permission.json $ARTIFACTORY_BASE/artifactory/api/security/permissions/my-permission
      {
        "errors" : [ {
          "status" : 400,
          "message" : "Permission target request missing repositories."
        } ]
      }
      # Sending the same request to the v2 endpoint works
      $ curl -d @my-permission.json $ARTIFACTORY_BASE/artifactory/api/v2/security/permissions/my-permission

      Also, it is strange that you must specify the repositories for build permissions even though there is a default value that you can't change.

        Attachments

          Activity

              People

              Assignee:
              Unassigned
              Reporter:
              william.dee.arm William Dee
              Votes:
              5 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:

                  Sync Status

                  Connection: RTFACT Sync
                  RTMID-18764 -
                  SYNCHRONIZED
                  • Last Sync Date: