Switch SAML auth to new general purpose filtering (PP-4422)#3384
Switch SAML auth to new general purpose filtering (PP-4422)#3384tdilauro wants to merge 3 commits into
Conversation
|
Claude finished @tdilauro's task in 3m 55s —— View job Code Review
SummaryClean refactor that replaces ~1,100 lines of hand-rolled pyparsing DSL with the shared DetailsMinor:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/general-purpose-filter #3384 +/- ##
==================================================================
- Coverage 93.35% 93.32% -0.04%
==================================================================
Files 508 501 -7
Lines 46497 46003 -494
Branches 6344 6307 -37
==================================================================
- Hits 43409 42930 -479
+ Misses 1999 1991 -8
+ Partials 1089 1082 -7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Important
Stacked PR — this branch is based on
feature/general-purpose-filter(#3373). This PR should not be merged until that one lands.Description
Replaces the custom
python_expression_dslpackage (a pyparsing-based custom DSL with its own AST, parser, and evaluator) with the new general-purposeFilterExpressionutility introduced in the preceding PR. TheSAMLSubjectFilterclass is rewritten as a thin adapter overFilterExpression, andSAMLWebSSOAuthSettings.validate_filter_expressionis updated to useFilterExpression.check_syntax()for syntax validation. TheSAMLAuthenticationManagerconstructor now acceptssubject_filteras an optional argument (defaulting to a plainSAMLSubjectFilter()), removing the need for callers to wire up DSL internals.This is a pure internal refactor: patron-facing behavior and the filter expression syntax are unchanged.
Motivation and Context
The SAML patron-filtering feature used a hand-rolled pyparsing DSL (~1,100 lines across four files) that was complex and duplicated functionality now provided by the shared
FilterExpressionutility. Replacing it reduces maintenance and cognitive load and aligns SAML filtering with the common expression-evaluation approach coming to other parts of the codebase.[Jira PP-4422]
How Has This Been Tested?
Checklist