Labs / Who Goes There / Kerberos, SSO, MFA & zero trust

Lab 3 of 4 · Kerberos, SSO, MFA & zero trust

Single sign-on: one login, many services

Sign in once with OpenID Connect and SAML, and see how the portal trusts it.

Open this lab Pro 5 steps

The idea

Single sign-on gives each person one place to prove who they are, an identity provider (IdP), and every application trusts the IdP's signed word instead of holding passwords. Here idp runs Dex, an OpenID Connect IdP, and a SAML responder; portal is a finance app that trusts it. From the laptop, follow one login: the password reaches only idp, and portal accepts a signed token.

The redirect dance and the one-way trust
The redirect dance and the one-way trust

Steps

  1. What the IdP advertises

    An OpenID Connect IdP publishes a discovery document at a fixed URL: its issuer (the name it signs every token with), where a browser logs in, where tokens are issued, and its jwks_uri, where its public signing keys live. Every relying party, an app that trusts the IdP, starts here. Fetch the document, then the keys.

    laptop:~# curl -sS http://idp.lab:5556/dex/.well-known/openid-configuration
    laptop:~# curl -sS http://idp.lab:5556/dex/keys
  2. The portal sends you to the IdP

    Open the portal's login, and it does not ask for a password. It answers with a redirect to the IdP, carrying its own client_id, the redirect_uri to come back to, and response_type=code: it wants an authorization code, not your password. Start a login and read the headers.

    laptop:~# curl -sS -i http://portal.lab:8080/login

Pro

3 more steps in the app

  1. Exchange at the token endpoint
  2. The portal validates the token
  3. The same login as a SAML assertion
Get Pro

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Start with a free account: Google or email, no card.

Open this lab