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

feat(hmac) Implement request body validation #2613

Merged
merged 1 commit into from
Jun 9, 2017
Merged

Conversation

shashiranjan84
Copy link
Contributor

@shashiranjan84 shashiranjan84 commented Jun 8, 2017

Summary

This PR adds additional request body validation along with existing
headers validation. The motivation behind request body validation
is to detect body tampering. But as the validation process requires
to read the whole body in memory, which can affect Kong's
performance, this feature is disabled by default. User can change
the default behavior using config validate-request-body.

if config validate-request-body is set to true, validate request
body along with headers validation. If it is false, perform only
headers validation.

Full changelog

  • Added new config validate-request-body to schema.
  • Logic added to validate digest header value.
  • Added tests test digest validation logic.

Note: This PR is based of #2419 with some code refactoring.

Validate the body digest sent in the Digest request header
if the validate_request_body plugin config flag is set to true.
Currently only SHA-256 digest is supported.
@p0pr0ck5 p0pr0ck5 force-pushed the feat/hmac-body-validate branch from 55e8f64 to 689ba02 Compare June 9, 2017 18:59
Copy link
Contributor

@p0pr0ck5 p0pr0ck5 left a comment

Choose a reason for hiding this comment

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

Merging with some very minor changes. Thanks @shashiranjan84 and @vaibhavatul47!

@p0pr0ck5 p0pr0ck5 merged commit 8561906 into next Jun 9, 2017
@p0pr0ck5 p0pr0ck5 deleted the feat/hmac-body-validate branch June 9, 2017 19:37
bungle added a commit that referenced this pull request Nov 5, 2021
### Summary

This is the final release of PCRE1. A few minor tidies are included.

1. CMakeLists.txt has two user-supplied patches applied, one to allow for the
setting of MODULE_PATH, and the other to support the generation of pcre-config
file and libpcre*.pc files.
2. There was a memory leak if a compile error occurred when there were more
than 20 named groups (Bugzilla #2613).
3. Fixed some typos in code and documentation.
4. Fixed a small (*MARK) bug in the interpreter (Bugzilla #2771).
bungle added a commit that referenced this pull request Nov 5, 2021
### Summary

This is the final release of PCRE1. A few minor tidies are included.

1. CMakeLists.txt has two user-supplied patches applied, one to allow for the
setting of MODULE_PATH, and the other to support the generation of pcre-config
file and libpcre*.pc files.
2. There was a memory leak if a compile error occurred when there were more
than 20 named groups (Bugzilla #2613).
3. Fixed some typos in code and documentation.
4. Fixed a small (*MARK) bug in the interpreter (Bugzilla #2771).
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