feat(supervisor): stream HTTP session hook uploads on the plain-HTTP forward proxy
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 32/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- rust
- Domaine
- backend, networking
Piste de recherche
Start by reading ForwardMiddlewarePipeline::apply in crates/openshell-supervisor-network/src/proxy.rs and compare it with how request_body_delivery(config) in l7/relay.rs picks a delivery per route. Read docs/extensibility/supervisor-middleware/operations.mdx for the current 4 MiB wording. Write the forward-proxy denial test first (body_over_limit, upstream sees nothing), then stream middleware output for routes that need no body-wide work. Done means the new tests pass and the limits text matches actual behavior.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
User Story
As an operator running an HTTP session hook that streams request bodies (for example a signing or redaction stage), I want plain-HTTP requests sent through the forward proxy to behave like requests on the L7 relay, so that uploads larger than 4 MiB are not denied depending on how the sandbox reached the endpoint.
Problem Statement
HTTP session hooks have no total size cap on STREAM request bodies on the L7 relay paths. The plain-HTTP forward proxy (ForwardMiddlewarePipeline::apply in crates/openshell-supervisor-network/src/proxy.rs) always passes RequestBodyDelivery::WITHHOLD, because it writes the request upstream as one buffer. The preflight therefore advertises limits.max_output_body_bytes of 4 MiB (MAX_MIDDLEWARE_PAYLOAD_BYTES), and a larger upload that matches a session request hook fails with failure_code: body_over_limit.
The limit is documented in Supported Operations (forward-proxy requests buffer output, 4 MiB), but the same hook behaves differently depending on the path a request takes. There is also no test covering the forward-proxy denial.
Raised in review of #4359: https://github.com/NVIDIA/OpenShell/pull/4359#discussion_r4381863330
Impact / Why This Matters
- Inconsistent behavior for one middleware config: an upload over 4 MiB succeeds via the L7 relay and fails via the forward proxy.
- It undercuts the "no total size cap" goal of HTTP session hooks for clients that use
HTTP_PROXYwith plain HTTP.
Proposed Design
- Add a test now: a forward-proxy upload over 4 MiB that matches a session request hook is denied with
failure_code: body_over_limit, and the upstream sees nothing. - Stream middleware output on the forward proxy, like the REST relay, when the route needs no body-wide work (no SigV4 signing, body credential rewrite, or body-aware L7 re-evaluation such as JSON-RPC/MCP/GraphQL). Keep
WITHHOLDwith its route limit for those cases. - Update the Supported Operations limits text once forward-proxy streaming lands.
Acceptance Criteria
- A test covers the 4 MiB forward-proxy denial (
body_over_limit, nothing forwarded). - A plain-HTTP forward-proxy upload over 4 MiB through a STREAM session request stage succeeds on routes that need no body-wide work, with
max_output_body_bytesunset in the preflight. - Routes that still need the whole body keep their documented limits.
- Docs describe the forward-proxy behavior.
Alternatives Considered
- Keep buffering and only document the limit. That leaves the path-dependent behavior in place.
Agent Investigation
proxy.rsForwardMiddlewarePipeline::applycallsapply_request_with_delivery(..., RequestBodyDelivery::WITHHOLD)with the comment "The forward proxy writes the request as one buffer, so middleware output is withheld and inlined."- The L7 REST relay chooses delivery per route via
request_body_delivery(config)inl7/relay.rs. - Docs:
docs/extensibility/supervisor-middleware/operations.mdx(request output buffering paragraph) already lists the forward proxy among buffered paths.
- Langage dominant
- Rust
- Étoiles
- 20.6k
- Forks
- 2k
- Merge moyen
- 2 j 13 h
- PR mergées (30 j)
- 262
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de NVIDIA/OpenShell
-
config preflight exits 0 on allow_unauthenticated_users = truePeut-être pris @ericcurtin l’a pris il y a 1 jour. Ouvertestate:triage-needed
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
Les mainteneurs répondent en général sous 1 jour
-
state:triage-needed
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
Les mainteneurs répondent en général sous 1 jour
-
bug(python): OIDC refresh drops the gateway's oidc_scopesPeut-être à nouveau libre @jyotir07 l’a pris il y a 8 jours, et aucune pull request n’est ouverte. Ouvertestate:triage-needed
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
NVIDIA/OpenShell#4919 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
bug: workspace access hint suggests a --subject command that fails for hyphen-leading OIDC subjectsPeut-être à nouveau libre Une pull request pour cette issue a été fermée sans être fusionnée. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de NVIDIA/OpenShell
Issues similaires
-
parity priority: low
Difficulté 2/5 Une demi-journée Accessibilité débutants 65/100
storytold/vectorcraft#5421 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
bug enchantments Java Edition protocol
Difficulté 2/5 1-3 heures Accessibilité débutants 80/100
Pumpkin-MC/Pumpkin#4465 ·
Les mainteneurs répondent en général sous 1 jour
-
docs(metrics): replace stale src/metrics.rs line anchors in dashboard-metrics.md with symbol namesOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
Les mainteneurs répondent en général sous 1 jour
-
ci-cd desktop size:low telemetry-improvement telemetry-round-1
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
vfarcic/dot-agent-deck#2079 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
fraiseql/fraisier-core#148 ·
Les mainteneurs répondent en général sous 1 jour