Security workshop · 7 chapters · 94 minutes
Enterprise auth, hands on.
Run a single sign-on flow on your laptop and read every step. Verify ID tokens, read a SAML assertion, map roles to permissions, then find a real cross-tenant leak and make the database stop it.
- SSO
- OAuth 2.0
- OIDC
- PKCE
- SAML
- RBAC
- Multi-tenant
- RLS
1 200 LEAK acme Wayne Industries
2 200 LEAK acme Stark Logistics
3 200 LEAK acme Oscorp
4 200 ok globex Initech
5 200 ok globex Hooli
3 invoices from another tenant. Chapter 06 fixes it in one line.
What you run and read
Identity provider
lab/sso/idp.pyOIDC code flow with PKCE, in memory.Tokens
lab/sso/tokens.pySign, decode and verify a JWT.Roles
lab/sso/rbac.pyRoles in, permissions out.Tenants
lab/postgres/rls.sqlIsolation in code, then in Postgres.7 short chapters
Each one is a few minutes of reading, one thing to run or break, and an exercise. By the end you can answer an enterprise customer's security review with a straight face.
Run it in a minute
You need uv and git. Then open http://127.0.0.1:8401 and sign in. Docker is only needed for the last chapter.
git clone https://github.com/jars-demo/enterprise-auth-demo.git cd enterprise-auth-demo/lab uv sync uv run python -m sso serve