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

[Shamir port] Implement greeting procedure #8995

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ac6252f
First implementation of shamir greeting procedure
vxgmichel Nov 25, 2024
d7cdbf2
Add invite_shamir_recovery_reveal command
vxgmichel Nov 28, 2024
dac9f38
Implement ShamirRecoveryClaimRecoverDeviceCtx::recover_device
vxgmichel Nov 28, 2024
d3e4570
Complete the shamir recovery invitation after the local device has be…
vxgmichel Nov 29, 2024
2c86fb4
Fix PreventSyncPattern after rebase
vxgmichel Dec 2, 2024
23a21d5
Use NonZeroU8 in shamir rfc
vxgmichel Dec 5, 2024
848a41d
Rename UserOrDeviceClaimInitialCtx to AnyClaimRetrievedInfoCtx
vxgmichel Dec 5, 2024
8cedd56
Specialize errors in shamir_recovery_list module
vxgmichel Dec 5, 2024
ddf2dee
Add proper error handling to get_shamir_recovery_share_data
vxgmichel Dec 5, 2024
f2078b4
Add dedicated errors for ShamirRecoveryClaim specific contexts
vxgmichel Dec 6, 2024
3df5362
Log errors if the shamir recovery invitation deletion fails after the…
vxgmichel Dec 6, 2024
7511eb9
Add revoked_on field to ShamirRecoveryRecipient
vxgmichel Dec 6, 2024
98f2771
Improve test_invited_invite_info_ok_with_shamir
vxgmichel Dec 9, 2024
f0f8e90
Add revoked recipient to shamir client test
vxgmichel Dec 9, 2024
2a5863a
Fix connection error handling for invited cmds
vxgmichel Dec 10, 2024
88bbdc4
Add more shamir greeting tests
vxgmichel Dec 10, 2024
ead1b8e
Address @touilleMan's comments about invite_shamir_recovery_reveal
vxgmichel Dec 11, 2024
45277c8
Add utils module for invite unit testing
vxgmichel Dec 11, 2024
de7e767
Bump testbed server
vxgmichel Nov 29, 2024
eda2bff
Do not expose shamir_recovery_get_share_data
vxgmichel Dec 11, 2024
44b6f2e
Address @touilleMan's comments about claimer module
vxgmichel Dec 11, 2024
f6aac97
Address @touilleMan's comments about get_shamir_recovery_share_data i…
vxgmichel Dec 11, 2024
eca6cfd
Rename AlreadyUsed to AlreadyUsedOrDeleted
vxgmichel Dec 11, 2024
618a657
Add more tests to shamir recovery invite
vxgmichel Dec 11, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/ci-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
TESTBED_SERVER: http://localhost:6777
services:
parsec-testbed-server:
image: ghcr.io/scille/parsec-cloud/parsec-testbed-server:3.2.1-a.0.dev.20053.312b36d
image: ghcr.io/scille/parsec-cloud/parsec-testbed-server:3.2.1-a.0.dev.20068.56e035b
ports:
- 6777:6777
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
# https://github.com/Scille/parsec-cloud/pkgs/container/parsec-cloud%2Fparsec-testbed-server
services:
parsec-testbed-server:
image: ghcr.io/scille/parsec-cloud/parsec-testbed-server:3.2.1-a.0.dev.20053.312b36d
image: ghcr.io/scille/parsec-cloud/parsec-testbed-server:3.2.1-a.0.dev.20068.56e035b
ports:
- 6777:6777
steps:
Expand Down
57 changes: 31 additions & 26 deletions bindings/electron/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,25 @@ export type ActiveUsersLimit =
| ActiveUsersLimitNoLimit


