where to store jasypt password [WINDOWS]

Four Stars

where to store jasypt password [WINDOWS]

What is the best practice to store and access jasypt (env var) password for Runtime?


Linux - I have simple bash script in setenv file to read file with my password and export it to env. variable.

Windows - using talend-esb-wrapper. This approach does not work. One option how to export password into env variable and then use it by jasypt is to configure talend-esb-wrapper.conf: set.default.MY_JASYPT_PASSWORD=supersecretpassword.


Is there better approach on Windows servers how to export local environment variable (only for runtime process)?


Re: where to store jasypt password [WINDOWS]


We will make an investigation on your issue and then come back to you as soon as we can.

Best regards


Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Community Manager

Re: where to store jasypt password [WINDOWS]

You can do this with a bit of Java. I use a mthod like this....


     * getEnvironmentVariable: used to retrieve Environment Variables
     * {talendTypes} String
     * {param} string("JASYPT_Password") variableName: the parameter name to be returned

     * {example} getEnvironmentVariable("JASYPT_Password") # returns "My Password"
	public static String getEnvironmentVariable(String variableName) {
		String returnVal = System.getenv(variableName);

		if (returnVal == null) {
					+ " does not exist or holds no value");

		return returnVal;

However, you may be struggling for other reasons with the runtime. If you are using JASYPT to decrypt values you want to use in context variables, this won't work nicely in the runtime. You will need to use PropertyPlaceholders.


However, if you are just wanting to access the JASYPT password, the code above will work if you have set an appropriately named System Environment Variable and started your services after this has been set.

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now


Introduction to Talend Open Studio for Data Integration.


Downloads and Trials

Test drive Talend's enterprise products.


Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.