Menu

Validating SAML Responses: Signatures, Audience & Clock Skew
📰

Validating SAML Responses: Signatures, Audience & Clock Skew

DEV Community: authentication·Muhammad Ali Mughal·about 2 hours ago
#kjiCESqF
#devtoauthentication#devto#dev#assertion#saml
Reading 0:00
15s threshold

During a security review of a client's SSO integration, I found that their SAML endpoint accepted a response that was perfectly signed by the customer's identity provider, but issued for a completely different application. The IdP was shared: the same Okta tenant also signed assertions for the customer's HR tool. The app checked the signature and the certificate, then trusted the NameID. It never compared the Audience with its own entity ID. Anyone at that customer with access to the HR tool's SSO flow could, in principle, have replayed an HR assertion into the SaaS app. Nothing exotic, no XML trickery, just one missing comparison. We fixed it in an afternoon, and it is the reason this post exists.

I wrote this with help from AI tools and checked the details against the SAML 2.0 Core and Profiles specifications, the OWASP SAML Security Cheat Sheet, and the documentation of the maintained libraries mentioned below.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.