Grails 3 and Spring Security Core Plugin 2.0-RC4

2,643 views
Skip to first unread message

David Spies

unread,
Mar 3, 2015, 12:43:37 AM3/3/15
to grails-de...@googlegroups.com
Does anyone know if the Spring Security Plugin can be used with Grails 3.0.0.M2? I tried adding

repositories {
 
...
  maven
{ url 'http://repo.spring.io/milestone/' }
}

dependencies
{
 
...
  compile
'org.grails.plugins:spring-security-core:2.0-RC4'
}

to build.gradle, but the springSecurityService is still null when I attempt to use it in an Interceptor.  Any help would be greatly appreciated.

Graeme Rocher

unread,
Mar 3, 2015, 2:35:27 AM3/3/15
to grails-de...@googlegroups.com
It hasn't been ported across yet, in the meantime if you need security
other uses have had success with the Spring Security Starter for boot
https://twitter.com/asoftwareguy/status/571699380991877120
> --
> You received this message because you are subscribed to the Google Groups
> "Grails Dev Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to grails-dev-disc...@googlegroups.com.
> To post to this group, send email to grails-de...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/grails-dev-discuss/4b5a4014-4b5c-4444-84fd-a4282bbc87da%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Graeme Rocher

Graeme Rocher

unread,
Mar 3, 2015, 2:37:08 AM3/3/15
to grails-de...@googlegroups.com
An article here about using it https://spring.io/guides/gs/securing-web/
--
Graeme Rocher

Alvaro Sanchez-Mariscal

unread,
Mar 3, 2015, 3:24:11 AM3/3/15
to grails-de...@googlegroups.com
This is an interesting discussion indeed: do we need a Grails plugin for Spring Security at all?


For more options, visit https://groups.google.com/d/optout.

Graeme Rocher

unread,
Mar 3, 2015, 3:54:43 AM3/3/15
to grails-de...@googlegroups.com
Certain Grails plugins do get replaced by Boot features (for example
Tomcat plugin is gone)

It is just whether a Grails plugin can provide value over what Boot
provides (with regards to Code generation, Traits, Gradle integration,
conventions etc.)

Cheers
> https://groups.google.com/d/msgid/grails-dev-discuss/CANWPwkTzOYCysiFOTEBt9BMq%2B4NiUdTBdz7RcO_ojEZDF9OOxg%40mail.gmail.com.

Alvaro Sanchez-Mariscal

unread,
Mar 3, 2015, 4:06:57 AM3/3/15
to grails-de...@googlegroups.com
Those are certainly the advantages, but the disadvantages are: you have another thing to maintain and support (specially in a key field like security), you need to catch up regularly with the library version, you add a learning curve to people coming from raw Spring Boot, ...

Not sure if migrating the plugin to Grails 3 is worth the effort. Perhaps we should focus on releasing a final 2.0 version compatible with Grails 2.x, and leave the Spring Boot one for Grails 3.


For more options, visit https://groups.google.com/d/optout.

Graeme Rocher

unread,
Mar 3, 2015, 4:24:47 AM3/3/15
to grails-de...@googlegroups.com
You might be right, but remember there is a half way house, in that
the plugin could simply add the Spring-Boot-Starter so all of the
configuration behaviour is provided by Boot, and additional features
like new methods, traits, code gen scripts are added by the plugin

Cheers

On Tue, Mar 3, 2015 at 10:06 AM, Alvaro Sanchez-Mariscal
> https://groups.google.com/d/msgid/grails-dev-discuss/CANWPwkT1uKi%3D2OLX122eCxpvNYGtN%3D5QeHfpsaq9WHJfHcZr%3Dw%40mail.gmail.com.

David Spies

unread,
Mar 4, 2015, 10:41:32 AM3/4/15
to grails-de...@googlegroups.com
Thanks guys, I assumed that it had not been ported yet, but I wanted to make sure it was not something I was doing.  

As for the discussion about Grails-Spring-Security-Plugin vs Spring-Starter-Security, I think it makes a lot of sense to embrace the Spring Boot Security Starter 
​while
 adding a few
​ Grails-specific items 
on top (
code gen scripts and Grails-specific docs
​)
 to ease the
​ migration
​ from Grails 2 to 3
.  For instance, one trivial item that came up using Spring-Starter-Security 
​is
 the
​ ​
default AuthenticationManager has a single user ‘user’ 
​with a
 random password printed at INFO level when the application starts up
​, however 
Grails 3 default logging displays ​ERROR level logs, so users setting it up for the first time may be confused on where to get the password.  This could be mitigated with Grails-specific documentation or a simple logging change via a grails script.


​Love Grails 3,
>> >> >> To post to this group, send email to
>> >> >> grails-de...@googlegroups.com.
>> >> >> To view this discussion on the web visit
>> >> >>
>> >> >>
>> >> >> https://groups.google.com/d/msgid/grails-dev-discuss/4b5a4014-4b5c-4444-84fd-a4282bbc87da%40googlegroups.com.
>> >> >> For more options, visit https://groups.google.com/d/optout.
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Graeme Rocher
>> >>
>> >>
>> >>
>> >> --
>> >> Graeme Rocher
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> >> Groups
>> >> "Grails Dev Discuss" group.
>> >> To unsubscribe from this group and stop receiving emails from it, send
>> >> an
>> >> To post to this group, send email to
>> >> grails-de...@googlegroups.com.
>> >> To view this discussion on the web visit
>> >>
>> >> https://groups.google.com/d/msgid/grails-dev-discuss/CAO_wNoecqEK-hHNjeGP1-MxoE%2Bdy1tOEbDhxEXTVpEOZz7Nr3w%40mail.gmail.com.
>> >> For more options, visit https://groups.google.com/d/optout.
>> >
>> >
>> >
>> >
>> > --
>> > Alvaro Sanchez-Mariscal
>> > alvaro.sanc...@gmail.com
>> > twitter.com/alvaro_sanchez
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "Grails Dev Discuss" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > To post to this group, send email to
>> > grails-de...@googlegroups.com.
>> > To view this discussion on the web visit
>> >
>> > https://groups.google.com/d/msgid/grails-dev-discuss/CANWPwkTzOYCysiFOTEBt9BMq%2B4NiUdTBdz7RcO_ojEZDF9OOxg%40mail.gmail.com.
>> >
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> Graeme Rocher
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Grails Dev Discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> To post to this group, send email to grails-de...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/grails-dev-discuss/CAO_wNoer%2BoLoa%2Bd2V4GxM_EVABmNp216bM2WjpSDRTcWqL80hQ%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
> --
> Alvaro Sanchez-Mariscal
> alvaro.sanc...@gmail.com
> twitter.com/alvaro_sanchez
>
> --
> You received this message because you are subscribed to the Google Groups
> "Grails Dev Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an

Manuel Ortiz

unread,
Mar 5, 2015, 8:19:49 AM3/5/15
to grails-de...@googlegroups.com
I use the Grails Spring Security REST Plugin in almost all of my RESTful services. It provides me with a lot of indispensable features that I would hate loosing in Grails 3. Alvaro, are you contemplating migrating this to Grails 3 or will we lose all its functionality? Spring Security does not provide the granulation and some of the features that you have managed to include in this plugin, sincerely, I would hate to lose it.

Alvaro Sanchez-Mariscal

unread,
Mar 5, 2015, 8:36:46 AM3/5/15
to grails-de...@googlegroups.com
I do plan to migrate it to Grails 3, that's why I raised my concern about Spring Security Core dependency. I'll probably sit on top of "Spring-Boot-Security" for Grails 3.

2015-03-05 14:19 GMT+01:00 Manuel Ortiz <ortiz....@gmail.com>:
I use the Grails Spring Security REST Plugin in almost all of my RESTful services. It provides me with a lot of indispensable features that I would hate loosing in Grails 3. Alvaro, are you contemplating migrating this to Grails 3 or will we lose all its functionality? Spring Security does not provide the granulation and some of the features that you have managed to include in this plugin, sincerely, I would hate to lose it.

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-disc...@googlegroups.com.

To post to this group, send email to grails-de...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

David Spies

