Generate Security Hash Assertion using key type hex.

Document ID : KB000016339
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

In CA API Gateway the generate security hash assertion would accept text type of key

refer: https://docops.ca.com/ca-api-gateway/8-4/en/policy-assertions/assertion-palette/xml-security-assertions/generate-security-hash-assertion

In some scenario the key may be hex type and we are required to use that key in the assertion. 

The result of using hex key type and text key type is different.

Question:

The generate security hash assertion uses a text type key to generate a hash. We need to use an hexadecimal key type instead of text type. How can we do this with available assertions? 

Environment:
CA API Gateway
Answer:

1. The hex key can be defined using context variable with

content-type : text/xml; charset=utf-8 

Data type : message

2. Use encode decode data assertion and decode the above defined hex value.

Encode/Decode: Base16(hex) Decode

Target Data type : Message

Content type : text/xml; charset=utf-8

3. Now use the generate security hash and use the output of 2. in Key

 

File Attachments:
TEC1920833.zip