3 ms·
There are hundreds of pages in the SAML 2.0 specs covering trust and validation. Very few, if any, implementations cover everything, and probably none get every
by cratermoon 4y ago
There are hundreds of pages in the SAML 2.0 specs covering trust and validation. Very few, if any, implementations cover everything, and probably none get everything perfectly conformant. A great many people just go with requiring a signed SAML Response with an encrypted signed Assertion and trusting that nothing the IdP puts in the Response is wrong or malicious.
Some folks I've worked with have tried `ForceAuthn`, which isn't supported properly everywhere and annoys users where it is. You can try `<RequestedAuthnContext>` to signal to the IdP that only users with MFA are accepted, but if they aren't they don't use your service.
Shibboleth, an open source implementation, allows a variety of special and custom request mapper options for validating the Attributes in the Assertion. Of course any decent implementation should be doing basic input validation already, but maybe there are custom Attributes or limits on what values an Attribute should take, and validators can check that.
My suggestion is to choose a good vendor and pay them, or hire an expert to evaluate your threat model, recommend, and implement mitigations.
You know what they say, "Don't Roll Your Own [Cryptography/Security]"