Looking for a Linux HTTP-listening-app which would relay incoming requests as-is to a remote HTTPS server and relay the (decrypred) responses back.
Basically we have a blackbox https VM for which the access is lost and its certs have expired. While devs are working on implementing a replacement (by end-of-year) we need our numerous other apps to keep talking to it. It would take significant time to re-code those apps to allow ignoring of expired certs, but it would be easy to reconfigure those apps to talk to another (HTTP) url, which would do the talking-to-expired-HTTPS behind the scenes.
Examples:
cert expired
$ curl https://blackbox:3333/v1/configserver/6c15dd4a -H 'X-Vault-Token: ****'
curl: (60) Peer's Certificate has expired.
...
ignoring-the-cert works for curl
$ curl -k https://blackbox:3333/v1/configserver/6c15dd4a -H 'X-Vault-Token: ****'
{"request_id":"b6e832", "backdoor.token.encryption.password":"****", "oauth.keys":"****|****",
...
need something HTTP-listening on localhost:80 and talking to HTTPS://blackbox:3333 behind the scenes
$ curl http://localhost:80/v1/configserver/6c15dd4a -H 'X-Vault-Token: ****'
{"request_id":"b6e832", "backdoor.token.encryption.password":"****", "oauth.keys":"****|****",
...
I'm told nginx should be capable of doing this, but I found no examples to easily set this up while ignoring the expired certs (and it feels nginx requires hefty background knowledge in configuring it before-you-even-start).
Update:
my question is for an HTTP -> expired-cert-HTTPS relay
@GeraldSchneider,
- there are topics solving the opposite relaying (HTTPS -> HTTP):
How can I forward requests from my web server?
- there are topics solving the alike relaying (HTTP -> good-valid-cert-HTTPS):
https://stackoverflow.com/questions/8017508/solutions-to-convert-http-traffic-to-https-proxy-relay
if any of those would mention how to configure the apacheHttpd/nginx/etc to ignore the expired/invalid/selfSigned certificates - that would be the answer I was looking for