-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TLS/SSL Security Framework #349
base: master
Are you sure you want to change the base?
Conversation
.gitignore
Outdated
@@ -61,13 +61,15 @@ dependencies/.extracted | |||
|
|||
# CMake | |||
cmake-build-*/ | |||
build/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gitignore 有一些重复的条目
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个commit暂时的,后面不会推上来
dependencies/cmake/CMakeLists.txt
Outdated
add_subdirectory(BSThreadPool) | ||
add_subdirectory(nlohmann_json) | ||
# add_subdirectory(nlohmann_json) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个依赖不能去掉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个也在想怎么解决
repeated AllowedPartitionQos allowed_partition_qos_list = 5; | ||
repeated string coordinator_accounts = 6; | ||
AdminLevel admin_level = 7; | ||
string password = 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 明文?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
有SSL的话,前端加密应该没必要了吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SSL不一定强制启用 可能还是考虑Hash 存储再加一个Salt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RileyWen @Nativu5 @L-Xiafeng 密码这块感觉还得对一下 今天马老师说集群已经认证过账号密码了,所以鹤思本身不需要密码,直接clogin获取token即可。现在的实现是clogin通过uid和密码登录(密码可为空),所以目前的安全框架是否需要对鹤思系统加入密码,保留现在的实现?还是说现在不需要密码,只依赖集群认证登录?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个应该还是需要的:
- 之前的规划中有提到前端在客户主机而不只是在登录节点上,那么自然需要密码;
- 从 JWT 的原理来讲,如果调用 clogin 传递 UID 就能使服务端签发 JWT,那么冒充者可以直接仿造一个 clogin 请求,传递一个受害者的 UID 来拿到 JWT。此时 JWT 防冒充的作用就完全失效了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
确实是的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RileyWen @Nativu5 @L-Xiafeng 马老师认为鹤思不能有输入密码这个步骤,但要保证获取token是安全的。感觉有点麻烦,目前我只能想到AddUser时传回密码保存文件用于登录自动读取,但文件权限保证不了,感觉不太行,或者手动在登录节点配置类似于公私钥这种,你们有没有什么更好的想法
|
||
DomainSuffix: crane.com | ||
|
||
JwtCertFilePath: /etc/crane/jwt.pem |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这一堆config新建一个SSL层级吧
SSL:
- CranedCertPath
- Ctld....
- xxxx
URL_HASH SHA256=b9eb270e3ba8221e4b2bc38723c9a1cb4fa6c241a42908b9a334daff31137406 | ||
INACTIVITY_TIMEOUT 5 | ||
) | ||
set(JWT_BUILD_EXAMPLES OFF CACHE BOOL "disable building examples" FORCE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个需要cache吗?
Crane动态链接需不需要修改参数?需要确认一下
292da88
to
2ae9fd8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*Server和CranedKeeper 统一移到RpcService的子文件夹下吧
info_->server_context()->TryCancel(); | ||
return; | ||
} | ||
char token[iter->second.size()]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C++里面就别写C系风格了吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
只能这样,直接转为string的话会出bug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不对,好像也是可以用string操作的
4533445
to
a9b1f63
Compare
ac83c71
to
bdb2f74
Compare
No description provided.