{"repo":"agoston/spring-data-mongodb-encrypt","free":true,"listed":false,"github":"https://github.com/agoston/spring-data-mongodb-encrypt","clone":"git clone https://github.com/agoston/spring-data-mongodb-encrypt.git","description":"Lightweight library for simple & easy per-field encryption in mongodb+spring","language":"Java","stars":87,"topics":["encryption","spring","mongodb","java","spring-data"],"license":"Apache-2.0","category":"security-tools","readme_excerpt":"spring-data-mongodb-encrypt Allows any field to be marked with @Encrypted for per-field encryption. Features - integrates transparently into spring-data-mongodb - supports nested Collections, Maps and beans - high performance (no reflection, optimized encryption) - key versioning (to help migrating to new key without need to convert data) - supports 256-bit AES out of the box - supports any encryption available in Java (via JCE) - simple (cca. 500 lines of code) - tested throughly - no dependencies Backwards compatibility For spring-data 1 projects, please use the spring-data-1 branch. For spring-data 2 projects, please use the spring-data-2 branch. From version 2.9.0 , java 17 or higher is required. If stuck on older java, use version 2.8.0 . For the impatient Add dependency: And add the following to your application.yml : And you're done! Example usage: Example result in mongodb: Manual configuration An example if you need to manually configure spring (see also how tests set up spring mongodb context): Starting mongodb for development (docker) A docker-compose.yml file is provided to allow for quickly running the tests and/or prototyping. Use with docker compose up . Polymorphism (and why it's bad) spring-data-mongodb supports polymorphism via a rather questionable mechanism: when the nested bean's type is not deductable from the java generic type, it would simply place an class field in the document to specify the fully qualified class name for deserialization. This has so","default_branch":null,"files":null,"tree":[],"storefront":"/r/agoston","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/agoston/spring-data-mongodb-encrypt/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}