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

book

Article ID: 77087

calendar_today

Updated On:

Products

CA API Gateway (Layer 7) SA94 to API SECURITY STARTER PACK-7 CA Rapid App Security MOBILE API GATEWAY CA Mobile - API Gateway CA API Gateway

Issue/Introduction

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}}
}

Environment

Release:
Component: APIGTW

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/

<Please see attached file for image>

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).

<Please see attached file for image>

Clients Policy

4. Configure the assertion as follows:

<Please see attached file for image>

Custom RegEx

5. Save an activate the policy

 

Attachments

1558702312942000077087_sktwi1f5rjvs16kvq.png get_app
1558702311281000077087_sktwi1f5rjvs16kvp.png get_app
1558702309385000077087_sktwi1f5rjvs16kvo.png get_app