enr / grails-spring-security-oauth

Adds OAuth-based authentication to the Spring Security plugin
9 stars 8 forks source link

Plugin Resets Spring Security Configuration #10

Open marcoscarceles opened 9 years ago

marcoscarceles commented 9 years ago

This seems to be reseting previous configuration done by other plugins:

https://github.com/enr/grails-spring-security-oauth/blob/a39d33466785507eb8c89d563009dd082b57eceb/SpringSecurityOauthGrailsPlugin.groovy#L56

We noticed this when we included this plugin alongside spring-security-facebook plugin, which registers its own filters. These filters were cleared after spring-secutiry-oauth loaded after.

enr commented 9 years ago

Hi @marcos-carceles , thank you for point out this.

The other plugin you are using is the oauth sub-plugin https://github.com/donbeave/grails-spring-security-oauth-facebook, https://github.com/splix/grails-spring-security-facebook/ or another one?

At the moment I don't have so much time to dedicate to this plugin.

It would be great if you could try if things are better removing the line and adding

def loadAfter = ['springSecurityCore', 'springSecurityFacebook']

to the plugin descriptor.

Otherwise, you could try to change the line with some process that clears only the spring-security-oauth keys, but I'm not sure of the implications of this :)

If you could confirm a fix I'm going to release immediately a new version. In the meantime this issue is open...

Just to know, if you are not using the donbeave/springsecurity-oauth-facebook: this plugin is designed to be used with other springsecurity-oauth subplugins, what are the reasons to use another one? Some problem/bug/missing functionality with the "fb oauth" ?

marcoscarceles commented 9 years ago

Hi,

the plugin is conflicting with, in our case, is http://grails.org/plugin/spring-security-facebook. We've started using spring-security-oauth with spring-security-oauth-google. There's a plan for us to migrate the spring-security-facebook plugin to the spring-security-oauth-facebook subplugin (however, this is unrelated and the issue would remain potentially impacting any other plugin making use of spring-security config).

For the time being, and as you suggested, we had already used a fork of the other plugin so that spring-security-facebook loads AFTER spring-security-oauth, but since it's oauth which is affecting the other facebook plugin we thought it was worth raising the issue ;)

Thank you very much!

enr commented 9 years ago

Clear! I'll get into this as soon as it's possible.

Thank you and sorry for the inconvenience :) Enrico