feat(kms): add GenerateRandom action (#1036)

- Add GenerateRandom action routing and handler in KmsJsonHandler
- Add SecureRandom field, constructor overload, and generateRandom() method with bounds validation
- Reject unsupported Recipient and CustomKeyStoreId fields
- Add integration tests for happy path, boundaries, validation, and unsupported fields
- Add SDK compatibility tests for Java, Python, and Node
This commit is contained in:
nblomquist authored and GitHub committed 2026-06-03 17:42:40 -05:00
1 parent c8b0048bac
commit 30a598f080
6 files changed
+234 -2

No files matched your search

@@ -308,4 +308,13 @@ class KmsTest {
assertThat(verifyResponse.signatureValid()).isTrue();
}
@Test
@Order(19)
void generateRandom() {
var response = kms.generateRandom(b -> b.numberOfBytes(32));
assertThat(response.plaintext()).isNotNull();
assertThat(response.plaintext().asByteArray()).hasSize(32);
}
}