Still using permanent cloud keys for inference deployments? Baseten splits permissions into three stages
Private model weights and LoRA adapters both have to be fetched from cloud storage. The easiest option—permanent keys plus public network access—grants excessive permissions. Baseten uses short-lived OIDC, read-only sealed volumes, and egress allowlists to narrow access across the build, deploy, and serve stages.
Inference services often need to connect to external data. Private base weights live in S3, LoRA adapters live in another bucket, and they are fetched when requests come in. To keep things simple, deployments are given a permanent cloud key, and public network access is left open. In a November 25 security series post, Baseten points out the problem: the model receives more permissions than it needs, creating too large an attack surface.
The approach it proposes is not complicated: each deployment gets short-lived credentials, permissions are limited to the resources it actually uses, and network access is allowed only to approved hosts.

These controls cover the deployment lifecycle. The article uses base weights and LoRA adapters as an example: the build stage copies the base weights, the deploy stage gives each replica the same copy of the weights, and the serve stage fetches adapters per request.
- Build: Replace long-term cloud keys with OIDC. Long-term keys must be securely stored, usage-tracked, and regularly rotated, and if leaked they can be used from the moment of exposure until they are disabled. With OIDC, Baseten issues short-lived signed tokens to identify workloads; the cloud provider verifies identity and authorizes access based on a preconfigured trust relationship. Once cloud permissions are configured, BDN volume sync can read the base weights, sync them to Baseten-managed storage, and publish them as a sealed BDN volume identified by a content digest as an immutable version.
- Deploy: Reference this version digest in
config.yamland mount it at/mnt/base-weights; replicas read it in read-only mode. Every replica gets the same bytes, updates upload only the changed parts, and deployment startup no longer depends on downloading weights from the original S3 bucket. Cold starts and scale-outs also have one less external dependency. - Serve: Adapters change more frequently, so they are fetched at runtime. With runtime OIDC enabled, the container can obtain a short-lived Baseten token, and the model code uses it to exchange for temporary cloud credentials with AWS STS; the mounted OIDC token refreshes automatically. The IAM role grants only
s3:GetObjectpermission on the adapter prefix, with no write permissions. Runtime tokens carry themodel_containerworkload type, so the adapter role's trust policy can match only running containers, preventing build-stage permissions from also entering the serving container.

Cloud permissions define which resources a model can use, while network controls define where it can connect. Baseten deployments allow outbound TCP 443 and 80 to internet hosts by default. Egress restrictions can configure domain and IP range allowlists per deployment. The adapter example only needs to allow the S3 endpoint used to download adapters and the STS endpoint used to exchange OIDC tokens. Domains are ultimately enforced by IP, and S3 often uses shared IPs, so which adapter can be read is still determined by IAM policy. When a model needs no outbound access at all, setting both allowlists to empty blocks egress; leaving them unset keeps the default. Configuration lives in config.yaml, so network changes are reviewed together with model changes. Updating the allowlist requires redeployment, and sensitive workloads can be tightened individually without affecting other deployments in the same organization.
The convenience of permanent keys comes at the cost of blurred permission boundaries. The value of this approach is that it shrinks the lateral-movement surface: malicious dependencies have no static cloud key to steal, and even if a container is compromised, it can connect only to approved destinations. Short-lived tokens do not stop a compromise that has already occurred; permission scope and destination selection still matter. Baseten also emphasizes that these controls must be used together with RBAC, restricted environments, fine-grained API keys, container and network security, and observability.
Most configuration lives in config.yaml: sealed volume references, runtime OIDC, and the egress allow list. For details, see Baseten's volume sync, OIDC, and egress restrictions documentation. The original article is in Baseten's security series.
发布时间: 2026-11-26 02:26