-
Notifications
You must be signed in to change notification settings - Fork 18
MongoHealthIndicator does not function for encrypted MongoClient #269
Copy link
Copy link
Open
Labels
type: bugSomething isn't workingSomething isn't workingtype: improvementA minor improvement to an existing featureA minor improvement to an existing feature
Description
Expected Behavior
Application starts up no errors
Actual Behaviour
Then the following error appears in the logs:
[default-nioEventLoopGroup-1-3] ERROR i.m.m.health.indicator.HealthResult - Health indicator [mongodb (Primary)] reported exception: com.mongodb.MongoClientException: Exception in encryption library: command not supported for auto encryption: buildinfo
This seems to be because MongoHealthIndicator uses the "buildinfo" command, which isn't a command that the mongocrypt library currently considers bypassable (https://jira.mongodb.org/projects/MONGOCRYPT/issues/MONGOCRYPT-308; https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/client-side-encryption.rst#libmongocrypt-auto-encryption-allow-list).
In order to support encryption, either the hardcoded command needs to be a bypassable one, or users should be able to configure the command to run in their YAML.
Steps To Reproduce
Specify an encrypted MongoClient bean to be eagerly created at startup, i.e.:
@Factory
class MongoFactory {
@Context
MongoClient mongoClient() {
(...create the CSFLE client here)
}
Start application and observe logs
Environment Information
- MacOS Monterey 12.2.1
- SDK 1.8.0_211
Example Application
No response
Version
2.3.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type: bugSomething isn't workingSomething isn't workingtype: improvementA minor improvement to an existing featureA minor improvement to an existing feature