Identity and Authentication for AI
ISC2 AI Security · Lesson 22 of 34 · 2:55:44
YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗
Learning with these videos? Subscribe for new courses and exam-style questions.
Subscribe on YouTube (opens in a new tab)In this lesson
Lesson 22 of the free ISC2 AI security series (pilot exam, domain 4, secure AI architecture, engineering, and identity and access management (IAM)). In this lesson: human and non-human identities, non-repudiation and accountability, machine to machine authentication, federation, single sign-on, and MFA, secrets on AI platforms, and every action, a known actor. With three quick checks and a recap, and Ravenmoor Payments, a fictional payment provider, as the running example.
Study notes
The text of this lesson, to read at your own pace. Information as of November 2026.
Who changed the payout account?
Ravenmoor has about three thousand employees, and more than forty thousand non-human identities: service accounts, API keys, pipelines, and now AI agents. Last month, an agent changed a merchant's payout account, and the logs only showed a shared service account. This lesson covers how to identify and authenticate AI systems, so that every action has a known actor.
Human and non-human identities
Start by classifying identities. Human identities belong to employees, contractors, and customers. Non-human identities include workloads, such as training jobs and inference services, as well as services, tools, and AI agents. Agents are a special case: they act with some autonomy, often on behalf of a human, so they need their own identity, linked to the person or process that they serve. Classifying identities tells you which controls apply, since non-human identities cannot use MFA, but they can use short-lived, automatically rotated credentials.
Non-repudiation and accountability
Accountability needs identity architectures that support non-repudiation: proof of who did what, which the actor cannot deny. Give every agent and workload a unique identity, and never a shared service account. When an agent acts for a user, log both: the agent's identity, and the user it acts for, as a delegation chain. Sign important requests, and keep tamper-evident logs, so neither the agent nor its operator can dispute an action later. Then, when something goes wrong, the trail leads to a specific identity, and to the human accountable for it.
Machine to machine authentication
Machine to machine authentication lets workloads and agents prove their identity without a person. A common pattern is the OAuth client credentials flow: the workload authenticates to an authorization server, and receives a short-lived access token for a specific audience and scope. Mutual TLS adds certificates on both sides, so each service proves its identity to the other. Workload identity platforms issue these credentials automatically, based on where the workload runs, so no static secret is stored. Prefer short-lived, scoped tokens to long-lived API keys, which leak, and rarely expire.
Federation, single sign-on, and MFA
For humans, federated identity lets one trusted identity provider vouch for users across systems, through standards such as SAML or OpenID Connect. Single sign-on, built on federation, gives users one login for their AI tools and platforms, and lets security disable access everywhere at once. Multi-factor authentication, or MFA, protects those logins, and phishing-resistant methods, such as passkeys, matter most for administrators of AI platforms. Partners and providers can join that federation too, so their staff never need local accounts at Ravenmoor. Every human login then leaves a consistent trail in one place.
Secrets on AI platforms
AI platforms are full of secrets: provider API keys, vector database credentials, tool tokens, and signing keys. Keep them in a secrets manager or vault, inject them at runtime, and rotate them automatically. Never place secrets in prompts, system instructions, or the model's context: a model can be tricked into repeating anything it can see. Scan code, notebooks, container images, and logs for leaked secrets, and revoke any that you find. And give each agent its own credentials, scoped to its tools, so one leak does not expose everything.
Every action, a known actor
Put together, every actor in an AI system has an identity, human or not. Humans authenticate through federation, single sign-on, and MFA. Workloads and agents use machine to machine authentication, with short-lived tokens. And every action ties back to an identity, and to an accountable person.
Recap
Let's recap. Classify identities as human or non-human, including workloads, services, tools, and agents. Unique identities, delegation chains, signed requests, and tamper-evident logs support non-repudiation. Machine to machine authentication uses short-lived, scoped tokens, mutual TLS, and workload identity instead of static keys. Federation, single sign-on, and MFA protect human access. And secrets live in a vault, rotate automatically, and never enter prompts.
Quick checks for this lesson
The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.
Ravenmoor’s three AI agents all call the payment system with the same shared service account. What does this break?
- Data residency
- Model explainability
- Rate limiting
- Non-repudiation and accountability
Show the answer
Non-repudiation and accountability
With a shared account, nobody can prove which agent acted, so non-repudiation and accountability break. “Data residency” is wrong, since residency is about where data is stored. “Model explainability” is wrong, because explainability is about why a model decided, not who acted. And “Rate limiting” is wrong, since rate limits still work on a shared account, although they cannot tell the agents apart.
A Ravenmoor batch job calls the model provider’s API with a key created three years ago, and never changed. What is the better design?
- A longer API key
- Short-lived tokens from workload identity
- MFA for the batch job
- One key shared with the other jobs
Show the answer
Short-lived tokens from workload identity
Workload identity issues short-lived, scoped tokens automatically, so no static key is left to leak. “A longer API key” is wrong, since a longer key is still a static secret that never expires. “MFA for the batch job” is wrong, because MFA is designed for humans, and a batch job cannot answer it. And “One key shared with the other jobs” is wrong, since sharing a key across jobs makes leaks wider, and actions harder to attribute.
A developer stores the vector database password in the system prompt of Ravenmoor’s assistant, so that the model can use it. What is the main risk?
- The prompt becomes too long
- The password expires sooner
- The model can be tricked into revealing it
- The vector database slows down
Show the answer
The model can be tricked into revealing it
Anything in the model's context can be extracted through prompt injection, so secrets never belong there. “The prompt becomes too long” is wrong, since length is a minor issue next to a leaked password. “The password expires sooner” is wrong, because placing a secret in a prompt does not change when it expires. And “The vector database slows down” is wrong, since performance is not the concern here.