wood burning stoves 2.0*
The moose likes JDBC and the fly likes password encoding problem in acegi..is it mandatory? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "password encoding problem in acegi..is it mandatory?" Watch "password encoding problem in acegi..is it mandatory?" New topic

password encoding problem in acegi..is it mandatory?

dee sri

Joined: Mar 10, 2006
Posts: 5
I am trying to configure acegi security on top of a web- application in which the passwords are already entered manually in the MYSQL db.
Without using any passwordencoding also, the authentication fails , though correct password is entered.
also, is the enabled column mandatory in the authoritiesByUsernameQuery.

pl. see the following. i have commented teh passwordencoder and in the usersByUsernameQuery I have given enabled as true as there is no column called enabled in the db.Is this the right way to configure!

Pl. let me know why authentication is failing always!
also how to set up logging in case of acegi errors in tomcat?

part of applicationcontext-acegisecurity.xml
<!-- bean id="passwordEncoder" class="net.sf.acegisecurity.providers.encoding.Pla intextPasswordEncoder"/ -->

<bean id="daoAuthenticationProvider" class="net.sf.acegisecurity.providers.dao.DaoAuthe nticationProvider">
<property name="authenticationDao"><ref local="jdbcAuthenticationDao"/></property>
<!-- property name="userCache"><ref local="userCache"/></property -->
<!-- property name="passwordEncoder"><ref local="passwordEncoder"/></property -->

<bean id="jdbcAuthenticationDao" class="net.sf.acegisecurity.providers.dao.jdbc.Jdb cDaoImpl">
<property name="dataSource"><ref bean="dataSource"/></property>
<property name="usersByUsernameQuery">
<value>SELECT ACCOUNTID,PASSWORD,enabled as 1 FROM account WHERE ACCOUNTID = ?</value>
<property name="authoritiesByUsernameQuery">
Maximilian Xavier Stocker
Ranch Hand

Joined: Sep 20, 2005
Posts: 381
I do not know the answer to your question but I rather suspect you will find the answer here http://acegisecurity.org/docbook/acegi.html
subject: password encoding problem in acegi..is it mandatory?
Similar Threads
spring security form based login using database not responding
No bean named '' is defined
Spring security framework with fine grained permissions
Dynamic ACL's in Acegi.
Jasypt + Acegi + Hibernate - Password doesnt match.