Security is a key element in the development of any non-trivial application. The Spring Security Framework provides a comprehensive set of functionalities to implement industry-standard authentication and authorization mechanisms for Java applications.
Pro Spring Security will be a reference and advanced tutorial that will do the following:
Guides you through the implementation of the security features for a Java web application by presenting consistent examples built from the ground-up.
Demonstrates the different authentication and authorization methods to secure enterprise-level applications by using the Spring Security Framework.
Provides you with a broader look into Spring security by including up-to-date use cases such as building a security layer for RESTful web services and Grails applications.
What you'll learn
What the basics of securing a Java application, including core security concepts and the step-by-step configuration to include the Spring Security Framework in your web application
What tools are available in Spring security to provide login and logout capabilities, with add-ons such as remember-me and password change functionalities.
What are the types of authentication mechanisms tailored for enterprise-level Java applications, including LDAP, the Central Authentication Service, OpenID and X.509.
How to dive into each of the application layers to control user access to the different architectural elements of your Java application. You will first apply authorization control to each of the components of the Model-View-Controller tier.
How to work with Domain Objects and RESTful web services in our authorization queue in order to fully secure our application by using Access Control Lists, along with Object Level and Method Level authorization.
How to explore the powerful Grails framework and how to use Spring security in the context of a Groovy on Grails application. You will earn about the core security plugin and others such as OpenID, Facebook and Twitter authentication.
Who this book is for
This book is for Java and Grails developers who would like to secure their applications easily by applying industry's best practices. I assume a fair knowledge of Java and a basic knowledge of Spring Dependency Injection.
Table of Contents
- Title Page
- Contents at a Glance
- About the Author
- About the Technical Reviewer
- CHAPTER 1: The Scope of Security
- CHAPTER 2: Introducing Spring Security
- CHAPTER 3: Spring Security Architecture and Design
CHAPTER 4: Web Security
- Introducing the Simple Example Application
- The Special URLs
- Custom Login Form
- Basic HTTP Authentication
- Digest Authentication
- Remember-Me Authentication
- Allowing Remember-Me Access to Selected Parts of the Application
- Logging Out
- The Session (javax.servlet.http.HttpSession) and the SecurityContext
- Beyond Simple User Roles: Using Spring Expression Language to Secure the Web Layer
- Extend with Your Own Expressions
- Switching to a Different User
- Session Management
- Forcing the Request to HTTPS
- Role Hierarchies
CHAPTER 5: Securing the Service Layer
- The Limitations of Web-Level Security
- What Is Business Service-Level Security?
- Setting Up the Example for the Chapter
- How the Described Actions Happen Under the Hood
- Creating a Business Layer in Your Application
- @RolesAllowed Annotation
- Securing the Application Using SpEL Expressions
- Securing the Data Returned from a Method
- Filtering Collections Sent and Returned from Methods
- Security Defined in XML
- Security Without a Web Layer
- Using AspectJ AOP instead of Spring AOP
- CHAPTER 6: Configuring Alternative Authentication Providers
- CHAPTER 7: Business Object Security with ACLs
CHAPTER 8: Customizing and Extending Spring Security
- Spring Security Extension Points
- Plug into the Spring Security Event System
- Your Own AuthenticationProvider and UserDetailsService
- Password Encryption
- New Voters in AccessDecisionManager
- Nonvoter AccessDecisionManager Implementations
- New Expression Root and SpEL
- Non-JDBC AclService
- Custom Security Filter
- Handling Errors and Entry Points
- Changing the Security Interceptor
- Spring Security Extensions Project
CHAPTER 9: Integrating Spring Security with Other Frameworks and Languages
- Spring Security with Struts 2
- Spring Security with Spring Web Flow
- Spring Security in Other JVM Languages
- Spring Security and Ruby (JRuby)
- Web-Layer Security in Rails
- Spring Security, Groovy, and Grails
- Using Grails to Secure the Web Layer with URL Rules
- Using Grails Security at the Method Level
- Spring Security and Scala
- Title: Pro Spring Security
- Release date: March 2013
- Publisher(s): Apress
- ISBN: 9781430248187