Grails Spring Security Plugin将用户密码从1.2.7.3迁移到2.0 [英] Grails Spring Security Plugin Migrate User Passwords from 1.2.7.3 to 2.0

查看:129
本文介绍了Grails Spring Security Plugin将用户密码从1.2.7.3迁移到2.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Grails 2.3.2,并试图将我的Spring Security Core Plugin从1.2.7.3升级到2.0。

I am using Grails 2.3.2 and am trying to upgrade my Spring Security Core Plugin from 1.2.7.3 to 2.0.

我做了所有导入更改并得到我的应用程序启动,但我无法登录。 2.0中的一个变化是它使用密码算法bcrypt,使得我所有的旧密码都没有用处。所以,我在我的应用程序中检查了密码重置过程,并确保在那之后我可以登录。

I made all the import changes and got my app to start, but I was unable to login. One of the changes in 2.0 is that it uses the bcrypt algorithm for passwords, making all my old passwords useless. So, I went through the password reset process in my app and sure enough after that I could log in just fine.

但是,我想保留所有旧密码我的用户,所以我去了,找到了1.2.7.3版插件的文档,并查找了它使用的算法: http://grails-plugins.github.io/grails-spring-security-core/docs/ manual.1273 / guide / 12%20Password%20and%20Account%20Protection.html

But, I want to keep my old passwords for all my users, so I went and found the documentation for the 1.2.7.3 version of the plugin and looked up what algorithm it used: http://grails-plugins.github.io/grails-spring-security-core/docs/manual.1273/guide/12%20Password%20and%20Account%20Protection.html

根据这些文档,其默认值是SHA-256。因此,我添加了配置更改,但仍然无法登录。

According to these docs its default is SHA-256. So, I added that config change, yet I still cannot log in.

那么,如何将我所有用户的密码迁移到2.0版本的插件?截至目前看起来似乎不可能......

So, how can I migrate all my user's passwords to the 2.0 version of the plugin? As of right now it doesn't seem possible...

推荐答案

添加这个以恢复旧的行为:

Add this to revert to the old behavior:

grails.plugin.springsecurity.password.algorithm = 'SHA-256'
grails.plugin.springsecurity.password.hash.iterations = 1

这篇关于Grails Spring Security Plugin将用户密码从1.2.7.3迁移到2.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