Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-52548

Bitbucket Authentication fails if using URI path Specification

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: bitbucket-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.121.1
      Bitbucket Plugin 1.1.8
      Blue Ocean 1.6.2
    • Similar Issues:

      Description

      When the credentials are restricted by "URI path" the Authentication fails always. I tried many different combinations of Includes/Excludes. I get always the following Error:

      Scan Multibranch Pipeline Log:

      Started by user admin
      [Fri Jul 13 10:27:26 PDT 2018] Starting branch indexing...
      ERROR: [Fri Jul 13 10:27:26 PDT 2018] Could not update folder level actions from source blueocean
      com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketRequestException: HTTP request error. Status: 401: .
      HttpResponseProxy{HTTP/1.1 401  [X-AREQUESTID: @RAO41Bx627x450x0, X-ASEN: SEN-L11962577, Cache-Control: no-cache, no-transform, Vary: X-AUSERNAME,Accept-Encoding, Transfer-Encoding: chunked, X-Content-Type-Options: nosniff, WWW-Authenticate: OAuth realm="http%3A%2F%2Flocalhost%3A7990", Content-Type: application/json;charset=UTF-8, Date: Fri, 13 Jul 2018 17:27:26 GMT] org.apache.http.client.entity.DecompressingEntity@199a1420}
      	at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getRequest(BitbucketServerAPIClient.java:679)
      	at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getRepository(BitbucketServerAPIClient.java:363)
      	at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.retrieveActions(BitbucketSCMSource.java:1068)
      	at jenkins.scm.api.SCMSource.fetchActions(SCMSource.java:748)
      	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:590)
      	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:276)
      	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165)
      	at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1024)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      [Fri Jul 13 10:27:26 PDT 2018] Finished branch indexing. Indexing took 13 ms
      FATAL: Failed to recompute children of test_nightwatch
      com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketRequestException: HTTP request error. Status: 401: .
      HttpResponseProxy{HTTP/1.1 401  [X-AREQUESTID: @RAO41Bx627x450x0, X-ASEN: SEN-L11962577, Cache-Control: no-cache, no-transform, Vary: X-AUSERNAME,Accept-Encoding, Transfer-Encoding: chunked, X-Content-Type-Options: nosniff, WWW-Authenticate: OAuth realm="http%3A%2F%2Flocalhost%3A7990", Content-Type: application/json;charset=UTF-8, Date: Fri, 13 Jul 2018 17:27:26 GMT] org.apache.http.client.entity.DecompressingEntity@199a1420}
      	at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getRequest(BitbucketServerAPIClient.java:679)
      	at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getRepository(BitbucketServerAPIClient.java:363)
      	at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.retrieveActions(BitbucketSCMSource.java:1068)
      	at jenkins.scm.api.SCMSource.fetchActions(SCMSource.java:748)
      	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:590)
      	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:276)
      	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165)
      	at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1024)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      Finished: FAILURE
      

      Using "Hostname:port" works like expected. For example: If the the wrong port is allowed (it should be 7990, but I included just 7997), a similar Error is thrown. 

        Attachments

          Activity

          Hide
          rvaidhya Raghav Vaidhyanathan added a comment -

          I get the same error but intermittently .  Where exactly does this plugin pick up the credentials from if using a Bitbucket project folder ? 

          Show
          rvaidhya Raghav Vaidhyanathan added a comment - I get the same error but intermittently .  Where exactly does this plugin pick up the credentials from if using a Bitbucket project folder ? 
          Hide
          carlosrodlop Carlos Rodríguez López added a comment -

          Please refer to this document https://go.cloudbees.com/docs/plugins/bitbucket/

          On April 29th, 2019, Atlassian updated their suite APIs for both Bitbucket and JIRA to comply with GDPR privacy requirements. Cloudbees has evaluated this change against the CloudBees BitBucket Branch Source Plugin and the CloudBees JIRA Plugin.
          
          BitBucket Cloud Pipeline jobs created with "classic" Jenkins are unaffected.
          
          There is a limited impact to Bitbucket Cloud Pipeline jobs created using Blue Ocean:
          
          If you are running Blue Ocean version 1.15.1 or earlier, you will be unable to create or edit BitBucket Cloud Pipeline jobs.
          
          Upgrading to Blue Ocean 1.16.0 or later fixes this issue.
          
          However, because "owner name" has been removed from the BitBucket REST API, when you edit Bitbucket Cloud Pipelines in the "classic" Jenkins UI, a UUID (instead of human-readable text) is displayed in the "owner" field of the Pipeline.
          
          We do not anticipate any broader customer impact. If you encounter a change in behavior that you believe is due to the BitBucket or JIRA API changes, please contact CloudBees Support for assistance.
          
          Show
          carlosrodlop Carlos Rodríguez López added a comment - Please refer to this document https://go.cloudbees.com/docs/plugins/bitbucket/ On April 29th, 2019, Atlassian updated their suite APIs for both Bitbucket and JIRA to comply with GDPR privacy requirements. Cloudbees has evaluated this change against the CloudBees BitBucket Branch Source Plugin and the CloudBees JIRA Plugin. BitBucket Cloud Pipeline jobs created with "classic" Jenkins are unaffected. There is a limited impact to Bitbucket Cloud Pipeline jobs created using Blue Ocean: If you are running Blue Ocean version 1.15.1 or earlier, you will be unable to create or edit BitBucket Cloud Pipeline jobs. Upgrading to Blue Ocean 1.16.0 or later fixes this issue. However, because "owner name" has been removed from the BitBucket REST API, when you edit Bitbucket Cloud Pipelines in the "classic" Jenkins UI, a UUID (instead of human-readable text) is displayed in the "owner" field of the Pipeline. We do not anticipate any broader customer impact. If you encounter a change in behavior that you believe is due to the BitBucket or JIRA API changes, please contact CloudBees Support for assistance.

            People

            • Assignee:
              Unassigned
              Reporter:
              mikorn Michael Korn
            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: