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

DB_SSL=verify-full and DB_SSL=verify-ca no longer work #507

Closed
joshuayuen99 opened this issue Sep 14, 2024 · 1 comment
Closed

DB_SSL=verify-full and DB_SSL=verify-ca no longer work #507

joshuayuen99 opened this issue Sep 14, 2024 · 1 comment

Comments

@joshuayuen99
Copy link

It seems like as of v3.0.0 DB_SSL_ROOT_CERT is no longer being used anywhere to construct the connection string, and it results in errors such as:

{"level":"fatal","error":"querying server version tls: failed to verify certificate: x509: certificate signed by unknown authority","time":"2024-09-14T15:01:47-04:00","message":"error running auto migration"}

when attempting to upgrade to v3.0.0 with DB_SSL=verify-full.

It looks like this is what the connection string was when it was previously working in v2.3.2:
internal/database/database.go

connectionString := fmt.Sprintf("host=%s port=%s user=%s password=%s dbname=%s sslmode=%s sslrootcert=%s",
		dbHost, dbPort, dbUser, dbPass, dbName, dbSSL, dbSSLTRootCert)

What it looks like now:
internal/server/server.go

dbString := fmt.Sprintf("user=%s password=%s host=%s port=%s dbname=%s sslmode=%s", envAppConfig.DB_USER, envAppConfig.DB_PASS, envAppConfig.DB_HOST, envAppConfig.DB_PORT, envAppConfig.DB_NAME, envAppConfig.DB_SSL)

cmd/worker/main.go

dbString := fmt.Sprintf("user=%s password=%s host=%s port=%s dbname=%s sslmode=%s", envAppConfig.DB_USER, envAppConfig.DB_PASS, envAppConfig.DB_HOST, envAppConfig.DB_PORT, envAppConfig.DB_NAME, envAppConfig.DB_SSL)
@Zibbp
Copy link
Owner

Zibbp commented Sep 14, 2024

DB SSL functionality has been restored in #508. You can use it now with the :dev image of the API container. Let me know if you have any issues with it.

@Zibbp Zibbp closed this as completed Sep 14, 2024
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

2 participants