How could I connect to external database safely?

Wwoon5/9/2023
Currently we are planning to host our api service on Railway. But we do have external data which need to connect to e.g. kafka, and MSSQL. How can we have private connectivity to our in house database?
Bbrody5/9/2023
add the connection details to service variables, and use those environment variables in code
Wwoon5/9/2023
It might have vulnerability. The connection expose to public, i can't convince to my investor to using Railway as a design of this, i am thinking to use 2 way ssl connection.
Bbrody5/9/2023
okay then tailscale private network
Wwoon5/9/2023
is tailscale a vpn? how is it work to your Railway platform?
Bbrody5/9/2023
it would be something you would need to add to your app yourself, you can do some research if you are unsure of what it is
Wwoon5/9/2023
noted. Thanks @Brody