Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: additional x-amz-server-side-encryption parameters for S3 object storage #1783

Open
peteher opened this issue Oct 29, 2024 · 0 comments

Comments

@peteher
Copy link

peteher commented Oct 29, 2024

When using AWS S3 as artifact/plan file(object) store with aws:kms, following best practices such as here it may be there are restrictive bucket policies requiring client (Digger) to provide x-amz-server-side-encryption* headers in the PutObject request - which if not existing then an explicit deny is applied to the request and so plan file upload fails.

For eg:

  statement {
    sid    = "DenyNoEncryptionHeader"
    effect = "Deny"

    resources = [
      "${aws_s3_bucket.plan.arn}/*",
    ]

    actions = [
      "s3:PutObject",
    ]

    principals {
      type        = "*"
      identifiers = ["*"]
    }

    condition {
      test     = "StringNotEquals"
      variable = "s3:x-amz-server-side-encryption"

      values = [
        "aws:kms",
      ]
    }
  }

Suggestion is to include these headers in the request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant