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

Bitbucket Application Link Adding default SSH port 7999 in allowlist

      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

          Form Name

            [BAM-25869] Bitbucket Application Link Adding default SSH port 7999 in allowlist

            Shashank Kumar made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 943598 ]
            Iryna Solonyshyn (Inactive) made changes -
            Remote Link New: This issue links to "Page (Atlassian Documentation)" [ 941534 ]
            Mateusz Szmal made changes -
            Resolution New: Answered [ 9 ]
            Status Original: Short Term Backlog [ 12074 ] New: Closed [ 6 ]

            Hello, 

            This is a feature limitation we are aware of. 
            Please check out our documentation on how to resolve this issue on your side: https://confluence.atlassian.com/bamkb/adding-a-bitbucket-linked-repository-in-bamboo-fails-with-uri-ssh-git-mybitbucket-ssh_port-project_name-repo_name-git-is-not-allowed-by-system-administrator-error-1431241285.html 

             

            Kind regards,

            Bamboo Development Team

            Mateusz Szmal added a comment - Hello,  This is a feature limitation we are aware of.  Please check out our documentation on how to resolve this issue on your side: https://confluence.atlassian.com/bamkb/adding-a-bitbucket-linked-repository-in-bamboo-fails-with-uri-ssh-git-mybitbucket-ssh_port-project_name-repo_name-git-is-not-allowed-by-system-administrator-error-1431241285.html     Kind regards, Bamboo Development Team
            Bruno Benvenuti made changes -
            Assignee Original: Bruno Benvenuti [ 94ce1c6f8249 ]
            Bruno Benvenuti made changes -
            Status Original: Needs Triage [ 10030 ] New: Short Term Backlog [ 12074 ]
            Bruno Benvenuti made changes -
            Assignee New: Bruno Benvenuti [ 94ce1c6f8249 ]
            Alexey Chystoprudov made changes -
            Component/s New: Bitbucket Server integration [ 18508 ]
            Alexey Chystoprudov made changes -
            Description Original: h3. 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)
            h3. Steps to Reproduce
             # In Bitbucket Server Settings, Change the SSH Port under in Bitbucket to non default port (Lets say 5901), whereas Bitbucket base URL being http://&lt;bitbucket_base_url&gt;:7990
             # Create an application link with the Bitbucket.
             # After successful creation, Could see below 2 entries added in the Allowlist
             ** Bitbucket (http://&lt;bitbucket_base_url&gt;:7990)
             ** ssh://&lt;bitbucket_base_url&gt;:7999

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

            h3. Actual Results
            Below error can be seen in the Bamboo UI
             !image-2024-08-23-12-59-30-210.png|thumbnail!

            Below error can be seen in the <bamboo-home>/logs/atlassian-bamboo.log
            {noformat}
            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:&lt;ssh_port&gt;/&lt;project_name&gt;/&lt;repo_name&gt;.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
            {noformat}

            h3. Workaround
            # Find the [SSH Port configured in Bitbucket|https://confluence.atlassian.com/bitbucketserver/enable-ssh-access-to-git-repositories-776640358.html#EnableSSHaccesstoGitrepositories-EnablingSSHaccess]
            # Navigate to [Allowlist|https://confluence.atlassian.com/bamboo/configuring-the-allowlist-1431536364.html] in Bamboo using <bamboo_base_url>/plugins/servlet/whitelist
            # Modify the Domain name entry for the SSH port from ssh://mybitbucket:7999 to ssh://mybitbucket:&lt;ssh_port_from_bitbucket>
            New: h3. 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)
            h3. Steps to Reproduce
             # In Bitbucket Server Settings, Change the SSH Port under in Bitbucket to non default port (Lets say 5901), whereas Bitbucket base URL being http://&lt;bitbucket_base_url&gt;:7990
             # Create an application link with the Bitbucket.
             # After successful creation, Could see below 2 entries added in the Allowlist
             ** Bitbucket (http://&lt;bitbucket_base_url&gt;:7990)
             ** ssh://&lt;bitbucket_base_url&gt;:7999

            h3. Expected Results

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

            Below error can be seen in the Bamboo UI
            !image-2024-08-23-12-59-30-210.png|thumbnail!

            Below error can be seen in the <bamboo-home>/logs/atlassian-bamboo.log
            {noformat}
            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:&lt;ssh_port&gt;/&lt;project_name&gt;/&lt;repo_name&gt;.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
            {noformat}
            h3. Workaround
            h4. #1
             # Find the [SSH Port configured in Bitbucket|https://confluence.atlassian.com/bitbucketserver/enable-ssh-access-to-git-repositories-776640358.html#EnableSSHaccesstoGitrepositories-EnablingSSHaccess]
             # Navigate to [Allowlist|https://confluence.atlassian.com/bamboo/configuring-the-allowlist-1431536364.html] in Bamboo using <bamboo_base_url>/plugins/servlet/whitelist
             # Modify the Domain name entry for the SSH port from ssh://mybitbucket:7999 to ssh://mybitbucket:&lt;ssh_port_from_bitbucket>

            h4. #2
             # Add system property to bin/setenv.sh or bin/setenv.bat
            {{-Dbamboo.stash.create.ssh.allow.list.records.automatically=false}}
            Venkata Sateesh Pentela created issue -

              Unassigned Unassigned
              d4e7ab297885 Venkata Sateesh Pentela
              Affected customers:
              0 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: