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

Download is forbidden for user with token authorisation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 4 - Normal
    • Resolution: Not a Bug
    • Affects Version/s: 7.3.2
    • Fix Version/s: None
    • Component/s: Access Tokens
    • Labels:
      None
    • Environment:

      Linux artifactory 5.3.0-46-generic #38~18.04.1-Ubuntu SMP Tue Mar 31 04:17:56 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

    • Severity:
      Medium

      Description

      Reproduce steps:

      1) Create token for artifactory local user, using an article https://www.jfrog.com/confluence/display/JFROG/Artifactory+REST+API#ArtifactoryRESTAPI-create-tokenCreateToken

      I used command:

      curl -urmantsurov:<pass> -XPOST "https://artifactory/artifactory/api/security/token" -d username=coma-ansible-winagents" -d "scope=api:*"

      2) For artifactory local user add read permission for a generic repository with binary files

      3) Try to download binary file from generic repo using local user with token:

      curl -H "Authorization: Bearer eyJ2ZXIiOiIyIiwidHlwIjoiSldUIiwiYWxnIjoiUlMyNTYiLCJraWQiOiIxN1N5cVBRcnFhT2ZtVHVsdC1ySVg3aloxUFB1QTVyRmZmdUFpQU9UaM4In0.eyJzdWIiOiJqZnJ0QDAxZTNtcWVxZWd3ZjkyMHQ2Njc5ODAwYnM1XC91c2Vyc1wvcm1hbnRzdXJvdiIsInNjcCI6ImFwaToqIGFwcGxpZWQtcGVybWlzc2lvbnNcL2dyb3VwczpcIml3dGQgY29tYSxpd3RkIGxpbnV4IGRldmVsb3BlcnNcIiIsImF1ZCI6ImpmcnRAMDFlM21xZXFlZ3dmOTIwdDY2Nzk4MDBiczUiLCJpc3MiOiJqZnJ0QDAxZTNtcWVxZWd3ZjkyMHQ2Njc5ODAwYnM1XC91c2Vyc1wvcm1hbnRzdXJvdiIsImV4cCI6MTU4NzQ2MTUyOSwiaWF0IjoxNTg3NDU3OTI5LCJqdGkiOiJlODVmMWYzNC1iMzlhLTRlMjktYTY2YS1kMWFmMGQyMzQ0NzgifQ.veqdmllR7kDJipFT2hKB9--4joSIZgsmun6dxVfbOXiCzN5-Ky6dP1Mtvta7y1jv7yCkPCBSkFUX6YYfUXRo3dLKvVZKWuNT0STpSkNsxqyDMk8hYTpOXrl-p7SCMIVZ2O54OYVyHDHohtLGoaBS_ESNxCFcaqAmHapRf5IftoJdyfEbADlw-fzDZ61qpUXY2DGEBpT8_pVcPE-yECr2RMi31Cljmc4Z_EgdVPJXkyRIVW6wqBJPU46mhcOlERnk-2-sobBfoO9NBFomGcxOpgtwcoMExt4vyxQRjeSnmIGTCeKhDvATMNmkBGR3or0am1zj25LAKjOLQewmJkCb0A" "https://artifactory/artifactory/test/common/7z1900-x64.exe"
      {  "errors" : [ {    
      "status" : 403,   
       "message" : "Download request for repo:path 'test:common/7z1900-x64.exe' is forbidden for user 'token:coma-ansible-winagents'."  } ]

      In case I generate a token for a local group with read permission on same repo, I download same file through curl with success. Please help to fix a problem.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            Mantsurov Roman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Sync Status

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