mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
fix(kms): normalize alias targetKeyId to plain key ID on createAlias (#1648)
Closes #1647
This commit is contained in:
1 parent
ed81f2b124
commit
d8c09754d5
2 files changed
+12
-3
No files matched your search
@@ -524,6 +524,15 @@ class KmsServiceTest {
|
||||
assertEquals(key.getKeyId(), resolved.getKeyId());
|
||||
}
|
||||
|
||||
@Test
|
||||
void resolveKeyByAliasCreatedWithArn() {
|
||||
KmsKey key = kmsService.createKey(null, REGION);
|
||||
kmsService.createAlias("alias/by-arn", key.getArn(), REGION);
|
||||
|
||||
KmsKey resolved = kmsService.describeKey("alias/by-arn", REGION);
|
||||
assertEquals(key.getKeyId(), resolved.getKeyId());
|
||||
}
|
||||
|
||||
@Test
|
||||
void encryptAndDecryptWithId() {
|
||||
KmsKey key = kmsService.createKey(null, REGION);
|
||||
|
||||
Reference in new issue
Block a user