4.11 Preventing Clickjacking Attacks

Web applications allow external sites to include content by using IFrames. This enables an attacker to embed the malicious code beneath legitimate clickable content. An attacker can trick a web user into clicking the malicious content that the attacker can control.

To prevent this attack, set the activate parameter of SameOriginFilter to True in the web.xml file. The web.xml file is located at the following location:

Linux: /opt/novell/nids/lib/webapp/WEB-INF/web.xml

Windows: \Program Files (x86)\Novell\Tomcat\webapps\nidp\WEBINF\web.xml

This filter adds the X-FRAME-OPTIONS: SAMEORIGIN header to HTTP responses and prevents cross-domain framing of web pages depending on the browser compatibility.

After updating web.xml, restart the Identity Server by using the following command

Linux: /etc/init.d/novell-idp restart.

Windows: Enter the following commands:

net stop Tomcat7

net start Tomcat7