CA API Management: Invalid JSON export for OAuth Client custom field

Document ID : KB000077087
Last Modified Date : 26/04/2018
Show Technical Document Details
Issue:
In OTK 4.0 when exporting a client configuration an invalid JSON message is produced if a client name, description, organization or custom field contained double-quote characters. 

I.E:
{
    "client_key_custom": {\
        "lifetimes\": {\"oauth2_access_token_lifetime_sec\": 86400, \"oauth2_refresh_token_lifetime_sec\": 432000}}
}
Resolution:
This can resolved by either upgrading to a new version of the OTK or implementing a policy change to correct the behavior.

1. Edit the endpoint <instance_modifier>/manager/clients/
2. Locate the "OTK Client Export" assertion on line 76 (OTK 4.0)
3. Immediately following this assertion add the assertion "Evaluate Regular Expression"

Clients Policy

4. Configure the assertion as follows:

Custom RegEx

5. Save an activate the policy