Deno Deploy
Deployments authenticate as the app and context they run in.
Deployments authenticate as the app and context they run in.
Identity proof
The token has to come from https://oidc.deno.com, and its sub claim has to match the workload you named. We compare that claim byte for byte, with no wildcards.
Every token also has to name your workspace as its audience. Ask for this audience and no other. A token requested for two audiences fails every exchange.
Console fields
| Field | Example | Advanced | What it pins |
|---|---|---|---|
| Organization slug | acme | no | Every Deno organization shares the issuer, so this is what scopes the trust. |
| App | api | no | |
| Context | production | yes |
A field marked advanced carries a default and stays behind the disclosure until you open it.
The console also asks which project and environment this identity reaches and which role it gets, with the credential lifetime behind Advanced.
Trust
Built from the example answers above:
| What | Value |
|---|---|
| Issuer | https://oidc.deno.com |
| Claim compared | sub |
| Subject | deployment:acme/api/production |
| Identity name | deno-api-production |
We name the identity for you, so the form never asks for one.
Console snippet
import { getIdToken } from "jsr:@deno/oidc";
const T = await getIdToken("YOUR_WORKSPACE_ID");
const r = await fetch("https://penv.cloud/api/v1/auth/oidc", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ token: T }),
});
Deno.env.set("PENV_TOKEN", (await r.json()).credential);Related
- Machine identity
- Connect a Platform in the console
- Deno Deploy documentation: the subject is the value most often set wrong