drogonframework / drogonframework/drogon
Postgresql is set to sslmode=require -> connection failed.
- Dominant language
- C++
- Stars
- 14.3k
- Forks
- 1.4k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 14
Description
**Describe the bug**
void DbClientManager::addDbClient(const DbConfig &config)
{
if (std::holds_alternative(config))
{
#if USE_POSTGRESQL
auto &cfg = std::get(config);
auto connStr = buildConnStr(cfg.host,
cfg.port,
cfg.databaseName,
cfg.username,
cfg.password,
cfg.characterSet);
why we are using only host , port , databaseName, username etc only?
what if my postgresql set sslmode=require , then how to include sslmode etc into connection string
ConnectionString = "dbname=defaultdb user=avnadmin password={PASSWORD} host={HOST} port=22389 sslmode=require"
if sslmode=require on postgresql
**To Reproduce**
Steps to reproduce the behavior:
1. Go to aiven cloud (aiven.io)
2. create a postgresql
3. try to connect with drogon
4. and see the error -> ERROR !!!Pg connection failed: FATAL: no pg_hba.conf entry for host {HOST}, user {USER}, database {DB_NAME}, no encryption
PgConnection.cc:161
**Desktop (please complete the following information):**
- OS: ubuntu
- i am using drogon from conan package manager.
Contributor guide
Assessment
This issue has not been assessed yet.