SkillAgentSearch skills...

Hdiv

Hdiv CE | Application Self-Protection

Install / Use

/learn @hdiv/Hdiv
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Build Status Maven Central GitHub license

Hdiv

New to Hdiv? Check this out

Hdiv: Application Self-Protection

Hdiv is a leading provider of open source software for real-time, self-protected applications. Hdiv solutions are built into applications during development to deliver the strongest available runtime application self-protection (RASP) against OWASP Top 10 threats. Since 2008, Hdiv has pioneered self-protection cyber security software, and today its solutions are used by leading commercial software providers and global enterprises in banking, government, retail, technology, and aerospace.

Official Site: https://hdivsecurity.com

Online documentation: https://hdivsecurity.com/docs/

Community Technical documentation: https://hdivsecurity.com/docs/installation/library-setup/

April 20th, 2018 - Hdiv v3.4.0 released!

How does Hdiv help?

Hdiv repels 90% of application security risks included in the OWASP Top 10—a broad consensus of the most critical web application security flaws —such as SQL injection, cross-site scripting, cross-site request forgery, data tampering, and brute force attacks. Hdiv offers higher effectiveness than any of the solutions currently available to fight web application security risks.

  • Want to ensure strong security without having to know and understand all current security threats.

  • Want strong security without compromising application performance or the user experience.

  • Want to build security into applications while in development, instead of having to go back and patch and tweak applications later.

Editions

Hdiv Community

Is an open-source web application security framework that includes read-only data protection and editable data risk mitigation. It is appropriate for customers who have less stringent security requirements but want protection from cyber threats.

Hdiv Enterprise

Is a commercial all-in-one solution integrating the best of AST (Application Security Testing), RASP (Runtime application self protection), and WAF (Web application firewall) approaches with enterprise-class security, exclusive functionality, scalability, and enterprise-level support services. For more information, contact us at support@hdivsecurity.com

Hdiv

Installation

Spring MVC

-

https://www.youtube.com/watch?v=6-BNTh8AqQY

Steps

Thanks to the new extension point included in Spring 3.1, Hdiv installation and configuration for Spring MVC is cleaner and easier than previously.

  1. Add Hdiv Jars.

     <dependency>
         <groupId>org.hdiv</groupId>
         <artifactId>hdiv-config</artifactId>
         <version>3.3.0</version>
     </dependency>
     <dependency>
         <groupId>org.hdiv</groupId>
         <artifactId>hdiv-spring-mvc</artifactId>
         <version>3.3.0</version>
     </dependency>
    
  2. Add Hdiv listener and filter within web.xml file.

     <listener>
         <listener-class>org.hdiv.listener.InitListener</listener-class>
     </listener>
    
     <!-- Hdiv Validator Filter -->
     <filter>
         <filter-name>ValidatorFilter</filter-name>
         <filter-class>org.hdiv.filter.ValidatorFilter</filter-class>
     </filter>
     <filter-mapping>
         <filter-name>ValidatorFilter</filter-name>
         <!-- Spring MVC Servlet name-->
         <servlet-name>SampleMvc</servlet-name>
     </filter-mapping>
    
  3. Multipart configuration. Replace Spring MVC's MultipartResolver with the one from Hdiv. If commons-fileupload library is used for multipart processing:

     <bean id="multipartResolver" class="org.hdiv.web.multipart.HdivCommonsMultipartResolver">
         <property name="maxUploadSize" value="100000" />
     </bean>
    

    If Servlet 3 standard multipart processing is used:

     <bean id="multipartResolver" class="org.hdiv.web.multipart.HdivStandardServletMultipartResolver"></bean>
    
  4. Editable data validation. In order to add editable validation errors into Spring MVC binding and validation errors, configure hdivEditableValidator as application wide validator.

     <mvc:annotation-driven validator="hdivEditableValidator"/>
    

If you are using a Spring MVC version prior to 3.1, it is necessary to introduce an additional step, replacing Spring MVC tlds with Hdiv tlds according to the specific version. The next example shows the code for Spring MVC 3.0.4:

    <jsp-config>
        <taglib>
            <taglib-uri>http://www.springframework.org/tags/form</taglib-uri>
            <taglib-location>/WEB-INF/tlds/hdiv-spring-form-3_0_4.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>http://www.springframework.org/tags</taglib-uri>
            <taglib-location>/WEB-INF/tlds/hdiv-spring.tld</taglib-location>
        </taglib>
    </jsp-config>

