Using the SAML workflow

Copied from the id-proto-debugger release 0.9.5 user guide, which is the debugger this service embeds. Its addresses are the embedded ones: the debugger is https://localhost:8444/ and its api https://localhost:8444/api. Accessing the debugger says how to reach, enable and disable it.

The debugger is a SAML service provider. It builds the request, sends it to an identity provider you choose, and shows the response that comes back:

  • the request — saml_request.html, from the SAML Protocol card;
  • the response — saml_response.html, opened when the assertion consumer service has caught what the identity provider posted.

Protocol Version defaults to SAML 2.0. SAML 1.1 is a different exchange, walked in the tutorials and described in SAML 1.1. SAML 1.0 (reference only) fills the form and does not complete a sign-in.

These pages are for somebody using the debugger. Why a check is made the way it is lives in the developer notes listed at the end.

Before you start

Open https://localhost:8444/ and sign in as a console administrator (Accessing the debugger), then choose SAML Protocol. The deployed copies at idptools.com and test.idptools.com have the pages too. What they can finish is under static sites.

The identity provider is yours to choose. Nothing on these pages is specific to one product. The values you need are that provider’s metadata, the entityID and assertion consumer it will accept, and an account it will sign in. The screenshots here use iya-sts at https://localhost:8081. Another provider has its own registration and its own sign-in page.

Where a URL is fetched from. With a backend, Load Metadata is fetched by the api (GET /samlmetadata), and an HTTP-Artifact response is resolved by the api as well. The URL has to be reachable from the api process. A name that works in the browser can still fail there when the api runs in another container and localhost means that container. Upload Metadata reads a file in the browser and does not use the api.

What the static sites can and cannot do

The deployed copies are S3 and CloudFront with no backend. They store nothing. The assertion consumer and the single logout endpoint on those sites are Lambda@Edge functions (/samlacs, /samlslo).

Works on the static sites:

  • SAML 2.0 sign-in over HTTP-Redirect and HTTP-POST. The identity provider’s POST is received at the edge and handed to saml_response.html.
  • Loading metadata in the browser, when the identity provider sends CORS headers for the debugger’s origin. Otherwise use Upload Metadata.
  • Reading the response, checking signatures, and decrypting an encrypted assertion. Decryption uses the service-provider private key, which stays in the browser.
  • The decoders and the SAML Assertion Tool. They need no network.

Not available on the static sites:

  • HTTP-Artifact. Resolving the artifact is a SOAP call the browser does not make. It needs the api.
  • Single logout on a site whose edge function is not deployed for /samlslo. The containerized stack answers it on the api.

Optional: iya-sts setup

setup-iya-sts.md is only for iya-sts. It says what product mode requires before a sign-in succeeds: a registered service provider, the signing certificate, and an account whose password is real. Every other identity provider has its own way, and the tutorials do not depend on that page.

Configuration reference

Every pane, field and button, with its element id, the specification that defines it, its default, and whether it is stored.

Page Reference
saml_request.html and saml_response.html reference.md

Protocol

What the workflow sends, which binding carries it, and what the response page checks.

   
SAML 2.0 Web Browser SSO, the three bindings, and Single Logout protocol.md
SAML 1.1, and why it is not an older spelling of 2.0 ../saml11.md

Tutorials

Each tutorial is one way the workflow is used. The pictures were taken against iya-sts. Your identity provider’s sign-in page will look different. The debugger’s panes are the same.

You want to Tutorial
Sign in over HTTP-Redirect and read the assertion Sign in over HTTP-Redirect
Send the AuthnRequest as a POST HTTP-POST
Ask for an artifact and let the api resolve it HTTP-Artifact
End the session Single Logout
Speak SAML 1.1 SAML 1.1

An encrypted assertion is decrypted on the response page. iya-sts does not encrypt a Web Browser SSO assertion, so that walk is not pictured here. The field is in the reference.

Developer notes

Regenerating the screenshots

The screenshots are taken by the debugger project’s own Selenium jobs, against the standalone debugger and this service, so the address bar in them shows https://localhost:3000 where the embedded debugger is https://localhost:8444. How to retake them is in that project’s guide.