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

fix(txn): validate verbs #21519

Merged
merged 2 commits into from
Jul 5, 2024
Merged

Conversation

DanStough
Copy link
Contributor

Description

There are two entry points into the state store:

  1. Through RPCs
  2. Indirectly, through Raft FSM Applies

In the latter case, errors are not acknowledged because the log must be processed by Consul. It is possible in this case that if a future version of Consul is using syntax, such as Txn API Verbs, that the current version does not understand, it will fail to apply successfully, causing a divergence with other servers.

This PR makes two types of changes:

  1. Panics are introduced for unknown verb types to prevent state store divergence
  2. Validation at the endpoint layer to make sure there is feedback to user for invalid verbs and this cannot be used for a DOS attack.

@DanStough DanStough added the backport/1.19 This release series is longer active on CE, use backport/ent/1.19 label Jul 5, 2024
@DanStough DanStough requested a review from rboyer July 5, 2024 15:46
@DanStough DanStough requested a review from a team as a code owner July 5, 2024 15:46
Copy link
Collaborator

@dhiaayachi dhiaayachi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@DanStough DanStough merged commit 763cd0b into main Jul 5, 2024
82 checks passed
@DanStough DanStough deleted the dans/NET-9159/panic-on-fsm-error-two branch July 5, 2024 18:51
jmurret pushed a commit that referenced this pull request Jul 8, 2024
* fix(txn): validate verbs

* changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.19 This release series is longer active on CE, use backport/ent/1.19
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants