upgrade-090-100.xml 5.2 KB

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