aws / aws/aws-encryption-sdk-python
Preferential order of decryption
- 主要语言
- Python
- 星标
- 255
- 派生
- 92
- 平均合并
- 2 天 17 小时
- 30 天内合并 PR
- 2
描述
Hi amazing crypto heroes of AWS!
We are using the library to encrypt our sensitive settings in our project (passwords, API keys etc). We encrypt with two keys, one is a "development-key" and the other is the "production-key". When we decrypt in production, we would like the SDK to not use the development key, however it tries both and always fails the decrypt on the development key. I know we can set up a KmsKeyProvider to only have the ARN of the production key, but that would make our code a lot messier (having to pass it from a dynamic environment variable etc).
Is there a way to set the order of which keys will be used to decrypt when encrypting? Such to say when we encrypt we will use keys "production-key" and then "development-key". During decryption the SDK will try the first and only if it fails will go onto the second. The failure of trying to use the development key in production is taking IO and impacting our Lambda cold start times.
I feel like this feature should already be supported and maybe I am just not able to figure it out. I see that the SDK gives preferences to keys that are in the same region, but both keys are in the same region in my case 🤕
Any insight or help would be greatly appreciated!
Stay awesome and stay safe,
Mo Kamioner
贡献指南
调研方向
首先检查 KmsKeyProvider 以及 SDK 现有的密钥选择和解密行为,包括其对相同区域的偏好。定义显式的生产密钥优先顺序应如何与加密和解密交互,然后使用报告的双密钥场景及其对 Lambda 冷启动的影响来验证该行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- aws, python
- 领域
- cloud, cryptography, security
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 28/100