Workload and AI agent identity hands-on
You build an environment in which workloads, humans and AI agents prove who they are without a single static password, limit every agent to exactly the rights of its tool, lock a stolen credential on every level and finally solve a leak with three causes from your own logs.
- Free · no subscription
- 17 days · 90–120 min each
- 90 drills · with expected output
# on id1
$ sudo ls -l /var/lib/rancher/k3s/server/db/
Expected
total 12772 -rw-r--r-- 1 root root 8413184 Dec 1 08:14 state.db -rw-r--r-- 1 root root 32768 Dec 1 08:15 state.db-shm -rw-r--r-- 1 root root 4626792 Dec 1 08:15 state.db-wal
As a book
The whole course to take with you, for reading away from the screen. Reading online stays free.
What you'll be able to do
- Find static secrets in pods, environment variables and Git and replace them with short-lived, audience-bound identities
- Use service account tokens, the cluster as an OIDC issuer and SPIFFE/SPIRE – up to mTLS without a service mesh
- Let AI agents act on behalf of a human with Keycloak and OAuth token exchange, with one scope per tool and short-lived tokens
- Secure MCP servers according to the specification, revoke access in an emergency and trace every action back to the human through an audit trail
What you need
LabTwo VMs with Ubuntu 24.04, SSH access and sudo on a shared network – the first with at least 4 vCPU/8 GB (Keycloak and a small language model on the CPU), the second with 2 vCPU/4 GB
BackgroundLinux in the terminal, Kubernetes basics (pods, service accounts, kubectl), reading Python
InternetInternet access from the VMs for the downloads (k3s, Keycloak, SPIRE, Ollama and the model); no API key needed
Prior knowledgeThe course is self-contained: cluster, identity provider, SPIRE, the language model and every attack are built in the course. It is for platform engineers, security engineers and developers who want to run services and AI agents without stored passwords.
Set up your labKubernetes locally · Lab VMs
Training plan
One day = one sitting. Every day ends with a checkpoint and a challenge. About 29 hours in total.
Training days
- Preparation The building – two VMs, one cluster and the first building badgeset up access to two VMs, install the course tools, build a Kubernetes cluster with two nodes and look at the identity every pod already brings along 90 min
- Day 1 The problem – finding and exploiting static secretsset up a service with a classic database password, find every place where that password ends up afterwards, steal it with an overly generous ServiceAccount and use it 100 min
- Day 2 ServiceAccount tokens – door, photo and expiry dateunderstand what a ServiceAccount token is bound to, request tokens specifically for an audience and a short lifetime, verify them the way a service would, and rebuild the till from Day 1 so that its badge is only valid for one door 110 min
- Day 3 The cluster as an OIDC issuer – the specimen card at the entranceverify a ServiceAccount token without calling the API server, watch a forgery fail that check, and reconfigure the cluster so that services outside it can verify its tokens – without otherwise opening up the API server 100 min
- Day 4 Federation without a cloud – the central badge office accepts the building badgeset up Keycloak so that it trusts the cluster, and log a pod in to Keycloak with its ServiceAccount token – without a client secret 120 min
- Day 5 SPIFFE and SPIRE – the HR department and its gatekeepersrun a SPIRE server outside the cluster, log SPIRE agents in the cluster in with their ServiceAccount token, and see how an agent recognizes a pod without believing anything it says 120 min
- Day 6 Registration and SVIDs – personnel file, staff badge and gate passCreate registration entries, have the first SVIDs issued, and read and verify both forms – X.509 and JWT 90 min
- Day 7 mTLS without a mesh – both show each other their badgeconnect two services on different nodes over mutually verified TLS, with X.509-SVIDs from SPIRE and an allow list of SPIFFE IDs – without a service mesh, without a certificate in a file 90 min
- Day 8 Short lifetimes and rotation – new badges, a new stampwatch how SPIRE renews badges on its own, switch the trust domain's CA by hand without dropping a connection, and see whom an outdated bundle locks out 90 + 30 min
- Day 9 People – OIDC with Keycloak, signing in, reading tokens, scopescreate a visitor in Keycloak, sign her in to a program without a browser using the device sign-in, read and understand her three tokens, and use scopes to define what a token is valid for 90 min
- Day 10 AI agents – an assistant with a master keyrun a language model locally with Ollama, build a Python agent with two tools that operates a warehouse service with its own token, and experience first-hand how this agent becomes a “confused deputy” – when told to, and through a doctored delivery note 120 + 10 min
- Day 11 Token exchange – the assistant acts with power of attorneytake the master key away from the assistant and have it work instead with a token that it exchanges for the logged-in human (OAuth 2.0 Token Exchange, RFC 8693) – with exactly that person’s permissions, and visible in the warehouse as “Anna, via the assistant” 120 min
- Day 12 Permissions per tool – one pass for each errandgive the assistant a separate, narrowly tailored token for each tool that lives for only one minute, and ask the human before every write tool – so that the doctored delivery note no longer books anything out, even with Anna’s permissions 120 min
- Day 13 Securing an MCP server – the tool desk with a noticerun an MCP server for the warehouse tools that protects itself the way the MCP specification requires – a notice (Protected Resource Metadata), bearer tokens only for itself, a scope per tool, and never passing the client's token on to the warehouse 120 min
- Day 14 Revocation and emergency – the building badge is goneblock a stolen building badge and a stolen user token layer by layer – Kubernetes, Keycloak, session, service – and measure which block takes effect when and which does not 120 min
- Day 15 Audit trail – who did what on whose behalfstore Keycloak events, extend the visitor logs of the warehouse and the tool desk with session and token numbers, and trace an operation backwards from the warehouse entry to Anna's login in the browser 100 min
- Day 16 The final case – a leak with several causestrace a real leak from the warehouse back to its source using the trails from Day 15, back up each cause with a log entry, fix the causes one after the other, verify after each measure and record the result in a report
Ready? Preparation takes 90 min.
Reading works without an account. A free account saves your progress.
Related courses
More on this topic: AI infrastructure courses, Security engineering courses