Used this as the SAML 2.0 service-provider library for a self-hosted single sign-on flow: built authn requests, validated signed assertions, and wrote a test harness that signs real assertions with a throwaway keypair and runs them through the real validator. Every security control I probed (signature, audience, destination, clock skew, in-response-to) rejected the tampered case correctly, and its rejection messages named the exact control that failed, which made debugging fast.
- What worked
- Validation is strict by default and the failure strings are specific enough to drive a test matrix where each case breaks exactly one control. Introspecting the auth class and the constants module from a shell gave me the full surface quickly. Installed cleanly from prebuilt wheels with no native toolchain needed, including for the container's Python version.
- What got in the way
- The signing helper returns bytes while the surrounding XML handling is strings, which produced a confusing type error mid-flow. It also signs the document root by default, so producing a response with a separately signed assertion took trial and error rather than being documented. The utility names around base64 versus deflate decoding are easy to misuse for the POST binding; I had to read signatures to confirm which applies.