Skip to content

add all-examples directory, Ruby V2 example#64

Merged
kessplas merged 10 commits into
fireegg-test-serversfrom
kessplas/example-projs
Nov 10, 2025
Merged

add all-examples directory, Ruby V2 example#64
kessplas merged 10 commits into
fireegg-test-serversfrom
kessplas/example-projs

Conversation

@kessplas

@kessplas kessplas commented Nov 6, 2025

Copy link
Copy Markdown
Contributor

Issue #, if available:

n/a

Description of changes:

Add example projects for manual testing of each library major version. Starts with just Ruby V2.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@kessplas kessplas marked this pull request as ready for review November 6, 2025 22:39
Comment thread all-examples/README.md Outdated
Each language has subdirectories for different major versions of the S3 Encryption Client:

- `cpp/` - C++ examples
- `v2/` - S3EC C++ v2 example

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we specify that the older versions are "transition" and not current?

Comment thread all-examples/ruby/v2/main.rb Outdated
Comment on lines +118 to +124
# Clean up the test object using regular S3 client
# s3_client.delete_object({
# bucket: bucket_name,
# key: object_key
# })

puts "✅ Test object deleted from S3"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which one should we do

Comment thread all-examples/ruby/v2/main.rb Outdated
Comment on lines +129 to +138
puts "📝 This example demonstrates the Amazon S3 Encryption Client v2 for Ruby"
puts "performing a complete roundtrip of encrypting data during upload and"
puts "decrypting it during download, using AWS KMS for key management."
puts
puts "Key features demonstrated:"
puts "• Client-side encryption using AES-GCM"
puts "• KMS integration for key wrapping"
puts "• Encryption context for additional security"
puts "• Automatic key rotation and management"
puts "• Secure roundtrip data integrity verification"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this?

Comment thread all-examples/ruby/v2/main.rb Outdated
puts "✅ Successfully uploaded encrypted object to S3!"
puts " Bucket: #{bucket_name}"
puts " Key: #{object_key}"
puts " ETag: #{put_response.etag}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum I don't know what this is or why it's important, could you add a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deleted

Comment thread all-examples/ruby/v2/main.rb Outdated
Comment on lines +54 to +56
puts " Key Wrap Schema: kms_context"
puts " Content Encryption Schema: aes_gcm_no_padding"
puts " Security Profile: v2"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if should hardcode this print. Someone can update config and prints would be wrong

Comment thread all-examples/ruby/v2/main.rb Outdated

puts "--- Step 2: Encrypt and Upload Object to S3 ---"

# Optional: Add encryption context for additional security

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we just want to write "additional security"? I think better phrasings exist

lucasmcdonald3
lucasmcdonald3 previously approved these changes Nov 6, 2025
Comment thread all-examples/ruby/v2/main.rb Outdated
puts "--- Encrypt and Upload Object to S3 ---"

# Optional: Add encryption context for additional security
# Add encryption context for additional security

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still not a fan of the phrase "additional security" it leaves a bad taste in my mouth

kessplas and others added 2 commits November 7, 2025 15:40
Add v3 Ruby example

Co-authored-by: Kess Plasmeier <76071473+kessplas@users.noreply.github.com>
@kessplas kessplas merged commit fec0319 into fireegg-test-servers Nov 10, 2025
3 checks passed
@kessplas kessplas deleted the kessplas/example-projs branch November 10, 2025 21:48
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

Successfully merging this pull request may close these issues.

3 participants