2020-08-24 05-59-49
Gemi Ablaza
Champion
Configure Availability of API Documentation through Service Center
726
Views
7
Comments
New
Service Center

Like overriding the endpoint URL of APIs through service center, we should be able to turn off documentation on the Production environment for security reasons.


This is currently being configured in the Service Studio (Yes or No values) and will be carried over to deployed environments. Not really safe to do publishes in the production just to turn off documentation.

2018-10-29 13-00-29
Magda Pereira
Changed the category to
Service Center
Merged this idea with 'Security: Disable API documentation per application and per environment using the Service Center' (created on 13 Jan 2024 13:26:43 by Lucas Soares)

Anyone with an API link can see all endpoints if the documentation is enabled in production environment.

I would like to be able to disable the API documentation through the service center and only in the production environment; Today it is only possible to disable the documentation of an API through service studio and when you do this, later when publishing this application in other environments it disables it for other environments.


In a penetration test, the tester only had the link:
https://name.outsystementerprise.com/Vuln/rest/MyFirstApi/GetClient?ClientId={ClientId}

However, all he has to do is delete part of the URL and in production he will be able to see all the available endpoints of this api:
https://name.outsystementerprise.com/Vuln/rest/MyFirstApi/


Thinking about security, if documentation is enabled, all endpoints are exposed to view the structure, which greatly increases the area of exploration.


I would like to be able to control in which environment and which API the documentation is active, for example, in the development environment, keep the documentation enabled, in the production environment, disable all API documentation.

Today this is not possible, because you can only disable the documentation in the service estudio, and even if I open the service estudio in production and disable the api documentation, when I do another deploy the documentation will be enabled again, because in the development environment would be active.


I think it would be interesting for the infrastructure administrator to be able to enable or disable API documentation directly through the service center, and can also disable it in a single environment, or in a single application in a single environment.

With this, the administrator would be able to leave the documentation active in the development environment, and in the production environment only the documentation for the endpoints he wants.


Guys, if there is any way to do this through the service center, I apologize, but I didn't find it.

Your suggestions make much sense. I'm following it too.

Please next time first search the idea, took me 1 second to find out it already exists. I  will have to merge it.

As this idea would mitigate security vulnerabilities, I'm disappointed that there has been no movement on it for over a year.

My coworker told me an additional information about this API Documentation feature.

Even when API Documentation is set to No in Service Studio, you can still get the swagger.json file if you add `swagger.json` to the end of the URL (`/<module or app name>/rest/<API name>/swagger.json`).
And of course, this swagger.json file has all the API information written in plain text.

From a security point of view, when the documentation is disabled, the delivery of swagger.json should also be disabled.