7.4. 暗号化された設定値の使用

pax-jdbc-config バンドルと同様に、Jacsypt を使用してプロパティーを暗号化できます。

OSGi に alias サービスプロパティーで登録される org.jasypt.encryption.StringEncryptor サービスがある場合は、接続 ファクトリーのファクトリー PID で参照し、暗号化されたパスワードを使用できます。以下に例を示します。

felix.fileinstall.filename = */etc/org.ops4j.connectionfactory-artemis.cfg
name = artemis
type = artemis
decryptor = my-jasypt-decryptor
url = tcp://localhost:61616
user = fuse
password = ENC(<encrypted-password>)

復号化サービスの検索に使用するサービスフィルターは (&(objectClass=org.jasypt.encryption.StringEncryptor)(alias=<alias>)) です。<alias> は、接続ファクトリー設定の ファクトリー PID からの decryptor プロパティーの値になります。