Encrypting configuration properties
In real-world applications, we typically store an environment-specific configuration outside of the application, and access it through the properties mechanism described in the Using external properties in Camel routes recipe in Chapter 1, Structuring Routes. This enables us to move an application between development, test, and production environments with no code changes required to repoint it to different databases, message brokers, and so on.
To access these resources we often need to store sensitive information such as passwords. It is considered bad practice to keep these in plain text, as that would allow the reader to freely access those resources. To address this, we need to overlay another mechanism that allows us to hide passwords through encryption.
This recipe will show you how to use the Camel Jasypt Component to manage encrypted configuration values within Camel.
Getting ready
The Java code for this recipe is located in the org.camelcookbook...