-
Notifications
You must be signed in to change notification settings - Fork 18
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?
Changes from all commits
3c576b1
8557142
b5eb611
71ecb99
7b66c6a
ac9f8d0
f1eae39
bf1b015
04f2882
9073d12
75ec4c8
b41d4dc
ab5b36b
f83c3d2
77ab683
2e317b6
67e21f1
6f02465
418fbee
45023b1
6a06ba7
1a6ffae
bdb2f74
9056b48
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -139,7 +139,7 @@ message TaskToCtld { | |
string extra_attr = 23; | ||
|
||
string cmd_line = 31; | ||
string cwd = 32; // Current working directory | ||
string cwd = 32; // Current working directory | ||
map<string, string> env = 33; | ||
|
||
string excludes = 34; | ||
|
@@ -182,7 +182,7 @@ message TaskToD { | |
// If this task is PENDING, start_time is either not set (default constructed) | ||
// or an estimated start time. | ||
// If this task is RUNNING, start_time is the actual starting time. | ||
google.protobuf.Timestamp start_time = 5; // Currently Only used in CraneCtld | ||
google.protobuf.Timestamp start_time = 5; // Currently Only used in CraneCtld | ||
google.protobuf.Duration time_limit = 6; | ||
|
||
string partition = 8; | ||
|
@@ -263,10 +263,11 @@ message TaskInfo { | |
string craned_list = 36; | ||
} | ||
|
||
// The time of different nodes across the whole cluster might not always be synchronized. | ||
// If the time on the front end node is more than several seconds ahead of the CraneCtld node, | ||
// a negative elapsed time might occur. | ||
// To avoid this, the elapsed time of a task is calculated on the CraneCtld side. | ||
// The time of different nodes across the whole cluster might not always be | ||
// synchronized. If the time on the front end node is more than several | ||
// seconds ahead of the CraneCtld node, a negative elapsed time might occur. | ||
// To avoid this, the elapsed time of a task is calculated on the CraneCtld | ||
// side. | ||
google.protobuf.Duration elapsed_time = 37; | ||
repeated string execution_node = 38; | ||
} | ||
|
@@ -328,36 +329,37 @@ enum ErrCode { | |
ERR_INVALID_ADMIN_LEVEL = 10007; | ||
ERR_USER_ACCOUNT_MISMATCH = 10008; | ||
ERR_NO_ACCOUNT_SPECIFIED = 10009; | ||
|
||
ERR_INVALID_ACCOUNT = 10010; | ||
ERR_DUPLICATE_ACCOUNT = 10011; | ||
ERR_INVALID_PARENTACCOUNT = 10012; | ||
ERR_DELETE_ACCOUNT = 10013; | ||
|
||
ERR_INVALID_PARTITION = 10014; | ||
ERR_ALLOWED_PARTITION = 10015; | ||
ERR_DUPLICATE_PARTITION = 10016; | ||
ERR_PARENT_ALLOWED_PARTITION = 10017; | ||
ERR_USER_EMPTY_PARTITION = 10018; | ||
ERR_CHILD_HAS_PARTITION = 10019; | ||
|
||
ERR_INVALID_QOS = 10020; | ||
ERR_DB_DUPLICATE_QOS = 10021; | ||
ERR_DELETE_QOS = 10022; | ||
ERR_CONVERT_TO_INTERGER = 10023; | ||
ERR_TIME_LIMIT = 10024; | ||
ERR_ALLOWED_QOS = 10025; | ||
ERR_DUPLICATE_QOS = 10026; | ||
ERR_PARENT_ALLOWED_QOS = 10027; | ||
ERR_SET_ALLOWED_QOS = 10028; | ||
ERR_ALLOWED_DEFAULT_QOS = 10029; | ||
ERR_DUPLICATE_DEFAULT_QOS = 10030; | ||
ERR_CHILD_HAS_DEFAULT_QOS = 10031; | ||
ERR_SET_ACCOUNT_QOS = 10032; | ||
ERR_SET_DEFAULT_QOS = 10033; | ||
ERR_IS_DEFAULT_QOS = 10034; | ||
|
||
ERR_UPDATE_DATABASE = 10035; | ||
ERR_PASSWORD_MISMATCH = 100010; | ||
|
||
ERR_INVALID_ACCOUNT = 10011; | ||
ERR_DUPLICATE_ACCOUNT = 10012; | ||
ERR_INVALID_PARENTACCOUNT = 10013; | ||
ERR_DELETE_ACCOUNT = 10014; | ||
|
||
ERR_INVALID_PARTITION = 10015; | ||
ERR_ALLOWED_PARTITION = 10016; | ||
ERR_DUPLICATE_PARTITION = 10017; | ||
ERR_PARENT_ALLOWED_PARTITION = 10018; | ||
ERR_USER_EMPTY_PARTITION = 10019; | ||
ERR_CHILD_HAS_PARTITION = 10020; | ||
|
||
ERR_INVALID_QOS = 10021; | ||
ERR_DB_DUPLICATE_QOS = 10022; | ||
ERR_DELETE_QOS = 10023; | ||
ERR_CONVERT_TO_INTERGER = 10024; | ||
ERR_TIME_LIMIT = 10025; | ||
ERR_ALLOWED_QOS = 10026; | ||
ERR_DUPLICATE_QOS = 10027; | ||
ERR_PARENT_ALLOWED_QOS = 10028; | ||
ERR_SET_ALLOWED_QOS = 10029; | ||
ERR_ALLOWED_DEFAULT_QOS = 10030; | ||
ERR_DUPLICATE_DEFAULT_QOS = 10031; | ||
ERR_CHILD_HAS_DEFAULT_QOS = 10032; | ||
ERR_SET_ACCOUNT_QOS = 10033; | ||
ERR_SET_DEFAULT_QOS = 10034; | ||
ERR_IS_DEFAULT_QOS = 10035; | ||
|
||
ERR_UPDATE_DATABASE = 10036; | ||
|
||
ERR_GENERIC_FAILURE = 10100; | ||
ERR_NO_RESOURCE = 10101; | ||
|
@@ -420,15 +422,17 @@ message AccountInfo { | |
bool blocked = 10; | ||
} | ||
|
||
// Note: UserInfo DIFFERS from the `User` struct in C++ code and database representation | ||
// and is ONLY used for communication between CraneCtld and cacctmgr command. | ||
// If an user belongs to multiple accounts, There will be multiple `UserInfo` | ||
// messages with `account` pointing to each account. | ||
// Note: UserInfo DIFFERS from the `User` struct in C++ code and database | ||
// representation | ||
// and is ONLY used for communication between CraneCtld and cacctmgr | ||
// command. If an user belongs to multiple accounts, There will be | ||
// multiple `UserInfo` messages with `account` pointing to each account. | ||
// For example, if a user (uid=1) belongs to accounts `1,2,3`, | ||
// there will be three `UserInfo` messages: (uid=1, account=1), (uid=1, account=2), | ||
// (uid=1, account=3). | ||
// The c++ code and database representation use a Map<account name, AttrsInAccount> to contain | ||
// in ONE UserInfo message all the information belonging to different accounts. | ||
// there will be three `UserInfo` messages: (uid=1, account=1), (uid=1, | ||
// account=2), (uid=1, account=3). The c++ code and database | ||
// representation use a Map<account name, AttrsInAccount> to contain in | ||
// ONE UserInfo message all the information belonging to different | ||
// accounts. | ||
message UserInfo { | ||
enum AdminLevel { | ||
None = 0; | ||
|
@@ -444,11 +448,12 @@ message UserInfo { | |
|
||
uint32 uid = 1; | ||
string name = 2; | ||
string account = 3; | ||
bool blocked = 4; | ||
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 commentThe 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 commentThe 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 commentThe 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 commentThe 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 commentThe 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. @RileyWen @Nativu5 @L-Xiafeng 马老师认为鹤思不能有输入密码这个步骤,但要保证获取token是安全的。感觉有点麻烦,目前我只能想到AddUser时传回密码保存文件用于登录自动读取,但文件权限保证不了,感觉不太行,或者手动在登录节点配置类似于公私钥这种,你们有没有什么更好的想法 |
||
string account = 4; | ||
bool blocked = 5; | ||
repeated AllowedPartitionQos allowed_partition_qos_list = 6; | ||
repeated string coordinator_accounts = 7; | ||
AdminLevel admin_level = 8; | ||
} | ||
|
||
message QosInfo { | ||
|
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动态链接需不需要修改参数?需要确认一下