Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-25869

Bitbucket Application Link Adding default SSH port 7999 in allowlist

XMLWordPrintable

      Issue Summary

      In Bamboo, while creating the application link with Bitbucket, 2 entries are added to the Allowlist. The Application link URL was added correctly. But the Domain name entry for SSH has defaulted the port to 7999 irrespective of what's configured in Bitbucket.

      This is reproducible on Data Center: (yes) / (no)

      Steps to Reproduce

      1. In Bitbucket Server Settings, Change the SSH Port under in Bitbucket to non default port (Lets say 5901), whereas Bitbucket base URL being http://<bitbucket_base_url>:7990
      2. Create an application link with the Bitbucket.
      3. After successful creation, Could see below 2 entries added in the Allowlist
        • Bitbucket (http://<bitbucket_base_url>:7990)
        • ssh://<bitbucket_base_url>:7999

      Expected Results

      While creating a Bitbucket Applink, Bamboo should add an entry in the allowlist based on the SSH port configured in the Bitbucket.

      Actual Results

      Below error can be seen in the Bamboo UI

      Below error can be seen in the <bamboo-home>/logs/atlassian-bamboo.log

      2024-08-15 15:09:27,158 INFO [http-nio-8085-exec-24 url: /admin/createLinkedRepository.action; user: user_name] [BitbucketServerServerConfigurator] Public key was added to Bitbucket Server (Bamboo user: user_name, application: Bitbucket [http://mybitbucket:7990], location: repository <project_name>/<repo_name>): ssh-ed25519 AAAAC3NzaC1l...............vZfiKR7Xth+h http://mybamboo:8085
      2024-08-15 15:09:27,159 INFO [http-nio-8085-exec-24 url: /admin/createLinkedRepository.action; user: user_name] [OutboundWhitelistImpl] No outbound rule found matching URI: ssh://git@mybitbucket:<ssh_port>/<project_name>/<repo_name>.git
      2024-08-15 15:09:27,159 INFO [http-nio-8085-exec-24 url: /admin/createLinkedRepository.action; user: user_name] [BitbucketServerServerConfigurator] Can't authenticate with Bitbucket Server despite successful public key storage: ssh-ed25519 AAAAC3NzaC1l...............vZfiKR7Xth+h http://mybamboo:8085
      

      Workaround

      #1

      1. Find the SSH Port configured in Bitbucket
      2. Navigate to Allowlist in Bamboo using <bamboo_base_url>/plugins/servlet/whitelist
      3. Modify the Domain name entry for the SSH port from ssh://mybitbucket:7999 to ssh://mybitbucket:<ssh_port_from_bitbucket>

      #2

      1. Add system property to bin/setenv.sh or bin/setenv.bat
        -Dbamboo.stash.create.ssh.allow.list.records.automatically=false

              Unassigned Unassigned
              d4e7ab297885 Venkata Sateesh Pentela
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: