
[100% Off] Non-Human Identity Security: Secrets, Tokens And Ai Agents
Find, scope, rotate and revoke the keys, tokens and service accounts behind AI agents, with free labs on your laptop
What you’ll learn
- Classify non-human identities and explain how AI agents differ from classic service accounts
- Build an NHI inventory with an owner, purpose and expiry for every key, token and account
- Find leaked secrets in git history with gitleaks and TruffleHog, and revoke instead of delete
- Replace static keys with short-lived OpenBao tokens and workload identity federation
- Delegate to agents safely with OAuth token exchange, the act claim and key-bound tokens
- Apply the MCP authorization rules: audience checks, no token passthrough, per-client consent
- Rotate, revoke and offboard credentials, then detect misuse with JSON logs, jq and Python
- Run a credential incident playbook end to end in a local capstone drill
Requirements
- Comfort with a terminal and basic Python (reading and running short scripts)
- Basic IAM ideas: users, roles, permissions, API keys
- A Mac, Linux or Windows computer that runs Python 3.11 or 3.12. All labs use free tools, with no paid account, no Docker and no cloud subscription.
Description
This course contains the use of artificial intelligence.
Every AI agent you deploy runs on credentials: an API key for the model, an OAuth token for the tools it calls, a service account for the data it reads, and a CI token that deployed it. Vendors estimate that these non-human identities already outnumber the people in most organisations, and they leak, linger and collect privileges. In 2026, an attacker prompted an agent to reveal its own model API key and used credits worth about 600,000 dollars. An admin key that sat in a public repository and was never revoked led, months later, to a poisoned software release. A compromised AI tool’s OAuth access opened a path into a cloud platform’s environment variables.
In this course we secure those identities with a fictional energy retailer, Fenwray Energy, as its IAM lead, SOC lead and platform engineer bring five kinds of machine identity under control. We follow the OWASP Non-Human Identities Top 10 and the OWASP agentic guidance on identity and privilege abuse. We use the open standards that solve the problem: OAuth token exchange for agents acting on behalf of people, proof-of-possession tokens that are useless when stolen, workload identity federation instead of stored keys, SPIFFE certificates, and the authorization rules of the Model Context Protocol.
You practise on your own machine with free, open-source tools: OpenBao for secrets and short-lived tokens, gitleaks and TruffleHog for leaked keys, a local certificate authority, and small Python scripts we read line by line. There is no cloud account, no Docker and no paid licence. Cloud workload identity on AWS, Microsoft Azure and Google Cloud is explained with diagrams and the documented configuration, so you can map each lab to your own platform.
What you will be able to do:
- Explain how AI agents differ from service accounts, and why that changes identity design
- Build an inventory of non-human identities with an owner, a purpose and an expiry for each
- Find leaked secrets in code and in git history, and know why deleting them is not enough
- Replace static keys with short-lived, scoped credentials and workload identity federation
- Let an agent act on behalf of a user with token exchange, without handing it the user’s full rights
- Bind tokens to keys so a stolen token fails, and stop token passthrough in MCP servers
- Rotate and revoke credentials without breaking production, and offboard identities nobody owns
- Log, detect and triage misuse of agent credentials with JSON logs, jq and Python, and run a credential incident playbook
The course includes section quizzes, four assignments, a practice test, and downloads: an NHI inventory template, an agent identity design checklist, a rotation and revocation runbook, a credential incident playbook, a detection pack and a lab kit.
This is an intermediate course. We assume you are comfortable in a terminal, can read short Python scripts, and know basic IAM ideas such as roles and permissions.
This is not a prompt-injection or AI red-teaming course. We do not attack models or agents. We secure the identities they run on.
Author(s): Dr. Amar Massoud








