Attempting to download an artifact or build log using "curl + personal access token" returns nothing and the command succeeds

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Fixed
    • 9.5.0
    • Component/s: Artifacts
    • None
    • 117

      Issue Summary

      The new authentication with the personal access token is not working when we attempt to download an artifact or build log with curl.

      Steps to Reproduce

      1. Create a plan with a shared artifact
      2. Run a build
      3. Create a personal access token with full access for a Bamboo admin user
      4. Try to download the artifact with the following command:
      curl -H "Authorization: Bearer <ACCESS_TOKEN>" \
           -X GET '<BAMBOO_URL>/browse/<BUILD-KEY>/artifact/shared/<ARTIFACT_NAME>/<ARTIFACT_FILE>' > <ARTIFACT_FILE>

      Expected Results

      The artifact will be download or the command will fail.

      Actual Results

      The artifact is not downloaded and the command succeeds

      Workaround

      Use plain text authentication (user + password).

      curl --user <USER>:<PASSWORD>
           -X GET '<BAMBOO_URL>/browse/<BUILD-KEY>/artifact/shared/<ARTIFACT_NAME>/<ARTIFACT_FILE>' > <ARTIFACT_FILE>

       

            Assignee:
            Mateusz Szmal
            Reporter:
            Daniel Santos (Inactive)
            Votes:
            51 Vote for this issue
            Watchers:
            40 Start watching this issue

              Created:
              Updated:
              Resolved: