Quantcast

New and updated Spring Security plugins

classic Classic list List threaded Threaded
26 messages Options
12
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

New and updated Spring Security plugins

burtbeckwith
I've released a new CAS plugin for CAS (http://www.jasig.org/cas) single sign-on, and also one for LDAP to support LDAP and Active Directory authentication. Configuring Active Directory authentication can be tricky so if anyone can contribute some notes about best practices I'll incorporate them into the docs.

Both plugins depend on the Spring Security Core plugin and like the core plugin, they only work with Grails 1.2.2 and above.

These are official Grails plugins, so the code is hosted at http://github.com/grails-plugins/grails-spring-security-cas and http://github.com/grails-plugins/grails-spring-security-ldap respectively

The standard wiki page for the CAS plugin is http://grails.org/plugin/spring-security-cas but there is documentation at http://burtbeckwith.github.com/grails-spring-security-cas/

The standard wiki page for the LDAP plugin is http://grails.org/plugin/spring-security-ldap but there is documentation at http://burtbeckwith.github.com/grails-spring-security-ldap/

Feedback, suggestions for improvement and contributions are always welcome. Please report any bugs or feature requests on the user list or in JIRA at http://jira.codehaus.org/browse/GRAILSPLUGINS under the 'Grails-Spring-Security-CAS' or 'Grails-Spring-Security-LDAP' component.

In addition I recently released minor updates of the Core and ACL plugins. Both releases fix a few bugs but add new taglibs which are described in the docs at http://burtbeckwith.github.com/grails-spring-security-core/ and http://burtbeckwith.github.com/grails-spring-security-acl/

Burt

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New and updated Spring Security plugins

Adam Evans
I'm using the old ACEGI plugin, what would be good in the new LDAP plugin is to fire a 'org.springframework.context.ApplicationEvent' on successful LDAP authentication.

My current usercase with the ACEGI plugin is all users should be in LDAP but I am required to also have a User model by the ACEGI plugin so I need to automaticaly create Users in grails if they don't exist but LDAP authenticates. Listening for a event would make this eaiser to do.

At the minute I achieve the above with Spring AOP by AfterReturing advice for the following pointcut 'execution(* org.springframework.security.providers.ldap.authenticator.BindAuthenticator.authenticate(..))'. Seems to be working ok and fairly simple so I don't have to update the ACEGI plugin like some of the sugestions I've seen on this mailing list.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New and updated Spring Security plugins

burtbeckwith
Both plugins support event handling. For Acegi see http://grails.org/AcegiSecurity+Plugin+-+Acegi+Events and for the new plugin see Chapter 7 in http://burtbeckwith.github.com/grails-spring-security-core/docs/manual/

Burt

>
> I'm using the old ACEGI plugin, what would be good in the new LDAP plugin is
> to fire a 'org.springframework.context.ApplicationEvent' on successful LDAP
> authentication.
>
> My current usercase with the ACEGI plugin is all users should be in LDAP but
> I am required to also have a User model by the ACEGI plugin so I need to
> automaticaly create Users in grails if they don't exist but LDAP
> authenticates. Listening for a event would make this eaiser to do.
>
> At the minute I achieve the above with Spring AOP by AfterReturing advice
> for the following pointcut 'execution(*
> org.springframework.security.providers.ldap.authenticator.BindAuthenticator.authenticate(..))'.
> Seems to be working ok and fairly simple so I don't have to update the ACEGI
> plugin like some of the sugestions I've seen on this mailing list.
>

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New and updated Spring Security plugins

thomasbee
Hi

I have a grails app which I hooked up to CAS. While single sign-in works fine, single sign-out doesn't, which is why I tried moving to spring-security-core (and then CAS later on). Using grails 1.3.3 I tried

> grails uninstall-plugin acegi (ok)
> grails install-plugin spring-security-core (ok)
> grails s2-quickstart org.mydomain User Role

the last step results in the error nelow. Note that I tried the same thing with an empty app from scratch and this works fine. Is there a conflict with some other app or leftovers from the previous acegi plugin? Your thoughts are greatly appreciated.

.tom

