diff --git a/doc/src/site/resources/announcements/announcement-0.1.txt b/doc/src/site/resources/announcements/announcement-0.1.txt new file mode 100644 index 0000000000..3847e81c63 --- /dev/null +++ b/doc/src/site/resources/announcements/announcement-0.1.txt @@ -0,0 +1,16 @@ +The acegi-security-doc team is pleased to announce the Acegi Security System +for Spring 0.1 release! + +http://acegisecurity.org/ + +Acegi Security System for Spring + +Changes in this version include: + + New Features: + +o Initial public release + +Have fun! +-The acegi-security-doc team + \ No newline at end of file diff --git a/doc/src/site/resources/announcements/announcement-0.2.txt b/doc/src/site/resources/announcements/announcement-0.2.txt new file mode 100644 index 0000000000..07e4456486 --- /dev/null +++ b/doc/src/site/resources/announcements/announcement-0.2.txt @@ -0,0 +1,34 @@ +The acegi-security-doc team is pleased to announce the Acegi Security System +for Spring 0.2 release! + +http://acegisecurity.org/ + +Acegi Security System for Spring + +Changes in this version include: + + New Features: + +o Added Commons Attributes support and sample (thanks to Cameron Braid) +o Added JBoss container adapter +o Added Resin container adapter +o Added JDBC DAO authentication provider +o Added several filter implementations for container adapter integration +o Added SecurityInterceptor startup time validation of ConfigAttributes +o Added more unit tests + + Fixed bugs: + +o Fixed switch block in voting decision manager implementations + + Changes: + +o Refactored ConfigAttribute to interface and added concrete implementation +o Enhanced diagnostics information provided by sample application debug.jsp +o Modified sample application for wider container portability (Resin, JBoss) +o Removed Spring MVC interceptor for container adapter integration +o Documentation improvements + +Have fun! +-The acegi-security-doc team + \ No newline at end of file diff --git a/doc/src/site/resources/announcements/announcement-0.3.txt b/doc/src/site/resources/announcements/announcement-0.3.txt new file mode 100644 index 0000000000..2d45aa0501 --- /dev/null +++ b/doc/src/site/resources/announcements/announcement-0.3.txt @@ -0,0 +1,28 @@ +The acegi-security-doc team is pleased to announce the Acegi Security System +for Spring 0.3 release! + +http://acegisecurity.org/ + +Acegi Security System for Spring + +Changes in this version include: + + New Features: + +o Added "in container" unit test system for container adapters and sample app +o Added library extractor tool to reduce the "with deps" ZIP release sizes +o Added unit test to the attributes sample +o Added Jalopy source formatting + + Changes: + +o Modified all files to use net.sf.acegisecurity namespace +o Renamed springsecurity.xml to acegisecurity.xml for consistency +o Reduced length of ZIP and JAR filenames +o Clarified licenses and sources for all included libraries +o Updated documentation to reflect new file and package names +o Setup Sourceforge.net project and added to CVS etc + +Have fun! +-The acegi-security-doc team + \ No newline at end of file diff --git a/doc/src/site/resources/announcements/announcement-0.4.txt b/doc/src/site/resources/announcements/announcement-0.4.txt new file mode 100644 index 0000000000..4005eeebe6 --- /dev/null +++ b/doc/src/site/resources/announcements/announcement-0.4.txt @@ -0,0 +1,40 @@ +The acegi-security-doc team is pleased to announce the Acegi Security System +for Spring 0.4 release! + +http://acegisecurity.org/ + +Acegi Security System for Spring + +Changes in this version include: + + New Features: + +o Added HTTP session authentication as an alternative to container adapters +o Added HTTP request security interceptor (offers considerable flexibility) +o Added security taglib +o Added Clover test coverage instrumentation (currently 97.2%) +o Added support for Catalina (Tomcat) 4.1.30 to in-container integration + tests +o Added HTML test and summary reporting to in-container integration tests + + Fixed bugs: + +o Fixed case handling support in data access object authentication provider + + Changes: + +o Updated JARs to Spring Framework release 1.0, with associated AOP changes +o Updated to Apache License version 2.0 +o Updated copyright with permission of past contributors +o Refactored unit tests to use mock objects and focus on a single class each +o Refactored many classes to enable insertion of mock objects during testing +o Refactored core classes to ease support of new secure object types +o Changed package layout to better describe the role of contained items +o Changed the extractor to extract additional classes from JBoss and Catalina +o Changed Jetty container adapter configuration (see reference documentation) +o Improved AutoIntegrationFilter handling of deployments without JBoss JARs +o Documentation improvements + +Have fun! +-The acegi-security-doc team + \ No newline at end of file diff --git a/doc/src/site/resources/announcements/announcement-0.5.1.txt b/doc/src/site/resources/announcements/announcement-0.5.1.txt new file mode 100644 index 0000000000..fb33c6ce33 --- /dev/null +++ b/doc/src/site/resources/announcements/announcement-0.5.1.txt @@ -0,0 +1,37 @@ +The acegi-security-doc team is pleased to announce the Acegi Security System +for Spring 0.5.1 release! + +http://acegisecurity.org/ + +Acegi Security System for Spring + +Changes in this version include: + + New Features: + +o Added samples/quick-start +o Added NullRunAsManager and made default for AbstractSecurityInterceptor +o Added event notification (see net.sf.acegisecurity.providers.dao.event) + + Fixed bugs: + +o Fixed issue with hot deploy of EhCacheBasedTicketCache (used with CAS) +o Fixed issue with NullPointerExceptions in taglib + + Changes: + +o Updated JAR to Spring 1.0.2 +o Updated JAR to Commons Attributes CVS snapshot from Spring 1.0.2 release +o Updated GrantedAuthorityImpl to be serializable (JBoss support) +o Updated Authentication interface to present extra details for a request +o Updated Authentication interface to subclass java.security.Principal +o Refactored DaoAuthenticationProvider caching (refer to reference docs) +o Improved HttpSessionIntegrationFilter to manage additional attributes +o Improved URL encoding during redirects +o Removed DaoAuthenticationToken and session-based caching +o Documentation improvements +o Upgrade Note: DaoAuthenticationProvider no longer has a "key" property + +Have fun! +-The acegi-security-doc team + \ No newline at end of file diff --git a/doc/src/site/resources/announcements/announcement-0.5.txt b/doc/src/site/resources/announcements/announcement-0.5.txt new file mode 100644 index 0000000000..ea221fec8d --- /dev/null +++ b/doc/src/site/resources/announcements/announcement-0.5.txt @@ -0,0 +1,42 @@ +The acegi-security-doc team is pleased to announce the Acegi Security System +for Spring 0.5 release! + +http://acegisecurity.org/ + +Acegi Security System for Spring + +Changes in this version include: + + New Features: + +o Added single sign on support via Yale Central Authentication Service (CAS) +o Added full support for HTTP Basic Authentication +o Added caching for DaoAuthenticationProvider successful authentications +o Added Burlap and Hessian remoting to Contacts sample application +o Added pluggable password encoders including plaintext, SHA and MD5 +o Added pluggable salt sources to enhance security of hashed passwords +o Added FilterToBeanProxy to obtain filters from Spring application context +o Added support for prepending strings to roles created by JdbcDaoImpl +o Added support for user definition of SQL statements used by JdbcDaoImpl +o Added definable prefixes to avoid expectation of "ROLE_" GrantedAuthoritys +o Added pluggable AuthenticationEntryPoints to SecurityEnforcementFilter +o Added Apache Ant path syntax support to SecurityEnforcementFilter +o Added filter to automate web channel requirements (eg HTTPS redirection) + + Fixed bugs: + +o Fixed FilterInvocation.getRequestUrl() to also include getPathInfo() +o Fixed Contacts sample application tags + + Changes: + +o Updated JAR to Spring 1.0.1 +o Updated several classes to use absolute (not relative) redirection URLs +o Refactored filters to use Spring application context lifecycle support +o Improved constructor detection of nulls in User and other key objects +o Established acegisecurity-developer mailing list +o Documentation improvements + +Have fun! +-The acegi-security-doc team + \ No newline at end of file diff --git a/doc/src/site/resources/announcements/announcement-0.6.1.txt b/doc/src/site/resources/announcements/announcement-0.6.1.txt new file mode 100644 index 0000000000..780c9fc191 --- /dev/null +++ b/doc/src/site/resources/announcements/announcement-0.6.1.txt @@ -0,0 +1,39 @@ +The acegi-security-doc team is pleased to announce the Acegi Security System +for Spring 0.6.1 release! + +http://acegisecurity.org/ + +Acegi Security System for Spring + +Changes in this version include: + + New Features: + +o Added additional DaoAuthenticationProvider event when user not found +o Added Authentication.getDetails() to DaoAuthenticationProvider response +o Added DaoAuthenticationProvider.hideUserNotFoundExceptions (default=true) +o Added PasswordAuthenticationProvider for password-validating DAOs (eg LDAP) +o Added FilterToBeanProxy compatibility with ContextLoaderServlet (lazy + inits) +o Added convenience methods to ConfigAttributeDefinition + + Fixed bugs: + +o Fixed MethodDefinitionAttributes to implement ObjectDefinitionSource change +o Fixed EH-CACHE-based caching implementation behaviour when cache exists +o Fixed Ant "release" target not including project.properties +o Fixed GrantedAuthorityEffectiveAclsResolver if null ACLs provided to method + + Changes: + +o Resolved to use http://apr.apache.org/versioning.html for future versioning +o Improved sample applications' bean reference notation +o Clarified contract for ObjectDefinitionSource.getAttributes(Object) +o Extracted removeUserFromCache(String) to UserCache interface +o Improved ConfigAttributeEditor so it trims preceding and trailing spaces +o Refactored UsernamePasswordAuthenticationToken.getDetails() to Object +o Documentation improvements + +Have fun! +-The acegi-security-doc team + \ No newline at end of file diff --git a/doc/src/site/resources/announcements/announcement-0.6.txt b/doc/src/site/resources/announcements/announcement-0.6.txt new file mode 100644 index 0000000000..363447ace6 --- /dev/null +++ b/doc/src/site/resources/announcements/announcement-0.6.txt @@ -0,0 +1,50 @@ +The acegi-security-doc team is pleased to announce the Acegi Security System +for Spring 0.6 release! + +http://acegisecurity.org/ + +Acegi Security System for Spring + +Changes in this version include: + + New Features: + +o Added domain object instance access control list (ACL) packages +o Added feature so DaoAuthenticationProvider returns User in Authentication +o Added AbstractIntegrationFilter.secureContext property for custom contexts +o Added stack trace logging to SecurityEnforcementFilter +o Added exception-specific target URLs to AbstractProcessingFilter +o Added JdbcDaoImpl hook so subclasses can insert custom granted authorities +o Added AuthenticationProvider that wraps JAAS login modules +o Added support for EL expressions in the authz tag library +o Added failed Authentication object to AuthenticationExceptions +o Added signed JARs to all official release builds (see readme.txt) +o Added remote client authentication validation package +o Added protected sendAccessDeniedError method to SecurityEnforcementFilter + + Fixed bugs: + +o Fixed CasAuthenticationToken if proxy granting ticket callback not + requested +o Fixed EH-CACHE handling on web context refresh + + Changes: + +o Updated Authentication to be serializable (Weblogic support) +o Updated JAR to Spring 1.1 RC 1 +o Updated to Clover 1.3 +o Updated to HSQLDB version 1.7.2 Release Candidate 6D +o Refactored User to net.sf.acegisecurity.UserDetails interface +o Refactored CAS package to store UserDetails in CasAuthenticationToken +o Improved organisation of DaoAuthenticationProvider to facilitate + subclassing +o Improved test coverage (now 98.3%) +o Improved JDBC-based tests to use in-memory database rather than filesystem +o Fixed Linux compatibility issues (directory case sensitivity etc) +o Fixed AbstractProcessingFilter to handle servlet spec container differences +o Fixed AbstractIntegrationFilter to resolve a Weblogic compatibility issue +o Documentation improvements + +Have fun! +-The acegi-security-doc team + \ No newline at end of file diff --git a/doc/src/site/resources/announcements/announcement-0.7.0.txt b/doc/src/site/resources/announcements/announcement-0.7.0.txt new file mode 100644 index 0000000000..e74befdfef --- /dev/null +++ b/doc/src/site/resources/announcements/announcement-0.7.0.txt @@ -0,0 +1,68 @@ +The acegi-security-doc team is pleased to announce the Acegi Security System +for Spring 0.7.0 release! + +http://acegisecurity.org/ + +Acegi Security System for Spring + +Changes in this version include: + + New Features: + +o Major CVS repository restructure to support Maven and eliminate libraries +o Added AfterInvocationManager to mutate objects return from invocations +o Added BasicAclEntryAfterInvocationProvider to ACL evaluate returned Object +o Added BasicAclEntryAfterInvocationCollectionFilteringProvider +o Added security propagation during RMI invocations (from sandbox) +o Added security propagation for Spring's HTTP invoker +o Added BasicAclEntryVoter, which votes based on AclManager permissions +o Added AspectJ support (especially useful for instance-level security) +o Added MethodDefinitionSourceAdvisor for performance and autoproxying +o Added MethodDefinitionMap querying of interfaces defined by secure objects +o Added AuthenticationProcessingFilter.setDetails for use by subclasses +o Added 403-causing exception to HttpSession via SecurityEnforcementFilter +o Added net.sf.acegisecurity.intercept.event package +o Added BasicAclExtendedDao interface and JdbcExtendedDaoImpl for ACL CRUD +o Added additional remoting protocol demonstrations to Contacts sample +o Added AbstractProcessingFilter property to always use defaultTargetUrl +o Added ContextHolderAwareRequestWrapper to integrate with getRemoteUser() +o Added attempted username to view if processed by + AuthenticationProcessingFilter +o Added UserDetails account and credentials expiration methods +o Added exceptions and events to support new UserDetails methods +o Added new exceptions to JBoss container adapter + + Fixed bugs: + +o Fixed ambiguous column references in JdbcDaoImpl default query +o Fixed AbstractProcessingFilter to use removeAttribute (JRun compatibility) +o Fixed GrantedAuthorityEffectiveAclResolver support of UserDetails + principals +o Fixed HttpSessionIntegrationFilter "cannot commit to container" during + logoff + + Changes: + +o Major improvements to Contacts sample application (now demos ACL security) +o Improved BasicAclProvider to only respond to specified ACL object requests +o Refactored MethodDefinitionSource to work with Method, not MethodInvocation +o Refactored AbstractFilterInvocationDefinitionSource to work with URL + Strings alone +o Refactored AbstractSecurityInterceptor to better support other AOP + libraries +o Improved performance of JBoss container adapter (see reference docs) +o Made DaoAuthenticationProvider detect null in Authentication.principal +o Improved JaasAuthenticationProvider startup error detection +o Refactored EH-CACHE implementations to use Spring IoC defined caches + instead +o AbstractProcessingFilter now has various hook methods to assist subclasses +o DaoAuthenticationProvider better detects AuthenticationDao interface + violations +o The User class has a new constructor (the old constructor is deprecated) +o Moved MethodSecurityInterceptor to ...intercept.method.aopalliance package +o Documentation improvements +o Test coverage improvements + +Have fun! +-The acegi-security-doc team + \ No newline at end of file diff --git a/doc/src/site/resources/announcements/announcement-0.7.1.txt b/doc/src/site/resources/announcements/announcement-0.7.1.txt new file mode 100644 index 0000000000..37c028483c --- /dev/null +++ b/doc/src/site/resources/announcements/announcement-0.7.1.txt @@ -0,0 +1,18 @@ +The acegi-security-doc team is pleased to announce the Acegi Security System +for Spring 0.7.1 release! + +http://acegisecurity.org/ + +Acegi Security System for Spring + +Changes in this version include: + + Fixed bugs: + +o AbstractIntegrationFilter elegantly handles IOExceptions and + ServletExceptions within filter chain (see + http://opensource.atlassian.com/projects/spring/browse/SEC-20) + +Have fun! +-The acegi-security-doc team + \ No newline at end of file diff --git a/doc/src/site/resources/announcements/announcement-0.8.0.txt b/doc/src/site/resources/announcements/announcement-0.8.0.txt new file mode 100644 index 0000000000..d66aadb974 --- /dev/null +++ b/doc/src/site/resources/announcements/announcement-0.8.0.txt @@ -0,0 +1,59 @@ +The acegi-security-doc team is pleased to announce the Acegi Security System +for Spring 0.8.0 release! + +http://acegisecurity.org/ + +Acegi Security System for Spring + +Changes in this version include: + + New Features: + +o Added Digest Authentication support (RFC 2617 and RFC 2069) +o Added pluggable remember-me services +o Added pluggable mechnism to prevent concurrent login sessions +o FilterChainProxy added to significantly simplify web.xml configuration of + Acegi Security +o AuthenticationProcessingFilter now provides hook for extra credentials (eg + postcodes) +o New WebAuthenticationDetails class now used by processing filters for + Authentication.setDetails() +o Additional debug-level logging +o Improved Tapestry support in AbstractProcessingFilter + + Fixed bugs: + +o Correct issue with JdbcDaoImpl default SQL query not using consistent case + sensitivity +o Improve Linux and non-Sun JDK (specifically IBM JDK) compatibility +o Log4j now included in generated WAR artifacts (fixes issue with Log4j + listener) +o Correct NullPointerException in FilterInvocationDefinitionSource + implementations + + Changes: + +o Made ConfigAttributeDefinition and ConfigAttribute Serializable +o User now accepts blank passwords (null passwords still rejected) +o FilterToBeanProxy now searches hierarchical bean factories +o User now accepted blank passwords (null passwords still rejected) +o ContextHolderAwareRequestWrapper now provides a getUserPrincipal() method +o HttpSessionIntegrationFilter no longer creates a HttpSession unnecessarily +o FilterSecurityInterceptor now only executes once per request (improves + performance with SiteMesh) +o JaasAuthenticatinProvider now uses System.property + "java.security.auth.login.config" +o JaasAuthenticationCallbackHandler Authentication is passed to handle method + setAuthentication removed +o Added AuthenticationException to the AutenticationEntryPoint.commence + method signature +o Added AccessDeniedException to the + SecurityEncorcementFilter.sendAccessDeniedError method signature +o FilterToBeanProxy now addresses lifecycle mismatch (IoC container vs + servlet container) issue +o Significantly refactor "well-known location model" to authentication + processing mechanism and HttpSessionContextIntegrationFilter model + +Have fun! +-The acegi-security-doc team + \ No newline at end of file diff --git a/doc/src/site/resources/announcements/announcement-0.8.1.1.txt b/doc/src/site/resources/announcements/announcement-0.8.1.1.txt new file mode 100644 index 0000000000..44a55895d9 --- /dev/null +++ b/doc/src/site/resources/announcements/announcement-0.8.1.1.txt @@ -0,0 +1,18 @@ +The acegi-security-doc team is pleased to announce the Acegi Security System +for Spring 0.8.1.1 release! + +http://acegisecurity.org/ + +Acegi Security System for Spring + +Changes in this version include: + + Fixed bugs: + +o HttpSessionContextIntegrationFilter elegantly handles IOExceptions and + ServletExceptions within filter chain (see + http://opensource.atlassian.com/projects/spring/browse/SEC-20) + +Have fun! +-The acegi-security-doc team + \ No newline at end of file diff --git a/doc/src/site/resources/announcements/announcement-0.8.1.txt b/doc/src/site/resources/announcements/announcement-0.8.1.txt new file mode 100644 index 0000000000..1c6c1dd883 --- /dev/null +++ b/doc/src/site/resources/announcements/announcement-0.8.1.txt @@ -0,0 +1,43 @@ +The acegi-security-doc team is pleased to announce the Acegi Security System +for Spring 0.8.1 release! + +http://acegisecurity.org/ + +Acegi Security System for Spring + +Changes in this version include: + + New Features: + +o X509 (certificate-based) authentication support + + Fixed bugs: + +o SecurityEnforcementFilter caused NullPointerException when anonymous + authentication used with BasicProcessingFilterEntryPoint +o FilterChainProxy now supports replacement of ServletRequest and + ServetResponse by Filter beans +o Corrected Authz parsing of whitespace in GrantedAuthoritys +o TokenBasedRememberMeServices now respects expired users, expired + credentials and disabled users +o HttpSessionContextIntegrationFilter now handles HttpSession invalidation + without redirection +o StringSplitUtils.split() ignored delimiter argument +o DigestProcessingFilter now provides userCache getter and setter +o Contacts Sample made to work with UserDetails-based Principal + + Changes: + +o UserDetails now advises locked accounts, with corresponding + DaoAuthenticationProvider events and enforcement +o ContextHolderAwareRequestWrapper methods return null if user is anonymous +o AbstractBasicAclEntry improved compatibility with Hibernate +o User now provides a more useful toString() method +o Update to match Spring 1.1.5 official JAR dependencies (NB: now using + Servlet 2.4 and related JSP/taglib JARs) +o Documentation improvements +o Test coverage improvements + +Have fun! +-The acegi-security-doc team + \ No newline at end of file diff --git a/doc/src/site/resources/announcements/announcement-0.8.2.txt b/doc/src/site/resources/announcements/announcement-0.8.2.txt new file mode 100644 index 0000000000..97d61975bd --- /dev/null +++ b/doc/src/site/resources/announcements/announcement-0.8.2.txt @@ -0,0 +1,33 @@ +The acegi-security-doc team is pleased to announce the Acegi Security System +for Spring 0.8.2 release! + +http://acegisecurity.org/ + +Acegi Security System for Spring + +Changes in this version include: + + Fixed bugs: + +o Correct location of AuthenticationSimpleHttpInvokerRequestExecutor in + clientContext.xml +o TokenBasedRememberMeServices changed to use long instead of int for + tokenValiditySeconds (SPR-807) +o Handle null Authentication.getAuthorities() in AuthorizeTag +o PasswordDaoAuthenticationProvider no longer stores String against + Authentication.setDetails() + + Changes: + +o Update commons-codec dependency to 1.3 +o AbstractProcessingFilter no longer has setters for failures, it uses the + exceptionMappings property +o Update to match Spring 1.2-RC2 official JAR dependencies +o AuthenticationProcessingFilter now provides an obtainUsername method +o Correct PathBasedFilterInvocationDefinitionMap compatibility with Spring + 1.2-RC2 +o Refactoring to leverage Spring's Assert class and mocks where possible + +Have fun! +-The acegi-security-doc team + \ No newline at end of file diff --git a/doc/src/site/resources/announcements/announcement-0.8.3.txt b/doc/src/site/resources/announcements/announcement-0.8.3.txt new file mode 100644 index 0000000000..34dd613712 --- /dev/null +++ b/doc/src/site/resources/announcements/announcement-0.8.3.txt @@ -0,0 +1,18 @@ +The acegi-security-doc team is pleased to announce the Acegi Security System +for Spring 0.8.3 release! + +http://acegisecurity.org/ + +Acegi Security System for Spring + +Changes in this version include: + + Fixed bugs: + +o HttpSessionContextIntegrationFilter elegantly handles IOExceptions and + ServletExceptions within filter chain (see + http://opensource.atlassian.com/projects/spring/browse/SEC-20) + +Have fun! +-The acegi-security-doc team + \ No newline at end of file diff --git a/doc/src/site/resources/announcements/announcement-0.9.0.txt b/doc/src/site/resources/announcements/announcement-0.9.0.txt new file mode 100644 index 0000000000..41a958d220 --- /dev/null +++ b/doc/src/site/resources/announcements/announcement-0.9.0.txt @@ -0,0 +1,17 @@ +The acegi-security-doc team is pleased to announce the Acegi Security System +for Spring 0.9.0 release! + +http://acegisecurity.org/ + +Acegi Security System for Spring + +Changes in this version include: + + Changes: + +o All changes are in JIRA at + http://opensource2.atlassian.com/projects/spring/secure/ReleaseNote.jspa?projectId=10040 + +Have fun! +-The acegi-security-doc team + \ No newline at end of file diff --git a/doc/src/site/resources/announcements/announcement-1.0.0 Final.txt b/doc/src/site/resources/announcements/announcement-1.0.0 Final.txt new file mode 100644 index 0000000000..a987b207f0 --- /dev/null +++ b/doc/src/site/resources/announcements/announcement-1.0.0 Final.txt @@ -0,0 +1,17 @@ +The acegi-security-doc team is pleased to announce the Acegi Security System +for Spring 1.0.0 Final release! + +http://acegisecurity.org/ + +Acegi Security System for Spring + +Changes in this version include: + + Changes: + +o All changes are in JIRA at + http://opensource2.atlassian.com/projects/spring/secure/ReleaseNote.jspa?projectId=10040 + +Have fun! +-The acegi-security-doc team + \ No newline at end of file diff --git a/doc/src/site/resources/announcements/announcement-1.0.0 RC1.txt b/doc/src/site/resources/announcements/announcement-1.0.0 RC1.txt new file mode 100644 index 0000000000..38558daab4 --- /dev/null +++ b/doc/src/site/resources/announcements/announcement-1.0.0 RC1.txt @@ -0,0 +1,17 @@ +The acegi-security-doc team is pleased to announce the Acegi Security System +for Spring 1.0.0 RC1 release! + +http://acegisecurity.org/ + +Acegi Security System for Spring + +Changes in this version include: + + Changes: + +o All changes are in JIRA at + http://opensource2.atlassian.com/projects/spring/secure/ReleaseNote.jspa?projectId=10040 + +Have fun! +-The acegi-security-doc team + \ No newline at end of file diff --git a/doc/src/site/resources/announcements/announcement-1.0.0 RC2.txt b/doc/src/site/resources/announcements/announcement-1.0.0 RC2.txt new file mode 100644 index 0000000000..b2da0a6d17 --- /dev/null +++ b/doc/src/site/resources/announcements/announcement-1.0.0 RC2.txt @@ -0,0 +1,17 @@ +The acegi-security-doc team is pleased to announce the Acegi Security System +for Spring 1.0.0 RC2 release! + +http://acegisecurity.org/ + +Acegi Security System for Spring + +Changes in this version include: + + Changes: + +o All changes are in JIRA at + http://opensource2.atlassian.com/projects/spring/secure/ReleaseNote.jspa?projectId=10040 + +Have fun! +-The acegi-security-doc team + \ No newline at end of file diff --git a/doc/xdocs/articles.html b/doc/xdocs/articles.xml similarity index 76% rename from doc/xdocs/articles.html rename to doc/xdocs/articles.xml index ca6aae4a5f..d8bded020a 100644 --- a/doc/xdocs/articles.html +++ b/doc/xdocs/articles.xml @@ -1,175 +1,147 @@ - - - - - -
-Here are some of the external pages mentioning Acegi Security. If you've
+
+ Here are some of the external pages mentioning Acegi Security. If you've
found another, please let us know.
-
-
+
+
+
+ The first place to look for Acegi Security support (use the 'search' function).
+ If you'd like to discuss development of the project.
+ Look here first for how to integrate with major third-party frameworks...
+ Thanks to Michael Vorburger.
+ Sanjiv Jivan offers a way of approaching AJAX login.
+ How to use Acegi Security with JCaptcha.
+ Java Developer's Journal (JDJ) article by David Hardwick.
+ Matthew Porter wrote this good introductory article for Javalobby.
+ Available in PDF and HTML formats, thanks to Bart van Riel.
+ Peter Veentjer discussed how to test Acegi Security-protected objects in isolation.
+ Explanation on using Acegi Security's MethodSecurityInterceptor with DWR.
+ AspectJ with Acegi Security thread on the AspectJ list.
+ Andrew Cooke discusses using concurrent sessions.
+ Pascal Gehl relates his experience in migrating from CMA to Acegi Security.
+ By David Medinets.
+ By David Medinets.
+ By David Medinets.
+ Matt Raible has provided a nice PDF presentation comparing Acegi Security and J2EE CMA.
+ Matt Raible's upgrade instructions.
+ Jared Odulio offers some configuration tips.
+ "For this reason I end up using something like Acegi Security", Dion Almaer comments after listing a series of missing hooks from the Servlet Spec security approach.
+ The fine folks at Atlassian have noted, "for more complex needs than Seraph meets, we suggest considering alternative frameworks like ACEGI, which provides more functionality (at the cost of greater complexity)."
+ Andrei Tudose has provided a JavaLobby article on this common customization point.
+ our CVS tree has become stable and there are build instructions.
+ Discusses AppFuse 1.8+'s replacement of Container-Managed Authentication (CMA) with Acegi Security.
+ Thanks to tony_k.
+ Covers using these two frameworks - thanks to Victor Tatai.
+ Cagatay Civici has provided a JSF version of our taglibs.
+ The popular AppFuse project now uses Acegi Security instead of container managed authentication!
+ updated by Seth Ladd for release 0.7.0.
+ Matt Raible is including Acegi Security in Chapter 12 of his popular ebook.
+ Acegi Security is included in Chapter 17 of this book.
+ Craig Walls has also written another popular Spring book, which includes Acegi Security in Chapter 11.
+ A general overview of how Acegi Security is used with JA-SIG's CAS.
+
+ An implementation of JDK 1.5 annotations with Acegi Security's SecurityConfig.
+ Reid Carlberg has provided a downloadable WAR containing the simplest possible Acegi Security 0.8.2 configuration.
+ A tip from Gavin Terrill on unit testing with Acegi Security.
FilterChainProxy
class.
+ Carlos Sanchez provides an overview of our new FilterChainProxy
class.
manageability.org
.
+ From manageability.org
.
+ Discussion about enhancing Acegi Security and WebWork integration.
+ our FAQ for additional JAAS comments.
+ demonstrates C-A integration.
+ Blog entry on the JavaDocs missing from Acegi release ZIPs. They're actually there. Just check /docs/multiproject/acegi-security/apidocs/.
This project uses Maven as project manager
+
+ This project uses Maven as project manager
and build tool. We recommend you to install Maven 1.0.2 or greater before trying
- the following. Note there are workarounds at the bottom of this page. To checkout Acegi Security from SVN, see our
- CVS Usage page. Often people reading this document just want to see if Acegi Security will work
+ the following. Note there are workarounds at the bottom of this page. To checkout Acegi Security from SVN, see our
+ CVS Usage page. Often people reading this document just want to see if Acegi Security will work
for their projects. They want to deploy a sample application, and that's about it
(after all, all the reference documentation can be read online at
http://acegisecurity.org).
- In this case, execute:Quick Build
-
+ In this case, execute:
cd $ACEGI_SECURITY/core (or cd %ACEGI_SECURITY%/core on Windows)
maven jar:install
cd $ACEGI_SECURITY/samples/contacts
maven multiwar:multiwar
copy $ACEGI_SECURITY/samples/contacts/target/acegi-security-sample-contacts-filter.war $YOUR_CONTAINER/webapps-
Then load up your web container and visit +
Then load up your web container and visit http://localhost:8080/acegi-security-sample-contacts-filter/ - (or whatever location is appropriate for your web container).
- -To properly integrate Commons Attributes with Maven (as required by + (or whatever location is appropriate for your web container).
To properly integrate Commons Attributes with Maven (as required by the Attributes Sample), - you need to install an additional plugin.
-To install the commons-attributes-plugin
, execute the following commands:
To install the commons-attributes-plugin
, execute the following commands:
cd $ACEGI_SECURITY/doc
maven plugin:download -DgroupId=commons-attributes -DartifactId=commons-attributes-plugin -Dversion=2.1-
The second (final) command should be executed on a single line.
- -Sometimes people are already using Acegi Security, and they just want to build the +
The second (final) command should be executed on a single line.
Sometimes people are already using Acegi Security, and they just want to build the
latest code from CVS. To build all artifacts (JARs) and install them into
your local Maven repository, simply perform a CVS checkout and install the
commons-attributes-plugin
(as detailed above), and then
- execute:
cd $ACEGI_SECURITY/doc
maven multiproject:install-
You can then check your $HOME/.maven/repository/acegisecurity
- directory and it should contain all of the latest Acegi Security JARs.
By "site" we mean the web site you can browse at +
You can then check your $HOME/.maven/repository/acegisecurity
+ directory and it should contain all of the latest Acegi Security JARs.
By "site" we mean the web site you can browse at http://acegisecurity.sourceforge.net, which includes the reference documentation and all of the Maven reports. If you'd like a local copy, simply execute: @@ -92,29 +42,20 @@ -Dmaven.jar.clover-ant=1.3.3_01 -
As per the +
As per the Maven Changelog Plugin Documentation, you must tell the plugin the "anonymous CVS pserver" password is blank. This is why there is the "create-cvspass" command shown above. You should only need to - do this once.
- -If you get an OutOfMemoryError
, simply execute the following before
- calling Maven:
If you get an OutOfMemoryError
, simply execute the following before
+ calling Maven:
set MAVEN_OPTS=-Xmx1024m -XX:MaxPermSize=512m-
If you get an [ERROR] Invalid license: Invalid license file [E1202]
,
+
If you get an [ERROR] Invalid license: Invalid license file [E1202]
,
this is because the maven-clover-plugin
is using an old version of
clover-ant-xxx.jar
. Whilst Acegi Security's project.properties
specifies a newer version, subprojects have an inheritence problem and don't pick
this up (as of the time of writing). To workaround this issue, you need to
specify those override properties on the command line. For example, to execute the
- Clover reports for the core subproject, you would do the following:
cd $ACEGI_SECURITY/core
maven clover:html-report -Dmaven.jar.override=on -Dmaven.jar.clover-ant=1.3.3_01-
This instructions are general, check the module documentation if you need concrete instructions.
-modulename can be for example:
-- http://svn.sourceforge.net/viewcvs.cgi/acegisecurity/ -
This project's CVS repository can be checked out through anonymous (pserver) CVS with the following instruction on a single line.
-maven scm:checkout-project - -Dmaven.scm.method=svn - -Dmaven.scm.svn.module=modulename - -Dmaven.scm.svn.root=scm:svn:https://svn.sourceforge.net/svnroot/acegisecurity/trunk/acegisecurity - -Dmaven.scm.checkout.dir=acegisecurity-
- This project's SVN repository can be checked out through anonymous - SVN with the following instruction set. -
- svn co https://svn.sourceforge.net/svnroot/acegisecurity/trunk/acegisecurity
- -If you'd prefer not to use SVN directly, please see our downloads page for nightly snapshots.
- - \ No newline at end of file diff --git a/doc/xdocs/cvs-usage.xml b/doc/xdocs/cvs-usage.xml new file mode 100644 index 0000000000..3fd703d913 --- /dev/null +++ b/doc/xdocs/cvs-usage.xml @@ -0,0 +1,17 @@ + +This instructions are general, check the module documentation if you need concrete instructions.
modulename can be for example:
This project's CVS repository can be checked out through anonymous (pserver) CVS with the following instruction on a single line.
+ This project's SVN repository can be checked out through anonymous + SVN with the following instruction set. +
+ svn co https://svn.sourceforge.net/svnroot/acegisecurity/trunk/acegisecurity
If you'd prefer not to use SVN directly, please see our downloads page for nightly snapshots.
If you wish to try out this project, you are probably looking for the - acegi-security-xx.zip file, which contains all of the officially - released JARs, a copy of all documentation, and two WAR artifacts. The two WAR artifacts - are from the Contacts Sample and the Tutorial Sample application. The Tutorial Sample - consists of a "bare bones" configuration that will get you up and running quickly, whereas - the Contacts Sample illustrates more advanced features.
- -Please note that in order to reduce download size, we only include in the - release ZIP one of the WAR artifacts produced by the Contacts Sample application. - The WAR artifact we include is suitable for standalone deployment (specifically, it - does not require a CAS server, container adapter, X509 or LDAP setup). The official release ZIP - therefore probably contains what you need, especially if you're initially - evaluating the project. If you wish to deploy the other WAR artifacts produced by - the Contacts Sample application (ie those that target CAS, container adapters, X509 or LDAP usage), - you will need to build Acegi Security from source. - -
The acegi-security-xx-src.zip is intended for use with IDEs. It does not contain the - files needed to compile Acegi Security. It also does not contain the sources to the - sample applications. If you need any of these files, please download from SVN.
- -The official release ZIP files are available from the - Sourceforge File Release System.
-The Acegi Security JARs are also available via the - iBiblio Maven Repository.
-Detailed instructions on downloading from CVS and building from source - are provided on the Building with Maven - page.
-- If you don't wish to access SVN directly, we provide - nightly SVN exports for your convenience. - There is also an automated build which uploads bundle of Acegi Security jar files to the same location. - Both binary and source archives have the date of the build and the SVN revision number appended to the filename, - so you can match them up easily. -
- - - diff --git a/doc/xdocs/downloads.xml b/doc/xdocs/downloads.xml new file mode 100644 index 0000000000..f70cd45ea2 --- /dev/null +++ b/doc/xdocs/downloads.xml @@ -0,0 +1,28 @@ + +If you wish to try out this project, you are probably looking for the + acegi-security-xx.zip file, which contains all of the officially + released JARs, a copy of all documentation, and two WAR artifacts. The two WAR artifacts + are from the Contacts Sample and the Tutorial Sample application. The Tutorial Sample + consists of a "bare bones" configuration that will get you up and running quickly, whereas + the Contacts Sample illustrates more advanced features.
Please note that in order to reduce download size, we only include in the + release ZIP one of the WAR artifacts produced by the Contacts Sample application. + The WAR artifact we include is suitable for standalone deployment (specifically, it + does not require a CAS server, container adapter, X509 or LDAP setup). The official release ZIP + therefore probably contains what you need, especially if you're initially + evaluating the project. If you wish to deploy the other WAR artifacts produced by + the Contacts Sample application (ie those that target CAS, container adapters, X509 or LDAP usage), + you will need to build Acegi Security from source. + +
The acegi-security-xx-src.zip is intended for use with IDEs. It does not contain the + files needed to compile Acegi Security. It also does not contain the sources to the + sample applications. If you need any of these files, please download from SVN.
The official release ZIP files are available from the + Sourceforge File Release System.
The Acegi Security JARs are also available via the + iBiblio Maven Repository.
Detailed instructions on downloading from CVS and building from source + are provided on the Building with Maven + page.
+ If you don't wish to access SVN directly, we provide + nightly SVN exports for your convenience. + There is also an automated build which uploads bundle of Acegi Security jar files to the same location. + Both binary and source archives have the date of the build and the SVN revision number appended to the filename, + so you can match them up easily. +
Acegi Security is an open source project that provides comprehensive authentication
+
+ Acegi Security is an open source project that provides comprehensive authentication
and authorisation services for enterprise applications based on
The Spring Framework.
Acegi Security can authenticate using a variety of pluggable providers, and
@@ -43,10 +12,7 @@
servlet Filters and Java AOP frameworks. In terms of AOP framework support, Acegi
Security currently supports AOP Alliance (which is what the
Spring IoC container uses internally) and AspectJ, although additional frameworks
- can be easily supported. Let's assume you're developing an enterprise application based on Spring.
+ can be easily supported. Let's assume you're developing an enterprise application based on Spring.
There are four security concerns you typically need to address: authentication,
web request security, service layer security (ie your methods that implement
business logic), and domain object instance security (ie different domain objects
@@ -63,7 +29,7 @@
authentication providers and mechanisms, meaning you can switch your
authentication approaches at deployment time. This is particularly
valuable for software vendors writing products that need to work in
- an unknown target environment.Why not just use web.xml security?
-
+ an unknown target environment.
+ inside the views). There are serious disadvantages with this approach:
+
Ah-see-gee. Said quickly, without emphasis on any part. +
Ah-see-gee. Said quickly, without emphasis on any part. Acegi isn't an acronym, name of a Greek God or anything similarly - impressive - it's just letters #1, #3, #5, #7 and #9 of the alphabet.
- -It's official name is Acegi Security System for Spring, + impressive - it's just letters #1, #3, #5, #7 and #9 of the alphabet.
It's official name is Acegi Security System for Spring, although we're happy for it to be abbreviated to Acegi Security. Please don't just call it Acegi, though, as that gets confused with the name of the company that maintains Acegi - Security.
- -80% of support questions are because people have not defined + Security.
80% of support questions are because people have not defined
the necessary filters in web.xml
, or the filters are being
mapped in the incorrect order. Check the
Reference Guide, which
- has a specific section on filter ordering.
The next most common source of problems stem from custom + has a specific section on filter ordering.
The next most common source of problems stem from custom
AuthenticationDao
implementations that simply don't properly
implement the interface contract. For example, they return null
instead
of the user not found exception, or fail to add in the
GrantedAuthority[]
s. Whilst DaoAuthenticationProvider
does its best to check the AuthenticationDao
returns a valid
UserDetails
, we suggest you write the
- UserDetails
object to the log and check it looks correct.
A common user problem with infinite loop and redirecting to the login page
+ UserDetails
object to the log and check it looks correct.
A common user problem with infinite loop and redirecting to the login page is caused by accidently configuring the login page as a "secured" resource. Generally make sure you mark your login page as requiring ROLE_ANONYMOUS. -
- -If you are securing web resources and they dont seem to be matched in the URL patterns, +
If you are securing web resources and they dont seem to be matched in the URL patterns, check the objectDefinitionSource in the FilterSecurityInterceptor. If you are using the CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON setting, then the URL patterns configured MUST be in lowercase. -
+
For example, making a request ending in /someAction.do will need to be configured as: /someaction.do (Note the case).
-<property name="objectDefinitionSource"> - <value> +<property name="objectDefinitionSource"> + <value> CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON PATTERN_TYPE_APACHE_ANT /index.jsp=ROLE_ANONYMOUS,ROLE_USER /someaction.do=ROLE_USER - <value> -</property> + <value> +</property>-
A common user requirement is to disable / lock an account after a number of failed login attempts. +
A common user requirement is to disable / lock an account after a number of failed login attempts. Acegi itself does not provide anything "out of the box", however in your application you can implement and register an org.springframework.context.ApplicationListener. Inside your application event listener you can then check for an instanceof the particular AuthenticationFailureEvent and then call your application user management interface to update the user details. -
+
For example:
public void onApplicationEvent(ApplicationEvent event) { @@ -197,91 +144,64 @@ }-
There are three things you must do to make a user password change take affect: +
There are three things you must do to make a user password change take affect:
The most important things to post with any support requests on the +
The most important things to post with any support requests on the
Spring Forums are your
web.xml
, applicationContext.xml
(or whichever
XML loads the security-related beans) as well as any custom
AuthenticationDao
you might be using. For really odd problems,
- also switch on debug-level logging and include the resulting log.
Acegi Security uses Commons Logging, just as Spring does. So you use the + also switch on debug-level logging and include the resulting log.
Acegi Security uses Commons Logging, just as Spring does. So you use the
same approach as you'd use for Spring. Most people output to Log4J, so
- the following log4j.properties
would work:
+ the following log4j.properties
would work:
+ log4j.category.net.sf.acegisecurity=DEBUG
- In most cases write an AuthenticationDao
which returns
+
In most cases write an AuthenticationDao
which returns
a subclass of User
. Alternatively, write your own
- UserDetails
implementation from scratch and return that.
Acegi Security targets enterprise applications, which are typically
+ UserDetails
implementation from scratch and return that.
Acegi Security targets enterprise applications, which are typically multi-user, data-oriented applications that are important to the core business. Acegi Security was designed to provide a portable and effective security framework for this target application type. It was not designed for securing - limited privilege runtime environments, such as web browser applets.
- -We did consider JAAS when designing Acegi Security, but it simply + limited privilege runtime environments, such as web browser applets.
We did consider JAAS when designing Acegi Security, but it simply wasn't suitable for our purpose. We needed to avoid complex JRE configurations, we needed container portability, and we wanted maximum leveraging of the Spring IoC container. Particularly as limited privilege runtime environments were not an actual requirement, this lead to the natural design of Acegi Security as - it exists today.
- -Acegi Security already provides some JAAS integration. It can today authenticate + it exists today.
Acegi Security already provides some JAAS integration. It can today authenticate via delegation to a JAAS login module. This means it offers the same level of JAAS integration as many web containers. Indeed the container adapter model supported by Acegi Security allows Acegi Security and container-managed security to happily co-exist and benefit from each other. Any debate about Acegi Security and JAAS should therefore centre on the authorisation issue. An evaluation of major containers and security frameworks would reveal that Acegi Security is by no - means unusual in not using JAAS for authorisation.
- -There are many examples of open source applications being preferred to + means unusual in not using JAAS for authorisation.
There are many examples of open source applications being preferred to official standards. A few that come to mind in the Java community include using Spring managed POJOs (rather than EJBs), Hibernate (instead of entity beans), Log4J (instead of JDK logging), Tapestry (instead of JSF), and Velocity/FreeMarker (instead of JSP). It's important to recognise that many open source projects do develop into de facto standards, and in doing so play a legitimate and beneficial - role in professional software development.
- -Yes. If you've written something and it works well, please feel free to share it. + role in professional software development.
Yes. If you've written something and it works well, please feel free to share it. Simply email the contribution to the acegisecurity-developers list. If you haven't yet written the contribution, we encourage you to send your thoughts to the same - list so that you can receive some initial design feedback.
- -For a contribution to be used, it must have appropriate unit test coverage and + list so that you can receive some initial design feedback.
For a contribution to be used, it must have appropriate unit test coverage and detailed JavaDocs. It will ideally have some comments for the Reference Guide as well (this can be sent in word processor or HTML format if desired). This helps ensure the contribution maintains the same quality as the remainder of - the project.
- -We also welcome documentation improvements, unit tests, illustrations, + the project.
We also welcome documentation improvements, unit tests, illustrations, people supporting the user community (especially on the forums), design ideas, articles, blog entries, presentations and alike. If you're looking for something to do, you can always email the acegisecurity-developers list and we'll be - pleased to suggest something. :-)
- - - + pleased to suggest something. :-)
Acegi Security is a powerful, flexible security solution for enterprise software,
with a particular emphasis on applications that use
- Spring. Using Acegi Security provides your
+ Spring. Using Acegi Security provides your
applications with comprehensive authentication, authorization, instance-based access control,
channel security and human user detection capabilities.
-
-
-
ApplicationEvent
services, you can write your own listeners
+ anywhere you like.ApplicationEvent
services, you can write your own listeners
for authentication-related events, along with authorisation-related events.
This enables you to implement account lockout and audit log systems, with
- complete decoupling from Acegi Security code.To complete this tutorial, you will require a servlet container (such as Tomcat) -and a general understanding of using Spring without Acegi Security. The Petclinic -sample itself is part of Spring and should help you learn Spring. We suggest you -only try to learn one thing at a time, and start with Spring/Petclinic before -Acegi Security. -
- --You will also need to download: -
-Unzip both files. After unzipping Acegi Security, you'll need to unzip the -acegi-security-sample-tutorial.war file, because we need some files that are -included within it. In the code below, we'll refer to the respective unzipped -locations as %spring% and %acegi% (with the latter variable referring to the -unzipped WAR, not the original ZIP). There is no need to setup any environment -variables to complete the tutorial. -
- --We now need to put some extra files into Petclinic. The following commands should work: -
-mkdir %spring%\samples\petclinic\war\WEB-INF\lib -copy %acegi%\acegilogin.jsp %spring%\samples\petclinic\war -copy %acegi%\accessDenied.jsp %spring%\samples\petclinic\war -copy %acegi%\WEB-INF\users.properties %spring%\samples\petclinic\war\WEB-INF -copy %acegi%\WEB-INF\applicationContext-acegi-security.xml %spring%\samples\petclinic\war\WEB-INF -copy %acegi%\WEB-INF\lib\acegi-security-1.0.0.jar %spring%\samples\petclinic\war\WEB-INF\lib -copy %acegi%\WEB-INF\lib\oro-2.0.8.jar %spring%\samples\petclinic\war\WEB-INF\lib -copy %acegi%\WEB-INF\lib\commons-codec-1.3.jar %spring%\samples\petclinic\war\WEB-INF\lib -- - -
Edit %spring%\samples\petclinic\war\WEB-INF\web.xml and insert the following block of code. -
-<filter> - <filter-name>Acegi Filter Chain Proxy</filter-name> - <filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class> - <init-param> - <param-name>targetClass</param-name> - <param-value>org.acegisecurity.util.FilterChainProxy</param-value> - </init-param> -</filter> - -<filter-mapping> - <filter-name>Acegi Filter Chain Proxy</filter-name> - <url-pattern>/*</url-pattern> -</filter-mapping> --Next, locate the "contextConfigLocation" parameter, and add a new line into the existing param-value. -The resulting block will look like this: -
-<context-param> - <param-name>contextConfigLocation</param-name> - <param-value> - /WEB-INF/applicationContext-jdbc.xml - /WEB-INF/applicationContext-acegi-security.xml - </param-value> -</context-param> -- - -
-To make it easier to experiment with the application, now edit -%spring%\samples\petclinic\war\WEB-INF\jsp\footer.jsp. Add a new "logout" link, as shown: -
-<table style="width:100%"><tr> - <td><A href="<c:url value="/welcome.htm"/>">Home</A></td> - <td><A href="<c:url value="/j_acegi_logout"/>">Logout</A></td> - <td style="text-align:right;color:silver">PetClinic :: a Spring Framework demonstration</td> -</tr></table> -- - -
-Our last step is to specify which URLs require authorization and which do not. Let's -edit %spring%\samples\petclinic\war\WEB-INF\applicationContext-acegi-security.xml. -Locate the bean definition for FilterSecurityInterceptor. Edit its objectDefinitionSource -property so that it reflects the following: -
-<property name="objectDefinitionSource"> - <value> - CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON - PATTERN_TYPE_APACHE_ANT - /acegilogin.jsp=IS_AUTHENTICATED_ANONYMOUSLY - /**=IS_AUTHENTICATED_REMEMBERED - </value> -</property> -- - -
Start the Hypersonic server (this is just normal Petclinic configuration): -
-cd %spring%\samples\petclinic\db\hsqldb -server -- - -
-Insert some data (again, normal Petclinic configuration): -
-cd %spring%\samples\petclinic -build setupDB -- - - -
-Use Petclinic's Ant build script and deploy to your servlet container: -
-cd %spring%\samples\petclinic -build warfile -copy dist\petclinic.war %TOMCAT_HOME%\webapps -- - -
Finally, start your container and try to visit the home page. -Your request should be intercepted and you will be forced to login.
- --Whilst you've now secured your web requests, you might want to stop users -from being able to add clinic visits unless authorized. We'll make it so -you need to hold ROLE_SUPERVISOR to add a clinic visit. -
- --In %spring%\samples\petclinic\war\WEB-INF\applicationContext-jdbc.xml, locate -the TransactionProxyFactoryBean definition. Add an additional property after -the existing "preInterceptors" property: -
-<property name="postInterceptors" ref="methodSecurityInterceptor"/> -- - -
-Finally, we need to add in the referred-to "methodSecurityInterceptor" bean definition. -So pop an extra bean definition in, as shown below: -
-<bean id="methodSecurityInterceptor" class="org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor"> - <property name="authenticationManager"><ref bean="authenticationManager"/></property> - <property name="accessDecisionManager"> - <bean class="org.acegisecurity.vote.AffirmativeBased"> - <property name="allowIfAllAbstainDecisions" value="false"/> - <property name="decisionVoters"> - <list> - <bean class="org.acegisecurity.vote.RoleVoter"/> - <bean class="org.acegisecurity.vote.AuthenticatedVoter"/> - </list> - </property> - </bean> - </property> - <property name="objectDefinitionSource"> - <value> - org.springframework.samples.petclinic.Clinic.*=IS_AUTHENTICATED_REMEMBERED - org.springframework.samples.petclinic.Clinic.storeVisit=ROLE_SUPERVISOR - </value> - </property> -</bean> -- - -
-Redeploy your web application. Use the earlier process to do that. Be careful to -ensure that the old Petclinic WAR is replaced by the new Petclinic WAR in your -servlet container. Login as "marissa", who has ROLE_SUPERVISOR. You will be able to -then view a customer and add a visit. Logout, then login as anyone other than Marissa. -You will receive an access denied error when you attempt to add a visit. -
- --To clean things up a bit, you might want to wrap up by hiding the "add visit" link -unless you are authorized to use it. Acegi Security provides a tag library to help -you do that. Edit %spring%\samples\petclinic\war\WEB-INF\jsp\owner.jsp. Add -the following line to the top of the file: -
-<%@ taglib prefix="authz" uri="http://acegisecurity.org/authz" %> --Next, scroll down and find the link to "add visit". Modify it as follows: -
-<authz:authorize ifAllGranted="ROLE_SUPERVISOR"> - <FORM method=GET action="<c:url value="/addVisit.htm"/>" name="formVisitPet<c:out value="${pet.id}"/>"> - <INPUT type="hidden" name="petId" value="<c:out value="${pet.id}"/>"/> - <INPUT type="submit" value="Add Visit"/> - </FORM> -</authz:authorize> -- - -
-These steps can be applied to your own application. Although we do suggest -that you visit http://acegisecurity.org -and in particular review the "Suggested Steps" for getting started with Acegi -Security. The suggested steps are optimized for learning Acegi Security quickly -and applying it to your own projects. It also includes realistic time estimates -for each step so you can plan your integration activities.
- - \ No newline at end of file + +To complete this tutorial, you will require a servlet container (such as Tomcat) +and a general understanding of using Spring without Acegi Security. The Petclinic +sample itself is part of Spring and should help you learn Spring. We suggest you +only try to learn one thing at a time, and start with Spring/Petclinic before +Acegi Security. +
+You will also need to download: +
+Unzip both files. After unzipping Acegi Security, you'll need to unzip the +acegi-security-sample-tutorial.war file, because we need some files that are +included within it. In the code below, we'll refer to the respective unzipped +locations as %spring% and %acegi% (with the latter variable referring to the +unzipped WAR, not the original ZIP). There is no need to setup any environment +variables to complete the tutorial. +
+We now need to put some extra files into Petclinic. The following commands should work: +
+mkdir %spring%\samples\petclinic\war\WEB-INF\lib +copy %acegi%\acegilogin.jsp %spring%\samples\petclinic\war +copy %acegi%\accessDenied.jsp %spring%\samples\petclinic\war +copy %acegi%\WEB-INF\users.properties %spring%\samples\petclinic\war\WEB-INF +copy %acegi%\WEB-INF\applicationContext-acegi-security.xml %spring%\samples\petclinic\war\WEB-INF +copy %acegi%\WEB-INF\lib\acegi-security-1.0.0.jar %spring%\samples\petclinic\war\WEB-INF\lib +copy %acegi%\WEB-INF\lib\oro-2.0.8.jar %spring%\samples\petclinic\war\WEB-INF\lib +copy %acegi%\WEB-INF\lib\commons-codec-1.3.jar %spring%\samples\petclinic\war\WEB-INF\lib ++
Edit %spring%\samples\petclinic\war\WEB-INF\web.xml and insert the following block of code. +
+<filter> + <filter-name>Acegi Filter Chain Proxy</filter-name> + <filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class> + <init-param> + <param-name>targetClass</param-name> + <param-value>org.acegisecurity.util.FilterChainProxy</param-value> + </init-param> +</filter> + +<filter-mapping> + <filter-name>Acegi Filter Chain Proxy</filter-name> + <url-pattern>/*</url-pattern> +</filter-mapping> ++Next, locate the "contextConfigLocation" parameter, and add a new line into the existing param-value. +The resulting block will look like this: +
+<context-param> + <param-name>contextConfigLocation</param-name> + <param-value> + /WEB-INF/applicationContext-jdbc.xml + /WEB-INF/applicationContext-acegi-security.xml + </param-value> +</context-param> ++
+To make it easier to experiment with the application, now edit +%spring%\samples\petclinic\war\WEB-INF\jsp\footer.jsp. Add a new "logout" link, as shown: +
+<table style="width:100%"><tr> + <td><A href="<c:url value="/welcome.htm"/>">Home</A></td> + <td><A href="<c:url value="/j_acegi_logout"/>">Logout</A></td> + <td style="text-align:right;color:silver">PetClinic :: a Spring Framework demonstration</td> +</tr></table> ++
+Our last step is to specify which URLs require authorization and which do not. Let's +edit %spring%\samples\petclinic\war\WEB-INF\applicationContext-acegi-security.xml. +Locate the bean definition for FilterSecurityInterceptor. Edit its objectDefinitionSource +property so that it reflects the following: +
+<property name="objectDefinitionSource"> + <value> + CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON + PATTERN_TYPE_APACHE_ANT + /acegilogin.jsp=IS_AUTHENTICATED_ANONYMOUSLY + /**=IS_AUTHENTICATED_REMEMBERED + </value> +</property> ++
Start the Hypersonic server (this is just normal Petclinic configuration): +
+cd %spring%\samples\petclinic\db\hsqldb +server ++
+Insert some data (again, normal Petclinic configuration): +
+cd %spring%\samples\petclinic +build setupDB ++
+Use Petclinic's Ant build script and deploy to your servlet container: +
+cd %spring%\samples\petclinic +build warfile +copy dist\petclinic.war %TOMCAT_HOME%\webapps ++
Finally, start your container and try to visit the home page. +Your request should be intercepted and you will be forced to login.
+Whilst you've now secured your web requests, you might want to stop users +from being able to add clinic visits unless authorized. We'll make it so +you need to hold ROLE_SUPERVISOR to add a clinic visit. +
+In %spring%\samples\petclinic\war\WEB-INF\applicationContext-jdbc.xml, locate +the TransactionProxyFactoryBean definition. Add an additional property after +the existing "preInterceptors" property: +
+<property name="postInterceptors" ref="methodSecurityInterceptor"/> ++
+Finally, we need to add in the referred-to "methodSecurityInterceptor" bean definition. +So pop an extra bean definition in, as shown below: +
+<bean id="methodSecurityInterceptor" class="org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor"> + <property name="authenticationManager"><ref bean="authenticationManager"/></property> + <property name="accessDecisionManager"> + <bean class="org.acegisecurity.vote.AffirmativeBased"> + <property name="allowIfAllAbstainDecisions" value="false"/> + <property name="decisionVoters"> + <list> + <bean class="org.acegisecurity.vote.RoleVoter"/> + <bean class="org.acegisecurity.vote.AuthenticatedVoter"/> + </list> + </property> + </bean> + </property> + <property name="objectDefinitionSource"> + <value> + org.springframework.samples.petclinic.Clinic.*=IS_AUTHENTICATED_REMEMBERED + org.springframework.samples.petclinic.Clinic.storeVisit=ROLE_SUPERVISOR + </value> + </property> +</bean> ++
+Redeploy your web application. Use the earlier process to do that. Be careful to +ensure that the old Petclinic WAR is replaced by the new Petclinic WAR in your +servlet container. Login as "marissa", who has ROLE_SUPERVISOR. You will be able to +then view a customer and add a visit. Logout, then login as anyone other than Marissa. +You will receive an access denied error when you attempt to add a visit. +
+To clean things up a bit, you might want to wrap up by hiding the "add visit" link +unless you are authorized to use it. Acegi Security provides a tag library to help +you do that. Edit %spring%\samples\petclinic\war\WEB-INF\jsp\owner.jsp. Add +the following line to the top of the file: +
+<%@ taglib prefix="authz" uri="http://acegisecurity.org/authz" %> ++Next, scroll down and find the link to "add visit". Modify it as follows: +
+<authz:authorize ifAllGranted="ROLE_SUPERVISOR"> + <FORM method=GET action="<c:url value="/addVisit.htm"/>" name="formVisitPet<c:out value="${pet.id}"/>"> + <INPUT type="hidden" name="petId" value="<c:out value="${pet.id}"/>"/> + <INPUT type="submit" value="Add Visit"/> + </FORM> +</authz:authorize> ++
+These steps can be applied to your own application. Although we do suggest +that you visit http://acegisecurity.org +and in particular review the "Suggested Steps" for getting started with Acegi +Security. The suggested steps are optimized for learning Acegi Security quickly +and applying it to your own projects. It also includes realistic time estimates +for each step so you can plan your integration activities.
The following policies and procedures are intended to ensure that Acegi Security will
+
+ The following policies and procedures are intended to ensure that Acegi Security will
continue to achieve its project objectives and support the community in the context of an
expanding development team.
-
+
The following was unanimously supported by the community supporting following
discussion
on acegisecurity-developer. The policies and procedures below represent version 1.0
@@ -40,92 +11,93 @@
Thanks for your help in connection with the above. If you have any suggestions for improving these
+ Thanks for your help in connection with the above. If you have any suggestions for improving these
policies and procedures, please use the acegisecurity-developer list to raise them.
-
- Ben Alex
+ Ben Alex
+
$Id$
-
-
+
+
+
-
+ This project uses JIRA. Please log a task in JIRA for any changes you make to SVN, with the exception of very minor changes that users are unlikely to ever be interested in searching for and/or the change affects code that has never been in an officially released version of the project (eg ongoing changes to a new feature in SVN HEAD that hasn't been released previously).
+ Any users running from SVN HEAD are warmly encouraged to join acegisecurity-cvs so that they can keep an eye on commit comments. Developers are encouraged to join acegisecurity-cvs and read the commit comments. If anyone has a concern with any commit, please raise it on acegisecurity-developer so that the broader community can participate (not acegisecurity-cvs). Alternatively, contact the author of the change directly if you think that would be more appropriate or diplomatic.
+ Please make your commit comments informative, yet not too detailed. Detailed comments are ideally placed in the JIRA task. In the case of a contribution by a non-developer, please use the SVN commits to reflect who provided the contribution and add that person's name to /project.xml in the contributors section. If the contributors section does not list the name of someone who has contributed accepted code, please add them or let me know so that I can do so.
+ If you add a major new feature, please announce it on acegisecurity-developer. That way people using the project have an idea of what is coming up in the next release, and any implementation-specific comments can be received prior to the first release when users will start expecting some degree of consistency and stability. It also encourages people to try out your new feature.
+ Please make sure /docs/xdocs/changes.xml has a reference to JIRA for the upcoming release version. You don't need to add the name of contributors to /doc/xdocs/changes.xml, as acknowledgement is already provided via /project.xml, source code @author tags, the SVN commit message, and typically a JIRA task.
+ Please edit /docs/xdocs/upgrade/upgrade-xx-yy.html if you make a change that is significant and you think users who are upgrading should be aware of it. Equally, users are encouraged to consult the upgrade-xx-yy.html file before they deploy subsequent official release JARs.
+ Please use Jalopy with the /jalopy.xml file to format your Java code before checkin. This keeps our code consistent and ensures the license message is correct. There are plugins for all major IDEs.
+ The /sandbox can be used to obtain feedback from fellow developers and the community about your code, general approach or new ideas. If you have SVN rights, please use /sandbox instead of emailing ZIP files to other developers for feedback. The community should understand that code in the sandbox is unsupported, subject to refactoring, may not have any unit tests, and may be removed at any time. The /sandbox will never be included in official release ZIPs. It's a "scratching pad" only.
+ Unit tests are important to any security project, and we have a good history of high coverage. You can view the latest coverage report online (rebuilt every 24 hours). Please keep an eye on coverage and don't hesitate to add more unit tests. Please do not check code into /core unless it has at least an exercising unit test - use the /sandbox instead.
+ Never check in code if the unit tests fail. This means, at minimum, successfully running "maven test:test" from /core. Always name your unit test classes so they end in "*Tests" - this ensures that Maven picks them up. If there is code in SVN which you didn't write and it is breaking the unit tests, please correct it yourself - don't leave SVN "broken" whilst waiting for the responsible developer to address it (the delay causes confusing and long-running threads on the list and forum). You can always rollback to the previous working version if in doubt of how the class works (just remember to comment the commit appropriately and let the author know).
+ Please update the reference guide and JavaDocs for any new major features. The JavaDocs should always be correct. The reference guide may be kept updated with less rigor, although please briefly discuss any major new features. XMLmind can be used if you don't have a DocBook editor.
+ Developers please keep an eye on the Acegi Security forum. It's a very active forum, and it takes a lot of work if not shared around. Please don't hesitate to reply to users - I try to read every thread and correct/confirm the situation if someone mentions they're unsure. I also will generally send developers an email if there's a question I can't answer as I didn't write the code.
+ In the future, I will put to vote any proposed new developers. New developers will be firstly encouraged to attach patches to JIRA tasks to illustrate their understanding of the project, or, if they're long-time users, they might be given access without this JIRA stage if they're undertaking a major new feature.
+ Developers should be subscribed to acegisecurity-developer. Obviously it would take significant time to read every thread, but reading the high priority messages (as indicated by the subject line) is needed to ensure we all have a way of communicating.
+ Please do not hesitate to assign yourself any JIRA task that is unassigned, or assigned to me and not in the "In Progress" status. Also feel free to approach fellow developers to volunteer to work on tasks they might be assigned but haven't started.
+ No code in SVN is "sacred". If you have a good idea or refactoring for an area of code that someone else wrote, raise it on acegisecurity-developer or contact the author directly. Please don't commit changes to such code unless it is a unit test failure correction, or you've firstly raised it on the acegisecurity-developer list or directly with the author.
+ People's priorities are ever-changing, and we're all short on time. For this reason it's perfectly understandable that over time developers will move on to other things. This is not a negative reflection in any way - just part of any long-term project. If a developer no longer has the time or inclination to participate in the project , please send an email to acegisecurity-developer or myself. I will remove the SVN rights and reassign any JIRA tasks. Importantly, this helps find a new maintainer of the former developer's code (or, in very extreme cases, their code might be relocated to the sandbox or removed).
+ Use CDATA inside XML files for multi-line properties. There is no tab/space policy for XML files, although try to maintain whatever the file is already using. The tab/space policy for Java files is managed by Jalopy.
+ Keep the warm community spirit. The Spring community is a nice place to be - especially compared with some of the other open source communities out there where people are abused, ignored, insulted or excluded. No policy or procedure (including those above) should ever compromise operating in a considerate and diplomatic manner that respects the dignity of each individual member of the community. If in doubt, please contact me directly first. If I am ever guilty of this, please let me know and I will correct myself.
+
Project Admin
-
Many open source and commercial products either use Acegi Security or at least
+
+ Many open source and commercial products either use Acegi Security or at least
support it. Following is a partial list of such products. If you've integrated Acegi
Security with some other product, please let us know (preferably with a URL
to some page explaining the integration/use)...
- Out-Of-the-Box Supported by Acegi Security
-
-
-
- Open Source Projects
-
-
-
- Commercial Deployments
-
-
-
-
-
+
Sometimes we get asked can Acegi Security be used without Spring. - This page provides a detailed answer.
- -Acegi Security started out as a method interceptor for Spring IoC container
+
+ Sometimes we get asked can Acegi Security be used without Spring.
+ This page provides a detailed answer. Acegi Security started out as a method interceptor for Spring IoC container
managed beans. Typically such beans provide services layer functions.
Over time Acegi Security grew to offer authentication services, There's plenty written about why the
+ see our change log). There's plenty written about why the
Spring Framework
is a good fit for modern applications. If you're not familiar with the benefits
Spring offers, please take a few minutes to learn more about it. In numerous
situations Spring will save you many months (or even years) of development time.
Not to mention your solutions will be better architected
(designed), better coded (implemented), and better supported (maintained) in the future.
- Acegi Security relies on the Spring IoC container to wire its classes, and execute lifecycle
+ Acegi Security relies on the Spring IoC container to wire its classes, and execute lifecycle
methods such as If it sounds too hard (it's not) or counter-productive (it is) to replace Spring's IoC
+ reasons people would not use Spring). If it sounds too hard (it's not) or counter-productive (it is) to replace Spring's IoC
services, don't forget you can always deploy Acegi Security and the Spring
IoC container solely for configuring Acegi Security. Spring does not mandate its
use in every part of your application. It will work quite successfully doing nothing more than
@@ -70,9 +28,7 @@
it's really no different than the traditional approach of every framework having its very
own XML or other proprietary configuration system. The main difference is that Spring is an
actual de facto standard, and you can gradually introduce it to other parts of your application
- over time (if desired). Acegi Security does not use any other Spring capabilities. Most notably, the
+ over time (if desired). Acegi Security does not use any other Spring capabilities. Most notably, the
entire architecture is based around In summary, we recommend you take a look at Spring and consider using it in your
+ In summary, we recommend you take a look at Spring and consider using it in your
applications. Irrespective of whether you do so or not, we strongly recommend you use it
for configuration and lifecycle management of Acegi Security. If that is also not desired,
Acegi Security can easily be executed without Spring at all, providing you implement
similar IoC services. Acegi Security has very minimal dependencies directly on Spring,
with it being useful in many non-Spring applications and with non-Spring frameworks.
-
-
+
+
+ThreadLocal
management,
web request filtering, extra AOP support,
ACL features, additional authentication mechanisms and so on (for those interested,
- see our change log).Why Use Spring
- Acegi Security Dependencies on Spring
- afterPropertiesSet()
. Some Acegi Security classes also
publish events to the ApplicationContext
, although you could provide a mock
implementation of ApplicationContext
easily enough which no-ops the method.
@@ -60,9 +20,7 @@
avoid its use by writing equivalent getter, setter and lifecycle invocation processes
in standard Java code. This is a natural consequence of the Spring way of development,
which emphasises framework independence (it is not because we think there are good
- reasons people would not use Spring).Filter
s, not Spring's MVC framework.
This allows it to be used with any MVC framework, or even with just straight JSPs.
Acegi Security uses the AOP Alliance and AspectJ interfaces for method interception -
@@ -83,13 +39,12 @@
even native Spring-powered applications for these to be re-implemented using the application's
persistence framework of choice (eg Hibernate).
- Conclusion
-
-
Presented below are the steps we encourage you to take in order to gain the most
+
+ Presented below are the steps we encourage you to take in order to gain the most
out of Acegi Security in a realistic timeframe.
Please note the time estimates are just that: estimates. They will vary considerably depending
+ Please note the time estimates are just that: estimates. They will vary considerably depending
on how much experience you have, particularly with Java and Spring. They will also vary depending
on how complex your intended security-enabled application will be. Some people need to push the domain
object instance access control list capabilities to the maximum, whilst others don't even need anything
beyond web request security. The good thing is Acegi Security will either directly support your future
needs, or provide a clearly-defined extension point for addressing them.
-
+
We welcome your feedback about how long it has actually taken you to complete each step, so we
can update this page and help new users better assess their project timetables in the future.
Any other tips on what you found helpful in learning Acegi Security are also very welcome.
-
-
+
+
+
-
+ be quickly and easily used to integrate into your own project.
- Estimated time: 30 minutes.
+ Estimated time: 30 minutes.
+ Acegi Security into your own application.
- Estimated time: 1 hour.
+ Estimated time: 1 hour.
+ implemented in the last step.
- Estimated time: 1 day.
+ Estimated time: 1 day.
acegi-security-sample-contacts-filter.war
,
- which is also included in the release ZIP file.
+ which is also included in the release ZIP file.
The purpose of understanding the "Contacts Sample" is to get a better feel for how method
security is implemented, particularly with domain object access control lists. This will
- really round-out the rest of the framework for you.
+ really round-out the rest of the framework for you.
The actual java code
is a completely standard Spring application, except ContactManagerBackend
@@ -84,24 +55,24 @@
web.xml (from the filter webapp).
The XML definitions are comprehensively discussed in the
Reference Guide.
-
+
Please note the release ZIP files do not include the sample application Java source code. You
- will need to download from SVN if you would like to access the Java sources.
+ will need to download from SVN if you would like to access the Java sources.
- Estimated time: 1-2 days.
+ Estimated time: 1-2 days.
+
We strongly recommend that you start your actual integration with the "Tutorial Sample".
Don't start by integrating with the "Contacts Sample", even if you have complex needs.
Most people reporting problems on the forums do so because of a configuration problem,
as they're trying to make far too many changes at once without really knowing what
they're doing. Instead, make changes one at a time, starting from the bare bones configuration
- provided by the "Tutorial Sample".
+ provided by the "Tutorial Sample".
If you've followed the steps above, and refer back to the
Reference Guide,
@@ -110,24 +81,25 @@
for help, you'll find it pretty easy to implement Acegi Security in your application.
Most importantly, you'll be using a security framework that offers you complete container
portability, flexibility, and community support - without needing to write and maintain your
- own code.
+ own code.
+
+ Estimated time: 1-5 days.
- Estimated time: 1-5 days.
-
Several changes were made between version 0.3 and 0.4 of the project.
+
+ Several changes were made between version 0.3 and 0.4 of the project.
These changes increased the modularity of the code, enhanced unit testing,
made package roles clearer, and added compelling alternatives to container
adapters and using web.xml security constraints to protect HTTP resources.
- Unfortunately, changes to the API and package locations were required. The
+ Unfortunately, changes to the API and package locations were required. The
following should help most casual users of the project update their
applications:
@@ -34,20 +28,21 @@ applications:
net.sf.acegisecurity.intercept.web package. This will give you considerably
more flexibility, and reuse the same concepts as you'd be familiar with
via the method security interception system. Refer to the reference
- documentation or Contacts sample application.
+ documentation or Contacts sample application.
+
We hope you find the new features useful in your projects.
-
-
+
+
+
The following should help most casual users of the project update their
+
+ The following should help most casual users of the project update their
applications:
+
There are also lots of new features you might wish to consider for your
projects. These include CAS integration, pluggable password encoders
(such as MD5 and SHA), along with pluggable salt sources. We hope you find
the new features useful in your projects.
-
-
+
+
+
@@ -48,12 +42,13 @@ applications:
Please continue using the Spring Users mailing list for general support.
-
+
+
The following should help most casual users of the project update their
applications:
@@ -21,31 +15,31 @@ Locate and remove all property references to
By default DaoAuthenticationProvider returns an Authentication object
containing the relevant User, which allows access to additional properties.
Where possible, we recommend you change your code to something like this,
- so that you can leave forcePrincipalAsString to the false default:
-
-
+
+
+
+ so that you can leave forcePrincipalAsString to the false default:
- String username = authentication.getPrincipal();
- if (authentication.getPrincipal() instanceof User) {
- username = ((User) authentication.getPrincipal()).getUsername();
- }
-
+ String username = authentication.getPrincipal();
+ if (authentication.getPrincipal() instanceof User) {
+ username = ((User) authentication.getPrincipal()).getUsername();
+ }
+
+ implementations, modify the User to UserDetails, as shown below:
- public User loadUserByUsername(String username)
Existing concrete implementations would be returning User, which implements
UserDetails, so no further code changes should be required.
- throws UsernameNotFoundException, DataAccessException {
+ public User loadUserByUsername(String username)
+ throws UsernameNotFoundException, DataAccessException {
- to:
+ to:
- public UserDetails loadUserByUsername(String username)
- throws UsernameNotFoundException, DataAccessException {
+ public UserDetails loadUserByUsername(String username)
+ throws UsernameNotFoundException, DataAccessException {
+ in web.xml match the following:
- <filter>
-
- <filter-name>Acegi Security System for Spring Auto Integration Filter</filter-name>
- <filter-class>net.sf.acegisecurity.util.FilterToBeanProxy</filter-class>
- <init-param>
- <param-name>targetClass</param-name>
- <param-value>net.sf.acegisecurity.ui.AutoIntegrationFilter</param-value>
- </init-param>
- </filter>
+ <filter>
+ <filter-name>Acegi Security System for Spring Auto Integration Filter</filter-name>
+ <filter-class>net.sf.acegisecurity.util.FilterToBeanProxy</filter-class>
+ <init-param>
+ <param-name>targetClass</param-name>
+ <param-value>net.sf.acegisecurity.ui.AutoIntegrationFilter</param-value>
+ </init-param>
+ </filter>
- Then add the following to applicationContext.xml:
+
+ Then add the following to applicationContext.xml:
- <bean id="autoIntegrationFilter" class="net.sf.acegisecurity.ui.AutoIntegrationFilter"/>
+ <bean id="autoIntegrationFilter" class="net.sf.acegisecurity.ui.AutoIntegrationFilter"/>
+
+
The following should help most casual users of the project update their
applications:
@@ -56,5 +50,6 @@ be correct.
Note the "cache" property is now required, and the old internally-managed
cache properties have been removed.
-
-
+
+
+
+
+
The following should help most casual users of the project update their
applications:
@@ -13,34 +7,35 @@ applications:
-
-
-
+
+
+
+
+
The following should help most casual users of the project update their
applications:
@@ -22,79 +16,80 @@ applications:
SecurityContextHolder and provides a single getter/setter for a
SecurityContext.
SecurityContextHolder
guarantees to never return a null
SecurityContext
.
- SecurityContext
provides single getter/setter for Authentication
.
+ SecurityContext
provides single getter/setter for Authentication
.
To migrate, simply modify all your code that previously worked with ContextHolder
,
SecureContext
and Context
to directly call SecurityContextHolder
and work with the SecurityContext
(instead of the now removed Context
- and SecureContext
interfaces).
+ and SecureContext
interfaces).
- For example, change:
+ For example, change:
- SecureContext ctx = SecureContextUtils.getSecureContext();
- to:
+ SecureContext ctx = SecureContextUtils.getSecureContext();
+ to:
- SecurityContext ctx = SecurityContextHolder.getContext();
-
+ SecurityContext ctx = SecurityContextHolder.getContext();
- and change:
+
+ and change:
- <bean id="httpSessionContextIntegrationFilter" class="net.sf.acegisecurity.context.HttpSessionContextIntegrationFilter">
- to:
- <property name="context"><value>net.sf.acegisecurity.context.security.SecureContextImpl</value></property>
- </bean>
+ <bean id="httpSessionContextIntegrationFilter" class="net.sf.acegisecurity.context.HttpSessionContextIntegrationFilter">
+ <property name="context"><value>net.sf.acegisecurity.context.security.SecureContextImpl</value></property>
+ </bean>
+ to:
- <bean id="httpSessionContextIntegrationFilter" class="net.sf.acegisecurity.context.HttpSessionContextIntegrationFilter">
-
- <property name="context"><value>net.sf.acegisecurity.context.SecurityContextImpl</value></property>
- </bean>
+ <bean id="httpSessionContextIntegrationFilter" class="net.sf.acegisecurity.context.HttpSessionContextIntegrationFilter">
+ <property name="context"><value>net.sf.acegisecurity.context.SecurityContextImpl</value></property>
+ </bean>
+
We apologise for the inconvenience, but on a more positive note this means you receive strict
type checking, you no longer need to mess around with casting to and from Context
implementations, your applications no longer need to perform checking of null
and
- unexpected Context
implementation types.
+ unexpected Context
implementation types.
AbstractProcessingFilter
has changed its getter/setter approach used for customised
authentication exception directions. See the
- AbstractProcessingFilter
JavaDocs to learn more.AbstractProcessingFilter
JavaDocs to learn more.
AnonymousProcessingFilter
now has a removeAfterRequest
property, which defaults to true
. This
will cause the anonymous authentication token to be set to null at the end of each request, thus
avoiding the expense of creating a HttpSession
in HttpSessionContextIntegrationFilter
. You may
set this property to false if you would like the anoymous authentication token to be preserved,
- which would be an unusual requirement.
LoggerListener
has changed. See the net.sf.acegisecurity.event package
.
-
- For example, change:
+ LoggerListener
has changed. See the net.sf.acegisecurity.event package
.
+
+ For example, change:
- <bean id="loggerListener" class="net.sf.acegisecurity.providers.dao.event.LoggerListener"/>
- to:
+ <bean id="loggerListener" class="net.sf.acegisecurity.providers.dao.event.LoggerListener"/>
+ to:
- <bean id="loggerListener" class="net.sf.acegisecurity.event.authentication.LoggerListener"/>
-
+ <bean id="loggerListener" class="net.sf.acegisecurity.event.authentication.LoggerListener"/>
+
<authz:authentication>
JSP tag will generally need to set the operation
- property equal to "username", as reflection is now used to retrieve the property displayed.<authz:authentication>
JSP tag will generally need to set the operation
+ property equal to "username", as reflection is now used to retrieve the property displayed.net.sf.acegisecurity.wrapper.ContextHolderAwareRequestFilter
should note that it has been
- renamed to net.sf.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter
.
+ renamed to net.sf.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter
.
+ review the new configuration requirements.
+
+
The following should help most casual users of the project update their
applications:
-Changes 0.9.0 to RC1
-
-
+