This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JDBC and the fly likes password encoding problem in it mandatory? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "password encoding problem in it mandatory?" Watch "password encoding problem in it mandatory?" New topic

password encoding problem in 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
I agree. Here's the link:
subject: password encoding problem in it mandatory?
Similar Threads
Dynamic ACL's in Acegi.
Spring security framework with fine grained permissions
No bean named '' is defined
spring security form based login using database not responding
Jasypt + Acegi + Hibernate - Password doesnt match.