From e35e1e86681554098b0634a3bfc3d1e77afb9520 Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Fri, 20 Oct 2023 19:11:27 +0200 Subject: [PATCH] Update coordinator client, tests and new error --- .../coordinatorclient/coordinatorclient.go | 77 ++++++-- .../coordinatorproto/coordinator.pb.go | 182 +++++++++--------- coordinator/coordinatorproto/deleteconfirm.go | 55 +++++- .../coordinatorproto/deleteconfirm_test.go | 11 +- .../coordinatorproto/protos/coordinator.proto | 1 + 5 files changed, 214 insertions(+), 112 deletions(-) diff --git a/coordinator/coordinatorclient/coordinatorclient.go b/coordinator/coordinatorclient/coordinatorclient.go index 18d79606..37053d1e 100644 --- a/coordinator/coordinatorclient/coordinatorclient.go +++ b/coordinator/coordinatorclient/coordinatorclient.go @@ -4,14 +4,17 @@ package coordinatorclient import ( "context" "errors" + + "storj.io/drpc" + "github.com/anyproto/any-sync/app" "github.com/anyproto/any-sync/coordinator/coordinatorproto" "github.com/anyproto/any-sync/net/peer" "github.com/anyproto/any-sync/net/pool" "github.com/anyproto/any-sync/net/rpc/rpcerr" "github.com/anyproto/any-sync/nodeconf" + "github.com/anyproto/any-sync/util/cidutil" "github.com/anyproto/any-sync/util/crypto" - "storj.io/drpc" ) const CName = "common.coordinator.coordinatorclient" @@ -26,7 +29,9 @@ func New() CoordinatorClient { } type CoordinatorClient interface { - ChangeStatus(ctx context.Context, spaceId string, conf *coordinatorproto.DeletionConfirmPayloadWithSignature) (status *coordinatorproto.SpaceStatusPayload, err error) + SpaceDelete(ctx context.Context, spaceId string, conf *coordinatorproto.DeletionConfirmPayloadWithSignature) (err error) + AccountDelete(ctx context.Context, conf *coordinatorproto.AccountDeletionConfirmPayload) (timestamp int64, err error) + AccountRevertDeletion(ctx context.Context) (err error) StatusCheckMany(ctx context.Context, spaceIds []string) (statuses []*coordinatorproto.SpaceStatusPayload, err error) StatusCheck(ctx context.Context, spaceId string) (status *coordinatorproto.SpaceStatusPayload, err error) SpaceSign(ctx context.Context, payload SpaceSignPayload) (receipt *coordinatorproto.SpaceReceiptWithSignature, err error) @@ -59,34 +64,64 @@ func (c *coordinatorClient) Name() (name string) { return CName } -func (c *coordinatorClient) ChangeStatus(ctx context.Context, spaceId string, conf *coordinatorproto.DeletionConfirmPayloadWithSignature) (status *coordinatorproto.SpaceStatusPayload, err error) { - var req *coordinatorproto.SpaceStatusChangeRequest - if conf != nil { - confMarshalled, err := conf.Marshal() - if err != nil { - return nil, err - } - req = &coordinatorproto.SpaceStatusChangeRequest{ - SpaceId: spaceId, - DeletionPayload: confMarshalled, - DeletionPayloadType: coordinatorproto.DeletionPayloadType_Confirm, - } - } else { - req = &coordinatorproto.SpaceStatusChangeRequest{ - SpaceId: spaceId, - } +func (c *coordinatorClient) SpaceDelete(ctx context.Context, spaceId string, conf *coordinatorproto.DeletionConfirmPayloadWithSignature) (err error) { + confMarshalled, err := conf.Marshal() + if err != nil { + return err } - err = c.doClient(ctx, func(cl coordinatorproto.DRPCCoordinatorClient) error { - resp, err := cl.SpaceStatusChange(ctx, req) + id, err := cidutil.NewCidFromBytes(confMarshalled) + if err != nil { + return err + } + req := &coordinatorproto.SpaceDeleteRequest{ + SpaceId: spaceId, + DeletionPayload: confMarshalled, + DeletionPayloadId: id, + } + return c.doClient(ctx, func(cl coordinatorproto.DRPCCoordinatorClient) error { + _, err := cl.SpaceDelete(ctx, req) if err != nil { return rpcerr.Unwrap(err) } - status = resp.Payload + return nil + }) +} + +func (c *coordinatorClient) AccountDelete(ctx context.Context, conf *coordinatorproto.AccountDeletionConfirmPayload) (timestamp int64, err error) { + confMarshalled, err := conf.Marshal() + if err != nil { + return + } + id, err := cidutil.NewCidFromBytes(confMarshalled) + if err != nil { + return + } + req := &coordinatorproto.AccountDeleteRequest{ + DeletionPayload: confMarshalled, + DeletionPayloadId: id, + } + err = c.doClient(ctx, func(cl coordinatorproto.DRPCCoordinatorClient) error { + resp, err := cl.AccountDelete(ctx, req) + if err != nil { + return rpcerr.Unwrap(err) + } + timestamp = resp.ToBeDeletedTimestamp return nil }) return } +func (c *coordinatorClient) AccountRevertDeletion(ctx context.Context) (err error) { + req := &coordinatorproto.AccountRevertDeletionRequest{} + return c.doClient(ctx, func(cl coordinatorproto.DRPCCoordinatorClient) error { + _, err := cl.AccountRevertDeletion(ctx, req) + if err != nil { + return rpcerr.Unwrap(err) + } + return nil + }) +} + func (c *coordinatorClient) DeletionLog(ctx context.Context, lastRecordId string, limit int) (records []*coordinatorproto.DeletionLogRecord, err error) { err = c.doClient(ctx, func(cl coordinatorproto.DRPCCoordinatorClient) error { resp, err := cl.DeletionLog(ctx, &coordinatorproto.DeletionLogRequest{ diff --git a/coordinator/coordinatorproto/coordinator.pb.go b/coordinator/coordinatorproto/coordinator.pb.go index b63ddcbc..29da2177 100644 --- a/coordinator/coordinatorproto/coordinator.pb.go +++ b/coordinator/coordinatorproto/coordinator.pb.go @@ -31,6 +31,7 @@ const ( ErrorCodes_SpaceCreated ErrorCodes = 3 ErrorCodes_SpaceNotExists ErrorCodes = 4 ErrorCodes_SpaceLimitReached ErrorCodes = 5 + ErrorCodes_AccountDeleted ErrorCodes = 6 ErrorCodes_ErrorOffset ErrorCodes = 300 ) @@ -41,6 +42,7 @@ var ErrorCodes_name = map[int32]string{ 3: "SpaceCreated", 4: "SpaceNotExists", 5: "SpaceLimitReached", + 6: "AccountDeleted", 300: "ErrorOffset", } @@ -51,6 +53,7 @@ var ErrorCodes_value = map[string]int32{ "SpaceCreated": 3, "SpaceNotExists": 4, "SpaceLimitReached": 5, + "AccountDeleted": 6, "ErrorOffset": 300, } @@ -1803,95 +1806,96 @@ func init() { } var fileDescriptor_d94f6f99586adae2 = []byte{ - // 1401 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcb, 0x6f, 0x13, 0x47, - 0x18, 0xf7, 0xac, 0x9d, 0x87, 0x3f, 0x07, 0xb3, 0x99, 0x3c, 0x70, 0x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xd6, 0x16, 0xdf, 0x0f, 0x77, 0x8d, 0xde, 0x75, 0x77, 0xb8, 0x91, 0x1b, - 0x7d, 0x4c, 0x87, 0xa9, 0x30, 0xf6, 0x84, 0x1a, 0xa6, 0xc4, 0x87, 0xa5, 0x8c, 0x14, 0x55, 0x86, - 0x5f, 0xc8, 0xa7, 0x34, 0x64, 0xc9, 0x6c, 0x69, 0x17, 0x36, 0xa1, 0x64, 0x11, 0x64, 0x8e, 0x26, - 0x17, 0x06, 0xec, 0xb9, 0xd1, 0x83, 0x50, 0x45, 0x79, 0xde, 0xd1, 0x47, 0xf2, 0x33, 0x82, 0xc5, - 0x31, 0x46, 0x5c, 0x07, 0xcb, 0xd7, 0xb6, 0x5a, 0xbe, 0x37, 0xf9, 0x9d, 0xc0, 0x5f, 0x26, 0x3b, - 0x45, 0x59, 0xce, 0x85, 0xf3, 0xd3, 0x4d, 0xca, 0xed, 0x17, 0x99, 0x60, 0x56, 0xf2, 0xc1, 0xfc, - 0x03, 0xa9, 0x35, 0x46, 0x8a, 0x79, 0x8f, 0x93, 0xb0, 0x0b, 0xb6, 0x86, 0x6e, 0xab, 0x5e, 0x57, - 0xd6, 0x8e, 0xe1, 0x64, 0x03, 0x96, 0x32, 0x36, 0xab, 0xdc, 0xf5, 0x60, 0x99, 0x87, 0xb7, 0x14, - 0xea, 0xa5, 0xcb, 0x14, 0x92, 0x62, 0x0a, 0xef, 0x48, 0x00, 0xcb, 0x37, 0xe3, 0xda, 0xcc, 0x06, - 0xa0, 0xd0, 0x4d, 0xf4, 0x3f, 0xdc, 0xb4, 0x0a, 0xdd, 0x24, 0xbf, 0x20, 0x38, 0x63, 0x2a, 0x1c, - 0x6f, 0xbb, 0x49, 0x33, 0xa6, 0xa0, 0xb9, 0xac, 0x63, 0x34, 0x57, 0x79, 0x6a, 0x73, 0x8d, 0xd5, - 0xc3, 0x3d, 0x58, 0xc9, 0xc5, 0xe3, 0x1d, 0x82, 0xdb, 0x86, 0x96, 0x12, 0xe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0x5c, 0xb0, 0x35, 0x67, 0xde, 0x8f, 0x9c, - 0xc4, 0xa2, 0xd7, 0xea, 0x09, 0x9c, 0xc8, 0x4c, 0x5a, 0xfc, 0x61, 0x86, 0xa5, 0xe8, 0x55, 0x6a, - 0x92, 0x69, 0x24, 0x4a, 0x6e, 0x90, 0x4c, 0xf0, 0xec, 0x50, 0xc5, 0x17, 0x8b, 0x98, 0x0b, 0x07, - 0x73, 0xb3, 0x7b, 0x1c, 0xd2, 0x58, 0xdf, 0xad, 0xcf, 0xff, 0x79, 0xd3, 0x46, 0xaf, 0xde, 0xb4, - 0xd1, 0xeb, 0x37, 0x6d, 0xf4, 0xe3, 0xdb, 0x76, 0xe9, 0xd5, 0xdb, 0x76, 0xe9, 0xdf, 0xb7, 0xed, - 0xd2, 0xb7, 0xad, 0x69, 0xff, 0x26, 0x7a, 0x36, 0x2b, 0x7f, 0x5d, 0xfd, 0x2f, 0x00, 0x00, 0xff, - 0xff, 0x8c, 0xaa, 0x0e, 0xe9, 0x4d, 0x12, 0x00, 0x00, + // 1411 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcd, 0x6f, 0x13, 0x47, + 0x14, 0xf7, 0xac, 0x9d, 0x0f, 0x3f, 0x07, 0xb3, 0x99, 0x7c, 0xe0, 0x1a, 0x63, 0xd2, 0x81, 0x52, + 0xe3, 0x56, 0x80, 0x8c, 0x5a, 0x15, 0xd1, 0x03, 0x10, 0xa8, 0x14, 0x3e, 0x42, 0xb4, 0x10, 0xaa, + 0x96, 0x43, 0xb5, 0x78, 0x27, 0xc9, 0x2a, 0xce, 0xae, 0x3b, 0x3b, 0x06, 0x72, 0xe8, 0xff, 0xd0, + 0x6b, 0x0f, 0xbd, 0x57, 0x6a, 0x0f, 0x55, 0xaf, 0x95, 0xda, 0x6b, 0x8f, 0x1c, 0x7b, 0x44, 0xf0, + 0x8f, 0x54, 0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0x88, 0xc6, 0xe7, + 0xdd, 0xfa, 0xfc, 0x9f, 0x37, 0x6d, 0xf4, 0xea, 0x4d, 0x1b, 0xbd, 0x7e, 0xd3, 0x46, 0x3f, 0xbe, + 0x6d, 0x97, 0x5e, 0xbd, 0x6d, 0x97, 0xfe, 0x7d, 0xdb, 0x2e, 0x7d, 0xdb, 0x9a, 0xf6, 0xaf, 0xa3, + 0x67, 0xb3, 0xf2, 0xd7, 0xd5, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xcb, 0xe3, 0xb8, 0x77, 0x61, + 0x12, 0x00, 0x00, } func (m *SpaceSignRequest) Marshal() (dAtA []byte, err error) { diff --git a/coordinator/coordinatorproto/deleteconfirm.go b/coordinator/coordinatorproto/deleteconfirm.go index d31c7e01..58d3fb7a 100644 --- a/coordinator/coordinatorproto/deleteconfirm.go +++ b/coordinator/coordinatorproto/deleteconfirm.go @@ -2,8 +2,9 @@ package coordinatorproto import ( "bytes" - "github.com/anyproto/any-sync/util/crypto" "time" + + "github.com/anyproto/any-sync/util/crypto" ) func PrepareDeleteConfirmation(privKey crypto.PrivKey, spaceId, peerId, networkId string) (signed *DeletionConfirmPayloadWithSignature, err error) { @@ -33,6 +34,58 @@ func PrepareDeleteConfirmation(privKey crypto.PrivKey, spaceId, peerId, networkI return } +func PrepareAccountDeleteConfirmation(privKey crypto.PrivKey, peerId, networkId string) (signed *DeletionConfirmPayloadWithSignature, err error) { + marshalledIdentity, err := privKey.GetPublic().Marshall() + if err != nil { + return + } + deleteConfirm := &AccountDeletionConfirmPayload{ + PeerId: peerId, + AccountIdentity: marshalledIdentity, + NetworkId: networkId, + Timestamp: time.Now().Unix(), + } + marshalledDeleteConfirm, err := deleteConfirm.Marshal() + if err != nil { + return + } + signature, err := privKey.Sign(marshalledDeleteConfirm) + if err != nil { + return + } + signed = &DeletionConfirmPayloadWithSignature{ + DeletionPayload: marshalledDeleteConfirm, + Signature: signature, + } + return +} + +func ValidateAccountDeleteConfirmation(pubKey crypto.PubKey, spaceId, networkId string, deleteConfirm *DeletionConfirmPayloadWithSignature) (err error) { + res, err := pubKey.Verify(deleteConfirm.GetDeletionPayload(), deleteConfirm.GetSignature()) + if err != nil { + return + } + if !res { + return errSignatureIncorrect + } + payload := &AccountDeletionConfirmPayload{} + err = payload.Unmarshal(deleteConfirm.GetDeletionPayload()) + if err != nil { + return + } + if payload.NetworkId != networkId { + return errNetworkIsIncorrect + } + accountRaw, err := crypto.UnmarshalEd25519PublicKeyProto(payload.AccountIdentity) + if err != nil { + return + } + if !bytes.Equal(pubKey.Storage(), accountRaw.Storage()) { + return errAccountIncorrect + } + return +} + func ValidateDeleteConfirmation(pubKey crypto.PubKey, spaceId, networkId string, deleteConfirm *DeletionConfirmPayloadWithSignature) (err error) { res, err := pubKey.Verify(deleteConfirm.GetDeletionPayload(), deleteConfirm.GetSignature()) if err != nil { diff --git a/coordinator/coordinatorproto/deleteconfirm_test.go b/coordinator/coordinatorproto/deleteconfirm_test.go index 8a24e770..db812f42 100644 --- a/coordinator/coordinatorproto/deleteconfirm_test.go +++ b/coordinator/coordinatorproto/deleteconfirm_test.go @@ -1,8 +1,9 @@ package coordinatorproto import ( - "github.com/stretchr/testify/require" "testing" + + "github.com/stretchr/testify/require" ) func TestValidateDeleteConfirmation(t *testing.T) { @@ -12,3 +13,11 @@ func TestValidateDeleteConfirmation(t *testing.T) { err = ValidateDeleteConfirmation(fx.accountKey, fx.spaceId, fx.networkKey.GetPublic().Network(), delConfirm) require.NoError(t, err) } + +func TestValidateAccountDeleteConfirmation(t *testing.T) { + fx := newFixture(t) + delConfirm, err := PrepareAccountDeleteConfirmation(fx.accountPrivKey, fx.peerId, fx.networkKey.GetPublic().Network()) + require.NoError(t, err) + err = ValidateAccountDeleteConfirmation(fx.accountKey, fx.spaceId, fx.networkKey.GetPublic().Network(), delConfirm) + require.NoError(t, err) +} diff --git a/coordinator/coordinatorproto/protos/coordinator.proto b/coordinator/coordinatorproto/protos/coordinator.proto index ce6d5c30..e54ee7e1 100644 --- a/coordinator/coordinatorproto/protos/coordinator.proto +++ b/coordinator/coordinatorproto/protos/coordinator.proto @@ -58,6 +58,7 @@ enum ErrorCodes { SpaceCreated = 3; SpaceNotExists = 4; SpaceLimitReached = 5; + AccountDeleted = 6; ErrorOffset = 300; }