aws / aws/aws-dynamodb-encryption-java

DirectKMSMaterialProvider API Behavior/Design improvements

Abierto
#151 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Java
Estrellas
141
Forks
74
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

### 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.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza revisando el comportamiento de DirectKMSMaterialProvider descrito en este issue y el parámetro keyId de KMS Decrypt. Compara la API deseada con los modos Strict y Discovery del AWS Encryption SDK, comprobando también la paridad con el DDBEC para Python. Se considerará terminado cuando exista un diseño de API definido y explícito, con valores predeterminados conservadores y un comportamiento de cifrado/descifrado documentado.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
aws, java
Área
cloud, cryptography, security
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.