aws / aws/aws-encryption-sdk-java
KmsMasterKeyProvider regionalClientSupplier_ does not appear to be getting set correctly by default
- Dominant language
- Java
- Stars
- 240
- Forks
- 125
- PR merge metrics
- No merged PRs in 30d
Description
When a `KmsMasterKeyProvider` is constructed using the default builder[1] and is then used to attempt to decrypt a ciphertext message from another region, the decrypt call fails with this error[2].
It appears that something is not connecting with the default supplier in `build()`[3].
[1] `KmsMasterKeyProvider.builder().build()`
[2] https://github.com/aws/aws-encryption-sdk-java/blob/6cb1c4256e26f26ecfd557608b80c9ed2bba4141/src/main/java/com/amazonaws/encryptionsdk/kms/KmsMasterKeyProvider.java#L526
[3] https://github.com/aws/aws-encryption-sdk-java/blob/6cb1c4256e26f26ecfd557608b80c9ed2bba4141/src/main/java/com/amazonaws/encryptionsdk/kms/KmsMasterKeyProvider.java#L245-L259
Contributor guide
Research direction
Start in src/main/java/com/amazonaws/encryptionsdk/kms/KmsMasterKeyProvider.java, reading the default builder() path at lines 245-259 and the decrypt failure location around line 526. Reproduce construction with KmsMasterKeyProvider.builder().build() and decrypt a ciphertext from another region; done means the default regionalClientSupplier is connected correctly and cross-region decryption no longer fails.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- cryptography, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100