test(xmldsig): add real SAML IdP integration coverage#44
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
📝 WalkthroughSummary by CodeRabbitTests
WalkthroughAdds end-to-end SAML XMLDSig verification tests and supporting fixtures: a real IdP-signed SAML response fixture plus two integration tests (valid signature check and tampering detection). Also updates smoke fixture assertions and a new ECDSA public-key PEM fixture reference. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
Adds an integration test intended to exercise the XMLDSig verification pipeline against a real-world SAML 2.0 IdP response fixture (including a positive verification case and a tampered-reference failure case).
Changes:
- Introduces a new integration test file that verifies an ECDSA-signed SAML response end-to-end using
verify_signature_with_pem_key. - Adds a tampering test that mutates the XML and asserts a
ReferenceDigestMismatchfailure.
- add integration coverage for donor SAML IdP response verification - assert valid signature status and reference tamper detection Refs P1-026
- move SAML fixture to committed tests/fixtures path - assert tamper mutation is effective before verification - update fixture smoke file count for new fixture
9a95a93 to
bf2e071
Compare
|
@coderabbitai re-review |
1 similar comment
|
@coderabbitai re-review |
|
🧠 Learnings used✅ Actions performedFull review triggered. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 42779 🏁 Script executed: Length of output: 5773
|
| Finding | |
|---|---|
| 🔴 | store_pre_digest: true with no pre-digest assertion — assert it or switch to false |
| 🔴 | Inline PEM key breaks the established tests/fixtures/keys/ convention |
Gitignored ROADMAP P1-026 reference is opaque |
|
| SHA-1 fixture usage lacks an explanatory comment |
🧠 Learnings used
Learnt from: polaz
Repo: structured-world/xml-sec PR: 41
File: tests/donor_full_verification_suite.rs:165-178
Timestamp: 2026-04-04T06:14:34.735Z
Learning: In `tests/donor_full_verification_suite.rs` (xml-sec Rust project), the `Expectation::Skip` arm must exercise skipped vectors through `VerifyContext::new().verify(xml)` (no injected PEM key) so that the real key-resolution path runs, and must assert a concrete blocker outcome per case: `Invalid(KeyNotFound)` for vectors with unresolved KeyValue/X.509 key material, and `ParseSignedInfo(UnsupportedAlgorithm)` for DSA-signature vectors. Accepting any `Err` or non-Valid result as a valid skip is insufficient and can mask stale skip reasons or unrelated failures.
- assert pre-digest capture when store_pre_digest=true - move SAML IdP public key into tracked fixture file - document PR linkage and intentional SHA-1 fixture usage
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
Summary
Validation
Notes