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

Enabling Server Side Encryption in S3 Publisher plugin causes uploads to fail

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • s3-plugin
    • Jenkins 2.516.3
      S3 Plugin: 515.vc2f8153c5dc6 or 508.vc5478ef36921

      When a Jenkins job using this plugin has the "Server Side Encryption" flag enabled, it causes uploads to fail, emitting this error:

       

      Caused by: hudson.remoting.ProxyException: software.amazon.awssdk.services.s3.model.S3Exception: Requests specifying Server Side Encryption with Customer provided keys must provide an appropriate secret key.

       

      I believe the cause of this error is in Line 60 of src/main/java/hudson/plugins/s3/callable/S3BaseUploadCallable.java:

       

      metadata.sseCustomerAlgorithm("AES256");

      I think the fix might be to specify server-side encryption rather than a Customer-Managed KMS key as the code does now (which I believe is how this plugin worked up until the move to AWS SDK v2 after 498.v4c32ea_de55c2):

       

      metadata.serverSideEncryption("AES256");

            jimilian Alexander A
            mwhite_hv Mat
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: