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

[Functions] Add extra validations for offchain heartbeats #11783

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

bolekk
Copy link
Contributor

@bolekk bolekk commented Jan 16, 2024

  1. Add AllowedHeartbeatInitiators list to node's config and validate senders of incoming requests against it (same logic as in Gateway).
  2. Validate Sender value in nodes' responses to make sure it matches the expected node. Extend an integration test to cover this change.
  3. Validate age of incoming requests against RequestTimeoutSec from job config to avoid processing ones that already timed out.
  4. Disallow null-byte suffixes in message fields to avoid any potential confusion with default padding.

Copy link
Contributor

I see that you haven't updated any CHANGELOG files. Would it make sense to do so?

@bolekk bolekk marked this pull request as ready for review January 16, 2024 06:52
@bolekk bolekk requested a review from a team as a code owner January 16, 2024 06:52
@smartcontractkit smartcontractkit deleted a comment from KuphJr Jan 21, 2024
@smartcontractkit smartcontractkit deleted a comment from KuphJr Jan 21, 2024
1. Add AllowedHeartbeatInitiators list to node's config and validate senders of incoming requests against it (same logic as in Gateway).
2. Validate Sender value in nodes' reponses to make sure it matches the expected node. Extend an integration test to cover this change.
3. Validate age of incoming requests against RequestTimeoutSec from job config to avoid processing ones that already timed out.
4. Disallow null-byte suffixes in message fields to avoid any potential confusion with default padding.
@cl-sonarqube-production
Copy link

@bolekk
Copy link
Contributor Author

bolekk commented Jan 21, 2024

@KuphJr I added one more item here, sorry! Please re-review. I improved the PR description to make it clearer.

@bolekk bolekk added this pull request to the merge queue Jan 23, 2024
Merged via the queue into develop with commit 388e779 Jan 23, 2024
83 checks passed
@bolekk bolekk deleted the heartbeat_checks branch January 23, 2024 03:36
bolekk added a commit that referenced this pull request Jan 23, 2024
1. Add AllowedHeartbeatInitiators list to node's config and validate senders of incoming requests against it (same logic as in Gateway).
2. Validate Sender value in nodes' reponses to make sure it matches the expected node. Extend an integration test to cover this change.
3. Validate age of incoming requests against RequestTimeoutSec from job config to avoid processing ones that already timed out.
4. Disallow null-byte suffixes in message fields to avoid any potential confusion with default padding.

(cherry picked from commit 388e779)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants