pypsy
pypsy

Reputation: 33

How to connect to PostgreSQL without VPN?

Background: My company has a PostgreSQL DB which allows access only through corporate VPN. I'm in the phase of developing a simple chatbot which fetches information (Shipment Status) from the Postgres DB. The chatbot will be used by Client's team who do not have access to our corporate VPN.

Question: Is there a way to avoid the VPN dependency? So that Client can use the Chatbot application to get information without actually having to log into VPN.

I have few basic thoughts about this (I might be very wrong, but giving it a shot):

  1. Maybe having a different Port number which will bypass the VPN?
  2. Migrating the DB to a Cloud instance such as AWS RDS and then querying info from there?
  3. Connecting to PostgreSQL API to get the information (Assuming it only requires API Key to access information and not a VPN connection)

As I mentioned, my idea of above points can be completely wrong but would love to hear your thoughts and ideas to overcome this.

P.S: The Chatbot is designed in such a way that only the Shipment Status information can be obtained from it, which cannot be classified as confidential information. So ideally anyone with a valid Shipment ID should be able to use the Chatbot application.

Upvotes: 1

Views: 102

Answers (1)

Marko Eskola
Marko Eskola

Reputation: 818

  • Create a firewall DMZ
  • Create an API server in the DMZ which has has access to the VPN and queries the dB and returns the result to the chatbot
  • Make the chatbot to use the API server to query shipment information.

Migrating to AWS could be also a viable option and this kind of behavior can be configured by using VPC and other AWS services.

Upvotes: 1

Related Questions