A web application (war) provides two set of HTTP APIs, one is public to the clients on Internet, another is for internal and should not public to Internet. What is the best practice on network deployment to protect the internal API?
I know that a common way is to split the application into two deployables, put the frontend which serves public API in DMZ and put the backend which serves internal API in internal network. But for some reason I want to keep the application as one deployable.
Finally we introduce a reverse proxy to hide the APIs inside internal network. Clients from Internet is only able to connect to the reverse proxy, the reverse proxy is configured to only forward requests to public API to the application.