Announcement Announcement Module
No announcement yet.
I have only suggestions, no solutions Page Title Module
Move Remove Collapse
This topic is closed
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • I have only suggestions, no solutions

    I would first like to thank the developers who contribute to the acegi framework. Developers are donating this so let's work with you and show some manners, right?

    Acegi will explode if you lay it out step by step like on Spring Then people can plug into the reference or a book and go from there but the initial learning curve is a little steep. Be detailed and put our noses in it.

    If one of the acegi guys wants to help me I'll be glad to write up what I do and feed it back. My company is going to use a db for authorization. I have the contact sample war deployed. I'll be glad to borrow the db script and see if I can make it work. I'm not going to AU any time soon and I'm desparate so I'll take about whatever I can get.

    IMHO, the harder part would be the ldap. There has to be a common way to approach this. Some algorithm to build the user context.

    I'm not a huge jack kerouac fan but I love this quote...
    "I had nothing to offer anybody except my own confusion." That's where I am with Acegi, baby steps.

    Thanks and please keep pluggin' away.


  • #2
    The Contacts Sample is already using a database for authentication (well, specifically DaoAuthenticationProvider delegates to JdbcDaoImpl). If you wish to use a different database, just update the dataSource being referred to by the jdbcDaoImpl bean in applicationContext-acegi-security.xml:

       <bean id="jdbcDaoImpl" class="net.sf.acegisecurity.providers.dao.jdbc.JdbcDaoImpl">
          <property name="dataSource"><ref bean="dataSource"/></property>
    You can use the stock-standard dbinit.txt script which can be found in the /docs directory of the downloadable ZIP file.

    To switch to LDAP, it's also pretty easy. At a bean level, you just replace the DaoAuthenticationProvider bean in applicationContext-acegi-security.xml with an PasswordDaoAuthenticationProvider with the same bean id (daoAuthenticationProvider). Your PasswordDaoAuthenticationProvider will then have its authenticationDao property set to another bean called (say) "passwordAuthenticationDao". Your passwordAuthenticationDao bean will be an instance of LdapPasswordAuthenticationDao.

    The LdapPasswordAuthenticationDao is currently in the sandbox. That means you'll need to build Acegi Security from CVS to receive a copy. You can do that by following the "Building with Maven" link at

    Good luck. Feel free to write up your experiences in a blog, or in a DocBook format, and I'll be pleased to link to it or publish it with Acegi Security respectively.