DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
11 Monitoring and Observability Tools for 2023
Learn more
  1. DZone
  2. Coding
  3. Java
  4. Java Application Security Frameworks

Java Application Security Frameworks

If you're creating a web app, security is more important than ever. Learn about some great Java-based frameworks that add extra security to your apps.

Swathi Prasad user avatar by
Swathi Prasad
·
Sep. 12, 17 · Analysis
Like (20)
Save
Tweet
Share
35.67K Views

Join the DZone community and get the full member experience.

Join For Free

When developing an application, security is a major concern. Any piece of code or application running over a network is vulnerable to risks and can threaten privacy, security, and integrity issues.

According to Open Web Application Security Project (OWASP), the most critical security risks are:

  • SQL Injection.
  • Broken authentication and session management.
  • Cross-Site Scripting (XSS).
  • Insecure Direct Object References.
  • Security Misconfiguration.
  • Sensitive Data Exposure.
  • Missing Function Level Access Control.
  • Cross-Site Request Forgery (CSRF).
  • Using Components with Known Vulnerabilities.
  • Unvalidated Redirects and Forwards.

Visit OWASP Top Ten Cheat Sheet to learn more about these vulnerabilities.

There are several security frameworks designed to make the process of securing an application faster, easier, and many times more successful. Some of them are:

JAAS (Java Authentication and Authorization Services)

JAAS is a security API which consists of a set of Java packages designed for user authentication and authorization. It was introduced as an optional package in Java SE 1.3 and later integrated into the JDK starting with JDK 1.4.

JAAS authentication is performed in a pluggable fashion. This permits the application to remain independent from the underlying authentication technologies.

Check the reference guide for the API and examples.

Spring Security

Spring Security is a highly customizable framework that is widely used to tackle authentication and access control (authorization) issues in Enterprise based applications built on Java.

Authentication is the process of establishing that a principal is who they claim to be (can be a user, device, or some other system which can perform an action in your application). Authorization is a process of deciding whether a principal can perform an action within your application.

I’ve used this framework; it is easy to learn and integrate. Check out the reference guide for more details.

Apache Shiro

Apache Shiro is considered a highly powerful security framework for Java that performs cryptography, authorization, and session management on all types of Java applications, regardless of their size.

Shiro has been designed to be an intuitive and easy-to-use framework while still providing robust security features. It is framework independent and hence can seamlessly work on any Java supported frameworks.

Refer their website for detailed documentation.

HDIV

HDIV is a Java Web Application Security Framework. It extends web applications’ behavior by adding Security functionalities and maintaining the API and the framework specification.

It is widely used for applications built on Struts, Spring MVC, Grails, JSTL, etc. since it offers developers much-needed transparency without adding any complexities in the development of applications.

Check out their documentation for more details.

OACC

OACC is an application security framework for Java designed for fine grained (object level) access control. It focuses on providing a fully featured API to both enforce and manage an application’s authentication and authorization needs – it is a full implementation of a powerful and flexible security model.

OACC uses the abstraction of a resource for the application objects being secured. This key abstraction enables OACC to provide a rich API that includes grant, revoke, and query capabilities for storing and managing the application’s security relationships.

Learn more about OACC here.

Conclusion

All these frameworks protect the applications by offering the required security in terms of authentication, authorization, data validation, session management, encryption, etc. Choose any of these frameworks depending on the privacy, security, and integrity required in your application.

Have you tried any other framework that is not listed here? Let me know in the comments!

Spring Security application Framework Application security Java (programming language)

Published at DZone with permission of Swathi Prasad, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Tackling Technology Challenges for Social Networking Applications With a Distributed SQL Database
  • What Are SLOs, SLIs, and SLAs?
  • The Evolution of Development and Coding
  • Monolithic First

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: