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

Can't decrypt noncurrent versions of files using EncryptionV2 with kms(short issue description) #2866

Closed
alextwoods opened this issue Jun 12, 2023 · 1 comment · Fixed by #2867
Assignees
Labels
bug This issue is a bug.

Comments

@alextwoods
Copy link
Contributor

Describe the bug

see: #2865

When attempting to decrypt a noncurrent version of an object using the S3 Encryption client, it fails with a OpenSSL::Cipher::CipherError.

Expected Behavior

Decryption of non-current versions should succeed.

Current Behavior

fails with a OpenSSL::Cipher::CipherError

Reproduction Steps

client = Aws::S3::EncryptionV2::Client.new(
  kms_key_id: ENV.fetch('KMS_KEY_ID'),
  key_wrap_schema: :kms_context,
  content_encryption_schema: :aes_gcm_no_padding,
  security_profile: :v2
)

client.put_object(
  bucket: ENV.fetch('S3_BUCKET_NAME'),
  key: 'foo',
  body: 'bar'
)

Decrypt (must be a non-current version_id)

obj = client.get_object(
  bucket: ENV.fetch('S3_BUCKET_NAME'),
  key: 'foo',
  version_id: version_id
)

Possible Solution

No response

Additional Information/Context

No response

Gem name ('aws-sdk', 'aws-sdk-resources' or service gems like 'aws-sdk-s3') and its version

aws-sdk-s3 (current)

Environment details (Version of Ruby, OS environment)

Ruby 2.7

@alextwoods alextwoods added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. and removed needs-triage This issue or PR still needs to be triaged. labels Jun 12, 2023
@alextwoods alextwoods self-assigned this Jun 12, 2023
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

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

Successfully merging a pull request may close this issue.

1 participant