Skip to content
Docs · Vertex AI and others, no key

AI agents

Connect Google Vertex AI, or any token service, without a key

Yomenie signs a short identity token per agent, and Google's token service (or any OAuth 2.0 token exchange) trades it for an access token. No key is stored.

Updated

On this page

Your AI teammates can call Google Vertex AI through Yomenie without a Google API key, which matters when your Google Cloud organisation doesn’t allow API keys. Yomenie is an identity provider your Google Cloud project trusts: for each call it signs a short identity token naming the agent (or the person), and Google’s security token service trades it for an access token that lasts up to an hour. Nothing long-lived is stored, so there is no key to leak or rotate.

It’s the same as Anthropic without an API key, using a standard: OAuth 2.0 Token Exchange (RFC 8693), which Google calls workload identity federation. Any other service that speaks the standard works the same way, set up as data: see Any token exchange.

What you need

  • An owner or admin of your Yomenie workspace (or a member who can manage AI providers), with the team vault set up.
  • Someone who can create workload identity pools and grant roles in the Google Cloud project that runs Vertex AI, with Vertex AI turned on there.

Your workspace’s issuer is on Vault › Providers › Keyless access. For a workspace called acme it is https://yomenie.us/oidc/acme.

1. Trust Yomenie in Google Cloud

In the project that runs Vertex AI (in the console under IAM & Admin › Workload Identity Federation, or with gcloud):

A pool:

gcloud iam workload-identity-pools create yomenie \
  --location=global --display-name="Yomenie"

An OIDC provider in the pool, trusting your workspace’s issuer:

gcloud iam workload-identity-pools providers create-oidc yomenie \
  --location=global --workload-identity-pool=yomenie \
  --issuer-uri="https://yomenie.us/oidc/acme" \
  --attribute-mapping="google.subject=assertion.sub" \
  --attribute-condition="assertion.sub.startsWith('workspace:acme:')"
Field Value
Issuer (URL) https://yomenie.us/oidc/acme
Audiences leave the default (Yomenie’s tokens carry the provider’s own name)
Attribute mapping google.subject = assertion.sub
Attribute condition assertion.sub.startsWith('workspace:acme:')

Vertex AI User for the pool’s identities. There is no service account to make: the role goes to the identities Yomenie signs for, directly. You need your project number (the console’s project dashboard, or gcloud projects describe PROJECT_ID --format='value(projectNumber)'):

gcloud projects add-iam-policy-binding PROJECT_ID \
  --role=roles/aiplatform.user \
  --member="principalSet://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/yomenie/*"

To let one AI teammate in rather than the whole workspace, grant the role to its subject instead: principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/yomenie/subject/workspace:acme:agent:<agent id>.

2. Connect it in Yomenie

Open the Vault’s ⋯ › Providers, press Connect a provider, pick Google Vertex AI, then Without a key. Fill in:

Field Where it is
Google Cloud project ID the project picker, like acme-ai
Project number the project dashboard, like 123456789012
Pool ID yomenie, as created above
Provider ID yomenie, as created above

Press Check connection. Yomenie signs a token, trades it at Google and makes one smallest call to Vertex AI (about one token). If Google says no, nothing is saved and the message says what to check: usually the issuer, the attribute condition, or the role on the project. Google logs each refused exchange in the project’s audit logs.

Your AI tool can do the same in one call:

add_api_provider {
  "preset": "vertex",
  "project": "acme-ai",
  "google": { "projectNumber": "123456789012", "poolId": "yomenie", "providerId": "yomenie" }
}

3. Call Gemini

Agents call models as vertex/<model>, like vertex/gemini-2.5-flash, through the usual address with their Yomenie credential, exactly as with a key (Call models and other APIs through Yomenie). Set one as an agent’s model, or the workspace’s default, and cloud runs use it too.

Any token exchange

Any service that takes the OAuth 2.0 Token Exchange (RFC 8693), or the JWT bearer grant (RFC 7523), and trusts an OIDC issuer can be connected the same way, as data, with no change to Yomenie. In Connect a provider › Your own server › Without a key, or with your AI tool:

add_api_provider {
  "preset": "custom",
  "name": "acme",
  "baseUrl": "https://llm.acme.dev/v1",
  "exchange": {
    "grant": "rfc8693",
    "tokenUrl": "https://sts.acme.dev/oauth/token",
    "audience": "https://llm.acme.dev",
    "scope": "inference"
  }
}
Field What it is
grant rfc8693 (Token Exchange, form-encoded) or rfc7523 (JWT bearer, JSON)
tokenUrl where Yomenie trades the identity token: public https
audience the identity token’s audience, also sent as audience with rfc8693
scope optional: the scopes to ask for
params optional: up to 8 fixed, non-secret fields the service wants (ids, not secrets)

With rfc8693 Yomenie sends grant_type=urn:ietf:params:oauth:grant-type:token-exchange, the identity token as subject_token (type urn:ietf:params:oauth:token-type:jwt), requested_token_type=urn:ietf:params:oauth:token-type:access_token, the audience and the scope. The answer must hold access_token and expires_in. The access token goes to the server as Authorization: Bearer unless you set auth otherwise, and its format (protocol), fixed headers and models work as for any own server.

Add "checkOnly": true to try it without saving.

Who the provider sees

Every token names who the call is for:

Caller Subject
An AI teammate (its key, a cloud run, or a person holding it) workspace:acme:agent:<agent id>
A person’s own AI tool (a person pass) workspace:acme:person:<person id>

What’s checked, and what’s recorded

As for any provider: the agent isn’t paused, no deny rule matches, rate and token limits hold, and each call is in the audit log. Each token trade is in the audit log too (proxy.token_minted), with who it was for, never the token. The token address and the server must both be public https; the access token goes only to the server’s host. Yomenie keeps the access token in memory only, and reuses it until two minutes before it expires.

Turn it off

Remove the role or the pool’s provider in Google Cloud (or the trust in your token service): the next trade fails and calls stop. Remove the provider in Vault › Providers to stop Yomenie asking.