Skip to content
Dashboard

What is just-in-time access?

Admin rights often outlast the work they were granted for. An engineer gets elevated access to roll back a broken deployment. The incident ends, but that access stays active. If someone later takes over the engineer's account or session, they can use any admin rights it still has.

Just-in-time access limits that risk by granting elevated rights only when needed and setting an expiry.

Copy link to headingWhat is just-in-time access?

Just-in-time (JIT) access grants elevated rights when needed for a limited time. These rights go beyond everyday permissions and can include admin access or permission to deploy to production. The grant's scope is the set of permissions it covers. When an eligible person or system requests access, policy determines whether to allow it or ask a person to approve it. The system then activates a role or provides a temporary session or credential. The grant expires at the end of that window.

JIT supports zero trust, a model that checks access to each resource without trusting a request simply because it comes from inside the network. Temporary privileges can cover one part of a business process and expire when the grant ends.

Copy link to headingWhat are the differences between standing privilege and just-in-time access?

Standing privileges stay active even when no one uses them. Someone who takes over an account can use its standing privileges as long as they have access to the account. A JIT grant limits elevated access to specific permissions and a set window.

Here's how standing and temporary access differ:

Standing privilege

Just-in-time access

Duration

Active until removed or changed

Active until the configured window ends

Attack surface

A compromised account can use standing rights at any time

A compromised account can use elevated rights only within the scope and window of an active grant

Audit evidence

Records of role assignments, changes, and reviews

A per-request record of who asked, why, who approved or which policy applied, and when access ended

Approval

At assignment, if required

Access evaluated at activation; human approval if required by policy

Revocation

Requires a separate change to a role or membership

Automatic if the target enforces expiry; verify that it removed access

If a role remains active but sees little use and needs manual removal, consider granting it on request for a limited time.

Copy link to headingWhy does just-in-time access matter?

JIT limits when a compromised account can use elevated rights and can give reviewers a record of how access was granted and removed:

  • Less damage from a stolen login: A compromised account can use the grant's permissions only while it's active. It can still use its everyday permissions and may qualify for another grant.

  • Permissions that fit the task: Least privilege sets which permissions an identity gets. JIT also limits how long the grant lasts.

  • Approval at the grant level: A person or a policy can authorize one temporary grant for several actions.

  • Easier audits: Keep records of who approved the grant, when it expired, and whether the target removed access.

Before using elevated permissions, someone has to request access and may have to wait for approval.

Copy link to headingCore components of just-in-time access

A JIT system defines who can request access, decides which requests to grant, and checks that temporary access ends.

Copy link to headingEligibility and access requests

Eligibility determines which permissions people and systems can request without holding them day to day. Base it on roles or attributes. An on-call engineer, for example, might be authorized to read production logs, whereas a contractor isn't. Ask for a reason, such as an incident or ticket number. If you reuse a broad standing role, you shorten its active period but grant the same broad permissions each time.

Copy link to headingApprovers and approval policies

A named approver can weigh the risks, but waiting for a decision can slow an incident response. A policy can handle routine requests and send riskier ones to a person. Indent lets teams request, approve, and revoke temporary access to infrastructure in Slack or via a web dashboard.

Copy link to headingTime-bound grants and short-lived credentials

Set an expiry for every temporary session, token, or role assignment. A token is a credential software presents to a service. A shorter lifetime limits how long a stolen token works, though the software may need to request tokens more often. With OAuth token exchange, software can use one token to request another with fewer permissions. A Vercel Function can use OpenID Connect (OIDC) federation to get temporary Amazon Web Services (AWS) credentials if the role's trust policy allows it. The function doesn't need to store a long-lived AWS access key. The same approach can replace long-lived CI tokens in build pipelines.

Copy link to headingAutomatic revocation and audit trails

Enforce expiry in the target system and verify that it removed access. Use a grant ID to link the request, the approval or policy decision, any credential ID, and the time access ended. Here's what that might look like during a production debugging session:

Time

Requester

Scope

Approver

Expiry

Log entry

14:02

On-call engineer

Read production logs for checkout

Policy (on-call plus open incident)

15:02

grant.issued with incident ID

14:19

On-call engineer

Roll back a production deployment

Team lead

14:49

grant.issued, deployment.rollback

14:49

System

Rollback scope

Not applicable

Expired

grant.expired, revocation verified

15:02

System

Log read scope

Not applicable

Expired

grant.expired, revocation verified

In this example, rolling back the deployment carries more risk than reading logs, so it needs a human approver and expires sooner. Record both the scheduled expiry and the time at which the target confirms it has removed access.

Copy link to headingHow just-in-time access applies to people and AI agents

People and AI agents differ in how long their tasks take and who answers for mistakes. An agent can repeat the same mistake many times before anyone notices.

Copy link to headingJust-in-time access for engineers and admins

Engineers may need elevated rights to debug production, deploy or roll back, or change firewall rules. Start with everyday permissions. Grant a named set of permissions for the task, then return to everyday access when the window ends. Keep the reason so a reviewer can check why the access was needed.

Check for shared admin accounts outside the request system. If one has standing privileges, anyone who signs in can use them without requesting approval or waiting for a grant. Those privileges have no JIT expiry.

Copy link to headingJust-in-time access for AI agents

In an incident, Vercel Agent can inspect the failed deployment and its build logs with read-only access. If it proposes redeploying the last successful build, it lists the permissions it needs and waits for an authorized user to approve the plan. For agents you build, grant only the permissions the task needs. If an agent acts on behalf of a user, grant only permissions that the user can delegate. Require human approval for high-impact actions or changes to the approved objective. Once the target enforces revocation, it rejects new requests using that credential. To stop work already in progress, you need a way to cancel it.

A server can't treat a chat client's message history as proof that someone approved a tool call. Check the approver's identity and permissions on the server. With signed approval requests, the server can verify that it issued the request for that exact tool call and those arguments.

Copy link to headingHow to implement just-in-time access without slowing teams down

People can bypass JIT if approvals take too long. Access can also remain active if no one checks whether it has expired.

Copy link to headingPlan break-glass access before you need it

When approvals stall during an outage, teams may fall back on permanent admin rights. Break-glass accounts give authorized responders a way to act if they can't sign in or get approval through the usual channels. Store credentials securely, alert on every use, and investigate unexpected sign-ins. After each use, review what happened and check that emergency access still works. Rotate credentials if policy requires it or if you suspect exposure.

Copy link to headingApprove low-risk requests automatically

A queue full of routine requests makes sensitive ones harder to spot. Automatically approve requests for limited-access that meet your policy. Require a person to review sensitive reads, destructive changes, and permission changes.

Copy link to headingKeep access windows short

A grant that lasts a whole shift leaves admin rights active long after a task that takes minutes. Set the shortest default window that fits each task, and let people request more time. If they ask for an extension every time they do a particular task, the default may be too short.

Copy link to headingConfirm that access was removed

A grant can expire in one system while access still works in another. At expiry, check that the target rejects the old access token. If the grant also uses a refresh token, check that it can't get a new access token. Alert if a check fails, and allow for any propagation delay in OAuth token revocation. Vercel Agent, for example, can create a temporary share link to a protected preview. It revokes the link when it finishes. If revocation fails, the link expires 15 minutes after creation.

Copy link to headingMeasure whether JIT is reducing risk

Track these measures as you roll out JIT:

  • Standing privilege count: The number of identities holding elevated rights outside an active grant. Track emergency exceptions separately.

  • Time to elevation: How long someone waits between requesting access and getting it. Track the median and 95th percentile to see typical waits and longer ones.

  • Revocation verification rate: The share of expired grants with confirmed removal in the target system. Investigate each failed check.

A falling count means fewer identities have elevated rights between tasks. Check the other two measures for long waits and access that stays active after expiry.

Copy link to headingHow Vercel supports just-in-time access for agents and production

Agents can request access to third-party services when their code runs. Vercel also lets you control who can make changes to production. Use your identity or access management system to grant people elevated roles for a limited time.

Copy link to headingGive agents short-lived tokens

A long-lived API key stored in an environment variable retains the same permissions across tasks. With Vercel Connect, an agent can call getToken to request provider credentials at runtime. Specify who the credential acts on behalf of and what it should be able to access. Whether you can limit it to a channel or repository depends on the provider. Connect handles OAuth refresh where supported. If the connector stores a long-lived API key, getting it at runtime doesn't shorten its lifetime.

