Penv Cloud
Start free
Docs
Reference

Trade a CI OIDC token for a machine credential

Verifies the token against a trust you created, then mints an ordinary short-lived credential.

POST/api/v1/auth/oidc

Verifies the token against a trust you created, then mints an ordinary short-lived credential. Use it from a CI job that can mint an OIDC token, so you store nothing long-lived in the pipeline. We refuse a GitHub Actions token minted under pull_request_target.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

The OIDC token the CI platform minted for this run. Its audience must be the workspace id.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/auth/oidc" \  -H "Content-Type: application/json" \  -d '{    "token": "string"  }'
{  "credential": "string",  "expiresAt": "2019-08-24T14:15:22Z"}