Axway/agents-apigee

Proxy mode - API Service endpoints incorrect scheme

gwandwingor opened this issue · 4 comments

Hi,

We noticed that the API service endpoint from the discovered proxies use the "http" scheme instead of "https".

Example :

image

When we look at the API Proxy configuration we can see that the deployed environment uses an https endpoint

image

In the HTTP Proxy connection, we can see that a "secure" virtual endpoint is referenced
image

We can also see that the "secure" virtual host is defined and uses tls
image

In the agent logs, we didn't see any http request reference to the "secure" virtual host, only the "default" one using http.

Could you please help ?

Thanks,

@gwandwingor considering we require the spec to be attached, could we trust that the spec has the desired URL in it?

At the moment there is no way to get that URL from the API calls. For instance the proxy and revision tells me that the TargetEndpoint is "default". Until now we took default and got the virtual host by the same name, the virtual host with the name of default is the insecure url.

If the URL will be in the spec, since we are already parsing the spec, we could use the URL/URLs from there. Really take a host config from the spec and create a url from it.

Here is a sample of what the API returns with some things removed for brevity.

{
  "basepaths": [
    "/gwa-coinbit"
  ],
  "description": "View the Coinbit Price Index (BPI) in real-time.",
  "displayName": "GWA-Coinbit",
  "name": "GWA-Coinbit",
  "proxies": [
    "default"
  ],
  "proxyEndpoints": [
    "default"
  ],
  "resources": [
    "openapi://association.json"
  ],
  "revision": "3",
  "sharedFlows": [],
  "spec": "",
  "targetEndpoints": [
    "default"
  ],
  "targetServers": [],
  "targets": [
    "default"
  ],
  "type": "Application"
}

It seems apigee has a BFF (backend for frontend) that has more capabilities than what the API data returns.

Spoke with @gwandwingor. Will pull the config XML file from the Proxy bundle to find the HTTPProxyConnection details and assemble the URL from it.

Will be fixed in APIGOV-26363