Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

By "jar file project " I mean a project that is not a web application - for example, the csf-iap project.

1.1 The pom file
Code Block

Under the "csf-security" dependency, remove the exclusions for Spring  Security and add an exclusion for Acegi. The Aegi exclusion looks like  this:

...

Code Block

<exclusion>
    <artifactId>acegi-security</artifactId>
    <groupId>org.acegisecurity</groupId>
</exclusion>

The CSF Security module includes dependencies for Spring Security, so there is no need to include them in your project.

...

1.2 Java Code

...

a) The following Java files made reference to Acegi classes (e.g. SecurityContextHolder):

  1. IapActivityServiceImpl.java
  2. IapPublishServiceImpl.java
  3. IapSecurityServiceImpl.java

In most cases, these were upgraded by changing the import statements' package names. e.g:

org.acegisecurity.context.SecurityContextHolder changes to org.springframework.security.core.context.SecurityContextHolder

Eclipse handled these changes nicely - I did a global search in the Java code for "acegi", deleted any imports that referenced org.acegisecurity package names,and then used Eclipse's "Organize Imports" feature to pull in the correct Spring Security imports.

b) Some interfaces have changed slightly with Spring Security - in particular, rather than the Acegi practice of using arrays, Spring Security uses Collections.

Steve's Guide to Upgrading from Acegi to Spring Security

This document is a guide for upgrading an Education Systems app from Acegi Security to Spring Security, based on the IAP application upgrade. There are two parts, one for the jar-file project upgrade and one for the web app upgrade.

1. Jar File Project Upgrade

By "jar file project " I mean a project that is not a web application - for example, the csf-iap project.

...

1.1 The pom file

...

The CSF Security module includes dependencies for Spring Security, so there is no need to include them in your project.

...

1.2 Java Code

...

a) All references to acegi classes were replaced by references to Spring Security classes. In most cases, these were upgraded by changing the import statements' package names. e.g:

...