apinf / platform

Apinf - Open source API management platform with multi proxy and protocol support
https://apinf.com/
European Union Public License 1.1
74 stars 33 forks source link

User have to create totally unique proxy base path #2093

Closed marla-singer closed 6 years ago

marla-singer commented 7 years ago

Now we have the rule that user must create the unique proxy base path. But we need to limit it more. Don't let user create the proxy base path if the first section of this path has is the part of other API

On local, I have three different APIs with the next settings. Bring to your notice that APIs have the different URL.

joxi_screenshot_1486625338473 2 joxi_screenshot_1486625338473 3 joxi_screenshot_1486625338473 4

Found &expected

  1. When I call https://nightly.apinf.io:3002/alternative/ it redirects to https://music.yandex.ru/genre/alternative/ that's correct
  2. When I call https://nightly.apinf.io:3002/alternative/artists/ it redirects to https://music.yandex.ru/genre/alternative/artists/ that's wrong. Expected: http://petstore.swagger.io/test-elastic/
  3. When I call https://nightly.apinf.io:3002/alternative/rock/ it redirects to https://music.yandex.ru/genre/alternative/rock/ that's wrong. Expected: https://learn.javascript.ru/courses/nodejs
brylie commented 7 years ago

We are not committing to resolve this issue right away, but want to get a better understanding of the underlying parts. I have self-assigned and will look for upstream issues or discussions that might give us better understanding.

brylie commented 7 years ago

This seems related to the API Umbrella internal matching order field:

screenshot_20170210_122004

The matching order field tells API Umbrella in which order to route requests. API Backends with lower matching order value will be routed before higher level routes, when their frontend prefix matches, even when a higher matching order route might have a more accurate frontend prefix.

The reason for a matching order may be so the proxy does not have to parse the entire route prefix map each time it resolves a request.

brylie commented 7 years ago

In the spirit of this issue title, we might consider 'solving' this challenge by allowing multiple, explicit frontent prefixes per Proxy Backend. This aligns with the design of API Umbrella:

screenshot_20170210_125223

Then we can change our code to not use wildcard queries for getting/deleting analytics data, rather relying on the explicit frontend prefix.

brylie commented 7 years ago

Caveat emptor: this would require that API managers explicitly define every desired frontend prefix, rather than allowing for the 'catch all' prefixing that API Umbrella allows.

Currently, we require a new Proxy Backend to be created per frontend prefix.

brylie commented 7 years ago

Opened an upstream support request: https://github.com/NREL/api-umbrella/issues/342

bajiat commented 7 years ago

@brylie We would need to unblock this issue. Can you get some advice from our developers?

bajiat commented 7 years ago

This is becoming even more urgent because of monetization and new dashboard. Let's resolve this during sprint 51.

bajiat commented 7 years ago

@brylie Please invite @matleppa, @marla-singer and @phanimahesh for a meeting to discuss both proxies and our domain model. Should happen 25 - 29 September

brylie commented 7 years ago

Invite sent for next Tuesday (2017-09-26).

brylie commented 7 years ago

Notes from our meeting with @bajiat, @matleppa, @Nazarah, and @phanimahesh:

Consistency across features

Wen resolving this issue, we want to be consistent across the followint APInf features:

Wireframes needed

Wireframes will be needed for at least:

User flows

Hypothetical user flow for adding an API

Hypothetical user flow for adding Proxy Backend

Desired flexibility

Things we would like to allow:

brylie commented 7 years ago

I have summarized our discussion in the above comment, and will need to hand this task off to another champion.

preriasusi commented 6 years ago

2319