Layer7 Access Management

Expand all | Collapse all

AA REST API swagger replaces FQDN with IP and removes https in base url, any easy fix possible?

Jump to Best Answer
  • 1.  AA REST API swagger replaces FQDN with IP and removes https in base url, any easy fix possible?

    Posted 02-21-2018 10:29 AM

    Hi,

    I have REST API app running on https://fqdn:8443/aa-restapi/doc/ . But Base URL shows up as  ip:8443/aa-restapi/ca/advancedauth/v1. Shemes only show HTTP. When clicking Try it out, a REST API request is sent to i.e. http://ip:http://ip:8443/aa-restapi/ca/advancedauth/v1/admin/authtoken
    The same for a generated curl command
    curl -X POST "http://ip:8443/aa-restapi/ca/advancedauth/v1/admin/authtoken" -H "accept: application/json" -H "content-type: application/json" -d ...

     

     

     

    Is there a way to fix it, a conf file?

     

    Thanks,

    Vlad 



  • 2.  Re: AA REST API swagger replaces FQDN with IP and removes https in base url, any easy fix possible?

    Posted 04-03-2018 09:13 AM

    Hi Vlad, 

     

    After looking internally I found that there is a defect opened on this issue and the latest on the defect notes is below:

     

    ===================================

    swagger doesn't support SSL API calls, this was documented, please see below docops link.

    Limitations:

    • Currently, Swagger support is available for only Chrome.
    • Swagger does not support SSL

    ============================================

     

    You will be updated via case with the final conclusion.

     

    thanks

    awijit



  • 3.  Re: AA REST API swagger replaces FQDN with IP and removes https in base url, any easy fix possible?
    Best Answer

    Posted 04-03-2018 11:06 AM

    Hi Awijit,

    I have had a ticket opened for a month and haven't received any update that there is a pending defect for this already. In the current state without ssl, Swagger is a dangerous tool because the credentials are not protected in the transit. The documentation is pretty frustrating as well, because it says as below until you find a "foot print" with Limitations.

    The base URL for the REST API is defined by the protocol, host, and application context on the root level of the API specification.

    The base URL used for all operations is formatted as follows:

    <protocol>://<host>:<port>/<application_context>/ca/advancedauth/v1/

    The components of the base URL are:

    • protocol
      Indicates the transfer protocols used by the REST API such as http and https.

    Thanks,

    Vlad



  • 4.  Re: AA REST API swagger replaces FQDN with IP and removes https in base url, any easy fix possible?

    Posted 05-11-2018 10:48 AM

    I tested a dev fix and Swagger is fine now.

    Thanks,

    Vlad