PDA

View Full Version : Jasig CAS support for the Spring Security plugin



brucedyoung
Oct 6th, 2010, 04:25 PM
Once I figured out the required database structure, I was able to create a new project, install the Spring Security Core plugin, and everything works great.
Used the default "grails s2-quickstart cedu.core User Role":

grails.plugins.springsecurity.userLookup.userDomai nClassName = 'edu.core.User'
grails.plugins.springsecurity.userLookup.authority JoinClassName = 'edu.core.UserRole'
grails.plugins.springsecurity.authority.className = 'edu.core.Role'

Persists to MySQL, no problem.

But somehow, I cannot get "Jasig CAS support for the Spring Security plugin" to work. I use the basic parameters in config.groovy:

grails.plugins.springsecurity.cas.loginUri = '/login'
grails.plugins.springsecurity.cas.serviceUrl = 'http://my.app.server:8080/Core/j_spring_cas_security_check'
grails.plugins.springsecurity.cas.serverUrlPrefix = my.cas.server/cas'
grails.plugins.springsecurity.cas.proxyCallbackUrl = 'http://my.app.server:8080/Core/secure/receptor'
grails.plugins.springsecurity.cas.proxyReceptorUrl = '/secure/receptor'

But it never intercepts.

On the other hand, I can install the "JA-SIG CAS Client Plugin for Grails", use the default parameters and it works. It sets the session variables, but not the Spring Security.

I've read here about people having problems with installing the Security Core, but having success with the CAS add-on.
Is there something I'm missing, or something else I need to write for the Spring Security to use the CAS credentials?

Ideally the authenticated CAS_FILTER_USER would map to Person.username, and everything would be set.

thanks
Bruce Young

sjd
Oct 20th, 2010, 11:49 PM
I have the same problem as well, Spring Security plugin for Grails works fine but I'm unable to login with CAS and I don't see any debug or error information

sjd
Oct 23rd, 2010, 09:50 PM
I've verifed my cas configuration is fine and the configuration it uses for jdbc connection is the same as my sample test application. I'm able to login in through cas using the db credentials perfectly fine.

The Grails Spring Security App with CAS is configured with the correct parameters but yet all I get when I attempt to login is:

http://my-desktop-1:8080/myspringcastestapp/login/auth?login_error=1

tojewel
Nov 23rd, 2010, 02:08 PM
I am also having same problem. Anybody got solution?

sjd
Nov 26th, 2010, 09:08 PM
Been awhile since this has been posted, anyone?

pledbrook
Nov 30th, 2010, 03:43 AM
I'm afraid I can't help with CAS, but I'll see if I can get someone to look into it.

pledbrook
Nov 30th, 2010, 04:01 AM
Have you tried raising the logging level for 'grails.plugins.springsecurity' to 'debug' or 'trace'? What about the logging on the CAS server?

abd
Dec 1st, 2010, 02:51 PM
I have problems with the Spring Security plugin too, when I'm installing it, the process never finish, because the JAR dependencies can't be resolved.

Also I'm installed ws-client but I cant't import it in my controller class, IDE shows me an error...

thanks for your helps

pledbrook
Dec 2nd, 2010, 06:19 AM
@abd Does it work from the command line? So if you run 'grails clean' and then 'grails run-app'?