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

[v15] dynamoevents: ensure cursor belongs to [fromUTC,toUTC] #42915

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

tigrato
Copy link
Contributor

@tigrato tigrato commented Jun 13, 2024

Backport #42865 to branch/v15

changelog: Fixes errors caused by dynamoevents query StartKey not being within the [From, To] window.

This PR ensures that the cursor if the cursor doesn't belong to
[fromUTC,toUTC], the request is adapted before sending it to DynamoDB.

When the cursor falls outside of the window either because `t<fromUTC`
or `t>toUTC`, we must avoid calling DynamoDB because the query will fail
with `The provided starting key does not match the range key predicate`.

To prevent errors, this PR clears the cursor if `t<fromUTC` and returns
empty if `t>toUTC`.

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
@github-actions github-actions bot added audit-log Issues related to Teleports Audit Log backport size/sm labels Jun 13, 2024
@tigrato tigrato added this pull request to the merge queue Jun 13, 2024
Merged via the queue into branch/v15 with commit 6ba08a9 Jun 13, 2024
32 checks passed
@tigrato tigrato deleted the bot/backport-42865-branch/v15 branch June 13, 2024 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audit-log Issues related to Teleports Audit Log backport size/sm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants