Hi I have downloaded appfuse light and installed the spring security module, default from under "extras" in the project. In short...this adds a simple security.xml file with two added users to try to login with.
This contains the following security.xml: -------- <http auto-config="true" lowercase-comparisons="false"> <intercept-url pattern="/**/*.html*" access="ROLE_ADMIN,ROLE_USER"/> <form-login login-page="/login.jsp" authentication-failure-url="/login.jsp?error=true" login-processing-url="/j_security_check"/> <logout logout-url="/logout.jsp"/> </http> <authentication-provider> <password-encoder hash="sha"/> <user-service> <user name="user" password="12dea96fec20593566ab75692c9949596833adc9" authorities="ROLE_USER"/> <user name="admin" password="d033e22ae348aeb5660fc2140aec35850c4da997" authorities="ROLE_ADMIN"/> </user-service> </authentication-provider> <global-method-security> <protect-pointcut expression="execution(* *..service.UserManager.removeUser(..))" access="ROLE_ADMIN"/> </global-method-security> ------------------------ To obtain database check of user/password, I have changed this to the following: ---------------------<http auto-config="true" lowercase-comparisons="false"> <intercept-url pattern="/**/*.html*" access="ROLE_ADMIN,ROLE_USER" /> <form-login login-page="/login.jsp" authentication-failure-url="/login.jsp?error=true" login-processing-url="/j_security_check" /> <logout logout-url="/logout.jsp" /> </http> <authentication-provider user-service-ref="userService" /> <jdbc-user-service id="userService" data-source-ref="securityDataSource" authorities-by-username-query="select username,authority from authorities where username=?"/> <beans:bean id="securityDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <beans:property name="driverClassName" value="com.mysql.jdbc.Driver" /> <beans:property name="url" value="jdbc:mysql://localhost:3306/adhocit" /> <beans:property name="username" value="root" /> <beans:property name="password" value="" /> </beans:bean> --------------- Where I try to connect to a mysql database with the following tables added: CREATE DATABASE `finansak_adhoc` /*!40100 DEFAULT CHARACTER SET latin1 */; //CREATE TABLE `finansak_adhoc`.`authorities` (`username` varchar(50) NOT NULL,`authority` varchar(50) NOT NULL, KEY `fk_authorities_users` (`username`), CONSTRAINT `fk_authorities_users` FOREIGN KEY (`username`) REFERENCES `users` (`username`)); //CREATE TABLE `finansak_adhoc`.`users` (`username` varchar(50) NOT NULL,`password` varchar(50) NOT NULL,`enabled` bit(1) NOT NULL, PRIMARY KEY (`username`)); And added user with passwords... BUT, my application just seems to ignore this setup.... Does anyone have any idea about what could be wrong?? I would be grateful for any help. Best regards Frank -- View this message in context: http://www.nabble.com/Appfuse-light---add-spring-security---database-authentication-problem-tp24983690s2369p24983690.html Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net For additional commands, e-mail: users-h...@appfuse.dev.java.net