My question is whether this is useful to anyone else or not? There are perhaps other useful things you could do with it, like add some observability features?
Thanks in advance for any feedback.
I would create a separate protected API that has an additional header such as:
Forward-To-API: database-prod
And have that service lookup the URL and credentials in a secure database and create it's own request to the external service. Even better it could also be your audit log.The Forward-To-API header would be stripped and the rest of the query would be passed through.
-- This is so obvious that it must already exist!
- comply with egress security policies more generally
- comply with rate limits and meters for costly APIs
- monitor outgoing request payloads so nothing sensitive goes over the wire
- caching and deduping large responses
- act as the starting point for adding crawling type workloads
These tend to be pretty limited and special case, and there are lots of other ways of solving each, but sometimes an egress proxy is the thing.