// AnyClaimRetrievedInfo
export interface AnyClaimRetrievedInfoDevice {
tag: "Device"
handle: number
greeter_user_id: string
greeter_human_handle: HumanHandle
}
export interface AnyClaimRetrievedInfoUser {
tag: "User"
handle: number
claimer_email: string
greeter_user_id: string
greeter_human_handle: HumanHandle
}
export type AnyClaimRetrievedInfo =
| AnyClaimRetrievedInfoDevice
| AnyClaimRetrievedInfoUser


// ArchiveDeviceError
export interface ArchiveDeviceErrorInternal {
tag: "Internal"
Expand Down Expand Up @@ -398,8 +417,8 @@ export interface ClaimInProgressErrorActiveUsersLimitReached {
tag: "ActiveUsersLimitReached"
error: string
}
export interface ClaimInProgressErrorAlreadyUsed {
tag: "AlreadyUsed"
export interface ClaimInProgressErrorAlreadyUsedOrDeleted {
tag: "AlreadyUsedOrDeleted"
error: string
}
export interface ClaimInProgressErrorCancelled {
Expand Down Expand Up @@ -443,7 +462,7 @@ export interface ClaimInProgressErrorPeerReset {
}
export type ClaimInProgressError =
| ClaimInProgressErrorActiveUsersLimitReached
| ClaimInProgressErrorAlreadyUsed
| ClaimInProgressErrorAlreadyUsedOrDeleted
| ClaimInProgressErrorCancelled
| ClaimInProgressErrorCorruptedConfirmation
| ClaimInProgressErrorGreeterNotAllowed
Expand All @@ -465,8 +484,8 @@ export type ClaimerGreeterAbortOperationError =


// ClaimerRetrieveInfoError
export interface ClaimerRetrieveInfoErrorAlreadyUsed {
tag: "AlreadyUsed"
export interface ClaimerRetrieveInfoErrorAlreadyUsedOrDeleted {
tag: "AlreadyUsedOrDeleted"
error: string
}
export interface ClaimerRetrieveInfoErrorInternal {
Expand All @@ -481,11 +500,16 @@ export interface ClaimerRetrieveInfoErrorOffline {
tag: "Offline"
error: string
}
export interface ClaimerRetrieveInfoErrorOrganizationExpired {
tag: "OrganizationExpired"
error: string
}
export type ClaimerRetrieveInfoError =
| ClaimerRetrieveInfoErrorAlreadyUsed
| ClaimerRetrieveInfoErrorAlreadyUsedOrDeleted
| ClaimerRetrieveInfoErrorInternal
| ClaimerRetrieveInfoErrorNotFound
| ClaimerRetrieveInfoErrorOffline
| ClaimerRetrieveInfoErrorOrganizationExpired


// ClientAcceptTosError
Expand Down Expand Up @@ -1533,25 +1557,6 @@ export type TestbedError =
| TestbedErrorInternal


// UserOrDeviceClaimInitialInfo
export interface UserOrDeviceClaimInitialInfoDevice {
tag: "Device"
handle: number
greeter_user_id: string
greeter_human_handle: HumanHandle
}
export interface UserOrDeviceClaimInitialInfoUser {
tag: "User"
handle: number
claimer_email: string
greeter_user_id: string
greeter_human_handle: HumanHandle
}
export type UserOrDeviceClaimInitialInfo =
| UserOrDeviceClaimInitialInfoDevice
| UserOrDeviceClaimInitialInfoUser


// WaitForDeviceAvailableError
export interface WaitForDeviceAvailableErrorInternal {
tag: "Internal"
Expand Down Expand Up @@ -2612,7 +2617,7 @@ export function claimerRetrieveInfo(
config: ClientConfig,
on_event_callback: (handle: number, event: ClientEvent) => void,
addr: string
): Promise<Result<UserOrDeviceClaimInitialInfo, ClaimerRetrieveInfoError>>
): Promise<Result<AnyClaimRetrievedInfo, ClaimerRetrieveInfoError>>
export function claimerUserFinalizeSaveLocalDevice(
handle: number,
save_strategy: DeviceSaveStrategy
Expand Down
Loading
Loading