-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
Validate Checkpoint in ChangePack for PushPull API requests #805
Comments
I'm interested in this issue. may I try this? |
@binary-ho Sure. If you have any questions, feel free to ask. |
Hello, I have some questions while trying to resolve the issue.
1. Where do we obtain the server's ClientSeq and ServerSeq?To resolve this issue, I believe comparing the ClientSeq and ServerSeq included in the client request with the ClientSeq and ServerSeq stored by the server in the Document of the project would be appropriate. I think we can use the ClientSeq and ServerSeq of the
2. Where do we obtain the client's ClientSeq and ServerSeq?The
According to the issue description, "so Additionally, you mentioned " For the client's ServerSeq, should we use the ServerSeq in the Checkpoint of the ChangePack in the Msg? (Not the ServerSeq values of each Change.)
3. How do we determine if the ClientSeq is invalid?You mentioned " (I am likely confused because I don't know exactly where and how the ClientSeq is generated.)
4. How do we determine if a request is a duplicate?In the case where
5. How do we determine if the ServerSeq is invalid?If
|
Description:
When the Client calls the
PushPull API
and sends the requestChangePack
,Checkpoint
in the request may be tampered with due to various reasons such as network delays causing duplicate requests, new SDK bugs, or intentional tampering by malicious clients.Therefore, it is beneficial for the stability and security of the system to validate
Checkpoint
.Consider the following validation checks:
Change
s in the requestChangePack
passed toPushPull API
are created by a single Client, soChange.ID.Checkpoint.ClientSeq
should increment sequentially by one.Checkpoint.ServerSeq
in the requestChangePack
forPushPull API
cannot be greater than the server'sCheckpoint.ServerSeq
since it is set when the server saves the Change to the database.If the Checkpoint is invalid, consider the following exception handling:
OK
INVALID_ARGUMENT
Why:
This validation will help ensure the integrity and security of the system.
The text was updated successfully, but these errors were encountered: