Penv Cloud
Start free
Docs
Reference

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

FieldExampleAdvancedWhat it pins
Organization slugacmenoEvery Deno organization shares the issuer, so this is what scopes the trust.
Appapino
Contextproductionyes

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:

WhatValue
Issuerhttps://oidc.deno.com
Claim comparedsub
Subjectdeployment:acme/api/production
Identity namedeno-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);