I've just started a Grails 2.4.4/Spring Security 2.0-RC4 (plugin) app. I'm using the same security configuration I have in Grails 2.3.11/Spring Security 1.2.7.3:
grails.plugin.springsecurity.password.algorithm = 'bcrypt'
grails.plugin.springsecurity.password.bcrypt.logrounds = 31
It hangs on startup - or so I thought. Really, it just starts to take an incredibly long time to start when log rounds is in the 20s. With the previous app, there is no delay when set to 31. After comparing the docs, I notice the 2.0 plugin has a new config option:
Property Default Description
password.hash.iterations 10000 the number of iterations which will be executed on the hashed password/salt.
I then dug into the code and it appears that 2.0 no longer relies on jbcrypt, but a Spring implementation (org.springframework.security.crypto.bcrypt
).
I assume that has something to do with the difference in speed, but I don't understand bcrypt or the difference in implementation well enough to compare them. Can someone shed light on this? What would make them equivalent? And is that what I want, or is my older app insecure?