Layer 7 API Gateway: Locating policies that are using specific assertions
Article ID: 15359
STARTER PACK-7CA Rapid App SecurityCA API GatewayCA API Developer PortalCA API Gateway Enterprise Service Manager (Layer 7)
How can I locate what policies are using a specific assertion?
Policies are stored as XML in the SSG database and can be searched with a simple query. In this example, we will locate all policies utilizing the 'Evaluate JSON Path Expression' assertion.
1. First, log in to the policy manager to obtain the name of the assertion.
Either locate a policy where the assertion is already in use or create a blank policy and drag the assertion into the policy
Highlight the assertion and copy it using the context menu
Open a text editor and paste the previously copied assertion. You will now see the source XML, locate the assertion name as highlighted below and take note of it
2. Connect to the Gateway Database host and execute the below query at the mysql prompt replacing SSG with the name of your Gateway Database and EvaluateJsonPathExpression with the assertion name obtained above.
select name from SSG.policy where xml like '%EvaluateJsonPathExpression%';
You are returned a list of policy names where the assertion is in use.