Base Directory: D:\myProjects\grails\ace
Resolving dependencies...
Dependencies resolved in 1078ms.
Running script C:\Documents and Settings\tom\.grails\1.3.3\projects\ace\plugins\spring-security-core-0.4.1\scripts\S2Quickstart.groovy
Environment set to development
  [groovyc] Compiling 71 source files to C:\Documents and Settings\tom\.grails\1.3.3\projects\ace\plugin-classes
  [groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
  [groovyc] Compile error during compilation with javac.
  [groovyc] C:\Documents and Settings\tom\.grails\1.3.3\projects\ace\plugins\spring-security-core-0.4.1\src\java\org\codehaus\groovy\grails\plugins\springsecurity\ChannelFilterInvocationSecurityMetadataSourceFactoryBean.java:37: type org.springframework.beans.factory.FactoryBean does not take parameters
  [groovyc]        implements FactoryBean<FilterInvocationSecurityMetadataSource>, InitializingBean {
  [groovyc]                              ^
  [groovyc] C:\Documents and Settings\tbierwir\.grails\1.3.3\projects\ace\plugins\spring-security-core-0.4.1\src\java\org\codehaus\groovy\grails\plugins\springsecurity\SecurityEventListener.java:60: type org.springframework.context.ApplicationListener does not take parameters
  [groovyc] public class SecurityEventListener implements ApplicationListener<ApplicationEvent>, ApplicationContextAware {
  [groovyc]                                                                  ^
  [groovyc] Note: C:\Documents and Settings\tom\.grails\1.3.3\projects\ace\plugins\datasources-0.5\src\java\com\burtbeckwith\grails\plugin\datasources\ReadOnlyDriverManagerDataSource.java uses unchecked or unsafe operations.
  [groovyc] Note: Recompile with -Xlint:unchecked for details.
  [groovyc] 2 errors
  [groovyc] 
  [groovyc] 
  [groovyc] 1 error
: Compilation Failed
	at org.codehaus.groovy.ant.Groovyc.compile(Groovyc.java:845)
	at org.codehaus.groovy.ant.Groovyc.execute(Groovyc.java:552)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at _GrailsCompile_groovy$_run_closure4_closure10.doCall(_GrailsCompile_groovy:117)
	at _GrailsCompile_groovy$_run_closure4_closure10.doCall(_GrailsCompile_groovy)
	at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:280)
	at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy)
	at _GrailsCompile_groovy$_run_closure4.doCall(_GrailsCompile_groovy:104)
	at _GrailsCompile_groovy$_run_closure3.doCall(_GrailsCompile_groovy:69)
	at _GrailsPackage_groovy$_run_closure2_closure9.doCall(_GrailsPackage_groovy:85)
	at _GrailsPackage_groovy$_run_closure2_closure9.doCall(_GrailsPackage_groovy)
	at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:280)
	at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy)
	at _GrailsPackage_groovy$_run_closure2.doCall(_GrailsPackage_groovy:84)
	at S2Quickstart$_run_closure1.doCall(S2Quickstart:36)
	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.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Compile error during compilation with javac.
C:\Documents and Settings\tom\.grails\1.3.3\projects\ace\plugins\spring-security-core-0.4.1\src\java\org\codehaus\groovy\grails\plugins\springsecurity\ChannelFilterInvocationSecurityMetadataSourceFactoryBean.java:37: type org.springframework.beans.factory.FactoryBean does not take parameters
       implements FactoryBean<FilterInvocationSecurityMetadataSource>, InitializingBean {
                             ^
C:\Documents and Settings\tom\.grails\1.3.3\projects\ace\plugins\spring-security-core-0.4.1\src\java\org\codehaus\groovy\grails\plugins\springsecurity\SecurityEventListener.java:60: type org.springframework.context.ApplicationListener does not take parameters
public class SecurityEventListener implements ApplicationListener<ApplicationEvent>, ApplicationContextAware {
                                                                 ^
Note: C:\Documents and Settings\tom\.grails\1.3.3\projects\ace\plugins\datasources-0.5\src\java\com\burtbeckwith\grails\plugin\datasources\ReadOnlyDriverManagerDataSource.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors


1 error

	at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:296)
	at org.codehaus.groovy.control.ErrorCollector.addFatalError(ErrorCollector.java:143)
	at org.codehaus.groovy.tools.javac.JavacJavaCompiler.addJavacError(JavacJavaCompiler.java:92)
	at org.codehaus.groovy.tools.javac.JavacJavaCompiler.compile(JavacJavaCompiler.java:71)
	at org.codehaus.groovy.tools.javac.JavaAwareCompilationUnit.gotoPhase(JavaAwareCompilationUnit.java:89)
	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:474)
	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:448)
	at org.codehaus.groovy.tools.FileSystemCompiler.compile(FileSystemCompiler.java:57)
	at org.codehaus.groovy.tools.FileSystemCompiler.doCompilation(FileSystemCompiler.java:170)
	at org.codehaus.groovy.ant.Groovyc.compile(Groovyc.java:830)
	... 26 more
