Azure / api-management-developer-portal

Developer portal provided by the Azure API Management service.
MIT License
486 stars 314 forks source link

Control of custom domains for APIs #1441

Closed ncroad closed 2 months ago

ncroad commented 3 years ago

We require the ability to have certain APIM custom domains visible for specific APIs to customers on the Portal and some not to show on the developer portal at all.

For a client, we have at three APIM Gateway custom domains. e.g. api.something.com, sandbox.api.something.com, and api.internaldomainname. In this situation API1 should only be accessed through api.something.com, API2 through sandbox.api.something.com, and API3 via the internal domain name (and ideally never shown on the portal). In addition the Portal content should also reflect this configuration.

When defining the API in APIM, we would ideally be able to control which custom domains are allowed to be used to access these APIs (as per above example). We would then require that the Portal would then render content as per the configured API Custom domains. i.e. on both the API Details page where it shows the Operation Request URL - currently appears to default to the first Custom Domain, and then on the Operation test screen to not simply show a full list of all custom domains.

When you currently import an API into APIM, it uses the first of the Gateway Custom domains. e.g. image

We have the APIM ability to validate and enforce that they are accessed correctly via policy, but we would prefer that not all custom domains are advertised publicly, and that they customers are lead to the correct and intended host.

We would like that the developer portal shows the configured/correct Request URL based on APIM configuration. e.g. for API2, it would show the sandbox.api.something.com domain name, not the first Gateway address. image

We would like that on the Test page which currently shows all custom domains, only show those that are configured for the given API. i.e. For API2 again, only the sandbox.api.something.com would be shown. image

If would be great, if APIM also validated the configuration as well rather than having to write custom Policy.

This appears related to #1202

ghost commented 3 years ago

@ncroad, thank you for requesting this feature.

mikebudzynski commented 3 years ago

This appears related to #1202

Thanks for opening the feature request; I recommend tracking #1202 for updates.