Skip to content

Commit 66a9332

Browse files
author
awstools
committed
feat(client-payment-cryptography): Added further restrictions on logging of potentially sensitive inputs and outputs.
1 parent 62d34b8 commit 66a9332

File tree

2 files changed

+23
-14
lines changed

2 files changed

+23
-14
lines changed

clients/client-payment-cryptography/src/models/models_0.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -1893,6 +1893,14 @@ export const RootCertificatePublicKeyFilterSensitiveLog = (obj: RootCertificateP
18931893
...(obj.PublicKeyCertificate && { PublicKeyCertificate: SENSITIVE_STRING }),
18941894
});
18951895

1896+
/**
1897+
* @internal
1898+
*/
1899+
export const ImportTr31KeyBlockFilterSensitiveLog = (obj: ImportTr31KeyBlock): any => ({
1900+
...obj,
1901+
...(obj.WrappedKeyBlock && { WrappedKeyBlock: SENSITIVE_STRING }),
1902+
});
1903+
18961904
/**
18971905
* @internal
18981906
*/
@@ -1919,7 +1927,7 @@ export const ImportKeyMaterialFilterSensitiveLog = (obj: ImportKeyMaterial): any
19191927
return {
19201928
TrustedCertificatePublicKey: TrustedCertificatePublicKeyFilterSensitiveLog(obj.TrustedCertificatePublicKey),
19211929
};
1922-
if (obj.Tr31KeyBlock !== undefined) return { Tr31KeyBlock: obj.Tr31KeyBlock };
1930+
if (obj.Tr31KeyBlock !== undefined) return { Tr31KeyBlock: ImportTr31KeyBlockFilterSensitiveLog(obj.Tr31KeyBlock) };
19231931
if (obj.Tr34KeyBlock !== undefined) return { Tr34KeyBlock: ImportTr34KeyBlockFilterSensitiveLog(obj.Tr34KeyBlock) };
19241932
if (obj.KeyCryptogram !== undefined) return { KeyCryptogram: obj.KeyCryptogram };
19251933
if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" };

codegen/sdk-codegen/aws-models/payment-cryptography.json

+14-13
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,16 @@
432432
"smithy.api#output": {}
433433
}
434434
},
435+
"com.amazonaws.paymentcryptography#EvenHexLengthBetween16And32": {
436+
"type": "string",
437+
"traits": {
438+
"smithy.api#length": {
439+
"min": 16,
440+
"max": 32
441+
},
442+
"smithy.api#pattern": "^(?:[0-9a-fA-F][0-9a-fA-F])+$"
443+
}
444+
},
435445
"com.amazonaws.paymentcryptography#ExportAttributes": {
436446
"type": "structure",
437447
"members": {
@@ -658,7 +668,7 @@
658668
}
659669
},
660670
"RandomNonce": {
661-
"target": "com.amazonaws.paymentcryptography#HexLength16",
671+
"target": "com.amazonaws.paymentcryptography#EvenHexLengthBetween16And32",
662672
"traits": {
663673
"smithy.api#documentation": "<p>A random number value that is unique to the TR-34 key block generated using 2 pass. The operation will fail, if a random nonce value is not provided for a TR-34 key block generated using 2 pass.</p>"
664674
}
@@ -1085,16 +1095,6 @@
10851095
"smithy.api#output": {}
10861096
}
10871097
},
1088-
"com.amazonaws.paymentcryptography#HexLength16": {
1089-
"type": "string",
1090-
"traits": {
1091-
"smithy.api#length": {
1092-
"min": 16,
1093-
"max": 16
1094-
},
1095-
"smithy.api#pattern": "^[0-9A-F]+$"
1096-
}
1097-
},
10981098
"com.amazonaws.paymentcryptography#HexLength20Or24": {
10991099
"type": "string",
11001100
"traits": {
@@ -1338,7 +1338,7 @@
13381338
}
13391339
},
13401340
"RandomNonce": {
1341-
"target": "com.amazonaws.paymentcryptography#HexLength16",
1341+
"target": "com.amazonaws.paymentcryptography#EvenHexLengthBetween16And32",
13421342
"traits": {
13431343
"smithy.api#documentation": "<p>A random number value that is unique to the TR-34 key block generated using 2 pass. The operation will fail, if a random nonce value is not provided for a TR-34 key block generated using 2 pass.</p>"
13441344
}
@@ -3492,7 +3492,8 @@
34923492
"min": 56,
34933493
"max": 9984
34943494
},
3495-
"smithy.api#pattern": "^[0-9A-Z]+$"
3495+
"smithy.api#pattern": "^[0-9A-Z]+$",
3496+
"smithy.api#sensitive": {}
34963497
}
34973498
},
34983499
"com.amazonaws.paymentcryptography#Tr34KeyBlockFormat": {

0 commit comments

Comments
 (0)