--- Nested Exception ---
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Compile error during compilation with javac.
C:\Documents and Settings\tom\.grails\1.3.3\projects\ace\plugins\spring-security-core-0.4.1\src\java\org\codehaus\groovy\grails\plugins\springsecurity\ChannelFilterInvocationSecurityMetadataSourceFactoryBean.java:37: type org.springframework.beans.factory.FactoryBean does not take parameters
       implements FactoryBean<FilterInvocationSecurityMetadataSource>, InitializingBean {
                             ^
C:\Documents and Settings\tom\.grails\1.3.3\projects\ace\plugins\spring-security-core-0.4.1\src\java\org\codehaus\groovy\grails\plugins\springsecurity\SecurityEventListener.java:60: type org.springframework.context.ApplicationListener does not take parameters
public class SecurityEventListener implements ApplicationListener<ApplicationEvent>, ApplicationContextAware {
                                                                 ^
Note: C:\Documents and Settings\tom\.grails\1.3.3\projects\ace\plugins\datasources-0.5\src\java\com\burtbeckwith\grails\plugin\datasources\ReadOnlyDriverManagerDataSource.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors


1 error

	at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:296)
	at org.codehaus.groovy.control.ErrorCollector.addFatalError(ErrorCollector.java:143)
	at org.codehaus.groovy.tools.javac.JavacJavaCompiler.addJavacError(JavacJavaCompiler.java:92)
	at org.codehaus.groovy.tools.javac.JavacJavaCompiler.compile(JavacJavaCompiler.java:71)
	at org.codehaus.groovy.tools.javac.JavaAwareCompilationUnit.gotoPhase(JavaAwareCompilationUnit.java:89)
	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:474)
	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:448)
	at org.codehaus.groovy.tools.FileSystemCompiler.compile(FileSystemCompiler.java:57)
	at org.codehaus.groovy.tools.FileSystemCompiler.doCompilation(FileSystemCompiler.java:170)
	at org.codehaus.groovy.ant.Groovyc.compile(Groovyc.java:830)
	at org.codehaus.groovy.ant.Groovyc.execute(Groovyc.java:552)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at _GrailsCompile_groovy$_run_closure4_closure10.doCall(_GrailsCompile_groovy:117)
	at _GrailsCompile_groovy$_run_closure4_closure10.doCall(_GrailsCompile_groovy)
	at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:280)
	at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy)
	at _GrailsCompile_groovy$_run_closure4.doCall(_GrailsCompile_groovy:104)
	at _GrailsCompile_groovy$_run_closure3.doCall(_GrailsCompile_groovy:69)
	at _GrailsPackage_groovy$_run_closure2_closure9.doCall(_GrailsPackage_groovy:85)
	at _GrailsPackage_groovy$_run_closure2_closure9.doCall(_GrailsPackage_groovy)
	at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:280)
	at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy)
	at _GrailsPackage_groovy$_run_closure2.doCall(_GrailsPackage_groovy:84)
	at S2Quickstart$_run_closure1.doCall(S2Quickstart:36)
	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)
Compilation error: Compilation Failed
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New and updated Spring Security plugins

burtbeckwith
It's complaining about generics: implements FactoryBean<FilterInvocationSecurityMetadataSource> and implements ApplicationListener<ApplicationEvent> Spring has used generics since 3.0, which is used in Grails 1.2+. Try running 'grails clean' and also see if there are old Spring jars somehow in your classpath.

Burt

