Use Cases
The problems teams bring to Keycard, what the solution looks like for each, and where to start building.
Each page here starts from a problem rather than a feature. Find the one that matches what you are trying to do, read what the solution looks like, then follow the link into the guide that builds it. New to Keycard? The Quickstart and How Keycard works come first.
Which one is yours
Section titled “Which one is yours”The question that separates these cases is whose authority the agent carries when it reaches a system, and whether that person is present.
flowchart TD
A[An agent needs to reach a system] --> B{Acting for a person?}
B -->|Yes, and they are present| C[Act as the user who asked]
B -->|Yes, several people, different reach| D[Same agent, different user]
B -->|Yes, but nobody is present| E[Act for an absent user]
B -->|No, it acts as itself| F[Give an agent its own identity]
G{Or limiting an agent you already run?} -->|It reaches an MCP server| I[Allow one tool, deny the next]
G -->|It runs on a developer machine| J[Govern a coding agent]
K[Something needs to stop] --> L[Revoke once, access stops]
Start with Act as the user who asked if you are evaluating Keycard for the first time. It is the shortest path to seeing per-user attribution work end to end, and most of the other patterns build on it.
| I want to | Use case | What it covers | Effort |
|---|---|---|---|
| Let an agent reach a system as the person who asked, so the log names that person | Act as the user who asked | Federating your identity provider, token exchange per request, per-user attribution in audit | Start here |
| Have one agent give different people different reach, driven by the groups in my directory | Same agent, different user | Group claims in policy, default deny, and where the snapshot boundary sits | Builds on the first |
| Let a service authenticate without a secret in its configuration | Give an agent its own identity | Workload identity as an issuer and a subject, and what the runtime has to be able to prove | Independent |
| Withdraw access in one place and show a reviewer that it stopped | Revoke once, access stops | What revocation reaches, what it does not, and how both sides appear in the log | Read with any of the above |
| Permit an agent one tool on an MCP server and refuse the adjacent one | Allow one tool, deny the next | Policy on the individual tool at the gateway, and why refusal beats restraint | Needs a gateway |
| Stop a coding agent on a laptop using the developer’s own production access | Govern a coding agent | Scoped credentials and a decision before each tool call, and where a local guardrail ends | Per developer machine |
Every page carries a Common questions section answering what a security reviewer asks, so the page a builder reads to understand the pattern is the same page a reviewer can be sent.
How these differ from the guides
Section titled “How these differ from the guides”A use-case page explains the problem, the shape of the solution, and what you end up with. It carries diagrams and configuration, no application code and no terminal commands.
A guide builds the thing. It carries prerequisites, a walkthrough, code in Python, TypeScript, and Go, and troubleshooting.
Read the use case to decide whether a pattern fits. Follow the guide to implement it.