powertools-lambda-python icon indicating copy to clipboard operation
powertools-lambda-python copied to clipboard

Feature request: Add support to bring custom encryption provider in DataMasking utility

Open leandrodamascena opened this issue 2 years ago • 3 comments

Use case

Currently, the DataMasking utility only supports using AWS Encryption SDK as the encryption provider. Some customers want an alternative to bringing their providers and leveraging existing mechanisms to encrypt/decrypt their data.

Solution/User Experience

Add support to bring external encrypt/decrypt providers.

Alternative solutions

No response

Acknowledgment

leandrodamascena avatar Dec 08 '23 14:12 leandrodamascena

Hello @heitorlessa and @seshubaws! The AWS Encryption SDK allows you to bring your own RSA/AES key to encrypt/decrypt data with them. We don't have to worry about creating our own implementation of a provider and dealing with things like caching, wrapping the key into a data key, and things like that. Another idea was to create a base class for a provider and allow clients to bring in their providers, but it's quite difficult for most clients. I don't see a customer writing a provider on top of Powertools with complex logic; most of those customers who could do this already have this implementation in place, I think.

We can create an implementation on top of RawMasterKeyProvider with a good developer experience. I have a code working in my local environment and we should schedule a meeting for the next week and we can go through it and discuss ideas.

Thanks

leandrodamascena avatar Dec 14 '23 17:12 leandrodamascena

For now we're keeping the Encryption SDK only because we want to focus on adding this feature to other runtimes & making sure we support all features like encrypting specific fields. We're closing this issue for the time being.

anafalcao avatar Jan 23 '25 12:01 anafalcao

⚠️COMMENT VISIBILITY WARNING⚠️

This issue is now closed. Please be mindful that future comments 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.

github-actions[bot] avatar Jan 23 '25 12:01 github-actions[bot]