>
> Hi
>
> I have a grails app which I hooked up to CAS. While single sign-in works
> fine, single sign-out doesn't, which is why I tried moving to
> spring-security-core (and then CAS later on). Using grails 1.3.3 I tried
>
> > grails uninstall-plugin acegi (ok)
> > grails install-plugin spring-security-core (ok)
> > grails s2-quickstart org.mydomain User Role
>
> the last step results in the error nelow. Note that I tried the same thing
> with an empty app from scratch and this works fine. Is there a conflict with
> some other app or leftovers from the previous acegi plugin? Your thoughts
> are greatly appreciated.
>
> .tom
>
>
> Base Directory: D:\myProjects\grails\ace
> Resolving dependencies...
> Dependencies resolved in 1078ms.
> Running script C:\Documents and
> Settings\tom\.grails\1.3.3\projects\ace\plugins\spring-security-core-0.4.1\scripts\S2Quickstart.groovy
> Environment set to development
>   [groovyc] Compiling 71 source files to C:\Documents and
> Settings\tom\.grails\1.3.3\projects\ace\plugin-classes
>   [groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException:
> startup failed:
>   [groovyc] Compile error during compilation with javac.
>   [groovyc] C:\Documents and
> Settings\tom\.grails\1.3.3\projects\ace\plugins\spring-security-core-0.4.1\src\java\org\codehaus\groovy\grails\plugins\springsecurity\ChannelFilterInvocationSecurityMetadataSourceFactoryBean.java:37:
> type org.springframework.beans.factory.FactoryBean does not take parameters
>   [groovyc]        implements
> FactoryBean<FilterInvocationSecurityMetadataSource>, InitializingBean {
>   [groovyc]                              ^
>   [groovyc] C:\Documents and
> Settings\tbierwir\.grails\1.3.3\projects\ace\plugins\spring-security-core-0.4.1\src\java\org\codehaus\groovy\grails\plugins\springsecurity\SecurityEventListener.java:60:
> type org.springframework.context.ApplicationListener does not take
> parameters
>   [groovyc] public class SecurityEventListener implements
> ApplicationListener<ApplicationEvent>, ApplicationContextAware {
>   [groovyc]                                                                
> ^
>   [groovyc] Note: C:\Documents and
> Settings\tom\.grails\1.3.3\projects\ace\plugins\datasources-0.5\src\java\com\burtbeckwith\grails\plugin\datasources\ReadOnlyDriverManagerDataSource.java
> uses unchecked or unsafe operations.
>   [groovyc] Note: Recompile with -Xlint:unchecked for details.
>   [groovyc] 2 errors
>   [groovyc]
>   [groovyc]
>   [groovyc] 1 error
> : Compilation Failed
> at org.codehaus.groovy.ant.Groovyc.compile(Groovyc.java:845)
> at org.codehaus.groovy.ant.Groovyc.execute(Groovyc.java:552)
> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
> at
> _GrailsCompile_groovy$_run_closure4_closure10.doCall(_GrailsCompile_groovy:117)
> at
> _GrailsCompile_groovy$_run_closure4_closure10.doCall(_GrailsCompile_groovy)
> at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:280)
> at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy)
> at _GrailsCompile_groovy$_run_closure4.doCall(_GrailsCompile_groovy:104)
> at _GrailsCompile_groovy$_run_closure3.doCall(_GrailsCompile_groovy:69)
> at
> _GrailsPackage_groovy$_run_closure2_closure9.doCall(_GrailsPackage_groovy:85)
> at
> _GrailsPackage_groovy$_run_closure2_closure9.doCall(_GrailsPackage_groovy)
> at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:280)
> at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy)
> at _GrailsPackage_groovy$_run_closure2.doCall(_GrailsPackage_groovy:84)
> at S2Quickstart$_run_closure1.doCall(S2Quickstart:36)
> 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.codehaus.groovy.control.MultipleCompilationErrorsException:
> startup failed:
> Compile error during compilation with javac.
> C:\Documents and
> Settings\tom\.grails\1.3.3\projects\ace\plugins\spring-security-core-0.4.1\src\java\org\codehaus\groovy\grails\plugins\springsecurity\ChannelFilterInvocationSecurityMetadataSourceFactoryBean.java:37:
> type org.springframework.beans.factory.FactoryBean does not take parameters
>        implements FactoryBean<FilterInvocationSecurityMetadataSource>,
> InitializingBean {
>                              ^
> C:\Documents and
> Settings\tom\.grails\1.3.3\projects\ace\plugins\spring-security-core-0.4.1\src\java\org\codehaus\groovy\grails\plugins\springsecurity\SecurityEventListener.java:60:
> type org.springframework.context.ApplicationListener does not take
> parameters
> public class SecurityEventListener implements
> ApplicationListener<ApplicationEvent>, ApplicationContextAware {
>                                                                  ^
> Note: C:\Documents and
> Settings\tom\.grails\1.3.3\projects\ace\plugins\datasources-0.5\src\java\com\burtbeckwith\grails\plugin\datasources\ReadOnlyDriverManagerDataSource.java
> uses unchecked or unsafe operations.
> Note: Recompile with -Xlint:unchecked for details.
> 2 errors
>
>
> 1 error
>
> at
> org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:296)
> at
> org.codehaus.groovy.control.ErrorCollector.addFatalError(ErrorCollector.java:143)
> at
> org.codehaus.groovy.tools.javac.JavacJavaCompiler.addJavacError(JavacJavaCompiler.java:92)
> at
> org.codehaus.groovy.tools.javac.JavacJavaCompiler.compile(JavacJavaCompiler.java:71)
> at
> org.codehaus.groovy.tools.javac.JavaAwareCompilationUnit.gotoPhase(JavaAwareCompilationUnit.java:89)
> at
> org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:474)
> at
> org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:448)
> at
> org.codehaus.groovy.tools.FileSystemCompiler.compile(FileSystemCompiler.java:57)
> at
> org.codehaus.groovy.tools.FileSystemCompiler.doCompilation(FileSystemCompiler.java:170)
> at org.codehaus.groovy.ant.Groovyc.compile(Groovyc.java:830)
> ... 26 more
> --- Nested Exception ---
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
> failed:
> Compile error during compilation with javac.
> C:\Documents and
> Settings\tom\.grails\1.3.3\projects\ace\plugins\spring-security-core-0.4.1\src\java\org\codehaus\groovy\grails\plugins\springsecurity\ChannelFilterInvocationSecurityMetadataSourceFactoryBean.java:37:
> type org.springframework.beans.factory.FactoryBean does not take parameters
>        implements FactoryBean<FilterInvocationSecurityMetadataSource>,
> InitializingBean {
>                              ^
> C:\Documents and
> Settings\tom\.grails\1.3.3\projects\ace\plugins\spring-security-core-0.4.1\src\java\org\codehaus\groovy\grails\plugins\springsecurity\SecurityEventListener.java:60:
> type org.springframework.context.ApplicationListener does not take
> parameters
> public class SecurityEventListener implements
> ApplicationListener<ApplicationEvent>, ApplicationContextAware {
>                                                                  ^
> Note: C:\Documents and
> Settings\tom\.grails\1.3.3\projects\ace\plugins\datasources-0.5\src\java\com\burtbeckwith\grails\plugin\datasources\ReadOnlyDriverManagerDataSource.java
> uses unchecked or unsafe operations.
> Note: Recompile with -Xlint:unchecked for details.
> 2 errors
>
>
> 1 error
>
> at
> org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:296)
> at
> org.codehaus.groovy.control.ErrorCollector.addFatalError(ErrorCollector.java:143)
> at
> org.codehaus.groovy.tools.javac.JavacJavaCompiler.addJavacError(JavacJavaCompiler.java:92)
> at
> org.codehaus.groovy.tools.javac.JavacJavaCompiler.compile(JavacJavaCompiler.java:71)
> at
> org.codehaus.groovy.tools.javac.JavaAwareCompilationUnit.gotoPhase(JavaAwareCompilationUnit.java:89)
> at
> org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:474)
> at
> org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:448)
> at
> org.codehaus.groovy.tools.FileSystemCompiler.compile(FileSystemCompiler.java:57)
> at
> org.codehaus.groovy.tools.FileSystemCompiler.doCompilation(FileSystemCompiler.java:170)
> at org.codehaus.groovy.ant.Groovyc.compile(Groovyc.java:830)
> at org.codehaus.groovy.ant.Groovyc.execute(Groovyc.java:552)
> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
> at
> _GrailsCompile_groovy$_run_closure4_closure10.doCall(_GrailsCompile_groovy:117)
> at
> _GrailsCompile_groovy$_run_closure4_closure10.doCall(_GrailsCompile_groovy)
> at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:280)
> at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy)
> at _GrailsCompile_groovy$_run_closure4.doCall(_GrailsCompile_groovy:104)
> at _GrailsCompile_groovy$_run_closure3.doCall(_GrailsCompile_groovy:69)
> at
> _GrailsPackage_groovy$_run_closure2_closure9.doCall(_GrailsPackage_groovy:85)
> at
> _GrailsPackage_groovy$_run_closure2_closure9.doCall(_GrailsPackage_groovy)
> at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:280)
> at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy)
> at _GrailsPackage_groovy$_run_closure2.doCall(_GrailsPackage_groovy:84)
> at S2Quickstart$_run_closure1.doCall(S2Quickstart:36)
> 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)
> Compilation error: Compilation Failed
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New and updated Spring Security plugins

