Skip to content

feat: Add TSA request headers via ta_headers and C2PA_TA_HEADERS - #369

Open
swhitt wants to merge 1 commit into
contentauth:mainfrom
swhitt:feat/tsa-request-headers
Open

swhitt wants to merge 1 commit into
contentauth:mainfrom
swhitt:feat/tsa-request-headers

Conversation

@swhitt

@swhitt swhitt commented Oct 29, 2026 •

Copy link
Copy Markdown

Changes in this pull request

Adds TSA request headers so we can sign against a TSA that needs auth. Non-secret headers go in ta_headers next to ta_url in the manifest JSON, secrets go in C2PA_TA_HEADERS (one Name: value per line), same split as ta_url / C2PA_TA_URL. Both get sent on the claim and ingredient timestamps for every signer type. Content-Type is rejected since c2pa sets it, and a bad env line errors without echoing the value.

Needs Signer::ocsp_vals and contentauth/c2pa-rs#2762, both in the c2pa bump on main (67d93ed). Rebased on that. 10 integration tests fail on main after the bump (assertion.action.ingredientMismatch), same 10 here, so not from this.

Relates to contentauth/c2pa-rs#2096.

Validation: cargo test --test integration against 67d93ed. 3 new tests against a mock TSA (headers sent, Content-Type rejected, bad env line doesn't leak) all pass.

Checklist

  • This PR represents a single feature, fix, or change.
  • All applicable changes have been documented.
  • Any TO DO items (or similar) have been entered as GitHub issues and the link to that issue has been included in a comment.

@swhitt
swhitt force-pushed the feat/tsa-request-headers branch 2 times, most recently from 76ab431 to 2762614 Compare October 29, 2026 15:28
@swhitt
swhitt marked this pull request as ready for review October 29, 2026 15:33
@swhitt
swhitt force-pushed the feat/tsa-request-headers branch from 2762614 to 9ba78da Compare October 29, 2026 15:35
Comment thread docs/signing.md

## Time-stamping

Set the timestamp authority URL with `ta_url` in the manifest JSON, `tsa_url` in the settings file or `--signer-info` response, or the `C2PA_TA_URL` environment variable. `C2PA_TA_URL` is used only when no URL is set elsewhere.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The tsa_url vs ta_url split is pre-existing. c2pa-rs settings and --signer-info use tsa_url, the manifest JSON and env vars use ta_. I just matched each one. Probably not worth renaming here.

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.

1 participant