upgrade-090-100.xml 5.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <document><properties><title>Acegi Security - Upgrading from version 0.8.0 to 1.0.0</title></properties><body><section name="Upgrading from 0.9.0 to 1.0.0"><p>
  3. The following should help most casual users of the project update their
  4. applications:
  5. </p></section><section name="Changes 0.9.0 to RC1"><ul>
  6. <li>The top level package name has changed. Simply find "net.sf.acegisecurity" and replace with
  7. "org.acegisecurity".</li>
  8. <li>
  9. DaoAuthenticationProvider has a property, authenticationDao. This property should now be renamed to
  10. userDetailsService.
  11. </li>
  12. <li>
  13. In JSPs, each "authz" taglib prefix must be changed from uri="http://acegisecurity.sf.net/authz"
  14. to uri="http://acegisecurity.org/authz".
  15. </li>
  16. <li>net.sf.acegisecurity.providers.dao.AuthenticationDao is now org.acegisecurity.userdetails.UserDetailsService.
  17. The interface signature has not changed. Similarly, User and UserDetails have moved into the latter's package as well.
  18. If you've implemented your own AuthenticationDao, you'll need to change the class it's implementing and quite likely
  19. the import packages for User and UserDetails. In addition, if using JdbcDaoImpl or InMemoryDaoImpl please
  20. note they have moved to this new package.</li>
  21. <li>Acegi Security is now localised. In net.sf.acegisecurity you will find a messages.properties. It is
  22. suggested to register this in your application context, perhaps using ReloadableResourceBundleMessageSource.
  23. If you do not do this, the default messages included in the source code will be used so this change is
  24. not critical. The Spring LocaleContextHolder class is used to determine the locale of messages included in
  25. exceptions. At present only the default messages.properties is included (which is in English). If
  26. you localise this file to another language, please consider attaching it to a
  27. <a href="http://opensource2.atlassian.com/projects/spring/secure/BrowseProject.jspa?id=10040">new JIRA task</a>
  28. so that we can include it in future Acegi Security releases.</li>
  29. </ul></section><section name="Changes RC1 to RC2"><ul>
  30. <li>
  31. org.acegisecurity.ui.rememberme.RememberMeProcessingFilter now requires an authenticationManager property. This will generally
  32. point to an implementation of org.acegisecurity.providers.ProviderManager.
  33. </li>
  34. <li>
  35. org.acegisecurity.intercept.web.AuthenticationEntryPoint has moved to a new location,
  36. org.acegisecurity.ui.AuthenticationEntryPoint.
  37. </li>
  38. <li>
  39. org.acegisecurity.intercept.web.SecurityEnforcementFilter has moved to a new location and name,
  40. org.acegisecurity.ui.ExceptionTranslationFilter. In addition, the "filterSecurityInterceptor"
  41. property on the old SecurityEnforcementFilter class has been removed. This is because
  42. SecurityEnforcementFilter will no longer delegate to FilterSecurityInterceptor as it has in the
  43. past. Because this delegation feature has been removed (see SEC-144 for a background as to why),
  44. please add a new filter definition for FilterSecurityInterceptor to the end of your
  45. FilterChainProxy. Generally you'll also rename the old SecurityEnforcementFilter entry in your
  46. FilterChainProxy to ExceptionTranslationFilter, more accurately reflecting its purpose.
  47. If you are not using FilterChainProxy (although we recommend that you do), you will need to add
  48. an additional filter entry to web.xml and use FilterToBeanProxy to access the FilterSecurityInterceptor.
  49. </li>
  50. <li>
  51. If you are directly using SecurityContextHolder.setContext(SecurityContext) - which is not
  52. very common - please not that best practise is now to call SecurityContextHolder.clearContext()
  53. if you wish to erase the contents of the SecurityContextHolder. Previously code such as
  54. SecurityContextHolder.setContext(new SecurityContextImpl()) would have been used. The revised
  55. method internally stores null, which helps avoids redeployment issue caused by the previous
  56. approaches (see SEC-159 for further details).
  57. </li>
  58. </ul></section><section name="Changes RC2 to Final"><ul>
  59. <li>
  60. AbstractProcessingFilter.onUnsuccessfulAuthentication(HttpServletRequest, HttpServletResponse)
  61. has changed it signature (SEC-238). If subclassing, please override the new signature.
  62. </li>
  63. <li>
  64. ExceptionTranslationFilter no longer provides a sendAccessDenied() method. Use the
  65. new AccessDeniedHandler instead if custom handling is required.
  66. </li>
  67. <li>
  68. There have been some changes to the LDAP provider APIs to allow for future improvements, as detailed in
  69. <a href="http://opensource.atlassian.com/projects/spring/browse/SEC-264">SEC-264</a>. These
  70. should only affect users who have written their own extensions to the provider. The general LDAP
  71. classes are now in the packages org.acegisecurity.ldap and the org.acegisecurity.userdetails.ldap
  72. package has been introduced. The search and authentication classes now return an
  73. <a href="../multiproject/acegi-security/apidocs/org/acegisecurity/userdetails/ldap/LdapUserDetails.html">LdapUserDetails</a>
  74. instance. The LdapAuthoritiesPopulator interface and its default implementation now both make use of
  75. LdapUserDetails. Any customized versions should be updated to use the new method signatures.
  76. </li>
  77. </ul></section></body></document>