upgrade-090-100.html 4.2 KB

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