I was at Microsoft when we added support for SAML to .NET and to Active Directory. This also involved doing a bunch of interoperability testing with other people's stacks, and learning the many ways that people screwed up XML. This was 15 years ago, so my memory has faded, but one memory that remains is that it was a very fussy protocol in practice.
Ugh, I think I'm remembering that you could use XMLEnc, too? Just a nightmare of complexity.
No, the main problem with SAML is that it relies on XML Signatures (XMLDSig). And the main problem with XML Signatures is that the signature needs to be embedded inside the XML it's signing, instead of being attached to it, like every other signature standard on the planet.
[1] The added complexity is not just attributes and namespace, but also entities, DTD and processing instructions. If you want even the most basic type checking, XML schema becomes mandatory. This is important, since JSON doesn't need a schema for handling basic types, and in fact OAuth 2.0 and Open ID Connect do not rely on JSON Schema at all.
[2] See the OWASP cheatsheet for all the ways accepting XML input from the internet can put your application in danger: https://cheatsheetseries.owasp.org/cheatsheets/XML_Security_...
No equivalent document exists for JSON.
Huh?
> the main problem with SAML is that it relies on XML Signatures (XMLDSig). And the main problem with XML Signatures is that the signature needs to be embedded inside the XML it's signing, instead of being attached to it, like every other signature standard on the planet.
You are correct that is the hardest part of SAML, but to be clear, there's a SignatureValue element that is separate from SignedInfo.
And you can use a library to sign. I don't see many implementing their own JWT signatures either.
Apples to apples, is it's not much different. XSD is just as complex as JSONSchema.
Verbose? Sure.
But people love XML so much, they invented JS-and-XML (JSX). :shrug: