OpenAI Has Machine Identity Now. Which Jobs Should Lose API Keys?

Illustrated infographic summarizing: OpenAI Has Machine Identity Now. Which Jobs Should Lose API Keys?

By Greg Nowak. Updated 8 October 2026.

Start with unattended OpenAI jobs that have a clear owner, a dependable machine identity, and a tested recovery path. Those are the strongest candidates for replacing long-lived API keys with short-lived access tokens.

For a business owner, the benefit is fewer persistent credentials to distribute and revoke. For operations and agency teams, the practical question is whether authentication will remain reliable when certificates rotate, deployments change, or someone leaves. Removing a key should leave you with clearer ownership and manageable maintenance.

mTLS and API-key replacement are different decisions

OpenAI’s mutual TLS guide describes mTLS as an extra certificate check. Requests need an accepted client certificate alongside their bearer credential. Adding mTLS to an API-key-based job leaves that API key in place.

Workload identity federation exchanges an existing machine identity for a short-lived OpenAI token. X.509 federation uses a verified client certificate; API calls then need both the token and an accepted certificate. OIDC federation uses identity tokens from supported environments instead.

My recommendation is to use the identity your infrastructure already manages well. A team with reliable certificate automation may prefer X.509. A workflow already receiving supported OIDC tokens should evaluate that route before adding certificate infrastructure.

Which jobs should move first?

Workload situation Suggested direction What to establish first
Server automation with managed client certificates X.509 federation Automatic certificate renewal, protected private keys, and a dedicated workload identity.
CI or cloud job with a supported identity-token issuer OIDC federation An exact identity mapping and reliable token retrieval.
Job keeping a bearer credential but needing certificate verification mTLS with its existing credential Every affected caller supports client certificates and the required API host.
Several unrelated jobs sharing one key Separate identities first Named owners and distinct permission requirements for each job.
Connector exposing only an API-key field Retain a restricted key while checking vendor support Supported authentication options, secure storage, rotation, and a review owner.
A starting decision matrix. Confirm the caller’s actual capabilities before choosing its authentication method.

A scheduled reporting job can make a good pilot: it is repeatable, easy to observe, and often recoverable by rerunning it. A customer-facing workflow deserves the same review, but usually needs stronger availability testing. Keep client businesses and production environments separately accountable when planning agency access.

For GitHub Actions federation, the job needs id-token: write permission and must request the audience configured in OpenAI. That permission allows identity-token issuance; it does not grant repository write access. Match the intended repository, environment, or branch identity so an unrelated workflow cannot obtain the same access.

What an X.509 migration actually involves

In the Platform console, certificate trust is configured under Organization settings > Security > Mutual TLS. Identity providers are under Security > Workload Identity Provider. Create or select the project service account before configuring its mapping.

The X.509 implementation guide requires a non-empty openai.subject derived from a stable certificate attribute. Map an exact subject to the intended service account. Restrict who can issue certificates with that identity and who can change the mapping.

The runtime needs its certificate chain, private key, provider ID, and service account ID. Present the leaf certificate followed by required intermediates; OpenAI does not retrieve missing intermediates for you. Exchange the certificate at POST https://mtls.auth.openai.com/oauth/token, then call https://mtls.api.openai.com/v1 with the returned bearer token and an accepted client certificate. Supported SDK configurations automate token renewal; check the guide’s version requirements before upgrading.

According to the token exchange reference, tokens last at most one hour and cannot outlive the certificate. There is no refresh token. Manual implementations must repeat the exchange before the returned expires_at, allowing for clock differences and network delays.

Set explicit mapping permissions. Leaving them blank adds no federation-specific scope restriction: access follows the service account’s project and organization roles. Shorter credential lifetimes do not automatically narrow permissions.

Roll out without surprising the rest of the business

  1. Inventory callers. Record each deployment, OpenAI project, credential, owner, permissions, and failure contact. Include infrequent jobs that may stay silent during a short pilot.
  2. Prepare a small pilot. Uploading certificate trust does not enforce mTLS; activation changes request behaviour. Activate in a non-critical project first and test every expected caller before expanding the scope.
  3. Test the lifecycle. Check renewal, expired certificates, missing intermediates, rejected mappings, and temporary exchange failures. Confirm alerts reach someone who can act. Define how failed business work will be resumed without duplicate processing.
  4. Write the recovery procedure. Document the settings to restore, who can change them, and how to pause affected jobs. Test it while the pilot is still small.
  5. Rotate with overlap. Activate the new trust anchor before deactivating the old one. Move and test callers, then retire old trust. Revoke previous API keys after checking all scheduled and occasional consumers.

Keep the remaining credential risks visible

OpenAI’s documented limitations matter here: workload identity tokens cannot call Admin API endpoints, so administrative automation still needs an admin API key. X.509 bearer tokens are also not cryptographically bound to their certificates; protect returned tokens as secrets.

OpenAI does not check certificate revocation lists or OCSP in this flow. Plan incident response around its trust, provider, and mapping controls, and account for already-issued tokens. Protect private keys and keep credentials out of logs.

If you want help deciding where to start, get in touch about an OpenAI authentication review. I can help turn a caller inventory into a migration backlog, agree the pilot and acceptance checks with your developers, and make the operational handover clear.

Related on GrN.dk

Need help with this kind of work?

Discuss your OpenAI authentication review with Greg Get in touch with Greg.

Sources

Latest articles

An ingredient change may mean a menu needs updating, even when the recipe’s modification date stays the same. Here is how AI can help with review and approval in WordPress.

Check whether AI crawlers can reach your service and product content. Compare response HTML with rendered pages, then identify practical CMS and rendering fixes.

Improve site search for customers who use everyday language. See where synonyms, semantic retrieval and behavioural signals help, while keeping product codes reliable.

Follow customer data through n8n, OpenAI and your CRM. Check who can access retained copies, what redaction hides and whether deletion works before scaling.

When checkout fails, your operations provider needs concrete evidence to work with. See how AI, dmesg and journalctl can gather the evidence into a useful incident ticket.

OpenAI’s hosted Evals platform is closing. Preserve your tests, validate replacement scoring and keep releases covered before the October and November 2026 deadlines.

Decide which AI-assisted pages to keep, improve, combine or remove. Check claims, page overlap and metadata, then put clear review controls into your CMS.

Use October to trial daily AI reorder recommendations before Black Friday. Get your Shopify data, lead times and budget in order before turning recommendations into purchases.

When an OpenAI request stalls, customers need an accurate status. Set sensible retry limits, preserve submissions, and make unresolved work visible.

I learned server operations by breaking my own servers. I want someone who stands next to me while I do it, then does it themselves the week after.