Jasypt

Spring Boot auto-configuration for Camel Jasypt encrypted properties.

This starter integrates Jasypt with both Camel’s property placeholder mechanism and Spring Boot’s Environment, so that encrypted values in application.properties (or YAML) are decrypted transparently at runtime. Encrypted values use the ENC(…​) syntax.

Maven coordinates

<dependency>
    <groupId>org.apache.camel.springboot</groupId>
    <artifactId>camel-jasypt-starter</artifactId>
</dependency>

Usage

Add encrypted values to your application.properties using the ENC(…​) syntax:

my.secret = ENC(encrypted-value-here)
camel.component.jasypt.password = the-master-password

Use Camel’s Jasypt tooling to encrypt values:

camel jasypt encrypt --password=the-master-password --input=my-secret-value

Spring Boot Auto-Configuration

The starter supports 9 options, which are listed below.

Name Description Default Type

camel.component.jasypt.algorithm

The algorithm to be used for decryption. Default: PBEWithMD5AndDES

PBEWithMD5AndDES

String

camel.component.jasypt.early-decryption-enabled

Enable the early properties decryption during Spring Start Up. Enabling this feature, encrypted properties can be decrypted before the Spring Boot AutoConfiguration kicks in, for example, server.port=ENC(oBpQDDUvFY0c4WNAG0o4LIS5bWqmlxYlUUDTW2iXJIAZFYvM+3vOredaMcVfL4xW) will be decrypted to 8082, and the application will start using that port.

false

Boolean

camel.component.jasypt.enabled

Enable the component

false

Boolean

camel.component.jasypt.iv-generator-class-name

The initialization vector (IV) generator applied in decryption operations. Default: org.jasypt.iv.

String

camel.component.jasypt.password

The master password used by Jasypt for decrypting the values. This option supports prefixes which influence the master password lookup behaviour: sysenv: means to lookup the OS system environment with the given key. sys: means to lookup a JVM system property.

String

camel.component.jasypt.provider-name

The class name of the security provider to be used for obtaining the encryption algorithm.

String

camel.component.jasypt.random-iv-generator-algorithm

The algorithm for the random iv generator

SHA1PRNG

String

camel.component.jasypt.random-salt-generator-algorithm

The algorithm for the salt generator

SHA1PRNG

String

camel.component.jasypt.salt-generator-class-name

The salt generator applied in decryption operations. Default: org.jasypt.salt.RandomSaltGenerator

org.jasypt.salt.RandomSaltGenerator

String