Layer7 API Management

  • 1.  restman returns urls with hostname instead of clustername

    Posted May 26, 2017 06:15 PM

    Enabled rest management service on both single node gateway and 2 node cluster.  Both have cluster.hostname set to a vanity name that matches the public CA private SSL key loaded.   Only modified published restman policy to go against LDAP IDP we have configured

     

    If i call https://vanityname/restman/1.0/doc/home.html   I get the documentation screen however all the uris embedded include the hostname such as https://hostname/restman/1.0/folders   This URI does work and I can replace the hostname with vanityname and it works as well (after loggin in again),   but the values returned again have hostname in them

     

    <l7:Name>FOLDER List</l7:Name>
    <l7:Type>List</l7:Type>
    <l7:TimeStamp>2017-05-26T17:58:20.843-04:00</l7:TimeStamp>
    <l7:Link rel="self" uri="https://hostname:443/restman/1.0/folders"/>
    <l7:Link rel="template" uri="https://hostname:443/restman/1.0/folders/template"/>
    <l7:Item>
    <l7:Name>Root Node</l7:Name>
    <l7:Id>0000000000000000ffffffffffffec76</l7:Id>
    <l7:Type>FOLDER</l7:Type>
    <l7:TimeStamp>2017-05-26T17:58:20.843-04:00</l7:TimeStamp>
    <l7:Link rel="self" uri="https://hostname:443/restman/1.0/folders/0000000000000000ffffffffffffec76"/>
    <l7:Resource>
    <l7:Folder id="0000000000000000ffffffffffffec76" version="0">
    <l7:Name>Root Node</l7:Name>
    </l7:Folder>
    </l7:Resource>
    </l7:Item>
    </l7:List>

     

    Is this suppose to work this way??? should I always be using hostname to call restman???  If not, how do I get restman to using the cluster.hostname?



  • 2.  Re: restman returns urls with hostname instead of clustername
    Best Answer

    Broadcom Employee
    Posted May 28, 2017 07:52 PM

    Hello pwhelan81 ,

    You will need a reverse proxy, or a load balancer, or a firewall to redirect vanity name to host name.

    CA API gateway can do this for you, ie. you can use another gateway as reverse proxy.

    Publish Reverse Web Proxy - CA API Gateway - 9.2 - CA Technologies Documentation 

     

    Regards,

    Mark



  • 3.  Re: restman returns urls with hostname instead of clustername

    Broadcom Employee
    Posted Jun 07, 2017 05:14 PM

    While Mark's answer above may solve the issue, the reason you are seeing direct host names is because of service resolution on your Gateway cluster.

     

    You send a request to the cluster host name of the Gateway, it listens to the request and forwards you to a specific node in the cluster, and the restman service is displaying the host that received the restman request.



  • 4.  Re: restman returns urls with hostname instead of clustername

    Posted Jun 07, 2017 06:00 PM

    Thanks for your advice

    I think I understand that the gateway by default does not act as a reverse proxy substituting the cluster hostname the user called for the the actual host name in urls restman returns to the caller.

     

    However I would have expected the restman interface to provide this substitution  much like what I see in OAUTH toolkit.  For example the OAUTH toolkit manager accessed at FQclustername/oauth/manager somehow does this with all the links it provides in the pages it returns.    Shouldn't this be a built in feature of the internal restman service???