-
Notifications
You must be signed in to change notification settings - Fork 426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always Encrypted Usability Modifications #902
Conversation
…der's client ID and key for Always Encrypted functionality. This now allows these fields to be set via the connection string URL (not recommended) or via the driver's connection properties (recommended). This is required to use Always Encrypted functionality within data processing solutions that initiate the driver for you such as Apache Spark clusters or third-party tools where you cannot programmatically call the static 'registerColumnEncryptionKeyStoreProviders' method on the SQLServerConnection class.
Codecov Report
@@ Coverage Diff @@
## dev #902 +/- ##
============================================
- Coverage 53.41% 50.12% -3.29%
+ Complexity 3334 2881 -453
============================================
Files 119 120 +1
Lines 27988 28014 +26
Branches 4679 4680 +1
============================================
- Hits 14950 14043 -907
- Misses 11001 11711 +710
- Partials 2037 2260 +223
Continue to review full report at Codecov.
|
src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java
Outdated
Show resolved
Hide resolved
Hi @ccdigix Thank you for coming up with the PR, we will review it and come up with improvements soon. |
Thanks @cheenamalhotra - if you need me to amend the pull request in any way then just let me know. |
src/main/java/com/microsoft/sqlserver/jdbc/SQLServerDriver.java
Outdated
Show resolved
Hide resolved
Hi @ccdigix I came up with PR ccdigix/dev#1 to address my comments and also add support for properties to be set by SQLServerDataSource. I also reverted back the change to remove the check in With my changes, we would only read and use connection properties if the Would request you to review and test the changes and let me know for any concerns. |
Hi @cheenamalhotra - made a few comments above about PR ccdigix/dev#1 but overall it looks good - how do you want to move it forward? Do you need me to merge it fully or are you happy to apply it now to the official Microsoft branch? |
Proposed changes for property names and functionalities
Pull request updated and all ready for you @cheenamalhotra |
I have updated the documentation based on Pull request in JDBC driver project (microsoft/mssql-jdbc#902) and tested the feature in JDBC Driver 7.4.1 (latest Stable release).
Added newly introduced Connection String Keywords (keyVaultProviderClientId, keyVaultProviderClientKey) in Microsoft JDBC Driver 7.4 version to enable use of Azure Key Vault Provider Based on MS JDBC Pull Request (microsoft/mssql-jdbc#902) and my testing of its working
As previously discussed on a call with Microsoft (E-Yen Tan, Cheena Malhotra, Raghav Kaushik, and Jakub Szymaszek).
Changes to allow easier access when setting the Azure Key Vault provider's client ID and key for Always Encrypted functionality. This now allows these fields to be set via the connection string URL (not recommended) or via the driver's connection properties (recommended). This is required to use Always Encrypted functionality within data processing solutions that initiate the driver for you such as Apache Spark clusters or third-party tools where you cannot programmatically call the static 'registerColumnEncryptionKeyStoreProviders' method on the SQLServerConnection class.
NOTE: this pull request is merely an indicator of how this could be addressed and probably needs refining before merging (e.g. whilst manually proven there are no automated tests associated with this).