Antonio Braccolino, Identity & Access, home
EN · Language: English

IAM interview questions · Protocols

Explain a SAML SP-initiated login.

In plain wordsThe shop sends you to the bank with a request slip; the bank checks you and sends you back with a sealed letter the shop can verify.

How it works

1) The user opens the SP. 2) The SP creates an AuthnRequest (with an ID) and redirects the browser to the IdP SSO endpoint, often with HTTP-Redirect binding. 3) The IdP authenticates the user. 4) The IdP builds a Response with a signed Assertion: Subject/NameID, Conditions (NotBefore, NotOnOrAfter, AudienceRestriction), AuthnStatement and attributes.

5) The browser auto-posts it to the SP’s Assertion Consumer Service (HTTP-POST binding). 6) The SP verifies the signature with the IdP certificate from metadata, checks audience, time window, Destination, InResponseTo and that the assertion was not used before, then creates its session.

A concrete example

A user logs into a SaaS via SAML and gets an error “invalid audience”. In the decoded assertion the AudienceRestriction says https://app.example.com while the SP expects https://app.example.com/saml/metadata. The fix is aligning the SP entity ID in the IdP configuration, not disabling the check.

Mistakes to avoid

  • Not mentioning XML signature wrapping: validate the signature on the exact element you read.
  • Accepting unsolicited responses everywhere (IdP-initiated) without thinking about the risk.

They may also ask you

  • How do you troubleshoot a failing SAML login?
  • What changes in IdP-initiated SSO?