Skip to content
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

feat(encrypt): support encrypt when sync #11

Merged
merged 49 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
90896e5
feat: support encrypt in sync
GoldenSheep402 Nov 5, 2023
28814f2
chore: gen code
GoldenSheep402 Nov 5, 2023
91e50bf
feat: UpdateGroup with the arg of master_key
GoldenSheep402 Nov 6, 2023
5f69ad4
update: automatic generate new proto
GoldenSheep402 Nov 6, 2023
5d10fef
feat: Gen user's keychain
GoldenSheep402 Nov 6, 2023
cacb2dd
update: automatic generate new proto
GoldenSheep402 Nov 6, 2023
f8b1302
fix: Update
GoldenSheep402 Nov 6, 2023
a3136e6
Merge branch 'feat/encrypt' of github.com:juanjiTech/jTerm-proto into…
GoldenSheep402 Nov 6, 2023
b32263c
update: automatic generate new proto
GoldenSheep402 Nov 6, 2023
1dcb3a8
feat: GetUserKeyChain
GoldenSheep402 Nov 6, 2023
d0366ed
update: automatic generate new proto
GoldenSheep402 Nov 6, 2023
ff33f96
feat: UpdateUserKeyChain
GoldenSheep402 Nov 6, 2023
fe899b2
update: automatic generate new proto
GoldenSheep402 Nov 6, 2023
4713f8f
fix: proto of encrypt
GoldenSheep402 Nov 6, 2023
57cc65a
update: automatic generate new proto
GoldenSheep402 Nov 6, 2023
c04cebc
style: format
GoldenSheep402 Nov 6, 2023
6350878
Merge branch 'feat/encrypt' of github.com:juanjiTech/jTerm-proto into…
GoldenSheep402 Nov 6, 2023
d2970af
update: automatic generate new proto
GoldenSheep402 Nov 6, 2023
4cf43e2
fix: delete params
GoldenSheep402 Nov 6, 2023
35503ab
update: automatic generate new proto
GoldenSheep402 Nov 6, 2023
9d92aba
docs: comment
GoldenSheep402 Nov 6, 2023
3208547
update: automatic generate new proto
GoldenSheep402 Nov 6, 2023
0d55ede
fix: UpdateUserKeyChain
GoldenSheep402 Nov 6, 2023
e5d0a21
fix: GetUserKeyChain
GoldenSheep402 Nov 6, 2023
5415904
Merge branch 'feat/encrypt' of github.com:juanjiTech/jTerm-proto into…
GoldenSheep402 Nov 6, 2023
0114f3a
update: automatic generate new proto
GoldenSheep402 Nov 6, 2023
8e5794c
fix: UpdateGroup
GoldenSheep402 Nov 7, 2023
aa9165e
fix: proto order
GoldenSheep402 Nov 7, 2023
286d7e3
update: automatic generate new proto
GoldenSheep402 Nov 7, 2023
0ea045d
fix: UserKeyChain support incremental synchronization
GoldenSheep402 Nov 7, 2023
8706b1a
update: automatic generate new proto
GoldenSheep402 Nov 7, 2023
97be35d
fix: parms details
GoldenSheep402 Nov 7, 2023
22151d8
update: automatic generate new proto
GoldenSheep402 Nov 7, 2023
d39295b
fix: syncKeyChian with timestamp
GoldenSheep402 Nov 7, 2023
0ade793
update: automatic generate new proto
GoldenSheep402 Nov 7, 2023
ba93d18
fix: UpdateGroup with user's keychain
GoldenSheep402 Nov 8, 2023
cb67b18
fix: order of proto
GoldenSheep402 Nov 8, 2023
071bd6f
fix: name format of proto
GoldenSheep402 Nov 11, 2023
149bd95
fix: Separate key creation from group creation
GoldenSheep402 Nov 14, 2023
13c1708
chore: push gen file(workflow fail)
GoldenSheep402 Nov 14, 2023
84c2644
chore: Use camelCase naming instead
GoldenSheep402 Nov 15, 2023
8d9d0ad
fix: Invite process
GoldenSheep402 Nov 21, 2023
355bd3f
update: add team manage proto
asjdf Nov 22, 2023
857accf
feat: add invite process
asjdf Nov 22, 2023
c53358e
update: rename group to team
asjdf Nov 22, 2023
1357a32
update: remove email in user info
asjdf Nov 22, 2023
2a98726
update: reformat create team request
asjdf Nov 22, 2023
82a399c
update: move key wallet from sync to user
asjdf Nov 22, 2023
423e8fd
feat: improve invite service
asjdf Nov 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
300 changes: 264 additions & 36 deletions gen/openapi/sync/v1/sync_service.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
"application/json"
],
"paths": {
"/gapi/sync/v1/sync": {
"/gapi/sync/v1/sync_config": {
"get": {
"summary": "拉取指定时间点之后的配置变动信息",
"operationId": "SyncService_Sync",
"operationId": "SyncService_SyncConfig",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1SyncResponse"
"$ref": "#/definitions/v1SyncConfigResponse"
}
},
"default": {
Expand Down Expand Up @@ -87,15 +87,48 @@
]
}
},
"/gapi/sync/v1/update": {
"/gapi/sync/v1/sync_user_key_wallet": {
"get": {
"summary": "获取用户密钥对",
"operationId": "SyncService_SyncUserKeyWallet",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1SyncUserKeyWalletResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "after",
"description": "获取该时间之后的设置变化,若不设置该字段,则拉取全量配置信息",
"in": "query",
"required": false,
"type": "string",
"format": "date-time"
}
],
"tags": [
"SyncService"
]
}
},
"/gapi/sync/v1/update_config": {
"post": {
"summary": "提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。",
"operationId": "SyncService_Update",
"summary": "提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。这里只负责配置内容修改。",
"operationId": "SyncService_UpdateConfig",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1UpdateResponse"
"$ref": "#/definitions/v1UpdateConfigResponse"
}
},
"default": {
Expand All @@ -111,7 +144,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1UpdateRequest"
"$ref": "#/definitions/v1UpdateConfigRequest"
}
}
],
Expand All @@ -122,7 +155,7 @@
},
"/gapi/sync/v1/update_group": {
"post": {
"summary": "更新组信息",
"summary": "更新组信息,如果服务端密钥为空不允许修改,请先去创建密钥链。",
"operationId": "SyncService_UpdateGroup",
"responses": {
"200": {
Expand Down Expand Up @@ -152,6 +185,72 @@
"SyncService"
]
}
},
"/gapi/sync/v1/update_group_key_chain": {
"post": {
"summary": "组的所有者修改组的密钥链",
"operationId": "SyncService_UpdateGroupKeyChain",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1UpdateGroupKeyChainResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1UpdateGroupKeyChainRequest"
}
}
],
"tags": [
"SyncService"
]
}
},
"/gapi/sync/v1/update_user_key_wallet": {
"post": {
"summary": "修改用户密钥对,修改的时候所有相关组的加密密钥均要替换",
"operationId": "SyncService_UpdateUserKeyWallet",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1UpdateUserKeyWalletResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1UpdateUserKeyWalletRequest"
}
}
],
"tags": [
"SyncService"
]
}
}
},
"definitions": {
Expand Down Expand Up @@ -189,10 +288,11 @@
"groupBasic": {
"$ref": "#/definitions/v1GroupBasic"
},
"memberId": {
"groupKeychain": {
"type": "array",
"items": {
"type": "string"
"type": "object",
"$ref": "#/definitions/v1GroupKeyChain"
}
}
}
Expand Down Expand Up @@ -227,6 +327,21 @@
"uid": {
"type": "string",
"title": "创建者"
},
"publicKey": {
"type": "string",
"title": "公钥,公钥存在服务器上,加密的私钥与相关用户关联存储"
}
}
},
"v1GroupKeyChain": {
"type": "object",
"properties": {
"memberId": {
"type": "string"
},
"privateKey": {
"type": "string"
}
}
},
Expand Down Expand Up @@ -404,23 +519,7 @@
},
"title": "SSH 密钥"
},
"v1SyncGroupResponse": {
"type": "object",
"properties": {
"serverTime": {
"type": "string",
"format": "date-time"
},
"groups": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1Group"
}
}
}
},
"v1SyncResponse": {
"v1SyncConfigResponse": {
"type": "object",
"properties": {
"serverTime": {
Expand Down Expand Up @@ -458,18 +557,46 @@
}
}
},
"v1UpdateGroupRequest": {
"v1SyncGroupResponse": {
"type": "object",
"properties": {
"group": {
"$ref": "#/definitions/v1Group"
"serverTime": {
"type": "string",
"format": "date-time"
},
"groups": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1Group"
}
}
}
},
"v1UpdateGroupResponse": {
"type": "object"
"v1SyncUserKeyWalletResponse": {
"type": "object",
"properties": {
"serverTime": {
"type": "string",
"format": "date-time",
"title": "当前服务器时间,用于给客户端下一次拉取变动时做一个参照,避免因客户端时间偏差导致同步混乱"
},
"publicKey": {
"type": "string"
},
"encryptedPrivateKey": {
"type": "string"
},
"userKeyWalletSet": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1UserKeyWallet"
}
}
}
},
"v1UpdateRequest": {
"v1UpdateConfigRequest": {
"type": "object",
"properties": {
"groupId": {
Expand All @@ -487,9 +614,10 @@
"identity": {
"$ref": "#/definitions/v1Identity"
}
}
},
"title": "UpdateConfig"
},
"v1UpdateResponse": {
"v1UpdateConfigResponse": {
"type": "object",
"properties": {
"host": {
Expand All @@ -505,6 +633,106 @@
"$ref": "#/definitions/v1Identity"
}
}
},
"v1UpdateGroupKeyChainRequest": {
"type": "object",
"properties": {
"groupId": {
"type": "string"
},
"publicKey": {
"type": "string"
},
"encryptedGroupPrivateKey": {
"type": "string"
},
"userKeyWallet": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1UserKeyWallet"
}
}
},
"title": "UpdateGroupKeyChain"
},
"v1UpdateGroupKeyChainResponse": {
"type": "object"
},
"v1UpdateGroupRequest": {
"type": "object",
"properties": {
"group": {
"$ref": "#/definitions/v1Group"
}
},
"title": "UpdateGroup"
},
"v1UpdateGroupResponse": {
"type": "object"
},
"v1UpdateUserKeyWalletRequest": {
"type": "object",
"properties": {
"publicKey": {
"type": "string"
},
"encryptedPrivateKey": {
"type": "string"
},
"userKeyWalletSet": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1UserKeyWallet"
}
}
},
"title": "UpdateUserKeyWallet"
},
"v1UpdateUserKeyWalletResponse": {
"type": "object",
"properties": {
"publicKey": {
"type": "string"
},
"encryptedPrivateKey": {
"type": "string"
},
"userKeyWalletSet": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1UserKeyWallet"
}
}
}
},
"v1UserKeyWallet": {
"type": "object",
"properties": {
"uid": {
"type": "string"
},
"gid": {
"type": "string"
},
"encryptedGroupPrivateKey": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"deletedAt": {
"type": "string",
"format": "date-time"
}
}
}
}
}
Loading
Loading