Details
Description
We currently have two different ways of routing, one is path routing features as described here:
The other is using API as a product which will route based on backend path defined when adding a backend to a product.
If path routing is used, you must ensure there is no conflict between the mapping rules in different services that use the same Public Base URL, i.e. each combination of method + path pattern is only used in one service.
Service A
Self Managed Apicast:
Mapping Rule: GET /a/product
Service B
Self Managed Apicast:
Mapping Rule: GET /a/product <- this should be blocked as it's used already
Due to shared responsibilities, two independent developer teams can configure 2 products with the same mapping rule on the same apicast gateway and there is no easy way to prevent this as there is no check for uniqueness.
If API as a product is used we do make sure backend paths are unique and the same backend can only be added once to the same product. But different products can still use the same public base path and again there is no safety as to where requests are being routed to if uniqueness is not enforced.
As we do not want to configure multiple different public base URLs which would require to configure a route for each product there should be only one gateway serving different products under one public base path.
Given that we are looking for a feature to easily check that a routing path is just used once. This should as well be available via an API (or blocked by the product/backend creation API) as products can be created in a self-service fashion with full automation of the creation of the products and their corresponding mapping rules.