Decrypt Message policy helps in decrypting messages received from the target endpoint or an API consumer. To decrypt the data accurately, the correct key and algorithm used in the encryption of data need to be known.
Configuration
Descriptions for the properties under the Data Encryption tab is the same as the of the Encrypt Message policy.
Figure 1: Decrypt Message Policy Configuration
Example
For the same project used in the Encrypt Message section, configure a Decrypt Message policy as shown below and add it to the Proxy Response. The algorithm and key specified must be the same as the ones used in Encrypt Message policy. When the request is sent, the Target Response payload will be encrypted by the Encrypt Message policy and then this encrypted message will be decrypted by Decrypt Message policy in the Proxy Response scope. The Result will be the same as the original payload i.e the one without Encrypt and Decrypt policies:
{"Envelope": {"Body": {"ConversionRateResponse": {"ConversionRateResult": "0.0157"}}}} |