Skip to content

refactor(middleware): validate trusted SigV4 signing after session hooks - #3

Draft
pimlock wants to merge 1 commit into
4359-http-session-validation-base/pimlockfrom
4359-sigv4-validation/pimlock
Draft

pimlock wants to merge 1 commit into
4359-http-session-validation-base/pimlockfrom
4359-sigv4-validation/pimlock

Conversation

@pimlock

@pimlock pimlock commented Oct 22, 2026

Copy link
Copy Markdown
Owner

Summary

Validate the HTTP session API proposed in NVIDIA/OpenShell#4359 with AWS SigV4 signing. External request middleware can transform the body first; the supervisor then signs the final request with credentials that never enter the external middleware protocol.

This draft lives in the personal fork as a validation example. Its base is frozen at upstream PR head 0dc751b086dd3a2190b9b87fba956e2ea36fd6c7, so the diff contains only this use case.

Related Issue

Validation for NVIDIA/OpenShell#4359, part of NVIDIA/OpenShell#2431. This fork has issues disabled; this validation draft does not close an upstream issue.

Changes

  • Move SigV4 signing and its AWS dependencies into the built-ins crate behind a typed, trusted in-process API.
  • Keep signing after external request middleware completes and credentials are resolved, with existing endpoint configuration and the 10 MiB signing limit.
  • Preserve the network crate's public signing exports for existing Rust callers.
  • Extend the relay regression test to verify the final payload hash after body transformation, secret omission from middleware preflights, and rejection above the signing limit.

Testing

  • All 32 built-in tests pass.
  • All 1,587 network unit tests pass, with two existing tests ignored.
  • mise run pre-commit passes.

Shared runtime validation: the Docker HTTP session content-guard E2E suite passed with both signing implementations applied. No live AWS requests were tested. The full repository suite stopped at endpoint_selector_single_star_crosses_path_separators; the same prover failure reproduces on the unchanged upstream PR head.

Checklist

  • Follows Conventional Commits.
  • Commits are signed off for DCO.
  • Crate and user documentation explain the credential boundary and endpoint configuration.

The trusted signer is selected by endpoint signing fields. It is not an externally registered service or a network_middlewares binding. This validates composition with the session API without adding a public credential-visible hook.

Companion validation: Git signing, based independently on the same frozen API head.

Move signing into the built-ins crate while preserving endpoint configuration and existing Rust signing exports. Verify the final payload hash after body transformations and keep AWS credentials outside external middleware preflights.

Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
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