I'm trying to set the system property value with encrypted string ${ENC::initial-resolver:ENCRYPTED_STRING}
So I enter the jboss-cli.sh and run the command
/system-property=javax.net.ssl.trustStorePassword:add(value="${ENC::initial-resolver:ENCRYPTED_STRING}")
- I get the information that the operation executes successfully, but when I read the resources I can see that the value is:
:initial-resolver:ENCRYPTED_STRING
and same in the standalone-full-ha.xml <property name="javax.net.ssl.trustStorePassword" value=":initial-resolver:ENCRYPTED_STRING"/>
I tried putting escape characters, using single and/or double quotes, but the only visible result I got was the '$' not be cut like $:initial-resolver:ENCRYPTED_STRING
, no matter what the "{ENC:" and "}" are cut.
I need the value to be stored like it is passed:
${ENC::initial-resolver:ENCRYPTED_STRING}
and in standalone-full-ha.xml:
<property name="javax.net.ssl.trustStorePassword" value="${ENC::initial-resolver:ENCRYPTED_STRING}"/>
The solution was to prevent the parameter's expansion in the bash. Whole solution is described here: https://stackoverflow.com/a/57541782/17651713
/system-property=javax.net.ssl.trustStorePassword:add(value=\$\${ENC::initial-resolver:ENCRYPTED_STRING})