Spring MVC and Thymeleaf

Thanks to the implementation of RequestDataValueProcessor interface in Thymeleaf, Hdiv support is straightforward.

  1. Follow configuration steps for Spring MVC installation.

  2. Add Hdiv jar for Thymeleaf

     <dependency>
         <groupId>org.hdiv</groupId>
         <artifactId>hdiv-thymeleaf</artifactId>
         <version>3.3.0</version>
     </dependency>
    

Grails

With the plugin architecture and Hdiv Plugin implementation supported by Grails, Hdiv installation is implemented using the BuildConfig.groovy configuration file adding the Hdiv plugin to it:

compile ':hdiv:1.0-RC2'

JSTL

  1. Add Hdiv jars.

     <dependency>
         <groupId>org.hdiv</groupId>
         <artifactId>hdiv-config</artifactId>
         <version>3.3.0</version>
     </dependency>
     <dependency>
         <groupId>org.hdiv</groupId>
         <artifactId>hdiv-jstl-taglibs-1.2</artifactId>
         <version>3.3.0</version>
     </dependency>
    
  2. Add Hdiv Listener and Filter within web.xml file

     <listener>
         <listener-class>org.hdiv.listener.InitListener</listener-class>
     </listener>
    
     <!-- Hdiv Validator Filter -->
     <filter>
         <filter-name>ValidatorFilter</filter-name>
         <filter-class>org.hdiv.filter.ValidatorFilter</filter-class>
     </filter>
     <filter-mapping>
         <filter-name>ValidatorFilter</filter-name>
         <!-- Spring MVC Servlet name-->
         <servlet-name>SampleMvc</servlet-name>
     </filter-mapping>
    
     <!-- Replace JSTL tld with Hdiv tld-->
     <jsp-config>
         <taglib>
             <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
             <taglib-location>/WEB-INF/tlds/hdiv-c.tld</taglib-location>
         </taglib>
     </jsp-config>
    

Struts 1

  1. Add Hdiv jars.

     <dependency>
         <groupId>org.hdiv</groupId>
         <artifactId>hdiv-config</artifactId>
         <version>3.3.0</version>
     </dependency>
     <dependency>
         <groupId>org.hdiv</groupId>
         <artifactId>hdiv-struts-1</artifactId>
         <version>3.3.0</version>
     </dependency>
    
  2. Add Hdiv listener and Filter within web.xml file.

     <!-- Hdiv Initialization listener -->
     <listener>
         <listener-class>org.hdiv.listener.InitListener</listener-class>
     </listener>
    
     <!-- Hdiv Validator Filter -->
     <filter>
         <filter-name>ValidatorFilter</filter-name>
         <filter-class>org.hdiv.filter.ValidatorFilter</filter-class>
     </filter>
     <filter-mapping>
         <filter-name>ValidatorFilter</filter-name>
         <url-pattern>*.do</url-pattern>
     </filter-mapping>
    
     <!-- Replace Struts 1 tld with Hdiv tlds -->
     <jsp-config>
         <taglib>
             <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
             <taglib-location>/WEB-INF/hdiv-html.tld</taglib-location>
         </taglib>
         <taglib>
             <taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri>
             <taglib-location>/WEB-INF/hdiv-nested.tld</taglib-location>
         </taglib>
         <taglib>
             <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
             <taglib-location>/WEB-INF/hdiv-logic.tld</taglib-location>
         </taglib>
     </jsp-config>
    

Struts 2

The latest Struts 2 version supported by Hdiv is Struts 2.0.11. Higher versions are supported by Hdiv Enterprise Edition.

  1. Add Hdiv jars.

     <dependency>
         <groupId>org.hdiv</groupId>
         <artifactId>hdiv-core</artifactId>
         <version>2.0.4</version>
     </dependency>
     <dependency>
         <groupId>org.hdiv</groupId>
         <artifactId>hdiv-struts-2.0.11</artifactId>
         <version>2.0.4</version>
     </dependency>
    
  2. Add Hdiv Listener and Filter within web.xml file.

     <!-- Hdiv Initialization listener -->
     <listener>
         <listener
    
View on GitHub
GitHub Stars219
CategoryDevelopment
Updated2d ago
Forks73

Languages

Java

Security Score

80/100

Audited on Mar 30, 2026

No findings