Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
155 views
in Technique[技术] by (71.8m points)

Field-level encryption in quarkus mongodb panache

i am trying to facilitate field-level encryption with quarkus mongodb panache, but struggle to find a guideline or example.

  • Is it possible to en-/decrypt specific fields with quarkus mongodb panache?
  • Or does a converter exist that i can attach to a field and implement the encryption inside the converter?
  • Or is it possible to provide quarkus mongodb panache with a specifically configured MongoClient to use the mongodb "client side encryption"?

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Quarkus creates the MongoClient for you and make it available via CDI.

MongoDB with Panache uses this MongoClient.

There is currently no way to provides an AutoEncryptionSettings for the creation of this MongoClient so Client Side Encryption cannot be used.

You can open an enhancement request to Quarkus to provides a way to configure client side encryption for MongoDB. But be aware that this will not currently work in native mode as the mongocrypt library needed for client side encryption is a native library so will not works OOTB with GraalVM native images.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...