Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgres unencrypted #92

Open
danverbs opened this issue May 17, 2024 · 9 comments
Open

Postgres unencrypted #92

danverbs opened this issue May 17, 2024 · 9 comments
Labels
need-investigate need to investigate

Comments

@danverbs
Copy link

I've set up a postgres instance in one of my projects and set up for external access but when I connect to it using Postico, it says the connection is unencrypted? How do I ensure this is encrypted?

If I set my cloudflare DNS to 'DNS Only' I get this message but can connect, if I set it to 'Proxied' I can't connect at all - the SSL connection is set to 'Full'

@Siumauricio
Copy link
Contributor

Siumauricio commented May 18, 2024

I will need to test this, because I've used pgadmin and dbeaber and 0 issues, probably it may need to adjust the database connection because it depends on the driver the tool are using

@Siumauricio
Copy link
Contributor

@danverbs I test and it was working looks like using the domain as hostname is not working only with the ip of the vps

@danverbs
Copy link
Author

Ok so don't use the url provided in Dokploy settings? Just the ip of the vps?

@Siumauricio
Copy link
Contributor

Correct @danverbs, for now just use the IP when I have more time I will investigate about this, but for now is functional

@danverbs
Copy link
Author

I will try this and let you know. Thanks 👍🏻

@danverbs
Copy link
Author

I tried with just the IP and it still says 'The server doesn't support TLS' and is unencrypted. Could you share the steps you took to set this up?

@Siumauricio
Copy link
Contributor

Hey @danverbs , I tested and it was working I share the configuration

  1. Create a postgres database (In my case only set the database name)
  2. Expose port, type 5432 and then save.
  3. copy the postgresql connection.

image

  1. go to Postico
    image
  2. type the postgresql connection but remember to remove the domain and set the ip of your vps
    image
  3. Click add server
  4. Select the database, click on test button it will appear some alert about TLS just accept it
    Screenshot 2024-05-20 at 1 10 00 AM
  5. Then click on test to check the connection is working
    image

@danverbs
Copy link
Author

Thanks - I can connect as shown in your steps but Postico still says the connection is unencrypted? Surely we want it to be encrypted?

@Siumauricio
Copy link
Contributor

The question is that it marks you that it is not a secure connection because we do not implement any configuration for the domain with that port, but making adjustments with some traefik configuration would be enough to achieve that result.

What I recommend in case you are afraid or something like that that the probability that it will happen is really low, is simply when you finish doing your tasks in the database remove the exposed port that way no one will be able to access the database from outside.

@Siumauricio Siumauricio added the need-investigate need to investigate label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-investigate need to investigate
Projects
None yet
Development

No branches or pull requests

2 participants