aws / aws/aws-dynamodb-encryption-java

DirectKMSMaterialProvider API Behavior/Design improvements

オープン
#151 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
141
フォーク
74
PR マージ指標
30日以内にマージされた PR はありません

説明

### Problem:

The correct behavior of the DirectKMSMaterialProvider is to use the configured CMK on encrypt, and to let KMS determine the correct CMK to use on Decrypt (this is a common KMS pattern, as KMS ciphertext stores the CMK used as metadata).

However, this behavior for DirectKMSMaterialProvider is potentially confusing, as customers may expect that the CMK configured on the CMP is also "used" to decrypt, and may be surprised if decryption succeeds even though the configured CMK was not the CMK used to encrypt the data.

### Solution:

Since the original DirectKMSMaterialProvider was designed, KMS has introduced a `keyId` param on Decrypt that ensures the call fails if a different key was used to encrypt the ciphertext.

We should consider either updating or replacing the DirectKMSMaterialProvider to allow enforcing a particular key on decrypt, similar to the Strict vs. Discovery modes expressed by the AWS Encryption SDK's Keyrings and Master Key Providers.

Our new design should:
- maintain API parity between the DDBEC for Python and Java.
- be as simple as possible to reason about.
- minimize possible "modes" for behavior, and ensure that any "mode" needs to be explicitly chosen by customers on config.
- ensure that any default configuration/behavior chooses the safest/most conservative option for customers.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start by reviewing the DirectKMSMaterialProvider behavior described in this issue and the KMS Decrypt keyId parameter. Compare the desired API with the AWS Encryption SDK's Strict and Discovery modes, while checking parity with the DDBEC for Python. Done means a settled, explicit API design with conservative defaults and documented encrypt/decrypt behavior.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
aws, java
領域
cloud, cryptography, security
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。