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

REST API responses are inconsistent when collections are involved

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: REST API
    • Labels:
      None

      Description

      REST API responses produce inconsistent responses when collections are involved, e.g users or repositories. On an example:

       

      /api/storage/pypi-remote?permissions

      {
        "uri" : "https://qa.repos.akamai.com:443//api/storage/pypi-remote-cache",
        "principals" : {
          "users" : {
            "user1" : [ "r", "w", "n" ],
            "user2" : [ "r", "w", "n" ],
            "user3" : [ "r", "w", "n" ],
            "admin1" : [ "r", "d", "w", "m", "n" ],
            "user4" : [ "r", "w", "n" ],
            "user5" : [ "r", "w", "n" ]
          },
          "groups" : {
            "readers" : [ "r", "w", "n" ]
          }
        }
      }

      Here, all 5 users are members of readers group. So, they are unpacked and added to readers dictionary in response.

       

      But here:

      /api/v2/security/permissions/groups/<group>

      [ {
        "name" : "Any Remote",
        "repo" : {
          "repositories" : [ "ANY REMOTE" ],
          "actions" : [ "read", "annotate", "write" ],
          "include-patterns" : [ "**" ],
          "exclude-patterns" : [ ]
        }
      } ]

      ANY REMOTE repository does not exist and is just an indicator of all remote repositories having having r/w/n.

      This is inconsistent and leads to errors when consuming the APIs.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              gskolysz Grzegorz Skołyszewski
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: