fix: Secure sql connection (#332)

* feat: sql ssl connection

* fix: simpler implementation of ssl-config in sql

* fix(config): set db ssl connection by env vars
This commit is contained in:
Silvan
2020-07-03 12:44:08 +02:00
committed by GitHub
parent a71b5e35d7
commit 6736b2867e
6 changed files with 103 additions and 67 deletions

View File

@@ -21,7 +21,7 @@ type AuthRequestCache struct {
}
func Start(conf Config) (*AuthRequestCache, error) {
client, err := sql.Open("postgres", conf.Connection.ConnectionString())
client, err := conf.Connection.Start()
if err != nil {
return nil, caos_errs.ThrowPreconditionFailed(err, "SQL-9qBtr", "unable to open database connection")
}