Skip to content
API Reference
Get Started
Use Cases

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.

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 toUse caseWhat it coversEffort
Let an agent reach a system as the person who asked, so the log names that personAct as the user who askedFederating your identity provider, token exchange per request, per-user attribution in auditStart here
Have one agent give different people different reach, driven by the groups in my directorySame agent, different userGroup claims in policy, default deny, and where the snapshot boundary sitsBuilds on the first
Let a service authenticate without a secret in its configurationGive an agent its own identityWorkload identity as an issuer and a subject, and what the runtime has to be able to proveIndependent
Withdraw access in one place and show a reviewer that it stoppedRevoke once, access stopsWhat revocation reaches, what it does not, and how both sides appear in the logRead with any of the above
Permit an agent one tool on an MCP server and refuse the adjacent oneAllow one tool, deny the nextPolicy on the individual tool at the gateway, and why refusal beats restraintNeeds a gateway
Stop a coding agent on a laptop using the developer’s own production accessGovern a coding agentScoped credentials and a decision before each tool call, and where a local guardrail endsPer 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.

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.