Storage Converter plugin throws null pointer exception

719 views
Skip to first unread message

Anand Parthiban

unread,
Mar 3, 2016, 12:41:44 AM3/3/16
to rundeck-discuss
Hi,

When i try to encrypt my password to store in the keystore. The storage converter plugin always throws an error.

Here is my config.

rundeck.storage.converter.1.type=jasypt-encryption
rundeck.storage.converter.1.path=keys
rundeck.storage.converter.1.config.encryptorType=custom
rundeck.storage.converter.1.config.passwordEnvVarName=ENC_PASSWORD
rundeck.storage.converter.1.config.algorithm=PBEWITHSHA256AND128BITAES-CBC-BC
rundeck.storage.converter.1.config.provider=BC

Error

Request: /storage/upload/keys?id=uploadKeyForm&dontOverwrite=true&uploadPassword=root123&fileName=JBPM_DEV&relativePath=NIX%2Fjbpm_dev&uploadKeyType=password&inputType=text&SYNCHRONIZER_URI=%2Fmenu%2Fstorage&SYNCHRONIZER_TOKEN=811355a95d9d20f71458c3f5b0e1ae9a44c40a01fa46540debf8c2cb4edadb79&storagefile=org.springframework.web.multipart.commons.CommonsMultipartFile%4035439871&resourcePath=keys%2FNIX%2Fjbpm_dev
Message:
Caused by:
Class: StorageController
At Line: [395]
Code Snippet:

Stack Trace

java.lang.NullPointerException
	at org.jasypt.encryption.pbe.config.SimplePBEConfig.getPasswordCharArray(SimplePBEConfig.java:434)
	at org.jasypt.encryption.pbe.StandardPBEByteEncryptor.resolveConfigurationPassword(StandardPBEByteEncryptor.java:783)
	at org.jasypt.encryption.pbe.StandardPBEByteEncryptor.initialize(StandardPBEByteEncryptor.java:598)
	at org.jasypt.encryption.pbe.StandardPBEByteEncryptor.encrypt(StandardPBEByteEncryptor.java:873)
	at org.rundeck.plugin.encryption.JasyptEncryptionConverterPlugin$EncryptStream.getInputStream(JasyptEncryptionConverterPlugin.java:407)
	at org.rundeck.plugin.encryption.JasyptEncryptionConverterPlugin$EncryptStream.writeContent(JasyptEncryptionConverterPlugin.java:412)
	at com.dtolabs.rundeck.core.storage.BaseStreamResource.writeContent(BaseStreamResource.java:31)
	at com.dtolabs.rundeck.core.storage.BaseStreamResource.writeContent(BaseStreamResource.java:31)
	at com.dtolabs.rundeck.core.storage.BaseStreamResource.writeContent(BaseStreamResource.java:31)

Anand Parthiban

unread,
Mar 21, 2016, 6:25:19 AM3/21/16
to rundeck-discuss
Guys,


Anyone came across this error.

Martin Woit

unread,
May 13, 2016, 10:16:33 AM5/13/16
to rundeck-discuss
Hi Anand,

did you already found the root cause of this error?

Сипун Илдаков

unread,
Oct 14, 2016, 2:47:13 AM10/14/16
to rundeck-discuss
Hi, guys!
I have a same trouble. Also error is: no such provider: BC
Anybody fix this problem?

try on java8 and java7. Rundeck version - 2.6.9-1
My config:
rundeck.storage.converter.1.type=jasypt-encryption
rundeck.storage.converter.1.path=keys
rundeck.storage.converter.1.config.encryptorType=custom
rundeck.storage.converter.1.config.password=123456
rundeck.storage.converter.1.config.algorithm=PBEWITHSHA256AND128BITAES-CBC-BC
rundeck.storage.converter.1.config.provider=BC

четверг, 3 марта 2016 г., 8:41:44 UTC+3 пользователь Anand Parthiban написал:

Сипун Илдаков

unread,
Oct 14, 2016, 7:15:14 AM10/14/16
to rundeck-discuss
I fix it!
We need:
1.Add the Bouncy Castle provider (http://www.bouncycastle.org/latest_releases.html) jar to the $JAVA_HOME/jre/lib/ext directory
2.Create a Bouncy Castle provider entry in the $JAVA_HOME/jre/lib/security/java.security file. Looks like:
security.provider.1=sun.security.provider.Sun
security
.provider.2=org.bouncycastle.jce.provider.BouncyCastleProvider
...
3. my ./rundeck-config.properties example:
rundeck.storage.converter.1.type=jasypt-encryption
rundeck.storage.converter.1.path=keys
rundeck.storage.converter.1.config.encryptorType=basic
rundeck.storage.converter.1.config.password=ENC_PASSWORD
rundeck.storage.converter.1.config.provider=BC



пятница, 14 октября 2016 г., 9:47:13 UTC+3 пользователь Сипун Илдаков написал:
Reply all
Reply to author
Forward
0 new messages