feat(grid): add secure provider gateway boundary#386
Draft
nerdalert wants to merge 7 commits into
praxis-proxy:mainpraxis-proxy/ai:mainfrom
nerdalert:grid-credential-injectnerdalert/ai:grid-credential-injectCopy head branch name to clipboard
Draft
feat(grid): add secure provider gateway boundary#386nerdalert wants to merge 7 commits intopraxis-proxy:mainpraxis-proxy/ai:mainfrom nerdalert:grid-credential-injectnerdalert/ai:grid-credential-injectCopy head branch name to clipboard
nerdalert wants to merge 7 commits into
praxis-proxy:mainpraxis-proxy/ai:mainfrom
nerdalert:grid-credential-injectnerdalert/ai:grid-credential-injectCopy head branch name to clipboard
Conversation
nerdalert
force-pushed
the
grid-credential-inject
branch
from
July 16, 2026 02:47
1ad1e9f to
37fe9b5
Compare
praxis-bot
reviewed
Jul 23, 2026
praxis-bot
left a comment
Collaborator
There was a problem hiding this comment.
Review: Grid credential inject
Well-structured PR. The two-filter design (grid_route writes credential reference metadata, grid_credential_inject reads it and injects the bearer token) is clean separation of concerns. Security properties are solid: tokens stored in Zeroizing<String>, never written to metadata/traces/error bodies, fail-closed on mismatch. Config validation is thorough with deny_unknown_fields on all structs and bounded field lengths.
Findings
| Severity | Count |
|---|---|
| Critical | 0 |
| Large | 0 |
| Medium | 4 |
See inline comments for details. Summary:
- [Medium] Doc table uses
secret_ref(snake_case) but YAML config requiressecretRef(camelCase) due to#[serde(rename_all = "camelCase")]onCandidateCredential. Will cause config parsing errors for users following the docs. - [Medium] No functional integration test for
grid-route-mcp.yamlexample config. Only inference routing has an integration test intests/schema/tests/suite/examples/ai/grid_route.rs. Project conventions require functional integration tests for all example configs. - [Medium] No example config or functional integration test for
grid_credential_inject. Unit tests are thorough, but project conventions require an example config inexamples/configs/and a corresponding integration test for new capabilities. - [Medium] Test
credential_not_written_to_route_metadatahas a misleading name and checks keys that would never be written. Credential references ARE written to route metadata byrecord_route_decision(undergrid.route.credential.*). The test only checks non-existent key patterns (grid.route.credential,grid.route.strategy,grid.route.secret_ref,grid.route.token), which pass trivially. The companion testcredential_reference_written_to_route_metadatadoes the meaningful positive assertion.
Add AI-owned grid_route inference and MCP tool routing under praxis-ai-filters and register it from praxis-ai-proxy. The filter selects ctx.cluster from static candidates, prefers fresh candidates over stale, applies local-site preference on equal freshness, and routes MCP tools/call by mcp metadata with precedence over model-header routing. Add docs, examples, and schema coverage for the new filter. Signed-off-by: Brent Salisbury <bsalisbu@redhat.com>
Add an end-to-end schema test for the MCP grid_route example. The test runs the mcp filter, routes a tools/call request through grid_route, and verifies the selected tool-owning backend responds. Signed-off-by: Brent Salisbury <bsalisbu@redhat.com>
nerdalert
force-pushed
the
grid-credential-inject
branch
from
July 24, 2026 03:10
37fe9b5 to
19f63a1
Compare
Add overlay-file mode for grid_route with bounded reads, last-known-good reload behavior, parent-directory watching for Kubernetes ConfigMap symlink swaps, and ArcSwap-backed snapshot updates. Include overlay example config, generated filter docs, and schema-level tests covering initial overlay routing and in-process hot reload. This is stacked on the grid_route PR and remains draft/WIP for broader review. Signed-off-by: Brent Salisbury <bsalisbu@redhat.com>
Treat Grid candidate order as authoritative, enforce admission state, and retain existing-only candidates only for valid session bindings. Accept the canonical credential.secretRef overlay shape while preserving the compatibility alias, and reject embedded credential values. Signed-off-by: Brent Salisbury <bsalisbu@redhat.com>
Forward stable candidate and request identities only to explicitly configured provider-hop clusters. Strip client-supplied peer fields before writing canonical x-grid-peer values so direct backends never receive Grid peer context. Use the AI-owned x-grid-peer namespace because Praxis reserves and removes x-praxis headers at upstream boundaries. Signed-off-by: Brent Salisbury <bsalisbu@redhat.com>
Add grid_provider_route as an exact provider-local candidate, model, and path validation filter. Consume edge-selected peer context only after the Praxis mTLS and peer-identity chain, then map it to a configured local backend and optional credential reference. Register shared Grid metadata contracts and reject provider pipelines that omit required client certificates, unconditional peer trust, or safe filter ordering. This is provider-local validation and mapping, not a second Grid routing decision. Signed-off-by: Brent Salisbury <bsalisbu@redhat.com>
Bound credential counts, locator fields, token sources, and token bytes before request processing. Fail closed for incomplete, unsupported, or unknown references and keep resolved values in zeroizing storage. Use the shared Grid credential metadata contract so both grid_route and grid_provider_route can select final-hop credentials without carrying secret bytes in overlays or peer headers. Signed-off-by: Brent Salisbury <bsalisbu@redhat.com>
nerdalert
force-pushed
the
grid-credential-inject
branch
from
July 26, 2026 23:41
bb1a97d to
2c88c95
Compare
This was referenced Jul 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dependencies
This PR is the final change in the existing Grid data-plane stack:
grid_route.It remains draft until its dependencies land. No separate provider-boundary PR is required.
Summary
Adds the provider-side Praxis AI pipeline used after an edge
grid_routedecision:The provider gateway is a Praxis AI inference gateway, not a generic reverse proxy. It validates the edge-selected candidate against provider-local policy, selects a preconfigured local backend cluster, replaces customer credentials at the final hop, and forwards through the normal Praxis load-balancer pipeline.
grid_provider_routegrid_provider_routeis an exact provider-local validation and mapping filter, not a second Grid routing engine. It maps:It:
Provider boundary enforcement
Proxy startup validation rejects a Grid provider chain unless:
peer_identity_trustis the first filter;peer_identity_trustprecedesgrid_provider_route.This keeps
x-grid-peer-*values from being treated as trusted merely because they are present. They are consumed only after Praxis establishes the mTLS peer identity and the provider-local trust policy accepts it.grid_credential_injectThe credential filter consumes credential-reference metadata from either
grid_routeorgrid_provider_route. It:(name, namespace, key, strategy)entry;Authorizationheader;Only references appear in Grid overlays and route metadata. Provider token values are not written to overlays, filter metadata, logs, or errors.
Architecture boundary
grid_routemakes the Grid candidate selection.grid_provider_routevalidates that selection against a local allow-list and maps it to a local cluster.grid_credential_injectperforms final-hop credential replacement.This PR does not add another scoring engine, session store, dynamic cluster system, credential subsystem, or Grid-specific Praxis core abstraction.
Validation
The final stacked head passes:
cargo +nightly fmt --all -- --checkcargo check --workspacecargo test --workspacecargo clippy --workspace --all-targets --all-features -- -D warningsRUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-depscargo xtask lint-separatorscargo xtask lint-filter-docsgit diff --checkFocused tests cover filter construction, chain validation, header stripping, unknown candidates, model/path denial, metadata output, credential replacement, missing credentials, and fail-closed runtime behavior.
The combined Grid GLB environment additionally proves the Praxis edge-to-provider mTLS hop, valid and invalid peer identities, provider-local route denial, private backend traversal, provider attribution, customer-token removal, and Secret-backed provider credential replacement.
Review focus