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

Document ID : KB000077087
Last Modified Date : 24/05/2018
Show Technical Document Details
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. 

    "client_key_custom": {\
        "lifetimes\": {\"oauth2_access_token_lifetime_sec\": 86400, \"oauth2_refresh_token_lifetime_sec\": 432000}}
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/

OTK 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" (within the oauth/manager/client).

Clients Policy

4. Configure the assertion as follows:

Custom RegEx

5. Save an activate the policy