aws / aws/aws-dynamodb-encryption-java

NPE if reading record without a amzn-ddb-map-desc

Open
#123 6 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Java
Stars
141
Forks
74
PR merge metrics
No merged PRs in 30d

Description

This line throws a null pointer exception if you attempt to decrypt a record where the amzn-ddb-map-desc attribute has been manually removed: https://github.com/aws/aws-dynamodb-encryption-java/blob/master/sdk1/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/encryption/providers/DirectKmsMaterialProvider.java#L126

We should check this earlier and throw a more useful exception.

Contributor guide

Open the contributing guide

Research direction

Start in sdk1/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/encryption/providers/DirectKmsMaterialProvider.java at line 126 and reproduce decryption after manually removing amzn-ddb-map-desc. Trace where the missing attribute is first used. Done means the missing attribute produces a useful exception instead of a null pointer exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.