{"id":1840,"date":"2019-06-18T16:33:56","date_gmt":"2019-06-18T11:03:56","guid":{"rendered":"http:\/\/blog.tenthplanet.in\/?p=1840"},"modified":"2026-03-03T10:14:17","modified_gmt":"2026-03-03T10:14:17","slug":"hardening","status":"publish","type":"post","link":"https:\/\/tenthplanet.in\/blogs\/hardening\/","title":{"rendered":"Increase security and performance tuning in pentaho+ and tomcat"},"content":{"rendered":"<p>Hardening is a process of taking a finished application and making it more difficult to reverse engineer and tamper. Combined with secure coding practices, application hardening is a best practice for companies to protect their app&#8217;s IP and prevent misuse, cheating, and repackaging by bad users.<\/p>\n<h3>Tomcat-Hardening<\/h3>\n<p>The below steps to be followed to harden the Tomcat web server to secure the application.<\/p>\n<h4>1. Remove Server Banner<\/h4>\n<p>Open the tomcat application in firefox and verify the server info from firebug.<br \/>\nRemoving Server Banner from HTTP Header is one of the first things to do as hardening. Having server banner expose the product you are using and leads to information leakage vulnerability.<\/p>\n<p>i. Go to &lt;tomcat installed directory&gt;\/conf folder<\/p>\n<p>ii. Modify server.xml by using vim editor<\/p>\n<p>iii. Add following under Connector port and save the file<\/p>\n<pre>Server =\u201d \u201c\n&lt;Connector port=\"8080\" protocol=\"HTTP\/1.1\"\nconnectionTimeout=\"20000\"\nServer =\" \"\nredirectPort=\"8443\" \/&gt;<\/pre>\n<p>Usage: Server banner information should be ignored, since It will protect the server from the hackers to launch Targeted attacks against our web server and version.<\/p>\n<h4>Verification:<\/h4>\n<p>i. Open Firefox with firebug<\/p>\n<p>ii. Access Tomcat application<\/p>\n<p>iii. You will notice Server value is blank now.<\/p>\n<h4>2. Starting Tomcat with a Security Manager<\/h4>\n<p>Security Manager protects you from an untrusted applet running in your browser. Running Tomcat with a security manager is definitely better than running without one.<\/p>\n<pre>start tomcat with \u2013security argument\n&lt;tomcat installed directory&gt;\/bin# .\/startup.sh -security<\/pre>\n<p><strong>Usage:<\/strong> Security Manager protects you from an untrusted applet running in your browser, use of a SecurityManager, while running Tomcat can protect your server from trojan servlets, JSPs, JSP beans, and tag libraries. Or even inadvertent mistakes<\/p>\n<h4>3. Enable access log logging<\/h4>\n<p>The default configuration doesn\u2019t capture access logs. The access log is very useful in troubleshooting to check request type, requester IP address, status code, etc.<\/p>\n<p>i. Go to &lt;tomcat installed directory&gt;\/conf<\/p>\n<p>ii. Modify server.xml by using vi<\/p>\n<p>iii. Go to the end of the file and uncomment Valve entry for valves.AccessLogValue<\/p>\n<p>iv. &lt;Valve className=&#8221;org.apache.catalina.valves.AccessLogValve&#8221;<\/p>\n<p>v. directory=&#8221;logs&#8221;<\/p>\n<p>vi. prefix=&#8221;localhost_access_log.&#8221;<\/p>\n<p>vii. suffix=&#8221;.txt&#8221;<\/p>\n<p>viii. pattern=&#8221;common&#8221; resolveHosts=&#8221;false&#8221;\/&gt;<\/p>\n<p>ix. Restart Tomcat server and you should see localhost_access_log is created under &lt;tomcat installed directory&gt;\/logs folder<br \/>\nUsage: The default configuration doesn\u2019t capture access logs. The access log is very useful in troubleshooting to check request type, requester IP address, status code, etc.<\/p>\n<h4>4. Enforced HTTPS<\/h4>\n<p>It\u2019s good to force redirect all HTTP requests to HTTPS to ensure web application data transmission are over SSL Certification.<\/p>\n<p>i. Go to &lt;tomcat installed directory&gt;\/conf folder<\/p>\n<p>ii. Modify web.xml by using vim editor<\/p>\n<p>iii. Add following before &lt;\/web-app&gt; syntax<\/p>\n<p>iv. &lt;security-constraint&gt;<\/p>\n<p>v. &lt;web-resource-collection&gt;<\/p>\n<p>vi. &lt;web-resource-name&gt;Protected Context&lt;\/web-resource-name&gt;<\/p>\n<p>vii. &lt;url-pattern&gt;\/*&lt;\/url-pattern&gt;<\/p>\n<p>viii. &lt;\/web-resource-collection&gt;<\/p>\n<p>ix. &lt;user-data-constraint&gt;<\/p>\n<p>x. &lt;transport-guarantee&gt;CONFIDENTIAL&lt;\/transport-guarantee&gt;<\/p>\n<p>xi. &lt;\/user-data-constraint&gt;<\/p>\n<p>xii. &lt;\/security-constraint&gt;<\/p>\n<p>xiii. Restart Tomcat and access web application to verify.<\/p>\n<p><strong>Note:<\/strong> ensure Tomcat is configured to run on SSL else it will break the application accessibility.<\/p>\n<h4>5. Add Secure flag in cookie<\/h4>\n<p>It is possible to steal or manipulate web application session and cookies without having a Secure flag in HTTP Header as Set-Cookie.<\/p>\n<p>i. Go to &lt;tomcat installed directory&gt;\/conf folder<\/p>\n<p>ii. Modify server.xml by using vi<\/p>\n<p>iii. Add following in Connector port<\/p>\n<pre>Secure=\u201dtrue\"\n&lt;Connector port=\"8080\" protocol=\"HTTP\/1.1\"\nconnectionTimeout=\"20000\"\nServer=\" \"\nSecure=\"true\"\nredirectPort=\"8443\" \/&gt;<\/pre>\n<p><strong>Usage :<\/strong> The secure flag is an option that can be set by the application server when sending a new cookie to the user within an HTTPS Response.<\/p>\n<p>The purpose of the secure flag is to prevent cookies from being observed by unauthorized parties due to the transmission of a the cookie in clear text.<\/p>\n<p><strong>Verification:<\/strong><\/p>\n<p>i. Open Firefox with firebug<\/p>\n<p>ii. Access your application and check HTTP response header, you should see Secure flag<\/p>\n<h4>6. Add HttpOnly in cookie<\/h4>\n<p>Best practice to have this enabled at application code level. However, due to bad programming or developer\u2019s unawareness, it comes to Web Infrastructure.<\/p>\n<p>i. Go to &lt;tomcat installed directory&gt;\/conf folder<\/p>\n<p>ii. Modify context.xml by using vi<\/p>\n<p>iii. Add following in Context directive<\/p>\n<pre>usehttponly=\u201dtrue\u201d\n&lt;context usehttponly=\"true\"&gt;\u2028...\u2028&lt;\/context&gt;<\/pre>\n<p><strong>Usage:<\/strong> Adding Http only in cookies will prevent the webservers from the steal or manipulate web application session and cookies.<\/p>\n<p><strong>Verification:<\/strong><br \/>\nPress F12 \/ firebug , go to the Cookies tab to verify the tomcat application pages for HttpOnly.<\/p>\n<h4>7. Enable Secure Socket Layer (SSL)<\/h4>\n<p>To enable Tomcat to listen over HTTPS protocol, you must configure tomcat with SSL. This assumes you have SSL Certificate imported under keystore.<\/p>\n<p>i. Go to $tomcat\/conf folder<\/p>\n<p>ii. Modify server.xml by using vim editor<\/p>\n<p>iii. Add following under Connector port<\/p>\n<pre>SSLEnabled=\u201dtrue\u201d scheme=\u201dhttps\u201d keystoreFile=\"conf\/keystore\" keystorePass=\"password\"\n&lt;Connector port=\"8080\" protocol=\"HTTP\/1.1\"\nconnectionTimeout=\"20000\"\nServer=\" \"\nSecure=\"true\"\nSSLEnabled=\"true\" scheme=\"https\" keystoreFile=\"conf\/keystore\" keystorePass=\"password\" clientAuth=\u201dfalse\u201d sslProtocol=\u201dSSLv3\u201d\nredirectPort=\"8443\" \/&gt;<\/pre>\n<p><strong>Usage:<\/strong> It is a standard security protocol for establishing encrypted links between a web server and a browser in an online communication.<\/p>\n<p>The usage of SSL technology ensures that all data transmitted between the web server and browser remains encrypted and securedIt is a standard security protocol for establishing encrypted links between a web server and a browser in an online communication.<\/p>\n<p>The usage of SSL technology ensures that all data transmitted between the web server and browser remains encrypted and secured.<\/p>\n<p><strong>Verification: <\/strong>Open the tomcat application in browser with https:\/\/\/, if you open the same with http:\/\/ then it will not allow you to view the application.<\/p>\n<h4>8. Run Tomcat from non-privileged account<\/h4>\n<p>It\u2019s good to use a separate non-privileged user for Tomcat. The idea here is to protect other services running in case of any security hole.<\/p>\n<p>i. Create a UNIX user<\/p>\n<p>ii. Change &lt;tomcat installed directory&gt; ownership to newly created UNIX user<\/p>\n<p><strong>Usage:<\/strong> For security purpose, tomcat should be run as a separate user with reduced permission, to protect other services running in case of any security hole.<\/p>\n<h4>9. Remove default\/unwanted applications<\/h4>\n<p>By default, Tomcat comes with following web applications, which may or not be required in a production environment. You can delete them to keep it clean and avoid any known security risk with Tomcat default application.<\/p>\n<p>i. ROOT \u2013 Default welcome page<\/p>\n<p>ii. Docs \u2013 Tomcat documentation<\/p>\n<p>iii. Examples \u2013 JSP and servlets for demonstration<\/p>\n<p>iv. Manager, host-manager \u2013 Tomcat administration<\/p>\n<p><strong>Usage:<\/strong> By default, Tomcat comes with sample web applications, which are not be required in a production environment. Clean up and avoid any known security risk with Tomcat default application.<\/p>\n<h4>10. Change SHUTDOWN port and Command<\/h4>\n<p>By default, tomcat is configured to be shutdown on 8005 port. Do you know you can shutdown tomcat instance by doing a telnet to IP:port and issuing SHUTDOWN command?<\/p>\n<pre># telnet localhost 8005\nTrying ::1... telnet:\nconnect to address ::1:\nConnection refused Trying 127.0.0.1...\nConnected to localhost.\nEscape character is '^]'.\nSHUTDOWN Connection closed by foreign host.\n#<\/pre>\n<p>You see having default configuration leads to high-security risk. It\u2019s recommended to change tomcat shutdown port and default command to something unpredictable.<\/p>\n<p>i. Go to $tomcat\/conf folder<\/p>\n<p>ii. Modify server.xml by using vim editor<\/p>\n<pre>&lt;Server port=\"8005\" shutdown=\"SHUTDOWN\"&gt;<\/pre>\n<p><strong>Usage:<\/strong> Default shutdown port and commands leaves anyone to easily connect and shutdown the server, So the default shutdown port and command must be changed or it should be disabled.<\/p>\n<h4>11. Replace default 404, 403, 500 page<\/h4>\n<p>Having default page for not found, forbidden, server error exposes Tomcat version and that leads to security risk if you are running with vulnerable version. Let\u2019s look at default 404 page.<\/p>\n<p>To mitigate, you can first create a general error page and configure web.xml to redirect to general error page.<\/p>\n<p>i. Go to $tomcat\/webapps\/$application<\/p>\n<p>ii. Create an error.jsp file<\/p>\n<pre>#vi error.jsp\n&lt;html&gt;\n&lt;head&gt;\n&lt;title&gt;404-Page Not Found&lt;\/title&gt;\n&lt;\/head&gt;\n&lt;body&gt; That's an error! &lt;\/body&gt;\n&lt;\/html&gt;<\/pre>\n<ul>\n<li>Go to $tomcat\/conf folder<\/li>\n<li>Add following in web.xml by using vi. Ensure you add before &lt;\/web-app&gt; syntax<\/li>\n<\/ul>\n<pre>&lt;error-page&gt;\n&lt;error-code&gt;404&lt;\/error-code&gt;\n&lt;location&gt;\/error.jsp&lt;\/location&gt;\n&lt;\/error-page&gt;\n&lt;error-page&gt;\n&lt;error-code&gt;403&lt;\/error-code&gt;\n&lt;location&gt;\/error.jsp&lt;\/location&gt;\n&lt;\/error-page&gt;\n&lt;error-page&gt;\n&lt;error-code&gt;500&lt;\/error-code&gt;\n&lt;location&gt;\/error.jsp&lt;\/location&gt;\n&lt;\/error-page&gt;<\/pre>\n<p>Restart tomcat server. Now, let\u2019s test it.<\/p>\n<p><strong>Usage:<\/strong> Default error page served by Tomcat can include the server and its configuration \/ path information that could be considered a vulnerability. To prevent this need to have a custom error page.<\/p>\n<p><strong>Verification:<\/strong> Restart tomcat server. Now, let\u2019s test it.<\/p>\n<h4>12. Session Timeout<\/h4>\n<p>The session timeout for all web applications must be set to 20 minutes.<br \/>\nThis can be done by editing the file in the $tomcat\/conf\/web.xml and setting the following configuration option:<\/p>\n<pre>&lt;session-config&gt;\n&lt;session-timeout&gt;20&lt;\/session-timeout&gt;\n&lt;\/session-config&gt;<\/pre>\n<p><strong>Usage:<\/strong> Server terminates automatically, if sessions remains idle for a specific time period<\/p>\n<h3>Pentaho+ Hardening<\/h3>\n<h4>Disable Home Perspective Widgets<\/h4>\n<p>The default console Home perspective contains the Getting Started widget, which has easy instructions and tutorials for evaluators. The directions below show you how to hide not only the Getting Started widget, but also other Home perspective widgets, as needed:<\/p>\n<p>i. Shut down the Pentaho+ Server, if it is currently running.<\/p>\n<p>ii. If you have not deployed yet, navigate to the \/pentaho-platform\/user-console\/source\/org\/pentaho\/mantle\/home\/properties\/config.properties file.<\/p>\n<p>iii. If you have manually deployed and want to hide widgets at a later time, navigate to \/pentaho-server\/tomcat\/webapps\/pentaho\/mantle\/home\/properties\/config.properties file.<\/p>\n<p>iv. Find the line that starts with disabled-widgets= and type in the ID of the widget getting-started. You can also disable the Recents and Favorites widgets using the same method, as shown here. Save and close the file.<\/p>\n<p>v. disabled-widgets=getting-started,recents,favorites<\/p>\n<p>vi. Locate the \/pentaho-server\/tomcat\/webapps\/pentaho\/mantle\/home and open the index.jsp file with any text editor.<\/p>\n<p>vii. Find this line and comment it out, then save and close the file.<\/p>\n<pre>viii. &lt;script language='JavaScript' type='text\/javascript' src='https:\/\/admin.brightcove.com\/js\/BrightcoveExperiences.js'&gt;&lt;\/script&gt;<\/pre>\n<p>ix. Start the Pentaho+ Server and log in to the User Console.<\/p>\n<p>You now have a Home page that is scrubbed of the specified widget(s).<\/p>\n<h4>Turn Autocomplete Off for Web App Login Screen<\/h4>\n<ol>\n<li>The User Console&#8217;s login settings have autocomplete turned off by default; if you need to, here is how to manually disable the autocomplete.<\/li>\n<li>Stop the Pentaho+ Server.<\/li>\n<li>Navigate to the \/pentaho-server\/tomcat\/webapps\/pentaho\/jsp directory and open the PUCLogin.jsp file with any text editor.<\/li>\n<li>Find the following two sections of text and change the autocomplete entry to off, as shown.<\/li>\n<\/ol>\n<pre>&lt;input id=\"j_username\" name=\"j_username\" type=\"text\" placeholder=\"\" autocomplete=\"off\"&gt;\n&lt;input id=\"j_password\" name=\"j_password\" type=\"password\" placeholder=\"\" autocomplete=\"off\"&gt;<\/pre>\n<ol>\n<li>Save and close the PUCLogin.jsp file.<\/li>\n<li>Restart the Pentaho+ Server.<\/li>\n<li>Autocomplete for user names and passwords is now disabled for the User Console login screen.<\/li>\n<\/ol>\n<h4>Remove Sample Data from the Pentaho+ Server<\/h4>\n<p>By default, Pentaho+ provides a sample data source and a solution directory filled with example content. These samples are provided for evaluation and testing. Once you are ready to move from an evaluation or testing scenario to development or production, you can remove the sample content. Follow the instructions below to completely remove the Pentaho+ sample data and solutions:<\/p>\n<p>i. Stop the Pentaho Plus Server.<\/p>\n<p>ii. Delete the samples.zip file from the \/pentaho-server\/pentaho-solutions\/system\/default-content directory. If you performed a manual WAR build and deployment, then the file path is \/pentaho-server\/pentaho-solutions\/system.<\/p>\n<p>iii. Edit the \/pentaho\/WEB-INF\/web.xml file inside of the deployed pentaho.war. As laid down by the Pentaho Plus graphical installer and archive packages, this path should be \/pentaho-server\/tomcat\/webapps\/pentaho\/WEB-INF\/web.xml. If you performed a manual WAR build and deployment, then you must adjust the path to fit your configuration.<\/p>\n<p>iv. Remove the hsqldb-databases section from the \/pentaho\/WEB-INF\/web.xml file:<\/p>\n<p>v. BEGIN HSQLDB DATABASES<\/p>\n<pre>&lt;!-- [BEGIN HSQLDB DATABASES] --&gt;\n&lt;context-param&gt;\n&lt;param-name&gt;hsqldb-databases&lt;\/param-name&gt;\n&lt;param-value&gt;sampledata@..\/..\/data\/hsqldb\/sampledata&lt;\/param-value&gt;\n&lt;\/context-param&gt;\n&lt;!-- [END HSQLDB DATABASES] --&gt;<\/pre>\n<p>vi. Remove the hsqldb-starter\u00a0section from the \/pentaho\/WEB-INF\/web.xml file:<\/p>\n<p>vii. BEGIN HSQLDB STARTER<\/p>\n<pre>&lt;!-- [BEGIN HSQLDB STARTER] --&gt;\n&lt;listener&gt;\n&lt;listener-class&gt;org.pentaho.platform.web.http.context.HsqldbStartupListener&lt;\/listener-class&gt;\n&lt;\/listener&gt;\n&lt;!-- [END HSQLDB STARTER] --&gt;<\/pre>\n<p>viii. Remove the SystemStatusFilter:<\/p>\n<p><strong>Note:<\/strong> This is not part of the Pentaho samples; it provides error status messages that are only useful for development and testing purposes, and should be removed from a production system.<\/p>\n<pre>&lt;filter&gt;\n&lt;filter-name&gt;SystemStatusFilter&lt;\/filter-name&gt;\n&lt;filter-class&gt;com.pentaho.ui.servlet.SystemStatusFilter&lt;\/filter-class&gt;\n&lt;init-param&gt;\n&lt;param-name&gt;initFailurePage&lt;\/param-name&gt;\n&lt;param-value&gt;InitFailure&lt;\/param-value&gt;\n&lt;description&gt;This page is displayed if the Pentaho+ System fails to properly initialize.&lt;\/description&gt;\n&lt;\/init-param&gt;\n&lt;\/filter&gt;<\/pre>\n<p>i. Save and close the web.xml file.<\/p>\n<p>ii. Delete the \/pentaho-server\/data\/ directory. This directory does not exist if you installed Pentaho with the installation wizard. It contains a sample database, control scripts for that database, the environment settings it needs to run, and SQL scripts to initialize a new repository.<\/p>\n<p>iii. Restart the Pentaho+ Server.<\/p>\n<p>iv. Log on to the User Console with the administrator user name and password and go to the Browse Files page.<\/p>\n<ol>\n<li>In the Folders pane, expand the Public folder and click to highlight the folder containing the Steel Wheels sample data. Click Move to Trash in the Folder Actions pane and confirm the deletion.<\/li>\n<li>Highlight the folder containing the Pentaho Plus Operations Mart sample data. Click Move to Trash in the Folder Actions pane and confirm the deletion.<\/li>\n<\/ol>\n<p>Your Pentaho+ Server instance is now cleaned of samples and development\/testing pieces, and is streamlined for production.<\/p>\n<h4>Enable JPivot in the User Console<\/h4>\n<p>We recommend that you use Pentaho+ Analyzer for analytic reporting. However, perform the following steps if you need to enable JPivot on the Pentaho+ Server:<\/p>\n<p><strong>Caustion:<\/strong> JPivot was deprecated in Pentaho 5.0 and is no longer supported by Pentaho Customer Support.<\/p>\n<p>i. Shut down the Pentaho Plus Server if it is currently running.<\/p>\n<p>ii. Navigate to \/pentaho-server\/pentaho-solutions\/system\/pentaho-jpivot-plugin-legacy\/plugin.xml file and delete file.<\/p>\n<p>iii. Rename the file called \/pentaho-server\/pentaho-solutions\/system\/pentaho-jpivot-plugin-legacy\/plugin.xml.enabled to \/pentaho-server\/pentaho-solutions\/system\/pentaho-jpivot-plugin-legacy\/plugin.xml and save it. You can either turn off the deprecation message for JPivot, or restart the Pentaho at this point.<\/p>\n<p>iv. Turn Off Deprecation Message for JPivot &#8211; Optional<\/p>\n<p>v. Shut down the Pentaho Plus Server if it is currently running.<\/p>\n<p>vi. Navigate to the \/pentaho-solutions\/system\/pentaho-jpivot-plugin-legacy\/settings.xml and open the file.<\/p>\n<p>vii. Change the Boolean value as shown and save the file.<\/p>\n<p>From:<\/p>\n<pre>&lt;show-deprecation-warning&gt;true&lt;\/show-deprecation-warning&gt;<\/pre>\n<pre>To:\n&lt;show-deprecation-warning&gt;false&lt;\/show-deprecation-warning&gt;<\/pre>\n<p>Restart the Pentaho+ Server.<\/p>\n<p>The JPivot plug-in is enabled in the User Console and the deprecation message is turned off.<\/p>\n<p>Change the Location of the Server Log File<\/p>\n<p>If you are using Linux, the log4j.xml file is found in \/pentaho-server\/tomcat\/webapps\/pentaho\/WEB-INF\/classes\/.<br \/>\nModify the location as shown in the sample below, using the appropriate path to your installation:<\/p>\n<pre>&lt;param name=\"File\" value=\"home\/pentaho\/server\/pentaho-server\/logs\/pentaho.log\"\/&gt;\n&lt;param name=\"Append\" value=\"true\"\/&gt;<\/pre>\n<h4>Change the Quartz Misfire Threshold<\/h4>\n<p>With Quartz, sometimes scheduled jobs, transformations, or reports might try to run several times when they are manually stopped and restarted, instead of running only once. This is typically caused by the misfireThreshold property in Quartz being set at too high of a number.<\/p>\n<p>These steps show how to reset the misfireThreshold to a lower numerical value.<\/p>\n<p>i. Stop the Pentaho+ Server.<\/p>\n<p>ii. Locate the \/pentaho-server\/pentaho-solutions\/system\/quartz directory.<\/p>\n<p>iii. Open the quartz.properties file with any text editor.<\/p>\n<p>iv. Find the property shown below and change the default to a smaller number, such as 5000. The default value represents the number of milliseconds.<\/p>\n<p>v. org.quartz.jobStore.misfireThreshold = 60000<\/p>\n<p>vi. Save and close the quartz.properties file.<\/p>\n<p>vii. Restart the Pentaho+ Server.<\/p>\n<h4>Set System Max Row Limit for Interactive Reports<\/h4>\n<p>You can prevent too many resources from hitting your database server at once by setting a system-wide maximum row-limit for Pentaho Plus Interactive Reports. Your users can still define their own design-time row limits in PIR, but they will never be able to go over the maximum number of rows that you have specified while designing their reports.<\/p>\n<p>i. Shut down the Pentaho+ Server.<\/p>\n<p>ii. Locate the \/pentaho-server\/pentaho-solutions\/system\/pentaho-interactive-reporting directory.<\/p>\n<p>iii. Open the settings.xml file with any text editor.<\/p>\n<p>iv. Find the &lt;query-limit&gt; tag and change the default number of 100000 within the tags to the maximum number of rows desired.<\/p>\n<p>&lt;!&#8211; The maximum number of rows that will be rendered in a report on PIR edit and view mode. A zero value means no limit. &#8211;&gt;<\/p>\n<pre>&lt;query-limit&gt;100000&lt;\/query-limit&gt;<\/pre>\n<p>i. Save and close the settings.xml file.<\/p>\n<p>ii. Start the Pentaho Plus Server.<\/p>\n<p>If you are migrating content from a previous version, you will need to add the &lt;query-limit&gt; tag to your settings.xml for PIR.<\/p>\n<h4>Roll Back System Max Row Limit<\/h4>\n<p>These instructions show you how to return the system maximum row limit to the Pentaho 5.3 settings.<\/p>\n<p>i. Shut down the Pentaho Server.<\/p>\n<p>ii. Locate the \/pentaho-server\/pentaho-solutions\/system\/pentaho-interactive-reporting directory.<\/p>\n<p>iii. Open the settings.xml file with any text editor.<\/p>\n<p style=\"padding-left: 30px\">1. To change the maximum number of rows that will be rendered in a Pentaho Interactive Report in edit or view mode, find the &lt;design-query-limit&gt; tag and change the default number of 500 back to 25.<\/p>\n<p style=\"padding-left: 30px\">FROM:<\/p>\n<pre style=\"padding-left: 30px\">&lt;design-query-limit&gt;500&lt;\/design-query-limit&gt;<\/pre>\n<p style=\"padding-left: 30px\">TO:<\/p>\n<pre style=\"padding-left: 30px\">&lt;design-query-limit&gt;25&lt;\/design-query-limit&gt;<\/pre>\n<p style=\"padding-left: 30px\">2. To turn the design-query-limit to be OFF by default, find the &lt;design-query-limit-enabled&gt; tags and change the value to false.<\/p>\n<pre style=\"padding-left: 30px\">&lt;design-query-limit-enabled&gt;false&lt;\/design-query-limit-enabled&gt;<\/pre>\n<p style=\"padding-left: 30px\">Save and close the settings.xml file.<\/p>\n<p style=\"padding-left: 30px\">Restart the server.<\/p>\n<h4>Increase the CSV File Upload Limit<\/h4>\n<p>You may find that you need to increase the size of the upload limit for your CSV files. These steps guide you through this process.<\/p>\n<p>i. Go to \/pentaho-server\/pentaho-solutions\/system and open the pentaho.xml file.<\/p>\n<p>ii. Edit the XML as needed (sizes are measured in bytes):<\/p>\n<pre>&lt;file-upload-defaults&gt;\n&lt;relative-path&gt;\/system\/metadata\/csvfiles\/&lt;\/relative-path&gt;\n&lt;!-- max-file-limit is the maximum file size, in bytes, to allow to be uploaded to the server --&gt;\n&lt;max-file-limit&gt;10000000&lt;\/max-file-limit&gt;\n&lt;!-- max-folder-limit is the maximum combined size of all files in the upload folder, in bytes. --&gt;\n&lt;max-folder-limit&gt;500000000&lt;\/max-folder-limit&gt;\n&lt;\/file-upload-defaults&gt;<\/pre>\n<p>i. Save your changes to the file.<\/p>\n<p>ii. In the User Console, go to Tools &gt; Refresh System Settings to ensure that the change is implemented.<\/p>\n<p>iii. Restart the User Console.<\/p>\n<p>Change the Staging Database for CSV Files<\/p>\n<p>Hibernate is the default staging database for CSV files. Follow these instructions if you want to change the staging database.<\/p>\n<p>i. Go to \/pentaho-solutions\/system\/data-access and open the settings.xml file with any text editor.<\/p>\n<p>ii. Edit the settings.xml file as needed. The default value is shown in the sample below.<\/p>\n<p>iii. &lt;!&#8211; settings for Agile Data Access &#8211;&gt;<\/p>\n<p>iv. &lt;data-access-staging-jndi&gt;hibernate&lt;\/data-access-staging-jndi&gt;<\/p>\n<p>This value can be a JNDI name or the name of a Pentaho+ Database Connection.<\/p>\n<p>i. Save and close the file.<\/p>\n<p>ii. Restart the User Console<\/p>\n<h4>Change the Karaf Startup Timeout Setting<\/h4>\n<p>Upon start up, the system waits for Karaf to install all of its features before timing out. If you modify Karaf and it now takes longer to install during start up, you may need to extend the default timeout setting to allow Karaf more time to install. The current default timeout is 2 minutes (120000 milliseconds).<\/p>\n<p>You can change this default timeout by editing the server.properties file.<\/p>\n<p>1. Stop the Pentaho+ Server.<\/p>\n<p>2. Navigate to the \/pentaho-server\/pentaho-solutions\/system directory.<\/p>\n<p>3. Open the server.properties file with any text editor, and search for the karafWaitForBoot parameter.<\/p>\n<p>4. Uncomment the line containing the parameter and set it to your desired wait time in milliseconds.<\/p>\n<p># This sets the amount of time the system will wait for karaf to install all of<br \/>\n# it&#8217;s features before timing out. The default value is 2 minutes but can be<br \/>\n# overridden here.<br \/>\n#karafWaitForBoot = 120000<\/p>\n<p>5. Save and close the file.<\/p>\n<p>6. Restart the Pentaho Plus Server.<\/p>\n<h4>Change the Port Numbers for the Pentaho+ Server<\/h4>\n<p>Follow the instructions below to change the port through which the Pentaho+ Server runs:<\/p>\n<p>i. Stop the Pentaho+ Server.<\/p>\n<p>ii. Navigate to the \/pentaho-server\/tomcat\/conf\/ directory.<\/p>\n<p>iii. Open the server.xml file with any text editor, and search for the value for Define a non-SSL HTTP\/1.1 Connector. Change the port number in the connector port element below from 8080 to your preferred port number.<\/p>\n<pre>&lt;!-- Define a non-SSL HTTP\/1.1 Connector on port 8080 --&gt;\n&lt;Connector port=\"8080\" maxHttpHeaderSize=\"8192\"\nmaxThreads=\"150\" minSpareThreads=\"25\" maxSpareThreads=\"75\"\nenableLookups=\"false\" redirectPort=\"8443\" acceptCount=\"100\"\nconnectionTimeout=\"20000\" disableUploadTimeout=\"true\" \/&gt;<\/pre>\n<p>i. Save and close the server.xml file.<\/p>\n<p>ii. Navigate to the \/pentaho-server\/pentaho-solutions\/system directory and open the server.properties file with any text editor.<\/p>\n<p>iii. Change the fully-qualified-server-url entry to match the new port number you specified in server.xml.<\/p>\n<pre>fully-qualified-server-url=http:\/\/localhost:8080\/pentaho\/<\/pre>\n<p>Save and close the file.<\/p>\n<p>Restart the Pentaho Plus Server.<\/p>\n<p>If you recently upgraded to Pentaho+ 6.0, you may need to remove the &lt;context-param&gt; entry for the fully-qualified-server-url from the \/tomcat\/webapps\/pentaho\/WEB-INF\/web.xml. If so, restart the Pentaho+ Server after removing it.<\/p>\n<h4>Change the Web Application Name or Port<\/h4>\n<p>The Pentaho+ Server and web application default port number is 8080. The default web application name is pentaho, which is the name of the .war file archive, the name of the directory that your application server creates, and also part of the URL structure for all content in the User Console.<\/p>\n<p>If you need to change the User Console application name to something else, or if your Web application server is running on a port other than 8080, follow these instructions for either JBoss or Tomcat.<\/p>\n<h4>Change the Web Application Name on Tomcat<\/h4>\n<p>These instructions only work on Tomcat servers that are configured to accept context.xml overrides built into deployed .war files. Some Tomcat deployments may not have this feature turned on. You can change the Tomcat configuration on your own, or consult your Tomcat documentation to learn about other methods of changing a web application context. Use the XML snippet in these instructions in whichever configuration file you end up creating or modifying.<\/p>\n<p>Follow these instructions to change the web application context for a Pentaho+ .war file that you deployed to a Tomcat server. While the example below uses &#8216;sample&#8217; as the context name, you can use whatever context name you choose.<\/p>\n<p>1. Stop the server.<\/p>\n<p>2. Open the pentaho\/server\/pentaho-server\/tomcat\/webapps\/pentaho\/META-INF\/context.xml file in a text editor, and change the pentaho references in the context path tag to your preferred context name. For example, to specify a context name of &#8216;sample&#8217;, modify context path as follows.<\/p>\n<pre>&lt;context path=\"\/sample\" docbase=\"webapps\/sample\/\"&gt;<\/pre>\n<p>3. Save and close the file.<\/p>\n<p>4. Navigate to the pentaho\/server\/pentaho-server\/tomcat\/webapps folder, and rename the pentaho folder to your preferred context name. In this example, rename the pentaho folder to sample.<\/p>\n<p>5. Edit the pentaho\/server\/pentaho-server\/tomcat\/webapps\/ROOT\/index.jsp file to change the pentaho reference in the URL property to your preferred context name. In this example, use the following line of code to specify &#8216;sample&#8217; as the new context name:<\/p>\n<pre>&lt;meta http-equiv=\u201drefresh\u201d content=\u201d0;URL=\/sample\u201d&gt;<\/pre>\n<p>7.Edit the pentaho\/server\/pentaho-server\/pentaho-solutions\/system\/server.properties file to change pentaho in the value of the fully-qualified-server-url setting to your preferred context name. In this example, set the fully-qualified-server-url as follows.<\/p>\n<pre>fully-qualified-server-url=http:\/\/localhost:8080\/sample\/<\/pre>\n<p>8. Start the server.<\/p>\n<p>Remove sample users and credentials<\/p>\n<p>The sample users and the credentials in the pentaho console should be removed due to security purpose.To do that edit the file called \/pentaho-server\/pentaho-solutions\/system\/pentaho.xml and change the line as shown ln below.<\/p>\n<pre>&lt;login-show-sample-users-hint&gt;false&lt;\/login-show-sample-users-hint&gt;<\/pre>\n<p>Once changed, restart the server and check the pentaho user console and make sure that the default sample user credentials gets removed.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Increase security and performance tuning in Pentaho Plus and tomcat<\/p>\n","protected":false},"author":23,"featured_media":1871,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[424],"tags":[533,464,534],"class_list":["post-1840","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pentaho","tag-pentaho-hardening","tag-pentaho-security","tag-tomcat-hardening"],"acf":[],"_links":{"self":[{"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/posts\/1840","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/users\/23"}],"replies":[{"embeddable":true,"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/comments?post=1840"}],"version-history":[{"count":0,"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/posts\/1840\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/media\/1871"}],"wp:attachment":[{"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/media?parent=1840"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/categories?post=1840"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/tags?post=1840"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}