UI登录密码改采用更安全的加密策略及可通过-Dbistoury.ui.register_disabled=true来禁用帐号注册功能#72
Open
qxo wants to merge 2 commits intoqunarcorp:masterfrom
Open
UI登录密码改采用更安全的加密策略及可通过-Dbistoury.ui.register_disabled=true来禁用帐号注册功能#72qxo wants to merge 2 commits intoqunarcorp:masterfrom
qxo wants to merge 2 commits intoqunarcorp:masterfrom
Conversation
1. 旧实现密码采用AES加密存储,是可逆的,这是不合适的。现改为SPI方式,默认是采用spring-security推荐的Pbkdf2PasswordEncoder 修改SPI实现配置见:META-INF/services/org.springframework.security.crypto.password.PasswordEncoder 2. quick start方式默认应该禁用帐号注册功能,以避免无意识地引入的安全风险 同时为了安全建议quick start脚本启动前指定密码,ie: `-DBISTOURY_ADMIN_PWD=xxx`
xleiy
requested changes
Jan 19, 2020
Contributor
xleiy
left a comment
There was a problem hiding this comment.
提交前需要测试修改代码所涉及到的逻辑分支。需要在快速部署及生产部署文档上补充相关文档
bistoury-ui-service-impl/src/main/java/qunar/tc/bistoury/ui/service/impl/UserServiceImpl.java
Outdated
Show resolved
Hide resolved
bistoury-ui-service-impl/src/main/java/qunar/tc/bistoury/ui/service/impl/UserServiceImpl.java
Show resolved
Hide resolved
bistoury-ui-service-impl/src/main/java/qunar/tc/bistoury/ui/service/impl/UserServiceImpl.java
Outdated
Show resolved
Hide resolved
...ce-impl/src/main/java/qunar/tc/bistoury/ui/service/impl/PasswordEncoder4OldAESCryptImpl.java
Outdated
Show resolved
Hide resolved
...ce-impl/src/main/java/qunar/tc/bistoury/ui/service/impl/PasswordEncoder4OldAESCryptImpl.java
Outdated
Show resolved
Hide resolved
quick start强制启用新模式,即: `export BISTOURY_UI_PASSWORD_ENCODER=new` 也可强制旧模式: `export BISTOURY_UI_PASSWORD_ENCODER=old`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修改SPI实现配置见:META-INF/services/org.springframework.security.crypto.password.PasswordEncoder
同时为了安全建议quick start脚本启动前指定密码,ie:
-DBISTOURY_ADMIN_PWD=xxx