Repository navigation
feat(oracle): sign caller-supplied request body headers - #953
Merged
Merged
Conversation
Sign content-length, content-type, and x-content-sha256 for POST, PUT, and PATCH requests when the caller has added them. Reqsign does not read the body or compute the digest; the service documentation tells callers which headers to prepare. Object Storage PutObject and UploadPart PUT requests keep the bodyless contract when those headers are absent. Duplicate signed body headers are rejected without mutating the request.
Resolve services/oracle/README.md by keeping both the configuration profile and request body header sections.
PsiACE
approved these changes
Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #111. The Oracle signer only signed
date,(request-target), andhost, so OCI IaaSPOST/PUTrequests with bodies could not satisfy the OCI signature contract. OCI requirescontent-length,content-type, andx-content-sha256for bodiedPOST/PUT/PATCHrequests;PutObjectandUploadPartPUT requests may omit them, and any that are present must be signed.This change signs the body metadata the caller actually supplied. It does not read the request body, compute the digest, add missing body headers, or choose object-storage behavior from the endpoint authority. Bodyless requests keep signing only
date,(request-target), andhost. Duplicate signed body headers are rejected before any request mutation.Callers must prepare
content-length,content-type, andx-content-sha256before signing. The service README and provider docs document the values and the empty-body digest. Automatic body hashing / a body-aware API remains open; this PR only covers caller-supplied metadata.Verification:
cargo test -p reqsign-oracleandcargo clippy -p reqsign-oracle --all-targets -- -D warningspass locally on the PR head. The integration tests sign through the publicSignerpath and use an independent verifier that reconstructs the signed fields from theAuthorizationheader and verifies the RSA signature. Verification is synthetic; no live OCI traffic was used.