You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "leno23 (via GitHub)" <gi...@apache.org> on 2026/05/20 08:44:15 UTC
[PR] docs: sign digest header in hmac-auth example [apisix]
leno23 opened a new pull request, #13396:
URL: https://github.com/apache/apisix/pull/13396
### Description
Update the `hmac-auth` body-validation example so the generated HMAC signature also covers the `Digest` header:
- compute the request body digest before building the signing string
- add `digest: ...` to the signing string
- include `digest` in `headers="@request-target date digest"`
- refresh the printed header, curl, and response examples
- add a short note explaining that `validate_request_body` validates the body against `Digest`, and signing `digest` binds that digest to the HMAC signature
Fixes #13395
### Checklist
- [x] I have explained the need for this PR and the problem it solves
- [x] I have explained the changes or the new features added to this PR
- [x] I have added tests corresponding to this change
- [ ] I have updated the documentation to reflect this change
- [ ] I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)
### Validation
- `git diff --check`
- extracted the documented Python snippet, fixed the timestamp to the sample output value, and verified it prints:
- `Digest: SHA-256=78qzJuLwSpZ8HacsTdFCQJWxzPMOf8bYctRk2ySLpS8=`
- `headers="@request-target date digest"`
- `signature="LGBTz7bVQQWlkijeyDpEwJWo+ppwX735uRZk5F8KhmU="`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs: sign digest header in hmac-auth example [apisix]
Posted by "wyf027 (via GitHub)" <gi...@apache.org>.
wyf027 closed pull request #13396: docs: sign digest header in hmac-auth example
URL: https://github.com/apache/apisix/pull/13396
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org