unread,
Mar 5, 2015, 10:51:11 AM3/5/15
to grails-de...@googlegroups.com
Sorry to drag this thread out even further, but I found a blog post related to Spring Boot, Spring-Boot-starter-security, and REST Token-based authentication that may be of interest (http://www.future-processing.pl/blog/exploring-spring-boot-and-spring-security-custom-token-based-authentication-of-rest-services-with-spring-security-and-pinch-of-spring-java-configuration-and-spring-integration-testing/).  I have not had the chance to go through it, but it looks pretty detailed if either of you are interested.


On Thursday, March 5, 2015 at 6:36:46 AM UTC-7, Álvaro Sánchez-Mariscal wrote:
I do plan to migrate it to Grails 3, that's why I raised my concern about Spring Security Core dependency. I'll probably sit on top of "Spring-Boot-Security" for Grails 3.
2015-03-05 14:19 GMT+01:00 Manuel Ortiz <ortiz....@gmail.com>:
I use the Grails Spring Security REST Plugin in almost all of my RESTful services. It provides me with a lot of indispensable features that I would hate loosing in Grails 3. Alvaro, are you contemplating migrating this to Grails 3 or will we lose all its functionality? Spring Security does not provide the granulation and some of the features that you have managed to include in this plugin, sincerely, I would hate to lose it.

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-discuss+unsub...@googlegroups.com.

To post to this group, send email to grails-de...@googlegroups.com.

Rainer Frey

unread,
Apr 10, 2015, 3:07:43 AM4/10/15
to grails-de...@googlegroups.com
Another added value of the spring-security-core plugin is the taglib that provides current user 
info and authority conditionals. This plugin actually does add features to the library itself.

Rainer
>> >> To post to this group, send email to
>> >> grails-de...@googlegroups.com.
>> >> To view this discussion on the web visit
>> >>
>> >> https://groups.google.com/d/msgid/grails-dev-discuss/4b5a4014-4b5c-4444-84fd-a4282bbc87da%40googlegroups.com.
>> >> For more options, visit https://groups.google.com/d/optout.
>> >
>> >
>> >
>> > --
>> > Graeme Rocher
>>
>>
>>
>> --
>> Graeme Rocher
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Grails Dev Discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> To post to this group, send email to grails-de...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/grails-dev-discuss/CAO_wNoecqEK-hHNjeGP1-MxoE%2Bdy1tOEbDhxEXTVpEOZz7Nr3w%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
> --
> Alvaro Sanchez-Mariscal
> alvaro.sanc...@gmail.com
> twitter.com/alvaro_sanchez
>
> --
> You received this message because you are subscribed to the Google Groups
> "Grails Dev Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an

James Kleeh

unread,
Apr 15, 2015, 1:16:15 PM4/15/15
to grails-de...@googlegroups.com
What are the current plans for porting the spring security plugin (and its associated plugins LDAP etc..) to Grails 3?

I've been able to get it working without too much trouble but the difference in functionality makes any new project reliant on 2.5 until they get migrated. It's a shame as I'd like to get started with 3 right away.

Jim

Owen Rubel

unread,
Apr 15, 2015, 2:34:02 PM4/15/15
to grails-de...@googlegroups.com
Burt said he is working on it and hoped to start the port this month. I wouldn't expect anything until maybe late next month... hes a busy man and that a complex plugin to convert.

Biniam Asnake

unread,
Jun 18, 2015, 5:39:20 AM6/18/15
to grails-de...@googlegroups.com
@Burt (or anyone who knows), what is the progress of the plugin. If spring-security-core is not supported in Grails 3, I will revise my decision to use Grails 3 and stick to 2.5 because dealing with the spring-security (of Spring boot) without the grails plugin would be much work.

Regards,

Owen Rubel

unread,
Jun 18, 2015, 11:34:55 AM6/18/15
to grails-de...@googlegroups.com
Thats not a show stopper if you know what you are doing. You can easily use a TOKEN in your distributed architecture (see StormPath).

Pavel Zakharov

unread,
Jul 10, 2015, 2:32:43 AM7/10/15
to grails-de...@googlegroups.com
Hi, can i know what about plugin progress ? I use Grails 3.0.2

среда, 15 апреля 2015 г., 11:34:02 UTC-7 пользователь Owen Rubel написал:
>> >> To post to this group, send email to
>> >> grails-de...@googlegroups.com.
>> >> To view this discussion on the web visit
>> >>
>> >> https://groups.google.com/d/msgid/grails-dev-discuss/4b5a4014-4b5c-4444-84fd-a4282bbc87da%40googlegroups.com.
>> >> For more options, visit https://groups.google.com/d/optout.
>> >
>> >
>> >
>> > --
>> > Graeme Rocher
>>
>>
>>
>> --
>> Graeme Rocher
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Grails Dev Discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> To post to this group, send email to grails-de...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/grails-dev-discuss/CAO_wNoecqEK-hHNjeGP1-MxoE%2Bdy1tOEbDhxEXTVpEOZz7Nr3w%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
> --
> Alvaro Sanchez-Mariscal
> alvaro.sanc...@gmail.com
> twitter.com/alvaro_sanchez
>
> --
> You received this message because you are subscribed to the Google Groups
> "Grails Dev Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an

Johny K

unread,
May 12, 2016, 4:22:30 AM5/12/16
to Grails Dev Discuss
Reply all
Reply to author
Forward
0 new messages