pgadmin-org / pgadmin-org/pgadmin4
SSLMode verify-full not working for pgadmin_servers.json
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 891
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 8
Description
I can't get pgadmin_servers.json to work with sslmode verify-full, I really don't know if it's a configuration bug or a misswriten configuration by my side.
I know the certificate and key + authority are working since my PGAdmin settings are connected to postgresql with the environment variables "PGADMIN_CONFIG_CONFIG_DATABASE_URI" and I verified them multiple times just in case.
pgadmin_servers.json :
{
"Servers": {
"1": {
"Name": "Core",
"Group": "Servers",
"Host": "[redacted]",
"Port": [redacted],
"MaintenanceDB": "postgresql",
"Username": "[redacted]",
"ConnectionParameters": {
"connect_timeout": 10,
"sslmode": "verify-full",
"sslcert": "/mypath/chain.crt",
"sslkey": "/mypath/key.pem"
}
}
}
}
I have the following environment variables :
- PGADMIN_CONFIG_CONFIG_DATABASE_URI : postgresql+psycopg://[redacted]:[redacted]@[redacted]:[redacted]/[redacted]?sslmode=verify-full&sslrootcert=/mypath/authority/chain_authority.crt&sslcert=/mypath/chain.crt&sslkey=/mypath/key.pem
- PGSSLROOTCERT=/mypath/authority/chain_authority.crt
Without specifying PGSSLROOTCERT, I was having errors that PGAdmin could not find any root.crt in the home path which i'm not using and after this error I got the one in the image below.
Expected behavior
Normally after configuring sslcert and sslkey inside of ConnectionParameters, the server connection should use those settings to establish the connection.
Error message
Here is the error I'm getting when I input the database password :
Desktop (please complete the following information):
- OS: Arch Linux
- pgAdmin version: 9.15.0
- Mode: Server
- Browser Opera GX
- Package type: Docker
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the pgadmin_servers.json configuration in the Docker package, focusing on how ConnectionParameters handles sslmode, sslcert, sslkey, and PGSSLROOTCERT. Confirm whether verify-full uses the supplied certificate paths and document the result when the connection succeeds with the expected PostgreSQL SSL settings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, postgresql
- Domain
- databases, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100