aashnanahar Posted March 27, 2017 Share Posted March 27, 2017 Hi Team,I followed the below steps to get the encryption turned on :1. Go to your Jaspersoft Install files: $jasper_installjasperreports-server-5.6.1-binbuildomaticdefault_master.properties2. Enter the correct value for Jasper DB Password in plain text3. Ensure all other values are still valid, such as Tomcat directory etc.4. Change the encrypt.done=true to encrypt=true5. Save the file.6. Now navigate to $jasper_installjasperreports-server-5.6.1-binbuildomatic7. Run the command:js-ant refresh-configThis will remove and recreate all the configuration files without deploying them to the application server.I was able to get the password encrypted in context.xml located at $jasper_installjasperreports-server-5.6.1-binbuildomaticbuild_confdefaultwebappMETA-INF and I copied the same to my tomact directory $JSTomcatwebappsreportserviceMETA-INFcontext.xml and restarted the server. After that I am not able to access the homepage.(http://localhost:8080/jasperserver/home.html)It gives me HTTP Status 404 Error.There are no error in the logs and below is the snippet from my context.xml<Resource name="jdbc/jasperserver" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" username="postgres" password="ENC-80d75f96110c52d1b163b2a3838cb8bb3d643a4a6fa65e1812be0e258846952d-" driverClassName="org.postgresql.Driver" accessToUnderlyingConnectionAllowed = "true" validationQuery="SELECT 1" testOnBorrow="true" url="jdbc:postgresql://127.0.0.1:5432/jasperserver" factory="com.jaspersoft.jasperserver.tomcat.jndi.JSCommonsBasicDataSourceFactory" />server.xml: </GlobalNamingResources> <Service name="Catalina"> <Connector port="8080" URIEncoding="UTF-8" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" scheme="http" secure="false" keystoreFile="D:/Users/aaashna/.keystore" keystorePass="changeit"/> Link to comment Share on other sites More sharing options...
aashnanahar Posted April 4, 2017 Author Share Posted April 4, 2017 On Apache Tomcat the encryption of password can be easily achieved by following steps:1. change the encryption tag to true in default_master.properties.encrypt=true2. From command prompt run the below command:C:Jaspersoftjasperreports-server-6.3.0buildomatic> js-ant refresh-configthis will give you the encrypted password in default_master.properties.3. Replace that password with the plain text password in C:Jaspersoftjasperreports-server-6.3.0apache-tomcatwebappsjasperserver-proMETA-INFcontext.xml.username="postgres" password="ENC-c7a3834ea09b0c47dc9ea00cc390222bb3965623bcbe960ca73899be5ed3a020-"Make sure the username and password in both the files(default_master.properties and context.xml) should be same.Create and entry in C:Jaspersoftjasperreports-server-6.3.0apache-tomcatwebappsjasperserver-proWEB-INFweb.xml in case of an external db configuration.<resource-ref> <description>My Database database</description> <res-ref-name>jdbc/newdb</res-ref-name> <res-type>javax.sql.ConnectionPoolDataSource</res-type> <res-auth>Container</res-auth> </resource-ref>4. start and stop the tomcat server and you are all set. Link to comment Share on other sites More sharing options...
Recommended Posts
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