Show HN: OneCLI – Vault for AI Agents in Rust
TL;DR Highlight
A pattern where AI agents call external services through fake OAuth-style credentials that proxy through your server — agents never hold real API keys.
Who Should Read
Security engineers and developers building AI agent systems that need to call external APIs without giving agents direct credential access.
Core Mechanics
- The core problem: AI agents need API keys to call external services, but giving agents direct access to real keys creates security risks (key exfiltration, scope abuse).
- The solution: agents are issued fake/synthetic credentials that look like real API keys. When the agent calls an external service with this credential, it hits a proxy server that authenticates the agent, validates the request, and replaces the fake key with the real one before forwarding.
- This enables fine-grained authorization: the proxy can enforce what endpoints the agent can call, rate-limit it, log all calls, and revoke access without rotating real credentials.
- The pattern mirrors how OAuth works for humans — the agent gets a token scoped to specific permissions, not the master credential.
- This is especially valuable for multi-agent systems where you want different agents to have different permission scopes.
Evidence
- The author demonstrated the pattern with a working implementation, showing how the proxy intercepts and validates agent requests before forwarding.
- HN security commenters validated this as sound practice, noting it's essentially applying the principle of least privilege to AI agents.
- Some pointed out that this adds a hop and potential latency — worth measuring for latency-sensitive workflows.
- Others noted that cloud providers (AWS, GCP) already have similar patterns for machine identities (IAM roles, Workload Identity) — this adapts those patterns for AI agents.
How to Apply
- For any AI agent that needs to call external APIs, provision a proxy layer rather than giving the agent direct credentials.
- Scope each agent's synthetic credential to exactly the API endpoints it needs — if an agent only needs to read from Slack, its credential should only allow GET requests to Slack's read endpoints.
- Log all agent API calls through the proxy — this gives you an audit trail for debugging and security review.
- Design the proxy to be revocable: if an agent behaves unexpectedly, you can disable its synthetic credential without rotating your real service credentials.
Code Example
# vault_get.sh (Fetching secrets from Hashicorp Vault - alternative mentioned in comments)
# Called from within agent skill scripts to prevent keys from being exposed in LLM context
# https://gist.github.com/sathish316/1ca3fe1b124577d1354ee254a...
# .env.example configuration for OneCLI usage
# Only FAKE_KEY is passed to the agent, actual keys are stored in the OneCLI dashboard
OPENAI_API_KEY=FAKE_KEY
STRIPE_SECRET_KEY=FAKE_KEY
# Include Proxy-Authorization header when agent makes HTTP calls
# curl -x http://onecli-gateway:8080 \
# -H 'Proxy-Authorization: Bearer <access-token>' \
# -H 'Authorization: Bearer FAKE_KEY' \
# https://api.openai.com/v1/chat/completions
# Gateway replaces FAKE_KEY with the real key before forwarding externallyTerminology
Related Papers
Migrating a production AI agent to GPT-5.6: 2.2x faster, 27% cheaper
마케팅 웹사이트를 자동 생성하는 프로덕션 AI 에이전트를 Claude Opus 4.8에서 GPT-5.6 Sol로 전환한 실전 경험담으로, 단순 모델 교체가 아니라 eval 하네스, 툴 스키마, 캐싱, 추론 리플레이까지 손봐야 했던 과정을 구체적인 수치와 함께 정리했다.
What xAI's Grok build CLI sends to xAI: A wire-level analysis
xAI의 공식 코딩 CLI 도구 Grok Build가 사용자 동의 없이 전체 Git 저장소와 .env 시크릿 파일을 xAI 서버로 업로드한다는 사실이 네트워크 트래픽 분석으로 밝혀졌다.
Remember When It Matters: Proactive Memory Agent for Long-Horizon Agents
LLM 에이전트가 긴 작업 중 중요한 정보를 잊어버리는 문제를 별도의 메모리 에이전트가 '적절한 타이밍에' 끼어들어 해결하는 방법
WebSwarm: Recursive Multi-Agent Orchestration for Deep-and-Wide Web Search
복잡한 웹 검색을 재귀적으로 분해하고 각 노드에 적합한 검색 모드를 동적으로 할당하는 멀티에이전트 프레임워크
Show HN: Reverse-engineering web apps into agent tools
로그인된 웹 앱의 API 호출을 브라우저에서 감시해 자동으로 MCP 도구로 변환하는 에이전트를 만들었다. 소스 코드나 공식 API 문서 없이도 Jira, Spotify 같은 서비스에 AI 어시스턴트를 붙일 수 있다.
Show HN: FableCut – A browser video editor AI agents can drive (zero deps)
타임라인 전체를 JSON 파일 하나로 표현하고 MCP/REST로 AI 에이전트가 직접 편집할 수 있는 브라우저 비디오 에디터로, Claude 같은 AI가 프롬프트 하나로 영상을 자동 컷편집하고 결과를 실시간으로 UI에 반영해준다.