Layer7 API Management

  • 1.  Swagger configuration issue

    Posted Apr 04, 2016 06:00 AM

    Hello All,

     

         I have configured swagger for identifying the operations in my backend service. When i configure swagger for front alone and access that URL , i am able to see all operations but when i try with my frontend URL i am getting policy falsified. Below is my configuration.Please resolve my issue.

     

    Backend URL: http://sit.dev.cloud.formula.net

    Frontend URL: https://my-partner.cloud.formula.net

     

     

    Backend URL: http://sit.dev.cloud.formula.net/swagger#  (Its working and able to see all swagger URLs)

    Frontend URL: https://my-partner.cloud.formula.net/swagger# (Its not working, i am getting policy falsified)

     

    Thanks&Regards

    Rajasekhar



  • 2.  Re: Swagger configuration issue

    Posted May 03, 2016 09:05 AM

    Can someone help on this request



  • 3.  Re: Swagger configuration issue

    Broadcom Employee
    Posted Aug 24, 2016 10:55 AM

    Hi Rajasekhar,

     

    Are you still experiencing this issue, and if you are, can you please a screenshot of the audit details right after you try to run this?

     

    Thanks

     

    Wesley.



  • 4.  Re: Swagger configuration issue
    Best Answer

    Broadcom Employee
    Posted Sep 02, 2016 01:29 AM
      |   view attached

    Raja,

     

    Good evening. I've setup a Swagger based service on the Gateway using the URL http://petstore.swagger.io/v2/swagger.json as a sample. During the creation of the service, the wizard will ask for several validation options as seen in the image below.

     

    If Validate Path is selected - Validate the path portion of the request (excluding base path and service URI).

    If Validate Method is selected - Check whether the method from the request is allowed by the API from the Swagger document.

    If Validate Scheme is selected - Check whether the scheme from the request (http or https) is permitted by the API from the Swagger document.

    If Require Security Credentials to be Present is selected - Check whether the security credentials required for the API from the Swagger document is present in the request.

     

    *Note: For this sample the Require Security Credentials is not used.

     

    From the wizard a service is created that can be consumed at http(s)://<gateway>:<port>/v2/ with the policy that is attached. The request that can be tested at /v2/pet using the headers "Content-Type: application/json" and "Accept: application/json" and the sample payload:

    {  "id": 0,  "category": {    "id": 0,    "name": "string"  },  "name": "doggie",  "photoUrls": [    "string"  ],  "tags": [    {      "id": 0,      "name": "string"    }  ],  "status": "available"}

     

    Issues that can occur with consuming the service is if the validation are in place and some component is in correct, URL is not valid, and back-end certificate is not trusted in the Gateway to name a few. The audit log should outline why the service failed or the service debugger on the service can be very beneficial.

     

    Sincerely,

     

    Stephen Hughes

    Director, CA Support

    Attachment(s)

    zip
    swagger_policy.xml.zip   1 KB 1 version