Go to our support website (http://support.deepnetsecurity.com ) and download the Tomcat 8 Valve zip file.
Unzip the file, open it, and copy the jar files to 'lib' folder on you Tomcat server install path.
Below is the file structure of the sample application. Your Tomcat web application would have a similar file structure.
In the WEB-INF folder, if there is no such a file named “keystore.jks”, then you need to create keystore. You can use the JAVA Keytool to generate a keystore and a key pair:
keytool -genkey -alias acme -keyalg RSA -keystore keystore.jks -keysize 2048
Replace “acme” with your own host or domain name. The alias is used to identify the key pair entry in the keystore, and is used in the next section.
In the META-INF folder, if there is no such file called “context.xml”, then use a text editor to create it with the context below:
keystore="/WEB-INF/keystore.jks" keystorePassword="password" key="acme"
keyPassword="password" idp="/WEB-INF/Idp.xml" appId="ApplicationName">
Replace the text in red colour accordingly. The value of “key” should be the alias that you provided to the keytool in last section. The value of "appId" should be the application name created in the DualShield management console.
In the WEB-INF folder, open the web.xml file in a text editor and add the following content:
In which, “/hello.jsp” is the web page that we want to protect with two-factor authentication. “ROLE_USER” is defined in the Service Provider settings in section above.
We have finished all settings and configuration. Finally, restart your Tomcat server.