Migrate from Acegi Security 1.0.x to Spring Security 5.0

Proprietary

Migrates Acegi Security 1.0.x directly to Spring Security 5.0. This recipe handles dependency changes, type renames, XML configuration updates, web.xml filter migration, and adds TODO comments for password encoders that require manual migration.

io.moderne.java.spring.security.MigrateAcegiToSpringSecurity_5_0
mod run . --recipe=io.moderne.java.spring.security.MigrateAcegiToSpringSecurity_5_0

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Change Gradle or Maven dependency org.acegisecurity:acegi-security
  2. Change Gradle or Maven dependency org.acegisecurity:acegi-security-cas
  3. Change Gradle or Maven dependency org.acegisecurity:acegi-security-tiger
  4. Add Gradle or Maven dependency org.springframework.security:spring-security-web:5.0.x
  5. Add Gradle or Maven dependency org.springframework.security:spring-security-ldap:5.0.x
  6. Change type org.acegisecurity.providers.UsernamePasswordAuthenticationToken to org.springframework.security.authentication.UsernamePasswordAuthenticationToken
  7. Change type org.acegisecurity.Authentication to org.springframework.security.core.Authentication
  8. Change type org.acegisecurity.AuthenticationException to org.springframework.security.core.AuthenticationException
  9. Change type GrantedAuthorityImpl to SimpleGrantedAuthority
  10. Change type org.acegisecurity.AuthenticationServiceException to org.springframework.security.authentication.AuthenticationServiceException
  11. Change type org.acegisecurity.context.SecurityContextHolder to org.springframework.security.core.context.SecurityContextHolder
  12. Change type org.acegisecurity.AuthenticationManager to org.springframework.security.authentication.AuthenticationManager
  13. Change type org.acegisecurity.providers.AuthenticationProvider to org.springframework.security.authentication.AuthenticationProvider
  14. Change type org.acegisecurity.context.SecurityContext to org.springframework.security.core.context.SecurityContext
  15. Change type org.acegisecurity.GrantedAuthority to org.springframework.security.core.GrantedAuthority
  16. Change type org.acegisecurity.userdetails.UserDetails to org.springframework.security.core.userdetails.UserDetails
  17. Change type org.acegisecurity.userdetails.UserDetailsService to org.springframework.security.core.userdetails.UserDetailsService
  18. Change type org.acegisecurity.ui.AuthenticationEntryPoint to org.springframework.security.web.AuthenticationEntryPoint
  19. Change type org.acegisecurity.ui.rememberme.RememberMeServices to org.springframework.security.web.authentication.RememberMeServices
  20. Change type BasicProcessingFilterEntryPoint to BasicAuthenticationEntryPoint
  21. Change type DigestProcessingFilter to DigestAuthenticationFilter
  22. Change type FilterToBeanProxy to DelegatingFilterProxy
  23. Change type AuthenticationProcessingFilter to UsernamePasswordAuthenticationFilter
  24. Change type AuthenticationProcessingFilterEntryPoint to LoginUrlAuthenticationEntryPoint
  25. Change type BasicProcessingFilter to BasicAuthenticationFilter
  26. Change type DigestProcessingFilterEntryPoint to DigestAuthenticationEntryPoint
  27. Change type RememberMeProcessingFilter to RememberMeAuthenticationFilter
  28. Change type org.acegisecurity.ui.rememberme.TokenBasedRememberMeServices to org.springframework.security.web.authentication.rememberme.TokenBasedRememberMeServices
  29. Change type AnonymousProcessingFilter to AnonymousAuthenticationFilter
  30. Change type org.acegisecurity.ui.ExceptionTranslationFilter to org.springframework.security.web.access.ExceptionTranslationFilter
  31. Change type org.acegisecurity.intercept.web.FilterSecurityInterceptor to org.springframework.security.web.access.intercept.FilterSecurityInterceptor
  32. Change type SecurityEnforcementFilter to FilterSecurityInterceptor
  33. Change type org.acegisecurity.util.FilterChainProxy to org.springframework.security.web.FilterChainProxy
  34. Change type org.acegisecurity.ui.logout.LogoutFilter to org.springframework.security.web.authentication.logout.LogoutFilter
  35. Change type org.acegisecurity.ui.logout.SecurityContextLogoutHandler to org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler
  36. Change type org.acegisecurity.ui.logout.LogoutHandler to org.springframework.security.web.authentication.logout.LogoutHandler
  37. Change type org.acegisecurity.providers.ldap.populator.DefaultLdapAuthoritiesPopulator to org.springframework.security.ldap.userdetails.DefaultLdapAuthoritiesPopulator
  38. Change type org.acegisecurity.userdetails.ldap.LdapUserDetails to org.springframework.security.ldap.userdetails.LdapUserDetails
  39. Change type InitialDirContextFactory to DefaultSpringSecurityContextSource
  40. Change type DefaultInitialDirContextFactory to DefaultSpringSecurityContextSource
  41. Change type org.acegisecurity.providers.ldap.LdapAuthenticationProvider to org.springframework.security.ldap.authentication.LdapAuthenticationProvider
  42. Change type org.acegisecurity.providers.ldap.authenticator.BindAuthenticator to org.springframework.security.ldap.authentication.BindAuthenticator
  43. Change type org.acegisecurity.providers.ldap.authenticator.PasswordComparisonAuthenticator to org.springframework.security.ldap.authentication.PasswordComparisonAuthenticator
  44. Change type org.acegisecurity.providers.ldap.authenticator.LdapAuthenticator to org.springframework.security.ldap.authentication.LdapAuthenticator
  45. Change type org.acegisecurity.providers.ldap.LdapAuthoritiesPopulator to org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator
  46. Change method name org.springframework.security.ldap.DefaultSpringSecurityContextSource setManagerDn(String) to setUserDn
  47. Change method name org.springframework.security.ldap.DefaultSpringSecurityContextSource setManagerPassword(String) to setPassword
  48. Change method name org.springframework.security.ldap.DefaultSpringSecurityContextSource newInitialDirContext(String, String) to getContext
  49. Change XML attribute
  50. Change XML attribute
  51. Change XML attribute
  52. Change XML attribute
  53. Change type org.acegisecurity.vote.AffirmativeBased to org.springframework.security.access.vote.AffirmativeBased
  54. Change type org.acegisecurity.vote.ConsensusBased to org.springframework.security.access.vote.ConsensusBased
  55. Change type org.acegisecurity.vote.UnanimousBased to org.springframework.security.access.vote.UnanimousBased
  56. Change type org.acegisecurity.vote.RoleVoter to org.springframework.security.access.vote.RoleVoter
  57. Change type org.acegisecurity.vote.AuthenticatedVoter to org.springframework.security.access.vote.AuthenticatedVoter
  58. Change type org.acegisecurity.vote.AccessDecisionVoter to org.springframework.security.access.AccessDecisionVoter
  59. Change type org.acegisecurity.vote.AccessDecisionManager to org.springframework.security.access.AccessDecisionManager
  60. Change type JdbcDaoImpl to JdbcUserDetailsManager
  61. Change type InMemoryDaoImpl to InMemoryUserDetailsManager
  62. Change type org.acegisecurity.providers.dao.DaoAuthenticationProvider to org.springframework.security.authentication.dao.DaoAuthenticationProvider
  63. Change type org.acegisecurity.providers.anonymous.AnonymousAuthenticationProvider to org.springframework.security.authentication.AnonymousAuthenticationProvider
  64. Change type org.acegisecurity.providers.anonymous.AnonymousAuthenticationToken to org.springframework.security.authentication.AnonymousAuthenticationToken
  65. Change type org.acegisecurity.providers.rememberme.RememberMeAuthenticationProvider to org.springframework.security.authentication.RememberMeAuthenticationProvider
  66. Change type org.acegisecurity.providers.rememberme.RememberMeAuthenticationToken to org.springframework.security.authentication.RememberMeAuthenticationToken
  67. Change type org.acegisecurity.providers.ProviderManager to org.springframework.security.authentication.ProviderManager
  68. Change type org.acegisecurity.AccessDeniedException to org.springframework.security.access.AccessDeniedException
  69. Change type org.acegisecurity.BadCredentialsException to org.springframework.security.authentication.BadCredentialsException
  70. Change type org.acegisecurity.DisabledException to org.springframework.security.authentication.DisabledException
  71. Change type org.acegisecurity.LockedException to org.springframework.security.authentication.LockedException
  72. Change type org.acegisecurity.AccountExpiredException to org.springframework.security.authentication.AccountExpiredException
  73. Change type org.acegisecurity.CredentialsExpiredException to org.springframework.security.authentication.CredentialsExpiredException
  74. Change type org.acegisecurity.InsufficientAuthenticationException to org.springframework.security.authentication.InsufficientAuthenticationException
  75. Change type org.acegisecurity.providers.encoding.PasswordEncoder to org.springframework.security.crypto.password.PasswordEncoder
  76. Change type org.acegisecurity.userdetails.User to org.springframework.security.core.userdetails.User
  77. Change type org.acegisecurity.userdetails.UsernameNotFoundException to org.springframework.security.core.userdetails.UsernameNotFoundException
  78. Change type org.acegisecurity.userdetails.UserDetailsChecker to org.springframework.security.core.userdetails.UserDetailsChecker
  79. Change type org.acegisecurity.intercept.AbstractSecurityInterceptor to org.springframework.security.access.intercept.AbstractSecurityInterceptor
  80. Change type ObjectDefinitionSource to SecurityMetadataSource
  81. Change type org.acegisecurity.ConfigAttribute to org.springframework.security.access.ConfigAttribute
  82. Change type ConfigAttributeDefinition to ConfigAttribute
  83. Change type org.acegisecurity.SecurityConfig to org.springframework.security.access.SecurityConfig
  84. Change XML attribute
  85. Change XML attribute
  86. Change XML attribute
  87. Change XML attribute
  88. Change XML attribute
  89. Change XML attribute
  90. Change XML attribute
  91. Change XML attribute
  92. Change XML attribute
  93. Change XML attribute
  94. Change XML attribute
  95. Change XML attribute
  96. Change XML attribute
  97. Change XML attribute
  98. Change XML attribute
  99. Change XML attribute
  100. Change XML attribute
  101. Change XML attribute
  102. Change XML attribute
  103. Change XML attribute
  104. Change XML attribute
  105. Change XML attribute
  106. Change XML attribute
  107. Change XML attribute
  108. Change XML attribute
  109. Change XML attribute
  110. Change XML attribute
  111. Change XML attribute
  112. Change XML attribute
  113. Change XML attribute
  114. Add a comment to an XML tag
  115. Add a comment to an XML tag
  116. Add a comment to an XML tag
  117. Change XML tag value
  118. Change XML tag value
  119. Change Gradle or Maven dependency net.sourceforge.jsf-comp:acegi-jsf
  120. Change XML attribute of a specific resource version
  121. Change XML tag value
  122. Change XML tag value
  123. Change XML tag value