Private Model Deployment: Stop Handing Over Long-Lived Tokens
Baseten and Hugging Face have launched read-only Trusted Publishers; deployments are issued a one-hour read-only token that can only pull a single private repo and cannot write. Includes the OIDC flow and three-step configuration.
Private model weights live in private Hugging Face repos. When deploying to an external platform, many teams are still handing over long-lived access tokens. This approach is like leaving a spare key under the doormat: convenient, but anyone passing by might find it.
In a November 24, 2026 post, Baseten announced that it has partnered with Hugging Face to join Trusted Publishers with read-only access, and claims to be the first inference provider to pull private Hugging Face weights via OIDC using short-lived, read-only tokens.
Original post link: Baseten on X
The Baseten blog lays out the problems with long-lived Hugging Face tokens plainly: it does not expire unless you manually delete it; its permissions often exceed what deployments need—a classic read token can read every private repo you can access, including repos under your organization; and it is rarely rotated, because rotating a token requires operations in both Hugging Face and Baseten, and once coordination costs rise, teams can't be bothered to do it.
Trusted Publishers could already issue short-lived tokens at deployment time, but those tokens could still write to repos. For deployments that only pull weights, that permission was still too broad. Baseten proposed a read-only option to Hugging Face, and it went live within days. Now inference providers receive a token that is valid for 1 hour, can only pull from a single repo, and cannot make changes.

The flow uses OIDC. When deploying a model, Baseten creates a signed identity token that states which organization and team this deployment belongs to and what type of workload it is—for example, a model build that needs to download weights. Hugging Face verifies the signature, then checks whether the organization, team, and workload type match the Trusted Publisher settings. If they match, it issues a short-lived read-only token. There is no long-lived token to leak, and no rotation is needed.
Configuration has three steps. First, use the Baseten CLI to find the organization and team ID; then, in the Hugging Face repo settings, add Baseten as a read-only Trusted Publisher, scoped to the organization and team; finally, point the Truss configuration at the repo:
weights:
- source: hf://acme/private-model@main
mount_location: /models/private-model
auth:
auth_method: HF_OIDC
hf_oidc_resource: acme/private-model
Step-by-step instructions, gated models, and volume sync are in the Baseten documentation.
This support is also folded into Baseten's existing OIDC capabilities, which previously supported pulling weights from S3 and GCS. The blog says more security posts are coming, with the next one covering API key hygiene.
One take: whether secure defaults can spread depends on integration cost. A three-step setup isn't heavy, but if every inference platform has its own OIDC setup, teams will still find it annoying. Narrowing scope to read-only, short-lived, single-repo access is the right direction; the next question is whether the industry will make it the default option, rather than just another configuration table that has to be maintained manually.
Original blog post: Deploy private Hugging Face models without sharing your access token

发布时间: 2026-11-25 05:25