conduit-dart / conduit

Dart HTTP server framework for building REST APIs. Includes PostgreSQL ORM and OAuth2 provider.
https://theconduit.dev
BSD 2-Clause "Simplified" License
450 stars 43 forks source link

feat: Allow passing `sslMode` to `PostgreSQLPersistentStore` #224

Closed edlman closed 5 months ago

edlman commented 5 months ago

This change keeps backward compatibility for bool useSSL, but useSSL forces SslMode.verifyFull which is not always suitable.

I've spent few hours to find out why my config value database.sslMode = require is not used as expected and connection fails with invalid server certificate. I found that's because all SSL modes are reduced to boo useSSL = true and this is later used to pass SslMode.verifyFull in PostgreSQL Connection.

j4qfrost commented 5 months ago

I can tag useSSL as deprecated for in the next release. Thanks for finding this. I'll try to integrate this by Friday and release it with version 5.1.0

j4qfrost commented 5 months ago

@edlman I've merged your changes into this branch https://github.com/conduit-dart/conduit/pull/223 and made some tweaks to the testing. It should be ready for release today. I am looking into some of the serialization code for the api and might be ripping out one of the packages, so that might delay release until tomorrow morning. I'll keep you posted.