Add support for trustServerCertificate flag
See original GitHub issueFeature Request
Is your feature request related to a problem? Please describe
In mssql-jdbc library such option is simply available to developer but in r2dbc it needs some struggle (mostly finding out how to enable it) to use SSL with self signed cert.
Describe the solution you’d like
Add new configuration flag which would control trustServerCertificate
parameter in underlying mssql-jdbc library.
Best to create new parameter in MssqlConnectionConfiguration
which would allow using self signed cert.
Describe alternatives you’ve considered
Using generic ConnectionFactoryOptions with adding custom Option but that in fact calls Mssql factory which omits it.
After abnalyzing mssql-jdbc driver I found out that in case of using this flag it register dummy trust manager so I mimic that:
configBuilder.sslContextBuilderCustomizer(b -> b.trustManager(TrustAllTrustManager.INSTANCE));
Teachability, Documentation, Adoption, Migration Strategy
MssqlConnectionConfiguration.builder().trustServerCertificate();
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
A connection was successfully established with the server, but ...
Data.SqlClient package, above error occurs no more and I don't have to inject TrustServerCertificate flag. 1) Can anyone let me know why this ......
Read more >Support Encrypt flag when building DNS [#2691691] - Drupal
I've been tasked with updating the shared SQL server our drupal installation uses to enforced encryption/SSL, and am wondering if there should ...
Read more >Using Encrypt=yes in a Sql Server connection string ...
I realize this is pretty old, but thought this might still help someone. ... option to add an "ignore this security warning flag"...
Read more >Connection Failures with Microsoft.Data.SqlClient 4 and later
So I just ran into an annoying issue while upgrading to the Microsoft.Data.SqlClient version 4.0.0 . I've been running version 3.0.1 and ...
Read more >How to set and use encrypted SQL Server connections
Enable ForceEncryption option in Flags tab, ... Confirm the settings and restart the SQL Server service to apply changes. ... Add($check).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
also feel free to review PR https://github.com/r2dbc/r2dbc-mssql/pull/186
Great thx, confirmed its ok. The only thing is that I needed to comment out javadocs generation from POM as it was failing: