-
Notifications
You must be signed in to change notification settings - Fork 589
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
systemClockOffset not applied to events sent over websocket connection #6217
Comments
related #5015 |
Due to the inability to read the date header in the upgrade response (#6221), to make use of the fix in #6227, the systemClockOffset must be supplied to the RekognitionStreaming client at initialization. Example: import { Rekognition } from '@aws-sdk/client-rekognition';
import { RekognitionStreaming } from '@aws-sdk/client-rekognitionstreaming';
const rekognition = new Rekognition({ ... });
// 1. make a request first, so that the client automatically corrects
// its config.systemClockOffset value if needed.
await rekognition.createFaceLivenessSession({ ... });
// 2. pass that value to the streaming client.
const rekognitionStreaming = new RekognitionStreaming({
systemClockOffset: rekognition.config.systemClockOffset
}); |
@kuhe thanks for the recommendation but I believe that solution will not work for most rekognition consumers as it is recommended that the I'm guessing in the example you posted above after calling the |
This was released in https://github.com/aws/aws-sdk-js-v3/releases/tag/v3.605.0.
They need to know their system clock offset. We've established that the upgrade response headers are not an option.
Yes. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Checkboxes for prior research
Describe the bug
Manually setting the
systemClockOffset
allows me to successfully establish a websocket connection, but anInvalidSignatureException
is returned once events are sent over the connection.SDK version number
@aws-sdk/[email protected]
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
Chrome 126
Reproduction Steps
Reproduction branch: https://github.com/esauerbo/rekognition-sdk-repro/tree/clockSkew
clockSkew
branchnpm install
.env
npm run dev
start-face-liveness-session
network request. Observe that connection is established successfully but after client sends event, server sends InvalidSignatureExceptionObserved Behavior
Received error for invalid signature exception
Expected Behavior
systemClockOffset
should be applied to events sent over websocket connection.Possible Solution
This may be relevant, offset doesn't seem to be getting applied.
aws-sdk-js-v3/packages/middleware-websocket/src/get-event-signing-stream.ts
Line 33 in f922dc1
Additional Information/Context
No response
The text was updated successfully, but these errors were encountered: