Skip to content

fix: carry trusted provenance across cell HTTP - #245

Open
patrickleet wants to merge 4 commits into
fix/cli-child-executable-identityfrom
codex/trusted-transport-provenance
Open

fix: carry trusted provenance across cell HTTP#245
patrickleet wants to merge 4 commits into
fix/cli-child-executable-identityfrom
codex/trusted-transport-provenance

Conversation

@patrickleet

@patrickleet patrickleet commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Why

An authenticated cell-command producer needs a small, explicit provenance context to survive the HTTP wait path so the receiving cell can validate source, operation, and decision identity. Forwarding the whole session would preserve too much unbounded, spoofable state; dropping provenance silently loses the authorization boundary.

Context example

let metadata = TrustedRequestMetadata::try_from_pairs([
    ("source-id", source_id),
    ("operation-id", operation_id),
    ("decision-id", decision_id),
])?;
let context = CellRequestContext::new(service_id, partition)
    .with_trusted_metadata(metadata);

host.post_cell_wait_path_with_context(
    command,
    command_id,
    input,
    &session,
    &context,
).await?;

Summary

  • add an authenticated CellRequestContext for internal cell wait-path calls
  • carry bounded, explicit trusted metadata without forwarding arbitrary Session claims
  • reject reserved/noncanonical metadata and require the internal cell secret
  • cover native HTTP to AggregateCell dispatch, causation preservation, replay, secret/provenance rejection, and command-body reuse fencing

Validation

  • cargo test --features graphql,http command_dispatch::host::tests --lib — 5 passed
  • cargo test --features graphql,http --test causal_wait_path --quiet — 10 passed
  • cargo test --features graphql,http --lib --quiet — 941 passed

@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 3f4d8caa-12c7-46e7-89ac-57acb5555357

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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