Workload identity
Choose a workload identity provider
Choose a provider-issued identity for cloud workloads, or a scoped Bulgur token for local and other runtimes.
Use the identity your runtime already has
A workload identity lets a supported cloud or CI runtime prove its identity to Bulgur without storing a long-lived Bulgur token in that workload. You create a policy that pins provider identity attributes to one Bulgur project and one concrete environment. The workload exchanges its provider-issued token for a short-lived Bulgur session with read-only access to that target.
Choose the provider that matches where the code runs. If a provider or hosting runtime is not listed here, use a scoped Bulgur token instead of assuming an undocumented OIDC flow is supported.
An organization owner or admin creates policies in organization settings. API tokens cannot create or edit workload identity policies. Policy changes and disablement revoke existing Bulgur sessions.
Provider guide
Each guide explains its required provider setup, policy fields, CLI and SDK configuration, and known limits.
| Where it runs | Auth mode and clients | Policy pins |
|---|---|---|
| GitHub Actions | github-oidc · CLI only | Repository and owner IDs, exact ref and GitHub Environment; choose allowed events. |
| Vercel | vercel-oidc · Node SDK only | Stable team and project IDs plus Preview or Production. |
| AWS | aws-oidc · CLI and Node SDK | Account-specific issuer, 12-digit account ID, and exact IAM role ARN. |
| Fly.io Machines | fly-oidc · CLI and Node SDK | Organization and app IDs from the signed token; configure the exact organization slug. |
| Google Cloud Run | gcp-oidc · CLI and Node SDK | Dedicated service account's numeric unique ID. |
| GitLab.com CI/CD | gitlab-oidc · CLI and Node SDK | Project and namespace IDs, protected exact ref, job environment, and permitted pipeline sources. |
| CircleCI Cloud | circleci-oidc · CLI and Node SDK, 1.4.0+ | Organization, project, checkout source/ref, config source/ref, and context IDs. |
| Bitbucket Pipelines | bitbucket-oidc · CLI and Node SDK, 1.4.0+ | Workspace slug/ID, repository ID, exact branch, and deployment environment ID. |
| Buildkite | buildkite-oidc · CLI and Node SDK, 1.4.0+ | Organization and pipeline IDs, exact ref, step key, and allowed source types. |
| Azure App Service or Functions | azure-oidc · CLI and Node SDK, 1.4.0+ | Entra tenant ID, managed identity principal/object ID, and dedicated API audience client ID. |
Choose CLI or SDK access
For a command or child process, set the documented provider mode and workload identity ID, then use bulgur run or bulgur pull. run injects values into one child process; pull writes an output file. Use the provider-specific guide for required environment variables and platform details.
For a server-side Node app, use loadValues with the provider's auth mode and the identity ID. It returns a request-local object and does not modify process.env. Use load only when startup-time environment mutation is intended. Provider auth does not silently fall back to token credentials when it fails.
const { loadValues } = require("bulgur");
async function main() {
return await loadValues({
auth: "<provider-auth-mode>",
identityId: "<bulgur-workload-identity-id>",
});
}
main().catch(() => {
console.error("Could not load Bulgur values");
process.exitCode = 1;
});These providers require Bulgur CLI/SDK 1.4.0 or newer and a matching server version. CLI/SDK 1.3.0 included GitHub Actions, Vercel, AWS, Fly.io, Google Cloud, and GitLab.com. CircleCI, Bitbucket, and Buildkite passed hosted Cloud runtime tests with 1.4.0 and hosted check tests with 1.4.1. Azure App Service passed a hosted Cloud runtime test; its hosted 1.4.1 check has not yet been verified. See each provider guide for scope.
Install a compatible client
Use Bulgur CLI or Node SDK 1.4.0 or newer with a server version that supports the provider. The npm 1.3.0 package does not contain CircleCI, Bitbucket, Buildkite, or Azure support.
npm install bulgur@^1.4.0CLI binaries target macOS and Linux. A source build must include the provider and be paired with a server version that supports it.
Use a scoped token when provider identity is unavailable
Local development commonly uses a project-bound full API token with the CLI. For a server-side SDK or hosting platform, use a runtime-scoped token expressed as a Bulgur DSN and store it in that platform's encrypted environment settings. The DSN is a credential: restrict it to one project and environment and rotate or revoke it if exposed.
For Railway or DigitalOcean App Platform, configure the scoped BULGUR_DSN in the app's environment settings when you are not using one of the documented provider identity integrations. This uses Bulgur token authentication; it does not claim that those platforms provide a Bulgur-compatible OIDC token.
# Store in the platform's protected runtime settings
BULGUR_DSN=bulgur://<runtime-token>@api.bulgur.dev/<org>/<project>/<environment>Keep the policy narrow
- Use a dedicated provider identity for each workload that needs a different Bulgur boundary.
- Bind each policy to one project and one non-Shared environment. That environment receives inherited Shared values, but the identity cannot directly target Shared or a sibling environment.
- Anyone who can control a trusted workflow, identity, or app can use it to read the policy's values. Limit access to the workload configuration and provider identity.
- Disable or delete a policy when the workload stops using it. This revokes Bulgur sessions; it does not revoke the provider's source token.