-
Notifications
You must be signed in to change notification settings - Fork 92
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: replay attack prevention using watermarks #854
Conversation
…inity/agent-js into kai/SDK-1332-prevent-outdated-queries
size-limit report 📦
|
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.
Thanks so much Kyle! Please announce the release with this fix on Taggr, I'll give a ⭐️! 😅
value: jest.fn(), | ||
Object.defineProperty(global, 'console', { | ||
writable: true, | ||
value: { ...global.console, log: jest.fn(), warn: jest.fn(), error: jest.fn() }, |
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.
does this mean that no logs will be printed during test execution?
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.
Yes, it's to clean up the console by default when running the tests. However, the logs aren't lost and you can access them as needed
Description
Several reports have been received about an issue affecting how immediately a response from an update call can be used. One example is the following scenario:
an update call is made to create a new resource (e.g. a social media post)
the application navigates to a page that displays the resource (e.g. the post itself)
the application requests the resource by executing a query call and using the resource id
the query hits a replica whos state has not yet been updated
a 404 is returned
the problem is, the resource does exist, it just so happens that 1/3 of replicas may not necessarily be up to date at the same moment the other 2/3’s are
Fixes # SDK-1332
How Has This Been Tested?
New unit and end to end tests, introducing a replay attack test in
e2e/node/basic/watermark.test.ts
Checklist: