Skip to content
All writing
July 15, 20265 min read

I Built a SAML Metadata Validator That Never Touches Disk

Validating SSO metadata is a ritual every identity engineer knows. Here's why the feature I'm proudest of is one you can't see — and how parsing untrusted XML safely shaped the whole tool.

  • SSO / SAML
  • AppSec
  • XXE
  • Privacy-first

If you've ever stood up SSO for an enterprise app, you know the ritual. Someone sends you a metadata.xml file, you squint at a wall of angle brackets, and you try to find the one Entity ID, ACS URL, or expired certificate that's quietly breaking the whole integration.

I've done that ritual more times than I can count — as a customer success engineer, as a technical account manager, and now as a forward deployed engineer. So I built SAMLCheck: paste or drop a SAML metadata document in, get a clean PASS / WARN / FAIL verdict out, in seconds.

But the feature I'm proudest of isn't a feature you can see. It's that the file never touches disk, never gets logged, and never leaves memory. Here's why that constraint shaped the entire tool.

The problem with "just paste your metadata here"

SAML metadata isn't usually secret, but it's not nothing either. It contains your identity provider's signing certificates, your endpoint topology, entity identifiers — the kind of information a security team does not want sitting in some random web service's request logs, S3 bucket, or analytics pipeline.

And yet most "free online XML validators" do exactly that: they POST your document to a backend, parse it server-side, and you have no idea what happens next. For a developer debugging their own app that's an annoyance. For someone validating a customer's production identity configuration, it's a non-starter.

So rule one for SAMLCheck: the raw XML is processed entirely in memory and is cleared the moment validation finishes. No storage. No logging of the document. The same validation engine runs behind both the UI and the API, and neither one persists what you give it.

Parsing untrusted XML without getting wrecked

Here's the part that's easy to underestimate: the moment you accept XML from a stranger, you've invited one of the oldest and nastiest classes of web vulnerability into your app — XML External Entity (XXE) injection and its cousin, the billion-laughs entity-expansion attack.

A malicious metadata file can define external entities that make a naive parser:

  • read local files off the server (file:///etc/passwd),
  • make outbound requests from your infrastructure (SSRF),
  • or expand a tiny document into gigabytes of memory and take the process down.

The irony is almost poetic: a security tool that parses XML carelessly becomes a security hole.

SAMLCheck uses fast-xml-parser configured under strict settings that reject external entities outright. External entity resolution is off. Entity expansion is bounded. The parser's job is to extract structure, not to go fetch things on the document's behalf. The tool treats every uploaded file as hostile until proven otherwise — which, for untrusted input, is exactly the right default.

What it actually checks

Once the document is parsed safely, the validation engine pulls out the things that actually break SSO integrations:

  • Entity ID / Issuer — present, well-formed, and matching what you expect.
  • Assertion Consumer Service (ACS) endpoints — the URLs and bindings assertions get posted back to.
  • Single Logout (SLO) endpoints — the piece everyone forgets until logout mysteriously doesn't work.
  • X.509 certificates — including the one check that quietly causes 2 a.m. outages: expiration.

Each finding is categorized and rolled up into a single PASS / WARN / FAIL verdict, so you don't have to interpret a report — you get an answer, then the details if you want them.

An API, because tools should compose

The same engine is exposed as a REST endpoint — POST /api/validate — with JSON in and JSON out. That means SAMLCheck isn't just a web page you visit; it's something you can wire into a CI pipeline, a provisioning script, or a pre-flight check before you push an identity config to production.

What I took away from building it

  1. Security constraints make better products, not just safer ones. "Never touch disk" sounds like a limitation. In practice it forced a cleaner architecture — a single in-memory engine, no storage layer, nothing to leak. The secure version was also the simpler version.
  2. The dangerous input is the input you built the tool to accept. SAMLCheck exists to read XML from people I don't know. That's precisely the thing I had to defend against.
  3. Actionable beats exhaustive. Collapsing the output to PASS / WARN / FAIL, with the detail one click away, is what made it genuinely useful for identity and security teams.

Try it

SAMLCheck is live at samlcheck.vercel.app and open source on GitHub. Drop in a metadata file — yours or a sample — and you'll have a verdict before you've finished reading this sentence. Nothing you paste leaves your session.

Davis Barillas is a forward deployed engineer working across security, identity, and AI. I build small, sharp, privacy-first tools around the problems I run into in the field.