Generate Security Hash Assertion using key type hex.

book

Article ID: 16339

calendar_today

Updated On:

Products

STARTER PACK-7 CA Rapid App Security CA API Gateway

Issue/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.



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

Resolution

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

 

Attachments

1558534658871TEC1920833.zip get_app