Users can set "encrypt=true" in default_master.properties file to enable encryption of passwords that reside on the file system.
Using this setting, users will be able to encrypt TIBCO JasperReports® Server repository and sample foodmart and sugercrm data source passwords in JasperReports Server JNDI resource context file when deploying JasperReports Server with WAR distribution.
Please refer to "Password encryption" discussion in TIBCO JASPERREPORTS® SERVER INSTALLATION GUIDE RELEASE 6.2, CHAPTER 3 "INSTALLING THE WAR FILE DISTRIBUTION" for more information.
Users can define their JNDI data source in the same META-INFcontext.xml file in JasperReports Server deployment, and use js-ant refresh-config script to generate obfuscated passwords with the same encryption as used in JasperReports Server installation. Users can follow the steps below to set the password encryption for their user defined data source in JasperReports Server:
Add user data source JNDI resource definition to deployed JasperReports Server META-INFcontext.xml file using plain password;
Restart server and test this user JNDI connection to make sure it works
Stop server;
Go to deployed JasperReports Server buildomaticbuild_confdefaultwebappMETA-INF directory, rename context.xml file to context.xml.org. File used here are for command line js-import and js-export utilities.
Edit default_master.properties file under deployed JasperReports Server buildomatic directory, and set the following property settings:
dbPassword={your datasource plain password} ..... encrypt=true ..... propsToEncrypt=dbPassword,sysPassword
Please make sure to comment out "encrypt.done=true" if it exists in this file.
Save the change;
At the command prompt, run the following script under deployed JasperReports Server buildomatic folder:
js-ant refresh-config
This will generate an encrypted password from the plain password provided in dbPassword in step 5;
Open default_master.properties file under deployed JasperReports Server buildomatic directory, copy the encrypted password from dbPassword property setting. For example:
dbPassword=ENC-f190c61be3478ccf8ddb97a30f1ea3aaf121ea798026d406aaaab3f42e44b213-
copy this string
ENC-f190c61be3478ccf8ddb97a30f1ea3aaf121ea798026d406aaaab3f42e44b213-
and paste to replace the plain password in JNDI resource definition deployed in JasperReports Server META-INFcontext.xml (refer to step 1);
Go to deployed JasperReports Server buildomaticbuild_confdefaultwebappMETA-INF directory, delete "context.xml" file, and rename "context.xml.org" file to "context.xml";
Restart server and test this users JNDI connection to verify it now uses encrypted password.
TTC-20160331
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now