Try Bifrost Enterprise free for 14 days.
Request access
Back to Blog
FeaturesGovernance

Workload identity in Bifrost: Govern jobs and services like users, without storing virtual keys

Reehan

Dec 02, 2026 · 8 min read

Workload identity in Bifrost: Govern jobs and services like users, without storing virtual keys

Workloads call Bifrost with a virtual key that someone has to store, copy and replace. With workload identity in Bifrost Enterprise, they can call it with a short-lived token from the platform they run on instead, as a service account you govern like any user.

Most of the identity work at an AI gateway is about people: who signs in, and which models and tools they and their agents can reach. But a growing share of AI traffic has no person behind it. It comes from workloads.

A "workload" is software that runs and does its job on its own, with no person at the keyboard. Examples - a deploy job in GitHub Actions, a script that runs every night, a service running in the cloud. Today, an increasing number of these workloads call AI models. (Our Cross App Access post covered agents that act for a signed-in person. This one covers software that acts for no one.)

A gateway asks every caller who they are, for common reasons: to decide which models and tools they can use, to charge the right budget, and to show the right name in the logs. A workload needs an identity the gateway can validate, just like a person.

In Bifrost, that identity has usually been a virtual key. A virtual key does three jobs: it says who's calling, what they can use, and which budget they spend. The problem is that anyone who has a copy of the key, becomes that caller.

Where a workload's virtual key ends up

Consider a fictional 'Payments' team in an enterprise. Every time code is merged, a GitHub Actions job (a script GitHub runs on each change) asks a model to write the release notes. To call models via Bifrost, this job needs a virtual key. Here's how that key usually travels:

  1. An engineer creates the key and saves it as a GitHub secret, an encrypted value GitHub hands to the job when it runs.
  2. The team's nightly job needs model access too, so the same key goes into its AWS Lambda settings.
  3. A teammate copies it into a file on their laptop to debug a failed run.
  4. The engineer who created it moves to another team. The key keeps working for anyone who has a copy.
  5. Replacing it means finding every place it was pasted and updating each one without breaking the jobs that use it.
0:00
/0:19

And keys like this do leak. GitGuardian counted 1,275,105 leaked secrets for AI services in 2025, up 81% on 2024. Anyone who gets hold of a leaked key can send requests on your account and add a lot to your bill.

A token from the platform, in place of a stored key

Cloud and CI platforms already offer a solution to this problem - workload identity federation. Instead of storing a key, a workload asks the platform it runs on for a token that proves who it is.

For example - GitHub, AWS and Microsoft Entra can each issue one: GitHub to an Actions job, AWS to an IAM role (the identity AWS gives a piece of software), and Entra to a managed identity (the same thing, for software running in Azure).

Think of the token as a short message from the platform: "This is a job in the acme/payments repository, on the main branch". It's signed, so the receiving service can check that GitHub wrote it and that nobody changed it. It names the service it's meant for, and it expires within minutes or hours.

The receiving service (Bifrost, in this post) decides once which platforms it trusts and what each workload can do. Once done, the workload gets a fresh token whenever it needs one. There's nothing to store or replace, and a copied token works only until it expires.

To understand this better, consider a GitHub Actions job that deploys code to AWS. Previously, this used to need an AWS access key saved as a GitHub secret. With workload identity federation, this job can show AWS its GitHub token instead and get temporary access, with no AWS key stored in GitHub.

With Bifrost Enterprise, the Gateway accepts these tokens too.

Why do this at the Gateway

Some model providers now accept workload identity themselves, including OpenAI and Anthropic. But each provider is set up separately, for each workload. Through Bifrost, a workload is set up once and holds no key for any provider, and provider credentials stay in one place.

Bifrost maps each workload to a service account: a Bifrost user that isn't a person. That gives a workload the same controls as your people:

  • A service account needs an access profile, just like any user. This profile decides which models and MCP tools (the tools agents call through Bifrost) the workload can use, and sets its budget and rate limits. A job stuck in a loop stops at that budget.
  • Several workloads can share one service account: A team's work often runs in more than one place. Its AKS service, its Lambda and its GitHub job can all map to one service account, share one budget and show up under one name in the logs. Give a workload its own service account when it needs its own budget, so a busy deploy job can't use up a production service's share.
  • You stop a workload in one place: Turn off its mapping, and its next request is refused
  • Model providers never see the token: Bifrost removes it before calling a provider, and passes it on only to agents you've registered to receive it.

In action: One service account for the Payments team's three workloads

To illustrate this, let's take three of the Payments team's workloads. They all need to call models through Bifrost:

  • release-notes, the GitHub Actions job, writes release notes for each merge.
  • charges-digest, an AWS Lambda function (code AWS runs on a schedule or on demand), summarizes the day's failed charges every night.
  • dispute-classifier, a service on Azure Kubernetes Service (AKS), sorts each incoming payment dispute.

Until now, each of them needed a virtual key stored wherever it runs. With workload identity, none of them stores a key. You create one service account, payments-service, give it an access profile, and map all three workloads to it.

The 'payments-service' service account in Bifrost mapped with three workloads

Every call from the three is logged under payments-service.

How the 'release-notes' job reaches Bifrost

Here's how the release-notes job, running in GitHub Actions, proves who it is and reaches models through Bifrost:

  1. The job asks GitHub for a token addressed to Bifrost: GitHub signs a short-lived token that names the repository and branch.
  2. The job sends its request to Bifrost with that token, in place of a virtual key.
  3. Bifrost checks the token and runs the request as the service account: It checks that GitHub signed it, that it's addressed to Bifrost and that it hasn't expired. Then it finds the mapping for acme/payments on main and runs the request as payments-service, under its access profile.

The AKS service and the Lambda work the same way, with tokens from Entra and AWS. None of the three stores a key.

Questions your security team will ask

QuestionAnswer
Can a person's sign-in act as a service account?No. A token runs as a service account only when it matches a mapping. If a mapped value could also appear in a person's token, Bifrost refuses the mapping until you add a rule that lets only workload tokens through.
How much does one mapping cover?One exact value: one repository and branch, one IAM role, or one managed identity.
What if a token is stolen?It works only until it expires. By default, Bifrost refuses tokens valid for more than 24 hours, and you can set a different limit for each issuer.
Who can add a mapping?Only admins, by default. Mapping a workload is its own permission, separate from adding a trusted platform, and every mapping change is recorded in the audit log.

A mapping for acme/payments on main covers every workflow that runs on that branch, so limit who can change workflows there.

Move workloads over one at a time

Virtual keys still work. Use a virtual key when a workload's platform can't give it a token. Workload identity turns on with the first mapping, so you can move workloads over one at a time. A request that carries both a token and a virtual key is refused, so each workload uses one or the other.

Get started

Workload identity is supported in Bifrost Enterprise from v2.5.0. Setup takes three steps: create a service account with an access profile, tell Bifrost which platforms to trust, and map each workload.

Each platform needs a few steps on its side too. The workload identity docs cover AWS, Azure, GitHub and other OIDC platforms.