graf
Hi,
had the same compilation errors with the generic FactoryBean and ApplicationListener after installing security plugin.

Did somebody solved the issue already or can give me a hint where to look?

In the meanwhile I upgraded to grails 1.3.3, cleaned all the caches, output-dirs etc.
Scanned my drive and didn't find any *spring* jar with a version less than 3.

Thomas
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New and updated Spring Security plugins

graf
In reply to this post by burtbeckwith
the stupid thing is
the IDE brief info of the classes shows the generics.
but when I simply use non-generic classes for both everything seems to work fine :(

that's not fair.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New and updated Spring Security plugins

abhay
In reply to this post by burtbeckwith
I want to use saml validation with this plugin. Does this supported by this plugin.
I had to make modifications to plugin to use Saml11TicketValidator and add then manullay add the Saml11TicketValidationFilter and HttpServletRequestWrapperFilter web.xml of the app.

Is that the right approach or its more configurable than this hard coding directly
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New and updated Spring Security plugins

abhay
In reply to this post by burtbeckwith
I want to use saml validation with this plugin. Does this supported by this plugin.
I had to make modifications to plugin to use Saml11TicketValidator and add then manullay add the Saml11TicketValidationFilter and HttpServletRequestWrapperFilter web.xml of the app.

Is that the right approach or its more configurable than this hard coding directly
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New and updated Spring Security plugins

burtbeckwith
No, this isn't supported. You wouldn't edit web.xml though. See section 16 in the docs, http://burtbeckwith.github.com/grails-spring-security-core/docs/manual/

You can either specify the position of a filter using clientRegisterFilter() or explicitly list the ordered filter bean names with 'filterNames'. Spring Security defines all filters as Spring beans and you need to follow that convention - specify the bean name(s) you use in resources.groovy to idenfity them.

Burt

>
> I want to use saml validation with this plugin. Does this supported by this
> plugin.
> I had to make modifications to plugin to use Saml11TicketValidator and add
> then manullay add the Saml11TicketValidationFilter and
> HttpServletRequestWrapperFilter web.xml of the app.
>
> Is that the right approach or its more configurable than this hard coding
> directly
>

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New and updated Spring Security plugins

Brian Spindler-3
Hi Burt, can we get the doc in PDF format? 

On Wed, Aug 4, 2010 at 3:04 AM, Burt Beckwith <[hidden email]> wrote:
No, this isn't supported. You wouldn't edit web.xml though. See section 16 in the docs, http://burtbeckwith.github.com/grails-spring-security-core/docs/manual/

You can either specify the position of a filter using clientRegisterFilter() or explicitly list the ordered filter bean names with 'filterNames'. Spring Security defines all filters as Spring beans and you need to follow that convention - specify the bean name(s) you use in resources.groovy to idenfity them.

Burt

>
> I want to use saml validation with this plugin. Does this supported by this
> plugin.
> I had to make modifications to plugin to use Saml11TicketValidator and add
> then manullay add the Saml11TicketValidationFilter and
> HttpServletRequestWrapperFilter web.xml of the app.
>
> Is that the right approach or its more configurable than this hard coding
> directly
>



--
-Brian
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New and updated Spring Security plugins

burtbeckwith
There are PDF docs for all of the plugins except the UI plugin. That one is broken because the images are too wide and they clip, but I'll work on that. If you go to the Github pages there are links to the HTML and PDF versions:

http://burtbeckwith.github.com/grails-spring-security-core/
http://burtbeckwith.github.com/grails-spring-security-openid/
http://burtbeckwith.github.com/grails-spring-security-acl/
http://burtbeckwith.github.com/grails-spring-security-cas/
http://burtbeckwith.github.com/grails-spring-security-ldap/
http://burtbeckwith.github.com/grails-spring-security-ui/ (will have the link when it's fixed)

Burt

> Hi Burt, can we get the doc in PDF format?
>
> On Wed, Aug 4, 2010 at 3:04 AM, Burt Beckwith <[hidden email]> wrote:
>
> > No, this isn't supported. You wouldn't edit web.xml though. See section 16
> > in the docs,
> > http://burtbeckwith.github.com/grails-spring-security-core/docs/manual/
> >
> > You can either specify the position of a filter using
> > clientRegisterFilter() or explicitly list the ordered filter bean names with
> > 'filterNames'. Spring Security defines all filters as Spring beans and you
> > need to follow that convention - specify the bean name(s) you use in
> > resources.groovy to idenfity them.
> >
> > Burt
> >
> > >
> > > I want to use saml validation with this plugin. Does this supported by
> > this
> > > plugin.
> > > I had to make modifications to plugin to use Saml11TicketValidator and
> > add
> > > then manullay add the Saml11TicketValidationFilter and
> > > HttpServletRequestWrapperFilter web.xml of the app.
> > >
> > > Is that the right approach or its more configurable than this hard coding
> > > directly
> > >
> >
>
>
>
>

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New and updated Spring Security plugins

Roshan Shrestha
Is there an oauth module?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New and updated Spring Security plugins

burtbeckwith
I'm working on that, should be available in a few weeks.

Burt

>
> Is there an oauth module?

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New and updated Spring Security plugins

Roshan Shrestha
Excellent! Hoping I can now use Twitter and Facebook authentication.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New and updated Spring Security plugins

Brian Spindler-3
In reply to this post by burtbeckwith
Perfect, thanks!

On Wed, Aug 4, 2010 at 11:02 AM, Burt Beckwith <[hidden email]> wrote:
There are PDF docs for all of the plugins except the UI plugin. That one is broken because the images are too wide and they clip, but I'll work on that. If you go to the Github pages there are links to the HTML and PDF versions:
http://burtbeckwith.github.com/grails-spring-security-openid/
http://burtbeckwith.github.com/grails-spring-security-acl/
http://burtbeckwith.github.com/grails-spring-security-cas/
http://burtbeckwith.github.com/grails-spring-security-ldap/
http://burtbeckwith.github.com/grails-spring-security-ui/ (will have the link when it's fixed)

Burt

> Hi Burt, can we get the doc in PDF format?
>
> On Wed, Aug 4, 2010 at 3:04 AM, Burt Beckwith <[hidden email]> wrote:
>
> > No, this isn't supported. You wouldn't edit web.xml though. See section 16
> > in the docs,
> > http://burtbeckwith.github.com/grails-spring-security-core/docs/manual/
> >
> > You can either specify the position of a filter using
> > clientRegisterFilter() or explicitly list the ordered filter bean names with
> > 'filterNames'. Spring Security defines all filters as Spring beans and you
> > need to follow that convention - specify the bean name(s) you use in
> > resources.groovy to idenfity them.
> >
> > Burt
> >
> > >
> > > I want to use saml validation with this plugin. Does this supported by
> > this
> > > plugin.
> > > I had to make modifications to plugin to use Saml11TicketValidator and
> > add
> > > then manullay add the Saml11TicketValidationFilter and
> > > HttpServletRequestWrapperFilter web.xml of the app.
> > >
> > > Is that the right approach or its more configurable than this hard coding
> > > directly
> > >
> >
>
>
>
>



--
-Brian
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New and updated Spring Security plugins

asafdav2
somewhat in topic - is there any estimate for the NTLM plugin release date?

On Thu, Aug 5, 2010 at 3:46 PM, Brian Spindler <[hidden email]> wrote:
Perfect, thanks!

On Wed, Aug 4, 2010 at 11:02 AM, Burt Beckwith <[hidden email]> wrote:
There are PDF docs for all of the plugins except the UI plugin. That one is broken because the images are too wide and they clip, but I'll work on that. If you go to the Github pages there are links to the HTML and PDF versions:
http://burtbeckwith.github.com/grails-spring-security-openid/
http://burtbeckwith.github.com/grails-spring-security-acl/
http://burtbeckwith.github.com/grails-spring-security-cas/
http://burtbeckwith.github.com/grails-spring-security-ldap/
http://burtbeckwith.github.com/grails-spring-security-ui/ (will have the link when it's fixed)

Burt

> Hi Burt, can we get the doc in PDF format?
>
> On Wed, Aug 4, 2010 at 3:04 AM, Burt Beckwith <[hidden email]> wrote:
>
> > No, this isn't supported. You wouldn't edit web.xml though. See section 16
> > in the docs,
> > http://burtbeckwith.github.com/grails-spring-security-core/docs/manual/
> >
> > You can either specify the position of a filter using
> > clientRegisterFilter() or explicitly list the ordered filter bean names with
> > 'filterNames'. Spring Security defines all filters as Spring beans and you
> > need to follow that convention - specify the bean name(s) you use in
> > resources.groovy to idenfity them.
> >
> > Burt
> >
> > >
> > > I want to use saml validation with this plugin. Does this supported by
> > this
> > > plugin.
> > > I had to make modifications to plugin to use Saml11TicketValidator and
> > add
> > > then manullay add the Saml11TicketValidationFilter and
> > > HttpServletRequestWrapperFilter web.xml of the app.
> > >
> > > Is that the right approach or its more configurable than this hard coding
> > > directly
> > >
> >
>
>
>
>



--
-Brian

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New and updated Spring Security plugins

thomasbee
Me again,

I have a small issue using the core spring-security-plugin together with the datasources plugin. While login works fine if I use as primary DB the one for User, Role, etc., it does not work anymore if I swap and configure it as secondary DB via the datasources plugin. (without errors, just a "Sorry, we were not able to find a user with that username and password.").

Here the working config:
// dataSource.groovy

dataSource {
	logSql = true
}

hibernate {
	format_sql=true
	cache.use_second_level_cache=true
	cache.use_query_cache=true
	cache.provider_class='net.sf.ehcache.hibernate.EhCacheProvider'
}

// environment specific settings
environments {
	development {
		dataSource {
			url = "jdbc:jtds:sybase://myserver.mydomain.org:6789/user_portal"
			driverClassName = "net.sourceforge.jtds.jdbc.Driver"
			username = "username"
			password = "password"
			dialect = "org.hibernate.dialect.SybaseDialect"
		}
	}
}
and
datasources = {
	datasource(name: 'up_dev') {
		environments(['development'])
		domainClasses([])
		readOnly(true)
		driverClassName('com.mysql.jdbc.Driver')
		url('jdbc:mysql:///nightlog')
		username('username')
		password('password')
		logSql(true)
		dialect('org.hibernate.dialect.MySQL5Dialect')
		hibernate {
			cache {
				provider_class('net.sf.ehcache.hibernate.EhCacheProvider')
				use_second_level_cache(true)
				use_query_cache(true)
			}	
		}
	}
}

And here is the swapped config that does NOT work:

// DataSource.groovy
dataSource {
	logSql = true
}

hibernate {
	format_sql=true
	cache.use_second_level_cache=true
	cache.use_query_cache=true
	cache.provider_class='net.sf.ehcache.hibernate.EhCacheProvider'
}

// environment specific settings
environments {
	development {
		dataSource {
			url = "jdbc:mysql:///nightlog"
			driverClassName = "com.mysql.jdbc.Driver"
			username = "username"
			password = "password"
			dialect = "org.hibernate.dialect.MySQL5Dialect"
		}
	}
}


and

datasources = {
	datasource(name: 'up_dev') {
		environments(['development'])
		domainClasses([org.mydomain.User,org.mydomain.Role,org.mydomain.UserRole, org.mydomain.Profile])
		readOnly(true)
		driverClassName('net.sourceforge.jtds.jdbc.Driver')
		url('jdbc:jtds:sybase://myserver.mydomain.org:6789/user_portal')
		username('username')
		password('password')
		logSql(true)
		dialect('org.hibernate.dialect.SybaseDialect')
		hibernate {
			cache {
				provider_class('net.sf.ehcache.hibernate.EhCacheProvider')
				use_second_level_cache(true)
				use_query_cache(true)
			}	
		}
	}
}

I do see the query going to the DB properly.

Hibernate: 
    select
        user0_.account_id as account1_8_,
        user0_.activated as activated8_,
        user0_.`passwd` as passwd3_8_,
        user0_.username as username8_ 
    from
        accounts user0_ 
    where
        user0_.username=?

Also, I noticed that on my User domain class the overridden method

String getPassword() {
    password? password.trim() : ""
}

Is no longer called, which I find worrisome.

Did anybody try using the datasources plugin with the spring security one?


Thanks

.t
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New and updated Spring Security plugins

burtbeckwith
If you could create a small project that demonstrates the issue and create a JIRA issue (run 'grails bug-report' to create the project zip) I'll take a look.

Burt

>
> Me again,
>
> I have a small issue using the core spring-security-plugin together with the
> datasources plugin. While login works fine if I use as primary DB the one
> for User, Role, etc., it does not work anymore if I swap and configure it as
> secondary DB via the datasources plugin. (without errors, just a "Sorry, we
> were not able to find a user with that username and password.").
>
> Here the working config:
>
> // dataSource.groovy
>
> dataSource {
> logSql = true
> }
>
> hibernate {
> format_sql=true
> cache.use_second_level_cache=true
> cache.use_query_cache=true
> cache.provider_class='net.sf.ehcache.hibernate.EhCacheProvider'
> }
>
> // environment specific settings
> environments {
> development {
> dataSource {
> url = "jdbc:jtds:sybase://myserver.mydomain.org:6789/user_portal"
> driverClassName = "net.sourceforge.jtds.jdbc.Driver"
> username = "username"
> password = "password"
> dialect = "org.hibernate.dialect.SybaseDialect"
> }
> }
> }
>
> and
>
> datasources = {
> datasource(name: 'up_dev') {
> environments(['development'])
> domainClasses([])
> readOnly(true)
> driverClassName('com.mysql.jdbc.Driver')
> url('jdbc:mysql:///nightlog')
> username('username')
> password('password')
> logSql(true)
> dialect('org.hibernate.dialect.MySQL5Dialect')
> hibernate {
> cache {
> provider_class('net.sf.ehcache.hibernate.EhCacheProvider')
> use_second_level_cache(true)
> use_query_cache(true)
> }
> }
> }
> }
>
>
> And here is the swapped config that does NOT work:
>
>
> // DataSource.groovy
> dataSource {
> logSql = true
> }
>
> hibernate {
> format_sql=true
> cache.use_second_level_cache=true
> cache.use_query_cache=true
> cache.provider_class='net.sf.ehcache.hibernate.EhCacheProvider'
> }
>
> // environment specific settings
> environments {
> development {
> dataSource {
> url = "jdbc:mysql:///nightlog"
> driverClassName = "com.mysql.jdbc.Driver"
> username = "username"
> password = "password"
> dialect = "org.hibernate.dialect.MySQL5Dialect"
> }
> }
> }
>
>
>
> and
>
>
> datasources = {
> datasource(name: 'up_dev') {
> environments(['development'])
>
> domainClasses([org.mydomain.User,org.org.mydomain.Role,org.mydomain.UserRole,
> org.mydomain.Profile])
> readOnly(true)
> driverClassName('net.sourceforge.jtds.jdbc.Driver')
> url('jdbc:jtds:sybase://myserver.mydomain.org:6789/user_portal')
> username('username')
> password('password')
> logSql(true)
> dialect('org.hibernate.dialect.SybaseDialect')
> hibernate {
> cache {
> provider_class('net.sf.ehcache.hibernate.EhCacheProvider')
> use_second_level_cache(true)
> use_query_cache(true)
> }
> }
> }
> }
>
>
> I do see the query going to the DB properly.
>
>
> Hibernate:
>     select
>         user0_.account_id as account1_8_,
>         user0_.activated as activated8_,
>         user0_.`passwd` as passwd3_8_,
>         user0_.username as username8_
>     from
>         accounts user0_
>     where
>         user0_.username=?
>
>
> Also, I noticed that on my domain class the overridden method
>
>
> String getPassword() {
>     password? password.trim() : ""
> }
>
>
> Is no longer called. Did anybody try using the datasources plugin with the
> spring security one?
>
> Thanks
>
> .t
>

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: New and updated Spring Security plugins

thomasbee
Hi Burt,

I reproduced the issue today and opened the JIRA with an attached report.

http://jira.codehaus.org/browse/GRAILS-6686

 Thanks for your great support.

.t
12
Loading...