Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: Grails-Spring-Security-CAS 1.0.2
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
My goal is to disable CAS in the development environment. According to the documentation this could be achieved by using the "cas.active" property.
Relevant part of the config:
Config.groovy
environments {
production {
grails.serverURL = "http://www.changeme.com"
grails.plugins.springsecurity.cas.loginUri = '...'
grails.plugins.springsecurity.cas.serviceUrl = '...'
grails.plugins.springsecurity.cas.serverUrlPrefix = '...'
grails.plugins.springsecurity.cas.proxyCallbackUrl = '...'
grails.plugins.springsecurity.cas.proxyReceptorUrl = '...'
grails.plugins.springsecurity.logout.afterLogoutUrl = '...'
}
development {
grails.serverURL = "http://localhost:8080/${appName}"
grails.plugins.springsecurity.cas.active=false
}
test {
grails.serverURL = "http://localhost:8080/${appName}"
grails.plugins.springsecurity.cas.active=false
}
}
This will however result in the following stacktrace when the "grails run-app" command is executed:
Running Grails application.. Configuring Spring Security ... Configuring Spring Security CAS ... context.GrailsContextLoader Error executing bootstraps: Error creating bean with name 'exceptionTranslationFilter': Cannot resolve reference to bean 'authenticationEntryPoint' while setting bean property 'authenticationEntryPoint'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationEntryPoint': Cannot resolve reference to bean 'casServiceProperties' while setting bean property 'serviceProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casServiceProperties': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: service must be specified. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'exceptionTranslationFilter': Cannot resolve reference to bean 'authenticationEntryPoint' while setting bean property 'authenticationEntryPoint'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationEntryPoint': Cannot resolve reference to bean 'casServiceProperties' while setting bean property 'serviceProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casServiceProperties': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: service must be specified. at org.grails.tomcat.TomcatServer.start(TomcatServer.groovy:212) at grails.web.container.EmbeddableServer$start.call(Unknown Source) at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy:158) at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy) at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:280) at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy) at _GrailsRun_groovy$_run_closure5.doCall(_GrailsRun_groovy:149) at _GrailsRun_groovy$_run_closure5.call(_GrailsRun_groovy) at _GrailsRun_groovy.runInline(_GrailsRun_groovy:116) at _GrailsRun_groovy.this$4$runInline(_GrailsRun_groovy) at _GrailsRun_groovy$_run_closure1.doCall(_GrailsRun_groovy:59) at RunApp$_run_closure1.doCall(RunApp.groovy:33) at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381) at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415) at gant.Gant$_dispatch_closure7.doCall(Gant.groovy) at gant.Gant.withBuildListeners(Gant.groovy:427) at gant.Gant.this$2$withBuildListeners(Gant.groovy) at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source) at gant.Gant.dispatch(Gant.groovy:415) at gant.Gant.this$2$dispatch(Gant.groovy) at gant.Gant.invokeMethod(Gant.groovy) at gant.Gant.executeTargets(Gant.groovy:590) at gant.Gant.executeTargets(Gant.groovy:589) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationEntryPoint': Cannot resolve reference to bean 'casServiceProperties' while setting bean property 'serviceProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casServiceProperties': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: service must be specified. ... 23 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casServiceProperties': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: service must be specified. ... 23 more Caused by: java.lang.IllegalArgumentException: service must be specified. ... 23 more
Can you confirm whether this is a bug?
I have already made ticket from this:
http://jira.grails.org/browse/GPSPRINGSECURITYCAS-13
And also submitted solution (pull request) to Github
https://github.com/grails-plugins/grails-spring-security-cas/pull/1