Support Postgres TLS #310

Closed
opened 2025-12-29 01:26:34 +01:00 by adam · 1 comment
Owner

Originally created by @Zk2u on GitHub (Aug 15, 2022).

Feature request

Support for Postgres DBs to use TLS during connection. Maybe add a config option that switches it on/off. Changes would be made to the following lines in app.go.

dbString = fmt.Sprintf(
	"host=%s port=%d dbname=%s user=%s password=%s sslmode=disable",
	cfg.DBhost,
	cfg.DBport,
	cfg.DBname,
	cfg.DBuser,
	cfg.DBpass,
)

Our databases run on separate machines on the same network, TLS connections are essential for security.

This is simple to change and I have it working with a quick patch, but thought I should open a PR to push a more polished version upstream later.

Originally created by @Zk2u on GitHub (Aug 15, 2022). <!-- Headscale is a multinational community across the globe. Our common language is English. Please consider raising the feature request in this language. --> **Feature request** Support for Postgres DBs to use TLS during connection. Maybe add a config option that switches it on/off. Changes would be made to the following lines in `app.go`. ```go dbString = fmt.Sprintf( "host=%s port=%d dbname=%s user=%s password=%s sslmode=disable", cfg.DBhost, cfg.DBport, cfg.DBname, cfg.DBuser, cfg.DBpass, ) ``` <!-- Please include the reason, why you would need the feature. E.g. what problem does it solve? Or which workflow is currently frustrating and will be improved by this? --> Our databases run on separate machines on the same network, TLS connections are essential for security. This is simple to change and I have it working with a quick patch, but thought I should open a PR to push a more polished version upstream later.
adam added the enhancement label 2025-12-29 01:26:34 +01:00
adam closed this issue 2025-12-29 01:26:34 +01:00
Author
Owner

@juanfont commented on GitHub (Aug 15, 2022):

@617a7a this looks like a simple change. Can you raise a PR?

@juanfont commented on GitHub (Aug 15, 2022): @617a7a this looks like a simple change. Can you raise a PR?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#310