diff --git a/clients/client-payment-cryptography-data/src/commands/EncryptDataCommand.ts b/clients/client-payment-cryptography-data/src/commands/EncryptDataCommand.ts index acbcf56dee37..fb246f18340a 100644 --- a/clients/client-payment-cryptography-data/src/commands/EncryptDataCommand.ts +++ b/clients/client-payment-cryptography-data/src/commands/EncryptDataCommand.ts @@ -107,7 +107,7 @@ export interface EncryptDataCommandOutput extends EncryptDataOutput, __MetadataB * const response = await client.send(command); * // { // EncryptDataOutput * // KeyArn: "STRING_VALUE", // required - * // KeyCheckValue: "STRING_VALUE", // required + * // KeyCheckValue: "STRING_VALUE", * // CipherText: "STRING_VALUE", // required * // }; * diff --git a/clients/client-payment-cryptography-data/src/models/models_0.ts b/clients/client-payment-cryptography-data/src/models/models_0.ts index 822c907b7ccc..2c930402ee05 100644 --- a/clients/client-payment-cryptography-data/src/models/models_0.ts +++ b/clients/client-payment-cryptography-data/src/models/models_0.ts @@ -1105,7 +1105,7 @@ export interface EncryptDataOutput { * @public *

The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography calculates the KCV by using standard algorithms, typically by encrypting 8 or 16 bytes or "00" or "01" and then truncating the result to the first 3 bytes, or 6 hex digits, of the resulting cryptogram.

