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

[S3 SSEC] S3 multitenancy: SSEC key derivation #5279

Open
Arsnael opened this issue Sep 18, 2024 · 7 comments
Open

[S3 SSEC] S3 multitenancy: SSEC key derivation #5279

Arsnael opened this issue Sep 18, 2024 · 7 comments
Assignees

Comments

@Arsnael
Copy link
Member

Arsnael commented Sep 18, 2024

Allows using an encryption key per blob (derived from the blobId) hence making each encryption key unique: if I break one key, I decrypt only one object, not all.

Configuration:

encryption.s3.sse.c.key.derivation.enabled=true

We could start by: domain + blobId enough to derivate the key

DoD: Integration tests + documentation

@quantranhong1999
Copy link
Member

So should we do #5280 first to determine the best way to derive the encryption key?

@Arsnael
Copy link
Member Author

Arsnael commented Sep 20, 2024

Not sure. we need a base implem I would say, and then you just change the salt in the code for key derivation and test easily. But that's my point of view

@chibenwa
Copy link
Member

Baseline implementation could get merged and forgotten and causemigration headache if suboptimal.

IMO #5280 shall be conducted first, if not as part of the grooming...

@chibenwa
Copy link
Member

Discussed with Xavier: PBKDF2WithHmacSHA256 with domain used as a salt is great, we can easily cache the resulting keys so that they are computed once.

This way we do not compromise on safety and performance.

@Arsnael
Copy link
Member Author

Arsnael commented Sep 26, 2024

So in case of algorthm broken on one object, logically you could decrypt all objects of a same domain? It's slightly better than one salt for all domains but is it enough for safety? Implem with one domain for example then key derivation does not matter.

Or should we allow different configurations with proper doc?

For example:

encryption.s3.sse.c.key.derivation.salt=domain|blobid

use domain as salt if you want to keep good perf with a minimum of safety, use blobid if you want to be an absolute maniac on safety att he cost of perf? Up to the admin. Of course defaults to domain

@chibenwa
Copy link
Member

chibenwa commented Sep 26, 2024

It's slightly better than one salt for all domains but is it enough for safety?

Yes, SSE-C already should derive keys on a per object basis and if not enough this is a choice we could re-challenge later: I'm happy with it and so do Xavier.

Using blobId as a salt BTW do not ensure cross-domain isolation constraints. (to do so it should be domain + blobId as a salt)

@Arsnael Arsnael removed the grooming label Oct 30, 2024
@vttranlina vttranlina self-assigned this Nov 7, 2024
@vttranlina
Copy link
Member

draft pr apache#2493

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

No branches or pull requests

4 participants