Migrate from Acegi Security 1.0.x to Spring Security 5.0
Recipe ID
io.moderne.java.spring.security.MigrateAcegiToSpringSecurity_5_0Artifactio.moderne.recipe:rewrite-springMigrates 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.
Composite recipespringacegisecurityProprietary
Usage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe io.moderne.java.spring.security.MigrateAcegiToSpringSecurity_5_0If the recipe isn’t available locally, install it with:
mod config recipes jar install io.moderne.recipe:rewrite-spring:RELEASEDefinition
This recipe runs the following recipes in order.
- Change Gradle or Maven dependency
org.acegisecurity:acegi-securityorg.openrewrite.java.dependencies.ChangeDependency - Change Gradle or Maven dependency
org.acegisecurity:acegi-security-casorg.openrewrite.java.dependencies.ChangeDependency - Change Gradle or Maven dependency
org.acegisecurity:acegi-security-tigerorg.openrewrite.java.dependencies.ChangeDependency - Add Gradle or Maven dependency
org.openrewrite.java.dependencies.AddDependency - Add Gradle or Maven dependency
org.openrewrite.java.dependencies.AddDependency - Change type
org.acegisecurity.providers.UsernamePasswordAuthenticationTokentoorg.springframework.security.authentication.UsernamePasswordAuthenticationTokenorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.Authenticationtoorg.springframework.security.core.Authenticationorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.AuthenticationExceptiontoorg.springframework.security.core.AuthenticationExceptionorg.openrewrite.java.ChangeType - Change type
GrantedAuthorityImpltoSimpleGrantedAuthorityorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.AuthenticationServiceExceptiontoorg.springframework.security.authentication.AuthenticationServiceExceptionorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.context.SecurityContextHoldertoorg.springframework.security.core.context.SecurityContextHolderorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.AuthenticationManagertoorg.springframework.security.authentication.AuthenticationManagerorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.providers.AuthenticationProvidertoorg.springframework.security.authentication.AuthenticationProviderorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.context.SecurityContexttoorg.springframework.security.core.context.SecurityContextorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.GrantedAuthoritytoorg.springframework.security.core.GrantedAuthorityorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.userdetails.UserDetailstoorg.springframework.security.core.userdetails.UserDetailsorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.userdetails.UserDetailsServicetoorg.springframework.security.core.userdetails.UserDetailsServiceorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.ui.AuthenticationEntryPointtoorg.springframework.security.web.AuthenticationEntryPointorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.ui.rememberme.RememberMeServicestoorg.springframework.security.web.authentication.RememberMeServicesorg.openrewrite.java.ChangeType - Change type
BasicProcessingFilterEntryPointtoBasicAuthenticationEntryPointorg.openrewrite.java.ChangeType - Change type
DigestProcessingFiltertoDigestAuthenticationFilterorg.openrewrite.java.ChangeType - Change type
FilterToBeanProxytoDelegatingFilterProxyorg.openrewrite.java.ChangeType - Change type
AuthenticationProcessingFiltertoUsernamePasswordAuthenticationFilterorg.openrewrite.java.ChangeType - Change type
AuthenticationProcessingFilterEntryPointtoLoginUrlAuthenticationEntryPointorg.openrewrite.java.ChangeType - Change type
BasicProcessingFiltertoBasicAuthenticationFilterorg.openrewrite.java.ChangeType - Change type
DigestProcessingFilterEntryPointtoDigestAuthenticationEntryPointorg.openrewrite.java.ChangeType - Change type
RememberMeProcessingFiltertoRememberMeAuthenticationFilterorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.ui.rememberme.TokenBasedRememberMeServicestoorg.springframework.security.web.authentication.rememberme.TokenBasedRememberMeServicesorg.openrewrite.java.ChangeType - Change type
AnonymousProcessingFiltertoAnonymousAuthenticationFilterorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.ui.ExceptionTranslationFiltertoorg.springframework.security.web.access.ExceptionTranslationFilterorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.intercept.web.FilterSecurityInterceptortoorg.springframework.security.web.access.intercept.FilterSecurityInterceptororg.openrewrite.java.ChangeType - Change type
SecurityEnforcementFiltertoFilterSecurityInterceptororg.openrewrite.java.ChangeType - Change type
org.acegisecurity.util.FilterChainProxytoorg.springframework.security.web.FilterChainProxyorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.ui.logout.LogoutFiltertoorg.springframework.security.web.authentication.logout.LogoutFilterorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.ui.logout.SecurityContextLogoutHandlertoorg.springframework.security.web.authentication.logout.SecurityContextLogoutHandlerorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.ui.logout.LogoutHandlertoorg.springframework.security.web.authentication.logout.LogoutHandlerorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.providers.ldap.populator.DefaultLdapAuthoritiesPopulatortoorg.springframework.security.ldap.userdetails.DefaultLdapAuthoritiesPopulatororg.openrewrite.java.ChangeType - Change type
org.acegisecurity.userdetails.ldap.LdapUserDetailstoorg.springframework.security.ldap.userdetails.LdapUserDetailsorg.openrewrite.java.ChangeType - Change type
InitialDirContextFactorytoDefaultSpringSecurityContextSourceorg.openrewrite.java.ChangeType - Change type
DefaultInitialDirContextFactorytoDefaultSpringSecurityContextSourceorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.providers.ldap.LdapAuthenticationProvidertoorg.springframework.security.ldap.authentication.LdapAuthenticationProviderorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.providers.ldap.authenticator.BindAuthenticatortoorg.springframework.security.ldap.authentication.BindAuthenticatororg.openrewrite.java.ChangeType - Change type
org.acegisecurity.providers.ldap.authenticator.PasswordComparisonAuthenticatortoorg.springframework.security.ldap.authentication.PasswordComparisonAuthenticatororg.openrewrite.java.ChangeType - Change type
org.acegisecurity.providers.ldap.authenticator.LdapAuthenticatortoorg.springframework.security.ldap.authentication.LdapAuthenticatororg.openrewrite.java.ChangeType - Change type
org.acegisecurity.providers.ldap.LdapAuthoritiesPopulatortoorg.springframework.security.ldap.userdetails.LdapAuthoritiesPopulatororg.openrewrite.java.ChangeType - Change method name
org.springframework.security.ldap.DefaultSpringSecurityContextSource setManagerDn(String)tosetUserDnorg.openrewrite.java.ChangeMethodName - Change method name
org.springframework.security.ldap.DefaultSpringSecurityContextSource setManagerPassword(String)tosetPasswordorg.openrewrite.java.ChangeMethodName - Change method name
org.springframework.security.ldap.DefaultSpringSecurityContextSource newInitialDirContext(String, String)togetContextorg.openrewrite.java.ChangeMethodName - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change type
org.acegisecurity.vote.AffirmativeBasedtoorg.springframework.security.access.vote.AffirmativeBasedorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.vote.ConsensusBasedtoorg.springframework.security.access.vote.ConsensusBasedorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.vote.UnanimousBasedtoorg.springframework.security.access.vote.UnanimousBasedorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.vote.RoleVotertoorg.springframework.security.access.vote.RoleVoterorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.vote.AuthenticatedVotertoorg.springframework.security.access.vote.AuthenticatedVoterorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.vote.AccessDecisionVotertoorg.springframework.security.access.AccessDecisionVoterorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.vote.AccessDecisionManagertoorg.springframework.security.access.AccessDecisionManagerorg.openrewrite.java.ChangeType - Change type
JdbcDaoImpltoJdbcUserDetailsManagerorg.openrewrite.java.ChangeType - Change type
InMemoryDaoImpltoInMemoryUserDetailsManagerorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.providers.dao.DaoAuthenticationProvidertoorg.springframework.security.authentication.dao.DaoAuthenticationProviderorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.providers.anonymous.AnonymousAuthenticationProvidertoorg.springframework.security.authentication.AnonymousAuthenticationProviderorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.providers.anonymous.AnonymousAuthenticationTokentoorg.springframework.security.authentication.AnonymousAuthenticationTokenorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.providers.rememberme.RememberMeAuthenticationProvidertoorg.springframework.security.authentication.RememberMeAuthenticationProviderorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.providers.rememberme.RememberMeAuthenticationTokentoorg.springframework.security.authentication.RememberMeAuthenticationTokenorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.providers.ProviderManagertoorg.springframework.security.authentication.ProviderManagerorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.AccessDeniedExceptiontoorg.springframework.security.access.AccessDeniedExceptionorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.BadCredentialsExceptiontoorg.springframework.security.authentication.BadCredentialsExceptionorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.DisabledExceptiontoorg.springframework.security.authentication.DisabledExceptionorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.LockedExceptiontoorg.springframework.security.authentication.LockedExceptionorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.AccountExpiredExceptiontoorg.springframework.security.authentication.AccountExpiredExceptionorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.CredentialsExpiredExceptiontoorg.springframework.security.authentication.CredentialsExpiredExceptionorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.InsufficientAuthenticationExceptiontoorg.springframework.security.authentication.InsufficientAuthenticationExceptionorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.providers.encoding.PasswordEncodertoorg.springframework.security.crypto.password.PasswordEncoderorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.userdetails.Usertoorg.springframework.security.core.userdetails.Userorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.userdetails.UsernameNotFoundExceptiontoorg.springframework.security.core.userdetails.UsernameNotFoundExceptionorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.userdetails.UserDetailsCheckertoorg.springframework.security.core.userdetails.UserDetailsCheckerorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.intercept.AbstractSecurityInterceptortoorg.springframework.security.access.intercept.AbstractSecurityInterceptororg.openrewrite.java.ChangeType - Change type
ObjectDefinitionSourcetoSecurityMetadataSourceorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.ConfigAttributetoorg.springframework.security.access.ConfigAttributeorg.openrewrite.java.ChangeType - Change type
ConfigAttributeDefinitiontoConfigAttributeorg.openrewrite.java.ChangeType - Change type
org.acegisecurity.SecurityConfigtoorg.springframework.security.access.SecurityConfigorg.openrewrite.java.ChangeType - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Add a comment to an XML tag
org.openrewrite.xml.AddCommentToXmlTag - Add a comment to an XML tag
org.openrewrite.xml.AddCommentToXmlTag - Add a comment to an XML tag
org.openrewrite.xml.AddCommentToXmlTag - Change XML tag value
org.openrewrite.xml.ChangeTagValue - Change XML tag value
org.openrewrite.xml.ChangeTagValue - Change Gradle or Maven dependency
net.sourceforge.jsf-comp:acegi-jsforg.openrewrite.java.dependencies.ChangeDependency - Change XML attribute of a specific resource version
org.openrewrite.xml.ChangeNamespaceValue - Change XML tag value
org.openrewrite.xml.ChangeTagValue - Change XML tag value
org.openrewrite.xml.ChangeTagValue - Change XML tag value
org.openrewrite.xml.ChangeTagValue
Data tables
Structured output this recipe can produce.
- Source files that had resultsSource files that were modified by the recipe run.
org.openrewrite.table.SourcesFileResults - Source files that had search resultsSearch results that were found during the recipe run.
org.openrewrite.table.SearchResults - Source files that errored on a recipeThe details of all errors produced by a recipe run.
org.openrewrite.table.SourcesFileErrors - Recipe performanceStatistics used in analyzing the performance of recipes.
org.openrewrite.table.RecipeRunStats