Skip to main content

We have code in place to build the api when the app is deployed to cloudhub. What I was wondering is where to find the syntax for the anypoint policies

 

Below as example:

 

anypoint_apis:

 

   anypoint_policies:

     - Asset ID: client-id-enforcement

       Asset Version: 1.2.3

       configuration:

         credentialsOriginHasHttpBasicAuthenticationHeader: customExpression

         clientIdExpression: "#attributes.headers[\"client_id\"]"

         clientSecretExpression: "#attributes.headers[\"client_secret\"]"

 

Also I found https://anypoint.mulesoft.com/exchange/portals/anypoint-platform/ which has an example that also covers the above but I am not sure where to find other ones. I hunted around but could not find anywhere it showed the syntax for the rest.

 

The one in particular I am looking for is OpenId Connect access token enforcement policy.

2 answers
  1. Feb 24, 2021, 8:15 AM

    Hello,

     

    The documentation that you have mentioned doesn't have a full set of policies, I'd recommend applying policies to an API and then doing a GET on that API to get all the structure you want.

     

    As they are modelled in a RESTful way the response of the GET is the same payload you will send in for a POST.

     

    Thanks

0/9000