@@ -979,7 +979,9 @@ describe('Test Branch keystore', () => {
979979 const material = await keyStore . getActiveBranchKey ( customId )
980980 expect ( material . branchKey ( ) . length ) . to . equal ( 32 )
981981
982- // Custom encryption context must be preserved
982+ // Custom encryption context must be preserved.
983+ // NOTE: Unlike the Dafny implementation, the JS SDK currently returns
984+ // keys with the `aws-crypto-ec:` prefix.
983985 expect ( material . encryptionContext ) . to . have . property (
984986 'aws-crypto-ec:department' ,
985987 'test'
@@ -1006,6 +1008,8 @@ describe('Test Branch keystore', () => {
10061008 } )
10071009
10081010 // 2. Retrieve the active key and verify EC
1011+ // NOTE: Unlike the Dafny implementation, the JS SDK currently returns
1012+ // keys with the `aws-crypto-ec:` prefix.
10091013 const v1 = await keyStore . getActiveBranchKey ( branchKeyIdentifier )
10101014 const v1Version = v1 . branchKeyVersion . toString ( 'utf8' )
10111015 expect ( v1 . branchKey ( ) . length ) . to . equal ( 32 )
@@ -1026,6 +1030,8 @@ describe('Test Branch keystore', () => {
10261030 const v2Version = v2 . branchKeyVersion . toString ( 'utf8' )
10271031 expect ( v2 . branchKey ( ) . length ) . to . equal ( 32 )
10281032 expect ( v2Version ) . to . not . equal ( v1Version )
1033+ // NOTE: Unlike the Dafny implementation, the JS SDK currently returns
1034+ // keys with the `aws-crypto-ec:` prefix.
10291035 expect ( v2 . encryptionContext ) . to . have . property (
10301036 'aws-crypto-ec:department' ,
10311037 'engineering'
@@ -1042,10 +1048,16 @@ describe('Test Branch keystore', () => {
10421048 )
10431049 expect ( oldMaterial . branchKey ( ) . length ) . to . equal ( 32 )
10441050 expect ( oldMaterial . branchKeyIdentifier ) . to . equal ( branchKeyIdentifier )
1051+ // NOTE: Unlike the Dafny implementation, the JS SDK currently returns
1052+ // keys with the `aws-crypto-ec:` prefix.
10451053 expect ( oldMaterial . encryptionContext ) . to . have . property (
10461054 'aws-crypto-ec:department' ,
10471055 'engineering'
10481056 )
1057+ expect ( oldMaterial . encryptionContext ) . to . have . property (
1058+ 'aws-crypto-ec:project' ,
1059+ 'lifecycle'
1060+ )
10491061 } )
10501062 } )
10511063} )
0 commit comments