CLAUDE LABJP
MODEL — Claude Fable 5 reached general availability on June 9 with a 1M-token context, always-on adaptive thinking, and 128K outputPLATFORM — The Developer Platform adds code execution, an MCP connector, a Files API, and prompt caching up to one hourMCP — Admins can provision MCP connectors org-wide via Okta, giving users zero-touch access on first loginSANDBOX — Claude Managed Agents now run in your own sandbox and connect to private MCP serversCODING — Opus 4.8 scores 72.5% on SWE-bench and 43.2% on Terminal-bench, excelling at long-running workLINEUP — Opus 4.8, Sonnet 4.6, and Haiku 4.5 lead the lineup; pick the right one per taskMODEL — Claude Fable 5 reached general availability on June 9 with a 1M-token context, always-on adaptive thinking, and 128K outputPLATFORM — The Developer Platform adds code execution, an MCP connector, a Files API, and prompt caching up to one hourMCP — Admins can provision MCP connectors org-wide via Okta, giving users zero-touch access on first loginSANDBOX — Claude Managed Agents now run in your own sandbox and connect to private MCP serversCODING — Opus 4.8 scores 72.5% on SWE-bench and 43.2% on Terminal-bench, excelling at long-running workLINEUP — Opus 4.8, Sonnet 4.6, and Haiku 4.5 lead the lineup; pick the right one per task
Articles/API & SDK
API & SDK/2026-06-22Advanced

Drop Your Static Claude API Keys: Moving CI and Production to Keyless Auth with Workload Identity Federation

Workload Identity Federation is now generally available on the Claude Platform. This guide walks through replacing long-lived sk-ant- keys with short-lived OIDC tokens, including keyless GitHub Actions auth, the migration steps, and token refresh design.

Claude41API25Security3AuthenticationCI/CD17

Premium Article

Have you ever pushed a file containing an API key to GitHub and felt your stomach drop? It happened to me once, back when I was juggling several repositories as an indie developer, and I spent a frantic afternoon revoking and rotating. There was no real damage, but the incident taught me something at a gut level: the danger isn't carelessness, it's the structure. A long-lived secret string will inevitably end up somewhere — in history, in logs, in CI — and stay there.

In June 2026, Workload Identity Federation (WIF) became generally available on the Claude Platform. In one sentence: you stop holding a long-lived sk-ant-... key entirely and instead have a short-lived token minted at request time. Once the premise of "store the key" disappears, most of the headaches — leakage, rotation, inventory — fall away with it. Running automated publishing across several Dolice sites by myself, I found this a quiet change with an outsized payoff. Let's walk through how it works and how to land it in CI and production, including the spots where people get stuck.

The structural risk in static keys

The trouble with a static key isn't performance or price — it's the absence of an expiry. Once issued, an sk-ant-... key is valid forever unless you explicitly revoke it. From the moment that string is exposed until the instant you finish revoking, the entire window is attackable.

And exposure routes are surprisingly varied: commit history, CI log output, shell history files, container image layers, stack traces shipped to your error monitor. If even one slips through, anyone holding that string can impersonate you. Because the key itself is the credential, this is structural, not a matter of discipline. I wrote up the emergency response in how to handle a committed API key, but the strongest defense is to not hold a key at all.

From "holding a key" to "minted on demand"

WIF inverts how you hold credentials. A traditional API key is itself the credential. With WIF, a token is issued — only when needed — to a principal called a service account. You don't hold the key; the key is minted for you.

The flow has three stages:

  1. An identity provider (IdP) you already operate issues a signed OIDC token (a JWT) to the workload. On most platforms this is ambient: a Kubernetes projected service-account token, the Google Cloud metadata server, Azure IMDS, or the GitHub Actions OIDC endpoint.
  2. The SDK presents that JWT to Claude's token endpoint. Anthropic verifies the signature and claims, then exchanges it for a short-lived Anthropic access token.
  3. The SDK attaches that token to every request and re-exchanges it before it expires. Your application code calls the API as usual, passing no api_key at all.

The key point is that the SDK carries the exchange-and-refresh loop for you. All you configure is "which rule, and whose JWT, to exchange."

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
A concrete path from static sk-ant- keys to OIDC tokens that expire in minutes
A GitHub Actions setup that calls the Claude API with zero API keys in CI secrets
The trap where ANTHROPIC_API_KEY silently shadows federation, and how ant auth status reveals it
Designing token lifetime as the lesser of the rule's token_lifetime_seconds and the JWT's remaining life
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

API & SDK2026-06-21
Connecting Managed Agents to Services You Don't Want to Expose: MCP Tunnel Design
How to connect Claude Managed Agents to an internal MCP server that is never exposed to the public internet. We cover the MCP tunnel, self-hosted sandboxes, authorization boundaries, and graceful degradation when things break.
API & SDK2026-06-22
Putting a Ceiling on the pause_turn Loop: Running Long Server Tools Safely Unattended
A production design for continuing pause_turn safely in unattended runs, where long server tools like web_search and code execution are involved. Covers branching all four stop_reason values in one loop, capping continuations and wall-clock time, and accumulating usage across paused segments.
API & SDK2026-05-30
Catching Claude Quality Regressions With an Eval Harness
I tweaked a prompt by one line and, for a different set of inputs, the output quietly got worse. Here is the eval harness I built to protect Claude's production quality across every prompt change and model update, with full implementation code and real operating numbers.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →