Security for Legal SaaS

Episode 22 · Module 5 · Authentication

SSO, SAML and Enterprise Identity

19 May 2026 · 9:02 · Security for Legal SaaS

9:02 9:02

When a 200-lawyer firm evaluates your legal SaaS platform, Single Sign-On is rarely optional. SSO — the ability to log in once through the firm's own identity provider and gain access to every connected application — is a security requirement, not a convenience feature. And from a vendor's perspective, saying yes to SSO is one of the smartest security decisions you can make, because it shifts authentication management to the client's own IT team.

Today’s Lesson

Security for Legal SaaS — Episode 22: SSO, SAML and Enterprise Identity

Why Enterprise Clients Demand SSO

When a 200-lawyer firm evaluates your legal SaaS platform, Single Sign-On is rarely optional. SSO — the ability to log in once through the firm's own identity provider and gain access to every connected application — is a security requirement, not a convenience feature. And from a vendor's perspective, saying yes to SSO is one of the smartest security decisions you can make, because it shifts authentication management to the client's own IT team.

In Episode 20, we covered OAuth 2.0 and OpenID Connect — the protocols that power consumer-facing "Sign in with Google" flows. Enterprise SSO builds on those concepts but uses a different set of protocols and a fundamentally different trust model. Where OAuth delegates access, enterprise SSO federates identity: the client's directory becomes the authoritative source of who works there, what access they should have, and — critically — when they should lose it.

SAML: The Enterprise Standard

Security Assertion Markup Language (SAML) — an XML-based open standard first published in 2002 and revised as SAML 2.0 in 2005 — remains the dominant SSO protocol in enterprise legal tech.1 It works through a three-party trust model:

Component Role Legal SaaS Example
Identity Provider (IdP) Authenticates users and issues identity assertions The law firm's Azure AD, Okta, or PingFederate instance
Service Provider (SP) Your application — receives and validates assertions Your case management or document review platform
Principal The user seeking access A partner, associate, or paralegal at the firm

The SSO Flow

In a Service Provider-initiated (SP-initiated) flow — the most common pattern — the user navigates to your application, which redirects them to their firm's IdP. The user authenticates there (using whatever MFA the firm enforces, as we discussed in Episode 21), and the IdP sends a signed XML document called a SAML assertion back to your application. This assertion contains the user's identity attributes: email address, name, group memberships, and any custom attributes the firm chooses to share.2

In an IdP-initiated flow, the user starts at the firm's identity portal and clicks your application's icon. This skips the initial redirect but introduces a security consideration: without an SP-generated authentication request to bind to, IdP-initiated flows are more vulnerable to replay attacks. The OWASP SAML Security Cheat Sheet recommends SP-initiated flows wherever possible.3

SAML vs. OpenID Connect

For new implementations, the industry is increasingly moving toward OpenID Connect (OIDC) — the JSON-based identity layer built on OAuth 2.0 that we covered in Episode 20. OIDC is lighter, easier to implement, and better suited to modern web and mobile architectures. But SAML is not going away:

Dimension SAML 2.0 OpenID Connect
Data format XML JSON
Token type Signed XML assertion JWT (JSON Web Token)
Typical use Enterprise SSO, legacy IdPs Modern web/mobile apps, consumer SSO
Complexity Higher (XML parsing, signature validation) Lower (standard HTTP/JSON)
Enterprise adoption Ubiquitous in large law firms Growing, but SAML still required by many
Practical reality: If you're building legal SaaS for enterprise clients, you'll need to support both. Many firms still run SAML-only IdPs, and some require SAML specifically in their procurement security questionnaires.

SAML Security Vulnerabilities

SAML's XML foundation creates a distinct class of vulnerabilities that JSON-based protocols avoid entirely.

Signature wrapping attacks are the most dangerous. In March 2025, GitHub disclosed CVE-2025-25291 and CVE-2025-25292 in the ruby-saml library — vulnerabilities scoring 8.8/10 on the CVSS scale.4 The attack exploited differences between how two XML parsers (REXML and Nokogiri) interpreted the same document. An attacker could craft a SAML response where the signed portion contained one identity but the parsed portion contained another, allowing authentication as any user — including administrators.

Earlier, in 2024, CVE-2024-6800 affected GitHub Enterprise Server itself, allowing attackers to forge SAML responses and bypass authentication entirely.5 These aren't theoretical — they're production vulnerabilities in widely-used software.

The OWASP SAML Security Cheat Sheet identifies several critical mitigations:3

  1. Validate the XML schema before verifying the signature — reject malformed documents before processing
  2. Use secure key selectors that ignore `KeyInfo` elements from the XML message itself
  3. Apply absolute XPath expressions for signature scope verification
  4. Never accept `alg=none` for any cryptographic operation

SCIM: Automated User Lifecycle

SSO solves authentication — but it does not solve provisioning. When a new associate joins the firm, someone still needs to create their account in your application. When they leave, someone needs to disable it. Manual provisioning at scale is a recipe for orphaned accounts — active credentials belonging to departed employees.

SCIM (System for Cross-domain Identity Management), defined in RFC 7644, automates this lifecycle.6 It's a REST API standard that lets the firm's identity provider push user records directly into your application:

Why this matters for legal SaaS: A firm with 500 lawyers might use 30 different SaaS platforms. Without SCIM, each departure requires manual deprovisioning across all 30 systems. Miss one, and a former employee retains access to privileged client communications. SCIM eliminates this class of risk entirely.7

Multi-Tenant SSO: One IdP Per Tenant

In a multi-tenant legal SaaS platform — where multiple firms share the same application infrastructure — each firm needs its own SSO configuration. This is called IdP-per-tenant routing, and it typically works by email domain:

  1. User enters their email address on your login page
  2. Your application extracts the domain (e.g., `@bakermckenzie.com`)
  3. A lookup table maps that domain to the firm's specific IdP configuration
  4. The user is redirected to their firm's IdP for authentication

This means your application must maintain a separate SAML or OIDC configuration for each enterprise client — including their IdP metadata URL, certificates, and attribute mappings. A configuration error in one tenant's SSO setup must never affect another tenant's authentication. We'll cover the broader multi-tenancy isolation challenge in Episode 27.

The SSO Tax — and Why It's Worth Paying

A common criticism in the SaaS industry is the "SSO tax" — vendors charging significantly more for SSO support, effectively penalising better security practices. sso.tax maintains a public list of vendors that charge premium prices for SSO.8

For legal SaaS, this framing misses the point. Enterprise law firms require SSO not as a premium feature but as a baseline security control. Supporting SAML SSO signals to enterprise procurement teams that your platform is ready for their security requirements. The implementation cost is real — maintaining SAML libraries, handling IdP certificate rotations, debugging XML signature issues — but the alternative is losing enterprise deals entirely.

NIST Guidance: Federation Assurance Levels

NIST SP 800-63C defines three Federation Assurance Levels (FALs) that govern how identity assertions are protected:9

Level Requirement Legal SaaS Relevance
FAL1 Bearer assertion (signed) Minimum for SSO — the assertion proves identity
FAL2 Holder-of-key assertion (assertion bound to a specific key or device) Higher assurance, suitable for sensitive matters
FAL3 Holder-of-key with hardware-backed cryptographic authenticator Maximum assurance — government, national security

Most legal SaaS platforms operate at FAL1, with signed SAML assertions over TLS (which we covered in Episode 13). Firms handling government contracts or national security matters may require FAL2, where the assertion is cryptographically bound to the user's session.10

What's Next

Episode 23 covers RBAC — Roles, Permissions and Scopes — how to structure who can do what inside your application, from firm administrator to paralegal to external client viewer.

Sources & Further Reading

Sources & references

  1. OASIS, SAML 2.0 Standard — the XML-based identity federation standard.
  2. NIST, SP 800-63C: Federation and Assertions — federal guidelines for identity federation.
  3. OWASP, SAML Security Cheat Sheet — implementation guidance and common vulnerability mitigations.
  4. GitHub Blog, Sign in as Anyone: Bypassing SAML SSO Authentication with Parser Differentials — CVE-2025-25291/25292 disclosure (March 2025).
  5. ProjectDiscovery, GitHub Enterprise SAML Authentication Bypass (CVE-2024-6800) — SAML signature wrapping in GHES.
  6. IETF, RFC 7644: SCIM Protocol — the standard for automated user provisioning.
  7. SSOJet, SCIM Provisioning Best Practices — practical guidance for SCIM implementation.
  8. sso.tax, SSO Wall of Shame — tracking vendors that charge premiums for SSO.
  9. NIST, SP 800-63C: Federation Assurance Levels — FAL1, FAL2, FAL3 definitions.
  10. IDManagement.gov, Enterprise Single Sign-On Playbook — federal SSO implementation guidance.
  11. PortSwigger Research, The Fragile Lock: Novel Bypasses for SAML Authentication — advanced SAML attack techniques.
  12. Endor Labs, CVE-2025-47949: samlify SAML SSO Bypass — signature wrapping in samlify library.