*/ - KeyCheckValue: string | undefined; + KeyCheckValue?: string; /** * @public @@ -2931,6 +2931,7 @@ export const MacAttributesFilterSensitiveLog = (obj: MacAttributes): any => { */ export const GenerateMacInputFilterSensitiveLog = (obj: GenerateMacInput): any => ({ ...obj, + ...(obj.MessageData && { MessageData: SENSITIVE_STRING }), ...(obj.GenerationAttributes && { GenerationAttributes: MacAttributesFilterSensitiveLog(obj.GenerationAttributes) }), }); @@ -3007,6 +3008,7 @@ export const TranslatePinDataInputFilterSensitiveLog = (obj: TranslatePinDataInp ...(obj.OutgoingTranslationAttributes && { OutgoingTranslationAttributes: TranslationIsoFormatsFilterSensitiveLog(obj.OutgoingTranslationAttributes), }), + ...(obj.EncryptedPinBlock && { EncryptedPinBlock: SENSITIVE_STRING }), }); /** @@ -3086,6 +3088,8 @@ export const VerifyCardValidationDataInputFilterSensitiveLog = (obj: VerifyCardV */ export const VerifyMacInputFilterSensitiveLog = (obj: VerifyMacInput): any => ({ ...obj, + ...(obj.MessageData && { MessageData: SENSITIVE_STRING }), + ...(obj.Mac && { Mac: SENSITIVE_STRING }), ...(obj.VerificationAttributes && { VerificationAttributes: MacAttributesFilterSensitiveLog(obj.VerificationAttributes), }), diff --git a/codegen/sdk-codegen/aws-models/payment-cryptography-data.json b/codegen/sdk-codegen/aws-models/payment-cryptography-data.json index 0822486949db..dc1be5f0fc77 100644 --- a/codegen/sdk-codegen/aws-models/payment-cryptography-data.json +++ b/codegen/sdk-codegen/aws-models/payment-cryptography-data.json @@ -707,8 +707,7 @@ "KeyCheckValue": { "target": "com.amazonaws.paymentcryptographydata#KeyCheckValue", "traits": { - "smithy.api#documentation": "

The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography calculates the KCV by using standard algorithms, typically by encrypting 8 or 16 bytes or \"00\" or \"01\" and then truncating the result to the first 3 bytes, or 6 hex digits, of the resulting cryptogram.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography calculates the KCV by using standard algorithms, typically by encrypting 8 or 16 bytes or \"00\" or \"01\" and then truncating the result to the first 3 bytes, or 6 hex digits, of the resulting cryptogram.

" } }, "CipherText": { @@ -925,7 +924,7 @@ } }, "MessageData": { - "target": "com.amazonaws.paymentcryptographydata#HexLengthBetween2And4096", + "target": "com.amazonaws.paymentcryptographydata#HexEvenLengthBetween2And4096", "traits": { "smithy.api#documentation": "

The data for which a MAC is under generation.

", "smithy.api#required": {} @@ -1112,6 +1111,17 @@ "smithy.api#output": {} } }, + "com.amazonaws.paymentcryptographydata#HexEvenLengthBetween16And32": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 16, + "max": 32 + }, + "smithy.api#pattern": "^(?:[0-9a-fA-F][0-9a-fA-F])+$", + "smithy.api#sensitive": {} + } + }, "com.amazonaws.paymentcryptographydata#HexEvenLengthBetween16And4064": { "type": "string", "traits": { @@ -1134,6 +1144,28 @@ "smithy.api#sensitive": {} } }, + "com.amazonaws.paymentcryptographydata#HexEvenLengthBetween2And4096": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 2, + "max": 4096 + }, + "smithy.api#pattern": "^(?:[0-9a-fA-F][0-9a-fA-F])+$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.paymentcryptographydata#HexEvenLengthBetween4And128": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 4, + "max": 128 + }, + "smithy.api#pattern": "^(?:[0-9a-fA-F][0-9a-fA-F])+$", + "smithy.api#sensitive": {} + } + }, "com.amazonaws.paymentcryptographydata#HexLength16Or32": { "type": "string", "traits": { @@ -1205,16 +1237,6 @@ "smithy.api#pattern": "^[0-9a-fA-F]+$" } }, - "com.amazonaws.paymentcryptographydata#HexLengthBetween2And4096": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 2, - "max": 4096 - }, - "smithy.api#pattern": "^[0-9a-fA-F]+$" - } - }, "com.amazonaws.paymentcryptographydata#HexLengthBetween2And8": { "type": "string", "traits": { @@ -2188,54 +2210,54 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://dataplane.payment-cryptography-fips.us-gov-east-1.api.aws" + "url": "https://dataplane.payment-cryptography-fips.us-east-1.api.aws" } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1", "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://dataplane.payment-cryptography-fips.us-gov-east-1.amazonaws.com" + "url": "https://dataplane.payment-cryptography-fips.us-east-1.amazonaws.com" } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1", "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://dataplane.payment-cryptography.us-gov-east-1.api.aws" + "url": "https://dataplane.payment-cryptography.us-east-1.api.aws" } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1", "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://dataplane.payment-cryptography.us-gov-east-1.amazonaws.com" + "url": "https://dataplane.payment-cryptography.us-east-1.amazonaws.com" } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1", "UseDualStack": false } }, @@ -2247,8 +2269,8 @@ } }, "params": { - "UseFIPS": true, "Region": "cn-north-1", + "UseFIPS": true, "UseDualStack": true } }, @@ -2260,8 +2282,8 @@ } }, "params": { - "UseFIPS": true, "Region": "cn-north-1", + "UseFIPS": true, "UseDualStack": false } }, @@ -2273,8 +2295,8 @@ } }, "params": { - "UseFIPS": false, "Region": "cn-north-1", + "UseFIPS": false, "UseDualStack": true } }, @@ -2286,108 +2308,108 @@ } }, "params": { - "UseFIPS": false, "Region": "cn-north-1", + "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + "endpoint": { + "url": "https://dataplane.payment-cryptography-fips.us-gov-east-1.api.aws" + } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1", "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://dataplane.payment-cryptography-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://dataplane.payment-cryptography-fips.us-gov-east-1.amazonaws.com" } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1", "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" + "endpoint": { + "url": "https://dataplane.payment-cryptography.us-gov-east-1.api.aws" + } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1", "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://dataplane.payment-cryptography.us-iso-east-1.c2s.ic.gov" + "url": "https://dataplane.payment-cryptography.us-gov-east-1.amazonaws.com" } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1", "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://dataplane.payment-cryptography-fips.us-east-1.api.aws" - } + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1", "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://dataplane.payment-cryptography-fips.us-east-1.amazonaws.com" + "url": "https://dataplane.payment-cryptography-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1", "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://dataplane.payment-cryptography.us-east-1.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1", "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://dataplane.payment-cryptography.us-east-1.amazonaws.com" + "url": "https://dataplane.payment-cryptography.us-iso-east-1.c2s.ic.gov" } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1", "UseDualStack": false } }, @@ -2397,8 +2419,8 @@ "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseFIPS": true, "Region": "us-isob-east-1", + "UseFIPS": true, "UseDualStack": true } }, @@ -2410,8 +2432,8 @@ } }, "params": { - "UseFIPS": true, "Region": "us-isob-east-1", + "UseFIPS": true, "UseDualStack": false } }, @@ -2421,8 +2443,8 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseFIPS": false, "Region": "us-isob-east-1", + "UseFIPS": false, "UseDualStack": true } }, @@ -2434,21 +2456,34 @@ } }, "params": { - "UseFIPS": false, "Region": "us-isob-east-1", + "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, "UseDualStack": false, "Endpoint": "https://example.com" } @@ -2459,8 +2494,8 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "UseFIPS": true, "Region": "us-east-1", + "UseFIPS": true, "UseDualStack": false, "Endpoint": "https://example.com" } @@ -2471,11 +2506,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -3050,7 +3091,7 @@ } }, "EncryptedPinBlock": { - "target": "com.amazonaws.paymentcryptographydata#HexLengthBetween16And32", + "target": "com.amazonaws.paymentcryptographydata#HexEvenLengthBetween16And32", "traits": { "smithy.api#documentation": "

The encrypted PIN block data that Amazon Web Services Payment Cryptography translates.

", "smithy.api#required": {} @@ -3508,14 +3549,14 @@ } }, "MessageData": { - "target": "com.amazonaws.paymentcryptographydata#HexLengthBetween2And4096", + "target": "com.amazonaws.paymentcryptographydata#HexEvenLengthBetween2And4096", "traits": { "smithy.api#documentation": "

The data on for which MAC is under verification.

", "smithy.api#required": {} } }, "Mac": { - "target": "com.amazonaws.paymentcryptographydata#HexLengthBetween4And128", + "target": "com.amazonaws.paymentcryptographydata#HexEvenLengthBetween4And128", "traits": { "smithy.api#documentation": "

The MAC being verified.

", "smithy.api#required": {}