views:

113

answers:

3

i've been looking over spring security and noticing how its a pretty big package. I'm wondering if it's worth the effort to take the time to ramp up on this.

has spring security 2.0+ saved you a large amount of time, or has it simplified your project in any way?

+2  A: 

If the alternative is no security or writing and maintaining my own, I'd rather learn Spring Security.

If I can amortize the learning curve over several projects, so much the better.

duffymo
does this answer contain any information?
irreputable
".... I'm wondering if it's worth the effort to take the time to ramp up on this...." - it does offer one view on this question. It's worth more than the nothing you've provided.
duffymo
+2  A: 

I considered using it for a Spring project a couple of years back, and opted against it because it was a tremendously heavy and complex framework and the flexibility that it provides just wasn't necessary IMHO. It was (in my estimation) less effort to roll our own authentication/authorization. Don't misinterpret this as meaning that it was a trivial effort; effective security never is.

From a risk standpoint, I didn't understand it deep down after spending some time with the documentation, and decided that the complexity represented a significant risk of misconfiguration. It may be "better" than what we built, but if we didn't understand how to use and configure it properly, then it wasn't going to live up to its potential. A custom-implemented (and possibly "inferior") security module that I understand inside-out is less concerning.

Disclaimer: Spring Security was still called Acegi at the time, and the current technology may well have changed along with the name.

Greg Harman
ACEGI did merit that conclusion, but Spring Security has undergone a significant refactoring since then. It'd be worth considering again.
duffymo
my feelings are the same. I don't know how deep the rabbit hole is at this point. I know i need to understand something like this on a deep level to be effective and secure with it.what ever solution is chosen, it also needs to be simple enough to be understood by the junior devs on the team. Its not really secure if no one else can understand it and apply it.
bostonBob
@Greg - the SpringSecurity "namespace" extensions in 2.x and 3.0 have *significantly* simplified configuration for simple use-cases. (They could provide more namespace hooks for complex use-cases, but that's a different kettle of fish.)
Stephen C
@bostonBob - good point. The SpringSecurity "namespace" extensions simplify configuration, but they also make it harder to figure out exactly *actually how* the filters are configured.
Stephen C
+6  A: 

Has spring security 2.0+ saved you a large amount of time, or has it simplified your project in any way?

For my project, yes and yes.

It very much depends on how simple or complex your security requirements are.

  • If you only need to do simple things, you can get away with only reading the small part of the SpringSecurity documentation that is relevant to your problem. Or just borrow stuff from the samples.

  • If you are doing complicated things like talking to an enterprise LDAP service or using OpenID, then using SpringSecurity is going to be much simpler that implementing things yourself staring from (non-spring) third-party libraries.

In my experience, decent website security is complicated and time-consuming, no matter how you implement it.

Stephen C
We're using Spring Security 2.0+ for some project involving rather specific security (LDAP/X509 authentication and authorization through 3rd party Java API) and, although it did not fit our needs out of the box, its extensibility was great. With very little subclassing and some configuration we got exactly what we wanted. I think Spring Security 2.0+ is a time saver.
gpeche