Vercel Sandbox: HTTP 헤더에 자격 증명 안전하게 주입하는 방법
요약
Vercel은 샌드박스 환경에서 외부 요청(outbound requests)을 보낼 때, API 키나 토큰 같은 민감한 자격 증명을 HTTP 헤더에 자동으로 주입하는 기능을 도입했습니다. 이 기능은 자격 증명이 샌드박스 VM 경계 밖에 안전하게 유지되도록 하여, 코드가 직접 크리덴셜에 접근할 필요 없이 인증된 서비스 호출을 가능하게 합니다. 특히 프롬프트 인젝션(prompt injection) 공격이 위험한 AI 에이전트 워크플로우에서 보안성을 극대화합니다. 이 기능은 기존 네트워크 정책과 결합하여 사용 가능하며, 런타임 중에도 설
핵심 포인트
- 자격 증명은 샌드박스 VM 경계 밖에 안전하게 유지되어, 코드가 직접 API 키에 접근할 위험을 원천 차단합니다.
- HTTP 헤더 주입 기능은 기존 헤더를 완전히 덮어쓰기(overwrite) 때문에, 샌드박스 코드의 임의 변경 시도를 방지합니다.
- 도메인 매칭(Domain matching) 기능을 지원하여, 특정 도메인에 대한 아웃바운드 요청이 발생할 때만 자격 증명 주입이 트리거됩니다.
- Pro 및 Enterprise 고객에게 제공되며, 런타임 중에도 네트워크 정책을 업데이트할 수 있어 다단계 워크플로우 구성이 용이합니다.
can now automatically inject HTTP headers into outbound requests from sandboxed code. This keeps API keys and tokens safely outside the sandbox VM boundary, so apps running inside the sandbox can call authenticated services without ever accessing the credentials.
Header injection is configured as part of the network policy using `. When the sandbox makes an HTTPS request to a matching domain, the firewall adds or replaces the specified headers before forwarding the request.
Vercel Sandbox transform This is designed for AI agent workflows where prompt injection is a real threat. Even if an agent is compromised, there's nothing to exfiltrate, as the credentials only exist in a layer outside the VM.
Injection rules work with all egress network policy configurations, including open internet access. To allow general traffic while injecting credentials for specific services:
Like all network policy settings, injection rules can be updated on a running sandbox without restarting it. This enables multi-phase workflows, inject credentials during setup, then remove them before running untrusted code:
Available to all Pro and Enterprise customers. Learn more in the `. documentation
Key highlights
- Header overwrite: Injection applies to HTTP headers on outbound requests.
- Full replacement: Injected headers overwrite any existing headers with the same name set by sandbox code, preventing the sandbox from substituting its own credentials.
- Domain matching: Supports exact domains and wildcards (e.g., *.github.com). Injection only triggers when the outbound request matches.
- Works with all policies: Combine injection rules with `, or domain-specific allow lists. allow-all
AI 자동 생성 콘텐츠
본 콘텐츠는 Vercel AI의 원문을 AI가 자동으로 요약·번역·분석한 것입니다. 원 저작권은 원저작자에게 있으며, 정확한 내용은 반드시 원문을 확인해 주세요.
원문 바로가기