Skip to content

test: use uuid dataplane subject fixtures#61

Open
gandhipratik203 wants to merge 1 commit into
mainfrom
user/pratik/issue-5462-dataplane-uuid-subjects
Open

test: use uuid dataplane subject fixtures#61
gandhipratik203 wants to merge 1 commit into
mainfrom
user/pratik/issue-5462-dataplane-uuid-subjects

Conversation

@gandhipratik203

@gandhipratik203 gandhipratik203 commented Jul 21, 2026

Copy link
Copy Markdown

Summary

  • Update Rust dataplane test fixtures to use UUID JWT subjects instead of email subjects.
  • Keep human-readable email in signed user.email metadata where examples need it.
  • Update local demo/book snippets so dataplane-facing token examples align with UUID subject lookup.

Context

Paired control-plane PR: IBM/mcp-context-forge#5708

Part of issue: IBM/mcp-context-forge#5462

The Python publisher now writes dataplane user configs under EmailUser.id, so Rust dataplane fixtures and examples should present JWTs whose sub matches that opaque UUID key.

Migration / Compatibility

Compatibility handling is documented in the paired control-plane PR IBM/mcp-context-forge#5708.

In short: existing email-keyed Redis configs expire through the normal publisher TTL, and pre-cutover API tokens with email subjects must be rotated or recreated so their sub is the user UUID. The Rust dataplane keeps JWT sub as an opaque Redis lookup key and does not add email-to-UUID fallback mapping.

Validation

cargo +1.96 test -p contextforge-gateway-rs-lib --test gateway_list_tools --test gateway_prompts --test gateway_resource_templates --test gateway_completions --test gateway_subscriptions --test gateway_plugins

cargo +1.96 test -p contextforge-gateway-rs-lib claims_id

cargo +1.96 clippy -p contextforge-gateway-rs-lib --tests -- -D warnings

cargo +1.96 fmt --check

git diff --check

Also validated with a cross-repo smoke against the Python publisher branch from IBM/mcp-context-forge#5708:

  • Python publisher wrote Redis config under ("UserConfig", "11111111-1111-1111-1111-111111111111").
  • A UUID-sub RS256 JWT initialized the Rust dataplane route for virtual server c0ffee00f001f00lf00ldeadbeefdead.
  • tools/list returned 200 with backend tools from gateway-one.
  • Rust logs confirmed config lookup with subject 11111111-1111-1111-1111-111111111111.

Signed-off-by: Pratik Gandhi <gandhipratik203@gmail.com>

@lucarlig lucarlig left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Two small changes requested before merge: (1) ContextForgeClaims::new still copies the UUID into user.email; please preserve separate email metadata or adjust the docs. (2) The Goose load test still requests an admin@example.com subject, so it will not match the UUID-keyed config. Focused tests, Clippy, formatting, and mdBook checks pass.

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.

2 participants