Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Brief Introduction 2012 Spring Security. What is it? Security toolkit for Java applications Primarily intended for web applications Open Source from.

Similar presentations


Presentation on theme: "A Brief Introduction 2012 Spring Security. What is it? Security toolkit for Java applications Primarily intended for web applications Open Source from."— Presentation transcript:

1 A Brief Introduction 2012 Spring Security

2 What is it? Security toolkit for Java applications Primarily intended for web applications Open Source from Spring Source (http://www.springsource.org/spring-security)http://www.springsource.org/spring-security Current version is 3.1.1 Requires Java 1.5+ and Spring 3.0.7+

3 Authentication Support Integrates with a wide variety of authentication mechanisms HTTP (Basic/Digest/X.509 certificates) LDAP (and Active Directory) Distributed authentication / Single Sign-On OAuth 1.0, OpenID, SAML, JA-SIG CAS JEE Container-managed authentication Header-based authentication (e.g., Siteminder) Custom implementations And many more… (> 30) Can support multiple mechanisms simultaneously

4 Authorization Support Supports authorization based on URL / URL pattern Similar to url-pattern in web.xml file Supports authorization based on method invocation Done via Aspects Supports the use of annotations Both Spring-specific and JSR-250 Can use all three mechanisms at the same time Also allows you to modify value returned, if needed

5 Simple Example (1) web.xml springSecFilter …DelegatingFilterProxy springSecFilter /* Still need Spring config…

6 Simple Example (2) applicationContext.xml (Spring configuration file) Will expect to have users defined in the XML this way…

7 Slightly More Complex… applicationContext.xml <intercept-url pattern=‘/**’ access=‘ROLE_USER’ requires-channel=‘https’/>

8 Other Features Can configure Spring Security to detect timeouts Detects requests submitted with expired session and redirects to another location Can be used to limit the number of concurrent logins by a user Limit applies to all users not to specific one(s) Supports steps to eliminate session fixation attacks Via session-fixation-protection attribute on session-management element. Allows for user-defined filters to be included in the security checking filter chain Can specify both the additional filter and where in the chain to execute it

9 Authorization Checking Support Default (simple examples) authorization based on: intercept-url protect-pointcut Annotations using: Spring @Secured (e.g., @Secured(“ROLE_ADMIN”) ) JSR-250 annotations Spring Pre/Post annotation (e.g., @PreAuthorize(“hasAuthority(‘ROLE_ADMIN’)”) Annotations only effective when Spring used to instantiate annotated classes! More complex models supported by subclassing AccessDecisionManager class

10 Questions?


Download ppt "A Brief Introduction 2012 Spring Security. What is it? Security toolkit for Java applications Primarily intended for web applications Open Source from."

Similar presentations


Ads by Google