-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Documentation
-
None
-
Environment:mac os
There are 2 bugs in the client side encryption doc (java driver). The second example does not compile.
it should be
var dataKeyId = clientEncryption.createDataKey("local", new DataKeyOptions());
instead of
var dataKeyId = keyVault.createDataKey("local", new DataKeyOptions());
and
var autoEncryptionSettings = AutoEncryptionSettings.builder() .keyVaultNamespace(keyVaultNamespace) .kmsProviders(kmsProviders) .schemaMap(Map.of....
instead of
var autoEncryptionSettings = AutoEncryptionSettings.builder() .keyVaultNamespace(keyVaultNamespace) .kmsProviders(kmsProviders) .namespaceToLocalSchemaDocumentMap(Map.of
I am talking about this page: https://mongodb.github.io/mongo-java-driver/3.11/driver/tutorials/client-side-encryption/
Also it is only working in java >= Java 10
We should add a comment that you need java 10 or provide a java 8 example
I am seeing lot’s of developers struggling with our examples because they are not as skilled as you might expect them to be
here is my example that works in Java 10
https://github.com/codedearta/mongodb-example-clientside-encryption