add rabbitmq jasypt property encryption facility#13676
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #13676 +/- ##
=============================================
- Coverage 17.69% 3.69% -14.01%
=============================================
Files 5925 449 -5476
Lines 533534 38176 -495358
Branches 65273 7072 -58201
=============================================
- Hits 94421 1409 -93012
+ Misses 428434 36580 -391854
+ Partials 10679 187 -10492
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
9adf608 to
55fb559
Compare
|
@blueorangutan package |
There was a problem hiding this comment.
Pull request overview
Adds a Spring PropertyPlaceholderConfigurer implementation in utils to decrypt ENC(...)-wrapped property values using a provided Jasypt StringEncryptor, intended to replace the missing/incompatible jasypt-spring3 placeholder configurer referenced in RabbitMQ encryption docs/config.
Changes:
- Introduces
EncryptablePropertyPlaceholderConfigurerto decryptENC(...)property values during Spring placeholder resolution. - Adds unit tests covering encrypted, whitespace-wrapped encrypted, plain, and null property values.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| utils/src/main/java/com/cloud/utils/crypt/EncryptablePropertyPlaceholderConfigurer.java | New Spring placeholder configurer that decrypts ENC(...) values via Jasypt StringEncryptor. |
| utils/src/test/java/com/cloud/utils/crypt/EncryptablePropertyPlaceholderConfigurerTest.java | Unit tests validating decrypt/pass-through/null handling behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| * This replaces {@code org.jasypt.spring3.properties.EncryptablePropertyPlaceholderConfigurer} | ||
| * (from the jasypt-spring3 artifact), which is not on the classpath and is incompatible with | ||
| * Spring 5, so beans referencing it fail with a ClassNotFoundException. | ||
| */ | ||
| public class EncryptablePropertyPlaceholderConfigurer extends PropertyPlaceholderConfigurer { |
Description
This PR...
Fixes: #13352
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?