After running the ciphertool.bat or ciphertool.sh script in the bin directory of WSO2 Identity server, the next time the server is started up, you are presented with a prompt that asks you for the keystore and private key password used to configure the WSO2 secure vault. Example:
C:\Program Files\WSO2\Identity Server\5.7.0\bin>wso2server.bat --start
JAVA_HOME environment variable is set to C:\Program Files\Java\jdk1.8.0_181
CARBON_HOME environment variable is set to C:\PROGRA~1\WSO2\IDENTI~1\570D0D~1.0\bin\..
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
[Enter KeyStore and Private Key Password :]
I have a WSO2 identity server instance that is running in a Docker container. My passwords are encrypted so I need to provide a keystore/private key password on startup.
This presents an issue though:
I have to run my docker container with the -it
flag in order to create an active bash shell in the container that allows me to type in the keystore and private key password. My docker run command looks like this docker run -p 443:443 -it wso2-test .
. If I don't include the -it
flag, WSO2 IS will never ask for the password and the passwords won't get resolved, causing everything to fail.
I don't want to use the -it
flag because it forces user input and I'd like the containers to run independently.
In order to keep things as automated as possible, I want to provide the keystore and private key password right away when I run the wso2server.sh
script (which is the entrypoint of my Dockerfile), rather than when the prompt is presented. Is this possible?
Ideally, a solution would have a Dockerfile entrypoint that looks something like this:
ENTRYPOINT ["wso2server.sh", "run", "KEYSTORE_PASSWORD"]
ciphertool.sh -Dconfigure
in one pack(say A) and copiedsecret-conf.properties
to the other one(say B). Then tried to start B, it asked for theKeyStore and Private Key Password
. Therefore please check again whether you have correctly copiedsecret-conf.properties
to the Dockerized implementation from the other pack which you ranciphertool.sh -Dconfigure
. – Sajith-it
flag was added. With the -it
flag, it works as expected. However, I want to be able to provide the password when I run thedocker run
command rather than having to give user input after thedocker run
command is run. I have updated the question to reflect the new issue. – stanakapassword-persist.txt
orpassword-tmp.txt
as described in below doc? docs.wso2.com/display/Carbon440/Resolving+Encrypted+Passwords – Sajithdaemon.sh
ordaemon.bat
in my WSO2bin
folder. I am running v5.7.0. Am I missing something? Also, the WSO2 documentation readsdaemon. sh wso2server.sh -start
I assume that is supposed to bedaemon.sh wso2server.sh -start
(no space) EDIT: I do seeforgetme.sh
andforgetme.bin
. Is that what I am supposed to be using? – stanakadaemon.sh
script, however. – stanaka