Azure / Azure/api-management-developer-portal

REST API returns backendServiceUrl

Open
#324 1 comment 0 reactions 0 assignees View on GitHub
(t) Bug P1
Dominant language
TypeScript
Stars
545
Forks
360
PR merge metrics
No merged PRs in 30d

Description

Related to the question I asked in #270, I'm calling the new developer portal REST API `/apis` endpoint from our site, and it returns an array of api entities. The `properties` object includes a `serviceUrl` that contains the URL to the backend API:

For example:
```
"value": [
{
"id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.ApiManagement/service/xxx/apis/12345",
"type": "Microsoft.ApiManagement/service/apis",
"name": "some-api",
"properties": {
"displayName": "Some API",
"apiRevision": "1",
"description": "Some API description.",
**"serviceUrl": "https://someapi...",**
"path": "someapi",
"protocols": [
"https"
],
"authenticationSettings": null,
"subscriptionKeyParameterNames": null,
"isCurrent": true
}
}
. . .
],
"count": ...
}
```
I wonder why is the `serviceUrl` included here?

I'd rather not have the backend API URL leaked out and sent down to the client - the new developer portal won't be talking directly to the API backend, and anyone sniffing the network traffic in the browser debugger would be able to discover the URL of the API backend itself (not callable of course, but seems odd to unnecessarily leak it this way).

Any thoughts on perhaps removing that property from the developer-facing portal REST API responses?

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the developer portal REST API `/apis` entry point and inspect how API entities' `properties` are shaped. Reproduce the response shown, then verify that developer-facing `/apis` responses omit `serviceUrl` while retaining the other listed properties and that any relevant response checks pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, typescript
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.