nextcloud / nextcloud/documentation
Add SSL verification example for PostgreSQL
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 628
- Forks
- 2.5k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 135
Description
Before You Submit
- I have checked for existing issues and pull requests related to my suggestion.
- I have posted on the Nextcloud Community Help Forum if my suggestion is a troubleshooting scenario or I'm unsure about the solution.
Type of Suggestion
Suggesting an improvement
Relevant Documentation Links
Summary
Add SSL verification example for PostgreSQL
Details
The manual presently only has SSL verification instructions for MySQL
'dbdriveroptions' => [
\PDO::MYSQL_ATTR_SSL_KEY => '/../ssl-key.pem',
\PDO::MYSQL_ATTR_SSL_CERT => '/../ssl-cert.pem',
\PDO::MYSQL_ATTR_SSL_CA => '/../ca-cert.pem',
\PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT => true,
],
It would be very useful (and make a lot of sense) if an equivalent instruction was provided for PostgreSQL users.
Additional Notes
Edit to add
Might be related https://github.com/nextcloud/server/pull/55256 needs to be documented ?
But I'm not at all familiar with the Nextcloud codebase, so someone else will need to verify and write the docs ? Maybe @Altahrim who submitted the merged patch could document it too ?
Edit to add more...
This desperately needs documenting by someone in the know !!!!!
A standalone PHP test:
<?php
$db = pg_connect("host=foo.example.com port=1234 dbname=example user=example password=secretsquirrel sslmode=verify-ca sslrootcert=test.pem");
echo pg_dbname();
Works fine. Connects instantly.
But neither this
'dbname' => 'example',
'dbhost' => 'foo.example.com',
'dbport' => '1234',
'dbtableprefix' => 'oc_',
'dbuser' => 'example',
'dbpassword' => 'example',
'pgsql_ssl' => [
'mode' => 'verify-ca',
'cert' => '',
'key' => '',
'crl' => '',
'rootcert' => 'test.pem',
],
It doesn't matter if I use the full patch to rootcert in the config.php. Nextcloud just hangs.
Removing pgsql_ssl, nextcloud connects fine.
I've no idea what's going on. 🤷
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 with the linked PostgreSQL SSL documentation request, the existing Linux database configuration page, and pull request #55256. Compare the standalone pg_connect example with the shown config.php pgsql_ssl settings and verify the correct behavior before documenting a working PostgreSQL SSL verification example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, postgresql
- Domain
- databases, documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100