By default, the SDK can reuse tokens for matching requests until 30 seconds before expiry. The next request fetches a new token. revokeToken asks the provider to revoke the grant if it supports revocation. Otherwise, the token can continue to work until expiry. Vercel Connect is generally available on all Vercel plans.

Copy link to headingRequire approval before agents make changes

Vercel Agent is in public beta on Pro and Enterprise. It is read-only by default and uses the requesting user's existing Vercel permissions. Plan approval covers the resources, actions, and permissions listed in the plan. Elevated access ends when the plan finishes, or someone cancels it.

In Vercel Agent Chat, pull request writes don't need Vercel plan approval. The agent uses the GitHub App installation's permissions for repositories linked to projects in the selected team. The team's Activity Log records session starts, requests for elevated permissions, and plan approvals made in the dashboard. It names the user who started the session or approved the plan.

Use tool approval policies to automatically approve or deny selected calls, or ask a person to decide. The toolApproval setting works on ToolLoopAgent, generateText, and streamText. The experimental experimental_toolApprovalSecret option lets the server verify that it issued the approval request for the exact tool call and arguments. The server also needs to check who approved it and whether they had permission. Keep the secret on the server. Don't put it in a client-exposed variable such as one prefixed with NEXT_PUBLIC_. These policies don't apply to tools the model provider runs.

Copy link to headingLimit who can change production

Use SAML single sign-on (SSO) for team access. It's available on Enterprise and as a paid add-on on Pro. On Enterprise, Directory Sync removes synced members from the Vercel team when they leave the connected directory. Use access roles to limit who has permission to Full Production Deployment. It covers production deploys from the command line, rollbacks, and promotions.

Copy link to headingSend audit records to your security tools

Enterprise Audit Logs record 400+ event types for team activity. Audit Log Drains can send supported events to a custom HTTPS endpoint, Amazon S3, or these security monitoring integrations: Datadog, Splunk, and Panther. For agents you build, log tool calls and record approval decisions in your application so you can see who authorized each action. Vercel's compliance documentation confirms its SOC 2 Type 2 attestation and ISO 27001:2022 certification.

Copy link to headingCut standing privilege for agents and production on Vercel

Start with people and agents that rarely use their elevated production permissions. Decide when to require approval based on what the grant allows, and set the window based on how long the task takes. On Vercel, use these controls:

  • Runtime credentials through Vercel Connect: Request access tokens for third-party services at runtime with supported OAuth connectors.

  • Plan-based sign-off in Vercel Agent: Review and approve operations that require elevated Vercel access one plan at a time.

  • Signed tool approvals in AI SDK: Require approval for high-impact tools with toolApproval and verify that the server issued the request for the exact tool call.

  • Identity-provider control of human access: Enforce SAML SSO, sync membership through Directory Sync, and reserve Full Production Deployment for the roles that need it.

  • Audit evidence outside Vercel with Audit Log Drains: Stream supported team audit events to your security tools on Enterprise.

Use the AI SDK and Vercel Connect to build a Shopify operations agent that checks orders and requests approval before changing a product.

Copy link to headingFrequently asked questions about just-in-time access

Copy link to headingHow do IAM, PAM, and privileged identity management relate to just-in-time access?

Identity and access management (IAM) covers who or what can access a system and what they can do. Privileged access management (PAM) focuses on elevated permissions. Privileged identity management (PIM) is a related term. For example, Microsoft Entra PIM lets eligible users activate privileged roles on demand. JIT is one way to manage privileged access.

Copy link to headingWhat is zero standing privilege?

Zero standing privilege (ZSP) means no identity has elevated permissions by default. An admin account with standing privileges keeps them even if a JIT system only lets people use the account temporarily. Document and monitor emergency exceptions.

Copy link to headingHow long should a just-in-time access window last?

Choose a window that fits the task and its risk. The 2018 DHS guidance gives eight hours as an example for a temporary privileged account. A narrow production change may need much less time. If someone needs longer, require a new request.

Reference Architecture

Choose a stack and work through the decisions behind it, with curated documentation, guides, templates, and courses to help you build.

  • Agent stack: Build and operate agents with models, tools, and durable workflows.
  • Web applications: Choose rendering, data, authentication, and caching approaches.
  • Backends: Choose a runtime, connect services, and run background work.

Browse all stacks

Build with prompts

Build an app, extend an agent, or improve your project with ready-to-use prompts for your coding agent.

Ready to deploy?