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

Incorrect Auth Region For Custom Endpoint

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • Jenkins 2.479.1
      Artifact Manager on S3 888.v342fb_0718408
      Amazon Web Services SDK :: All 1.12.772-474.v7f79a_2046a_fb_

      I created a VPC endpoint for S3 in my AWS account and want Jenkins to use it.

      Buckets in this form are accessed via a hostname of the form BUCKETNAME.bucket.vpce-0123456789abcdef0-tiydc1f7.s3.us-east-1.vpce.amazonaws.com

      Configuring bucket.vpce-0123456789abcdef0-tiydc1f7.s3.us-east-1.vpce.amazonaws.com as the custom endpoint as well as setting the Custom Signing Region setting to "us-east-1" still results in the SDK using the "vpce" region for signing credentials; resulting in the following error after clicking "Validate S3 Bucket Configuration":
       
      org.jclouds.aws.AWSResponseException: request GET  https://BUCKETNAME.bucket.vpce-0123456789abcdef0-tiydc1f7.s3.us-east-1.vpce.amazonaws.com/?delimiter=/&prefix=BUCKETPREFIX/ HTTP/1.1 failed with code 400, error: AWSError{requestId='DDXYEPSG8RB7HTJG', requestToken='XX, code='AuthorizationHeaderMalformed', message='The authorization header is malformed; the region 'vpce' is wrong; expecting 'us-east-1'', context='

      {Region=us-east-1, HostId=XX'}

      at PluginClassLoader for artifact-manager-s3//org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent.handleError(ParseAWSErrorFromXmlContent.java:76)
      at PluginClassLoader for artifact-manager-s3//org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:65)
      at PluginClassLoader for artifact-manager-s3//org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:138)
      at PluginClassLoader for artifact-manager-s3//org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:107)
      at PluginClassLoader for artifact-manager-s3//org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:91)
      at PluginClassLoader for artifact-manager-s3//org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:74)
      at PluginClassLoader for artifact-manager-s3//org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:45)
      at PluginClassLoader for artifact-manager-s3//org.jclouds.rest.internal.DelegatesToInvocationFunction.handle(DelegatesToInvocationFunction.java:156)
      at PluginClassLoader for artifact-manager-s3//org.jclouds.rest.internal.DelegatesToInvocationFunction.invoke(DelegatesToInvocationFunction.java:123)
      at PluginClassLoader for artifact-manager-s3/jdk.proxy94/jdk.proxy94.$Proxy219.listBucket(Unknown Source)
      at PluginClassLoader for artifact-manager-s3//org.jclouds.s3.blobstore.S3BlobStore.list(S3BlobStore.java:177)
      at PluginClassLoader for artifact-manager-s3//org.jclouds.blobstore.BlobStores$1$1.computeNext(BlobStores.java:86)
      at PluginClassLoader for artifact-manager-s3//org.jclouds.blobstore.BlobStores$1$1.computeNext(BlobStores.java:73)
      at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145)
      at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140)
      at java.base/java.util.Iterator.forEachRemaining(Iterator.java:132)
      at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575)
      at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
      at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616)
      at PluginClassLoader for artifact-manager-s3//io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.list(JCloudsVirtualFile.java:225)
       
      I created a bug report for the AWS SDK, but they stated they will not fix it because the 1.x SDK is end of life: https://github.com/aws/aws-sdk-java/issues/3069

            Unassigned Unassigned
            mgrochowalski Matt Grochowalski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: