- Its agent finishes, even if the agent fails
- You think its session token leaked, because anyone with the token can call every API in the session’s access bundle until the session ends
- The agent no longer needs access, such as a long-running agent you’re shutting down
- Admins of the Agent Vault project, for any session in the project
- Members of the project, for their own sessions
- A machine identity, for the sessions it created, including sessions it created on behalf of a user
- Anyone who holds the session’s token
Revoke the session
- Dashboard
- CLI
- API
- Python SDK
- Node.js SDK
In your Agent Vault project, go to Sessions, open the session’s menu, and select Revoke Session.If you’re an admin of the project, select All Sessions to find sessions that other users and machine identities created.
Revoked sessions
- The Sessions page shows the session as Revoked, and keeps the session so you can still see the access bundle and services the agent had
- You can still view the session’s logs and change its label
- Infisical deletes the credentials of the session’s inline services right away
- Infisical writes an audit event for the revocation
Sessions left active
If the agent’s machine shuts down mid-run, or your code exits before it revokes the session, the session keeps working until it expires. To limit how long that can last, set the session’s duration a little longer than the agent’s longest run, instead ofnever.
Troubleshooting
A session stays Active after the agent stopped
A session stays Active after the agent stopped
Nothing revoked the session. This happens if:
- The machine shut down, or the CLI’s process was killed, before the CLI could revoke the session
- Your code exited before it reached the revoke call
Revoking a session fails with 401
Revoking a session fails with 401
The access token you sent expired. Log in again to get a new access token, then revoke the session.