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

Support Ed25519 SSH keys for SSH transport

    XMLWordPrintable

Details

    • 0
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      In Bamboo, it's possible to specify an SSH private key to authenticate with certain repository types (e.g. Bitbucket Cloud).

      Currently, it appears that, while RSA keys work fine (even larger 4096 bit ones), the new(ish) Ed25519 SSH keys do not. The error I receive when trying is:

      [RepositoryResource] Failed to connect to repository (type: Bitbucket Cloud, location: https://bitbucket.org/xxxxx/yyyyyyy, time: 13.23 ms, errors: [Cannot decode connection params])
      
      ERROR [11-BranchDetectionBackgroundThread:pool-19-thread-2] [BranchDetectionServiceImpl] Repository error while detecting branches for plan PROJ-PLAN. Cannot decode connection params
      com.atlassian.bamboo.repository.RepositoryException: Cannot decode connection params
      	at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.beforeRepositoryAccess(NativeGitOperationHelper.java:249)
      	at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.lambda$getRemoteRefs$1(NativeGitOperationHelper.java:602)
      	at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper$$Lambda$563/619325710.call(Unknown Source)
      	at com.atlassian.bamboo.util.CallableResultCache$1.load(CallableResultCache.java:39)
      	at com.atlassian.bamboo.util.CallableResultCache$1.load(CallableResultCache.java:35)
      ...
      	at com.atlassian.bamboo.utils.collections.AlwaysInvalidatingCacheDecorator.get(AlwaysInvalidatingCacheDecorator.java:65)
      	at com.atlassian.bamboo.utils.collections.AlwaysInvalidatingCacheDecorator.getUnchecked(AlwaysInvalidatingCacheDecorator.java:126)
      	at com.atlassian.bamboo.util.CallableResultCache.call(CallableResultCache.java:142)
      	at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.getRemoteRefs(NativeGitOperationHelper.java:613)
      	at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.getOpenBranches(NativeGitOperationHelper.java:588)
      	at com.atlassian.bamboo.plugins.git.v2.GitBranchDetector.getOpenBranches(GitBranchDetector.java:46)
      	at com.atlassian.bamboo.plugins.bitbucket.v2.BitbucketCloudBranchDetector.getOpenBranches(BitbucketCloudBranchDetector.java:31)
      	at com.atlassian.bamboo.repository.RepositoryCachingFacadeImpl$1.getOpenBranchesCaller(RepositoryCachingFacadeImpl.java:65)
      	at com.atlassian.bamboo.repository.RepositoryCachingFacadeImpl$1.call(RepositoryCachingFacadeImpl.java:54)
      	at com.atlassian.bamboo.repository.RepositoryCachingFacadeImpl$1.call(RepositoryCachingFacadeImpl.java:49)
      	at com.atlassian.bamboo.util.CallableResultCache$1.load(CallableResultCache.java:39)
      	at com.atlassian.bamboo.util.CallableResultCache$1.load(CallableResultCache.java:35)
      ...
      	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
      	at com.atlassian.bamboo.utils.collections.AlwaysInvalidatingCacheDecorator.get(AlwaysInvalidatingCacheDecorator.java:65)
      	at com.atlassian.bamboo.utils.collections.AlwaysInvalidatingCacheDecorator.getUnchecked(AlwaysInvalidatingCacheDecorator.java:126)
      	at com.atlassian.bamboo.util.CallableResultCache.call(CallableResultCache.java:142)
      	at com.atlassian.bamboo.repository.RepositoryCachingFacadeImpl.getOpenBranches(RepositoryCachingFacadeImpl.java:72)
      	at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl.lambda$getOpenBranches$6(BranchDetectionServiceImpl.java:589)
      	at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl$$Lambda$526/338388242.call(Unknown Source)
      	at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:185)
      	at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl.getOpenBranches(BranchDetectionServiceImpl.java:588)
      	at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl.findBranchesCreatedBeforePlanCreation(BranchDetectionServiceImpl.java:431)
      	at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl.access$500(BranchDetectionServiceImpl.java:91)
      	at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl$BranchDetector$1.lambda$run$1(BranchDetectionServiceImpl.java:141)
      	at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl$BranchDetector$1$$Lambda$494/515717325.doInHibernate(Unknown Source)
      	at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:383)
      	at org.springframework.orm.hibernate5.HibernateTemplate.execute(HibernateTemplate.java:335)
      	at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl$BranchDetector$1.run(BranchDetectionServiceImpl.java:134)
      	at com.atlassian.bamboo.plugin.BambooPluginUtils$Runnable.call(BambooPluginUtils.java:106)
      	at com.atlassian.bamboo.plugin.BambooPluginUtils$Runnable.call(BambooPluginUtils.java:99)
      	at com.atlassian.bamboo.plugin.BambooPluginUtils.callUnsafeCode(BambooPluginUtils.java:53)
      	at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl$BranchDetector.run(BranchDetectionServiceImpl.java:187)
      	at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)
      	at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
      	at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
      	at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.io.IOException: unrecognised object: OPENSSH PRIVATE KEY
      	at org.bouncycastle.openssl.PEMParser.readObject(Unknown Source)
      	at com.atlassian.bamboo.plugins.ssh.ProxyConnectionDataBuilderImpl.withKeyFromReader(ProxyConnectionDataBuilderImpl.java:84)
      	at com.atlassian.bamboo.plugins.ssh.ProxyConnectionDataBuilderImpl.withKeyFromString(ProxyConnectionDataBuilderImpl.java:65)
      	at com.atlassian.bamboo.plugins.ssh.ProxyConnectionDataBuilderImpl.withKeyFromString(ProxyConnectionDataBuilderImpl.java:27)
      	at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.beforeRepositoryAccess(NativeGitOperationHelper.java:231)
      	... 54 more
      

      bitbucket.org has had support for Ed25519 keys since 2016 and they are increasingly in wider use generally. It would be good to see Bamboo add support for this key type too.

       

      Related to:

      Attachments

        Issue Links

          Activity

            People

              mgardias Marcin Gardias
              mknight@atlassian.com Michael Knight
              Votes:
              8 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: