I have 2 servers lets name them serverA and serverFirebase
serverA has no internet access and only accessible in a local network and it hosts a .net application
serverFirebase is google firebase server
i need to send a request from serverA to serverFirebase but i can't because serverA has no internet access
the solution that came to my mind is that since the browser (that shows the web app from serverA) has internet access i could proxy my request using his browser
so it would be like this
serverA -> browser -> serverFirebase
now the way that i wanna do this is like this:
1 - create a rsa key pair and have the private key in serverA and the public key in serverFirebase
2 - in serverA create a sha256 hash of the request payload and padd it and sign it using the priavte key (note that the request payload has an order number that can only be used once)
3 - send the payload and the signed hash to browser
4 - send the payload and the signed hash from borwser to serverFirebase
5 - in serverFirebase decrypt the signed hash using the public key and compare it to the hash of the payload and check that the order number hasn't been used before
my question is that is this method secure enough? and if there are any protocols to handle this situation already.
thanks