News for hackers. Stuff that matters.
Re:SAML: A Technical Primer by recursive on Friday September 27, 2024 @06:35PM (#41676203)
Everyone in here is saying SAML is dead and long live OIDC. The company I work for has SAML support, but not OIDC. As far as I understand it, all the customers are asking for SAML. I've never heard a request for SAML. This is in the health care sector.
Re:SAML: A Technical Primer by paulddraper on Friday September 27, 2024 @06:39PM (#41676224)
Anyone who thinks OIDC is way easier than SAML has never implemented OIDC (or SAML).
Re:SAML: A Technical Primer by pdq on Friday September 27, 2024 @06:53PM (#41676313)
I investigated both and implemented OIDC. It was difficult, but compared to the SAML and XML complexity, I'd say it was much easier.
Re:SAML: A Technical Primer by paulddraper on Friday September 27, 2024 @07:12PM (#41676448)
XML is marginally more complicated than JSON: attributes and namespaces.

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:

Re:SAML: A Technical Primer by cldellow on Friday September 27, 2024 @08:14PM (#41676785)
Attributes and namespaces are a big deal when it comes time to canonicalize the document so that you can do XMLDSig.

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.

Re:SAML: A Technical Primer by unscaled on Friday September 27, 2024 @11:03PM (#41677551)
The problem is not XML by itself. XML adds a considerable amount of complexity to JSON[1] and when writing security-oriented software complexity matters quite a bit[2]. But this is still a level of complexity that can be managed. Most other XML-based protocols aren't as bad as SAML.

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.

Re:SAML: A Technical Primer by osigurdson on Saturday September 28, 2024 @12:42AM (#41677941)
XML=JSON=YAML=TDL (tree describing language)
Re:SAML: A Technical Primer by sam_lowry_ on Saturday September 28, 2024 @01:19AM (#41678076)
Not really.
Re:SAML: A Technical Primer by osigurdson on Saturday September 28, 2024 @08:51PM (#41683965)
But pretty close.
Re:SAML: A Technical Primer by paulddraper on Saturday September 28, 2024 @10:33AM (#41680447)
> 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

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.

Re:SAML: A Technical Primer by jcrites on Friday September 27, 2024 @06:46PM (#41676265)
Could you elaborate? I'm interested.
Re:SAML: A Technical Primer by cyberax on Friday September 27, 2024 @08:51PM (#41676978)
I have implemented the server-side of OIDC to support the single sign-on for AWS account management. It was a breeze, around 200 lines of Go code.

I tried that with SAML (back then, it didn't require kludgy X.509 thumbprint management in AWS), and I ran away crying after a couple of days trying to understand why it fails.

Re:SAML: A Technical Primer by deathanatos on Friday September 27, 2024 @10:05PM (#41677306)
I also work in healthcare. There are some entities out there doing OIDC, but SAML is pretty popular, unfortunately.

Healthcare, as an industry, is not making decisions based on what constitutes "good engineering", for the most part. There are so many other things I'd burn to the ground that are just ancient, ass-backwards things that the rest of the industry has moved on from, but healthcare clings to. (…IPSec, for example. God I'd like to not have to do double-NAT'ing with providers who don't even understand NAT and just expect me to recognize IP addresses that are only internal to their network and never exposed to me, ever again.)

Re:SAML: A Technical Primer by surfpel on Saturday September 28, 2024 @01:08AM (#41678037)
I implemented SAML SSO for Django at my prev company about a year ago. I procrastinated for a few months and by the time I implemented it, the whole company started retiring it in favor of OIDC. I was about to do that too but I quit right before. Looked much easier to do OIDC with Django. Seemed like SAML was on the way out in general, even Django extensions weren’t prioritizing it and information resources for implementing SAML weren’t great. Long live OIDC I guess.