-
Notifications
You must be signed in to change notification settings - Fork 13
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
InstructionFile vs MetaData #355
Comments
Hello Jan, Thanks for reaching out. It is indeed possible to "re-envelope" an S3EC encrypted object that uses object metadata by calling This should suffice to provide the same functionality as re-enveloping through instruction files, with roughly the same cost profile as Get/Put on the instruction file. HEAD/COPY requests are cheaper than GET/PUT in some cases, depending on storage tier and network topology. However, this approach does have slightly different cost properties when the bucket containing the object(s) has versioning enabled; updating object metadata will create a new version, which is billed as another object. If the object is larger than the instruction file, this would cause your storage costs to increase unless you delete the new versions. Though, if the objects are very small, i.e. smaller than the instruction file, then you would save on costs using this scheme. That said, if this nuance in billing is a blocker for the customer adopting the HEAD/COPY approach, we can add the ability to store crypto parameters in an instruction file on encrypt ( |
Example:
output:
|
@justplaz Thank you for this example and the explanation. I'm a little bit surprised about the complexity of the example. Compared to the simple putInstructionFile request, rotating the wrapping key seems to be much more complicated with the new client and it seems to be a more manual process involving kms and so on. But to be fair I did not have a look into the V2 API on key rotation using metadata. |
I see, indeed there isn't as simple of a solution in the V3 client. Your usecase is valid and we will add this feature in V3. This should be ready well before the V2 client (through the AWS SDK v1) is fully deprecated at the end of 2025. |
@justplaz I'm really happy to read that! |
We are blocked on upgrading from v1 to v2 because of the lack of instructionFile support when storing new files. Is there a timeline for the addition of this feature? |
Hey @atennapel, To clarify, do you need the key rotation functionality through an equivalent to |
Problem:
In the context of client-side encryption using a customer-provided encryption key (Java, AES, SSE-C), the AWS SDK v1 offers the option to use instruction files to store the encryption metadata. This supports a cost-efficient way of rotation the client-side key (See AWS blog).
Now with the AWS SDK v1 being in maintenance mode, it is suggested to migrate to this library. According to the documentation, the V3 library supports decryption of encrypted files that use instruction files. However, it is mentioned in the 'legacy' section and it seems as if it's not possible to encrypt new files using the instruction files.
Moving forward, what is the recommended way to implement client-side encryption with this library? Are instruction files not recommended anymore? Relying on object metadata instead of instruction files makes it more expensive to rotate the client-side key because the metadata is immutable and a copy of the file is required.
Solution:
Clarification on the usage of instruction files. Are they future-proof? If not, is there a different (cheap) way to rotate client-side keys?
The text was updated successfully, but these errors were encountered: