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

Please support SSL #45

Open
parhamr opened this issue Apr 17, 2018 · 2 comments
Open

Please support SSL #45

parhamr opened this issue Apr 17, 2018 · 2 comments

Comments

@parhamr
Copy link

parhamr commented Apr 17, 2018

The connection constructors are currently hardcoded to not use SSL:

crunchy-watch/main.go

Lines 266 to 282 in c0e8a18

// Construct connection string to primary
target := fmt.Sprintf("postgresql://%s:%s@%s:%d/%s?sslmode=disable&connect_timeout=%d",
config.GetString(Username.EnvVar),
config.GetString(Password.EnvVar),
config.GetString(Primary.EnvVar),
config.GetInt(PrimaryPort.EnvVar),
config.GetString(Database.EnvVar),
int(timeout.Seconds()),
)
pgconstr = fmt.Sprintf("postgresql://%s:%s@%s:%d/%s?sslmode=disable&connect_timeout=%d",
config.GetString("postgres"),
config.GetString(Password.EnvVar),
config.GetString(Primary.EnvVar),
config.GetInt(PrimaryPort.EnvVar),
config.GetString(Database.EnvVar),
int(timeout.Seconds()),
)

Please consider changing this to allow or require SSL.

Thanks!

@davecramer
Copy link
Contributor

Seems reasonable

@GajaHebbar
Copy link

@parhamr you can find the changes here https://github.com/GajaHebbar/crunchy-watch/blob/master/main.go. But you need to build the image yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants