Skip to content

fix: four gaps found porting Praxis onto this release - #72

Merged
shaneutt merged 8 commits into
praxis-proxy:mainfrom
araujof:fix/praxis-port-gaps
Sep 3, 2026
Merged

fix: four gaps found porting Praxis onto this release#72
shaneutt merged 8 commits into
praxis-proxy:mainfrom
araujof:fix/praxis-port-gaps

Conversation

@araujof

@araujof araujof commented Sep 3, 2026

Copy link
Copy Markdown
Member

Description

Four fixes found while porting Praxis onto this release. Each is independent.

Changes

  • A glob route never ran its policy. A route like tool: "hr-*" resolved fine but its authorization: block was never dispatched, because the annotation is stored under the pattern and looked up under the request's name. An operator wrote a deny and the request got an allow. Three tests asserted the old behaviour; they now assert the new one.

  • The bundled hyper transport panicked in Praxis. It built its TLS config from the process-level crypto provider, and Praxis's dependency graph has both ring and aws-lc-rs, so rustls refused to pick one. It now names ring explicitly instead of reading the ambient default.

  • plugin_narrowed_by_policy fired on almost every config. A delegator runs under token.delegate and an elicitation handler under elicit, but both were credited with the route's CMF hook, so their real hook looked uncovered. The three demo policies raised four of these warnings and only one was real.

  • The upgrade guide's Rust section covered one of four host-facing changes. Added the HTTP hook family move, the Subject::claims shape change, and the HttpTransport a host now has to install. The transport one matters most: it is the only one a clean build does not catch.

  • Deps: Closes build(deps): bump uuid from 1.24.1 to 1.25.0 in the cargo-minor-patch group #61

Verified against the Praxis port and the policy-engine demo: 12 scenarios across Cedar, CEL and OPA, no load-time alarms.

A name selector matches by glob and a route annotates its body under the
pattern as written, but the lookup asked for the name the request arrived
under. Those agree for an exact selector and diverge for a glob, so a
route like `tool: "hr-*"` installed a handler and dispatched no policy:
an operator wrote a deny and the request got an allow.

Resolve the route and ask again under the name that matched, which is
what the `http:` selector already did. Gated on the config declaring a
glob, so an exact-only deployment pays nothing.

Three tests pinned the old behavior as expected; they now assert the
body runs, and the precedence and shadowing cases are covered beside
them.

Signed-off-by: Frederico Araujo <frederico.araujo@ibm.com>
The Rust API section is written for a host embedding the engine, and it
named one of the four changes that break one. Add the HTTP hook family
move, the Subject::claims shape change, and the HttpTransport a host must
install, which is the only one of the four a clean build does not catch.

Its perform_http half reaches a configuration rather than a host, so the
introduction points a config-only reader at it.

Signed-off-by: Frederico Araujo <frederico.araujo@ibm.com>
with_webpki_roots() builds its ClientConfig through
rustls::ClientConfig::builder(), which reads the process-level
CryptoProvider, and the host's dependency graph is what sets that. A graph
carrying both ring and aws-lc-rs has none, so rustls panics on the first
connection instead of choosing.

That is praxis: pingora and its TLS stack pull aws-lc-rs while this
transport pulls ring, so install_default_http_transport worked standalone
and panicked in the gateway on the first JWKS fetch.

Build the config against ring explicitly rather than installing a process
default, which would race a host installing its own. client() is fallible
as a result, since naming a provider means asking it for protocol
versions.

Signed-off-by: Frederico Araujo <frederico.araujo@ibm.com>
The per-hook reachability tally credited every plugin a route reaches with
that route's CMF hook pair. A delegate step invokes its plugin under
token.delegate and an elicitation verb under elicit, whatever entity the
route selects, so a delegator came out covered on cmf.tool_pre_invoke and
uncovered on the one hook it declares.

plugin_narrowed_by_policy then fired on every config that delegates, which
is most of them. The three demo policies raised four warnings and one was
real.

The plugin-level tally was already right, so this was noise rather than a
load failure. The report still fires for a delegator declaring a CMF hook
nothing reaches.

Signed-off-by: Frederico Araujo <frederico.araujo@ibm.com>
@araujof
araujof marked this pull request as ready for review September 3, 2026 12:49
@araujof
araujof requested a review from terylt as a code owner September 3, 2026 12:49
@araujof araujof moved this from Backlog to Review in Praxis Policy Engine (PPE) Sep 3, 2026
@araujof araujof added this to the 0.1.1 milestone Sep 3, 2026
@araujof
araujof requested a review from shaneutt September 3, 2026 12:52
Comments, doc prose and assertion messages only. No logic, no dependency or
feature changes.

Signed-off-by: Frederico Araujo <frederico.araujo@ibm.com>
@shaneutt
shaneutt requested a review from maleck13 September 3, 2026 13:20

@praxis-bot praxis-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

praxis-bot review: fix/praxis-port-gaps

Purpose: Four independent fixes found while porting Praxis onto this release: glob route policy dispatch, hyper transport crypto provider panic, false plugin_narrowed_by_policy alarms, and upgrade guide gaps.

Assessment: Solid fixes with strong test coverage. Two medium findings.

Severity Count
Critical 0
Large 0
Medium 2

Test coverage is thorough: glob routes get five dedicated tests (match, multi-name, miss, exact-outranks-glob, exact-shadows-glob), delegator/elicitation hooks get three (covered, covered, unreached-still-reported), and the transport gets a process-default guard test. The existing matrix test was also updated to reflect the corrected behavior.

Comment thread crates/ppe-core/src/engine.rs
Comment thread crates/ppe/src/http_hyper.rs Outdated
From the cargo-minor-patch dependabot PR (praxis-proxy#61), folded in here because it
touches Cargo.lock and would otherwise conflict with this branch. Lock only,
no manifest change.

Signed-off-by: Frederico Araujo <frederico.araujo@ibm.com>
Two review points on praxis-proxy#72.

build_client kept the brace from the get_or_init closure it was extracted
from. Removed; body is unchanged.

The glob detector was asked to also treat `[` as a wildcard. It should not:
wildmatch defines only `*` and `?` and no escapes, so `hr-[a-z]` is eight
literal characters and matches nothing else. A literal selector needs no
resolution, since its annotation key equals the request name whenever it
matches. Recorded that in the function's doc and pinned it with a test.

Signed-off-by: Frederico Araujo <frederico.araujo@ibm.com>
@shaneutt

shaneutt commented Sep 3, 2026

Copy link
Copy Markdown
Member

Something weird happened and my comment didn't post:

I noticed huge methods/functions, we should turn on the settings from conventions which blocks that, and restructure around functions.

However, if you don't want to do that now, I consider this resolved if we create a follow-up issue to do this later.

Once that's resolved, merge at your discretion 👍

@araujof

araujof commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

Agreed, and we can address this in bulk when we close issue #15.

Leaving this PR as is on that basis.

Signed-off-by: Frederico Araujo <frederico.araujo@ibm.com>

# Conflicts:
#	Cargo.lock
#	crates/ppe/src/http_hyper.rs
@araujof
araujof requested a review from a team September 3, 2026 16:46
@shaneutt
shaneutt merged commit a63af82 into praxis-proxy:main Sep 3, 2026
7 checks passed
@github-project-automation github-project-automation Bot moved this from Review to Done in Praxis Policy Engine (PPE) Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants