A shared database password in the Devin environment gives every Devin session standing access, with no record of who asked for it. Formal replaces that password with Devin’s own short-lived OIDC identity, a Slack approval for each session, and logs that name the person behind the agent.
What does Devin security with Formal cover?
Devin by Cognition runs each session in its own VM, with whatever credentials you put in its environment. Devin security with Formal covers the two paths that matter most: database queries, which go through the Formal Connector (PAM), and outbound HTTPS from the Devin VM, which goes through the Formal Endpoint installed in the environment.
For Devin AI security, the point is that neither path depends on a static key stored in Devin. Both authenticate with Devin’s OIDC token, both evaluate your policies, and both attribute each action to the human who started the Devin session.
How does Devin OIDC authentication work?
Every Devin session gets a short-lived identity token signed by Devin, with claims such as org_id, devin_id and requesting_user_email (Devin’s OIDC documentation). Cognition’s setup-devin-oidc action installs the devin-oidc CLI, which exchanges the session token for a token scoped to your Formal integration’s audience.
In Formal, you create an OIDC integration from the Devin preset (issuer https://app.devin.ai), restrict it to your organization with claims.org_id == "<DEVIN_ORG_ID>", and map it to a devin machine user. The preset’s End-User Email Expression, claims.requesting_user_email, resolves the requesting user to a Formal user; if no Formal user matches, Formal mints no database credential. We explain why we built this in Giving Cloud Agents Production Access with OIDC, Not Secrets.
Just-in-time database access for Devin, approved in Slack
Devin starts with no database access. A policy blocks the devin machine user by default, and access opens for one Devin session after the person who started it approves. That is just-in-time access built from two platform pieces: a workflow that asks in Slack, and a policy suspension that expires.
The scope comes from verified token claims, never from the request. The suspension matches the requester’s email and the devin_id claim. Devin writes the request payload (its reason and the requested duration), so the guide keeps those fields out of the suspension’s match condition, and the approver sees both in Slack before saying yes.
The guide sends the request to the person who started the session; the workflow’s ask-in-chat action can also target a Slack channel or a list of approvers. For the policy, the Permission, the workflow and the formal-db.sh script Devin runs, follow the guide to give Devin just-in-time database access.
How do you control what Devin sends out?
Install the Endpoint’s headless Debian package in your Devin environment blueprint, with oidc.provider = "devin" and Transparent Mode set to fail closed. The package ships a formal.service systemd user unit that Devin snapshots keep, so every later session starts the Endpoint automatically.
Here’s the limit to know: the Endpoint passes a connection through untouched unless a network rule matches it, so you choose which destinations it inspects. The documented example matches github.com and api.github.com for Devin’s machine user and blocks merging and auto-merge, so a human still merges. The cloud agents guide covers the setup, shared with Cursor Cloud Agents. On laptops, network rules can match the Devin CLI process with process.is_devin_cli.
What does a Devin enterprise rollout need?
- Matching identities. Every Devin user needs a Formal user with the same email address, and needs to be in the Slack workspace connected to Formal.
- A reachable Connector. The Devin VM must reach the Connector listener in front of your Postgres resource. If the Connector is on a private network, connect the VM to it, for example with a Tailscale subnet router.
- The right issuer. The Devin preset uses
https://app.devin.ai. As of November 2026, Cognition documents a separate issuer URL for enterprise deployments on a custom domain, so confirm yours with your Devin administrator first. - Infrastructure as code, if you want it. The whole setup maps to the Terraform resources
formal_user,formal_integration_oidc,formal_permission,formal_policyandformal_workflow.