Layer7 API Management

Expand all | Collapse all

MicroGateway Creating MetaPolicy JSON file

Jump to Best Answer
  • 1.  MicroGateway Creating MetaPolicy JSON file

    Posted 11-15-2018 10:05 PM



    I am currently looking at creating a MetaPolicy JSON file which has my proxy details/policies.

    Couple of issues 

    • I can use the policy manager to add the policies but then when I export it doesn't give me the option to export as JSON.
    • So how do I add policies like comments, etc because the documentation on CA micro gateway has no sample JSON definitions.
    • My current implementation involves placing the metapolicies under services folder which get picked during build.

  • 2.  Re: MicroGateway Creating MetaPolicy JSON file
    Best Answer

    Posted 11-16-2018 10:55 PM

    Good evening,


    Based on your questions, there may be a bit of a misconception of what the JSON is used for. The JSON is used to outline encapsulated assertions / Quick Start template (Build Your QuickStart Templates - CA Microgateway - 1.0 - CA Technologies Documentation)  that have been created on the Microgateway and exported through the $ curl --user <USERNAME>:<PASSWORD> --request GET 'https://<HOST_NAME>:<PORT>/quickstart/1.0/templates?name=<ENCASS>&action=export'. These templates can then be bundled with the microgateway and called through the JSON Metapolicy.


    Excerpt from the documentation - QuickStart Template - CA Microgateway - 1.0 - CA Technologies Documentation :

    The sample JSON meta-policy below does the following:

    • Creates a service named MyService1
    • Permits the HTTP methods GET, PUT, POST
    • Publishes a policy that includes these custom encapsulated assertions:


    {   "Service": {     "name": "MyService1",     "gatewayUri": "/someservice",     "httpMethods": [ "get", "put", "post" ],     "policy": [       {         "CredentialSourceHttpBasic"        },       {         "RouteHttp" : {           "targetUrl" : "",           "httpMethod" : "GET"         }       }     ]   } }


    The online sample documentation (https://<microgateway FQDN/IP>:8443/quickstart/1.0/doc) in the QuickStart build of the Microgateway will outline JSON schema for each sample template.


    Useful links:

    QuickStart Template - CA Microgateway - 1.0 - CA Technologies Documentation 

    GitHub - CAAPIM/Microgateway: Security and management for microservices, with rich functionalities of the CA API Gateway… 

    https://<microgateway FQDN/IP>:8443/quickstart/1.0/doc




    Stephen Hughes

    Broadcom Support