講座 › 分野7 セキュリティと安全性
7.4 ID、シークレット、キーの管理
配点 1.6%Identity, Secrets, and Key Management
エージェントに鍵を見せない。鍵は境界の外で注入し、利用者ごとの認証情報は保管庫で参照し、使われ方を監視する。
未読
鍵をエージェントの外に置く 読了

安全性の高い構成では、認証情報のような重要な資源を、エージェントのいる境界の外に置きます。例えばAPIキーをエージェントに直接渡す代わりに、境界の外のプロキシがリクエストにキーを差し込みます。エージェントはAPIを呼べますが、キーそのものは見えません。
出典:Securely deploying AI agents
rather than giving an agent direct access to an API key, you could run a proxy outside the agent's environment that injects the key into requestshttps://code.claude.com/docs/en/agent-sdk/secure-deployment.md(取得 2026-11-17)
出典:Securely deploying AI agents
Inject via proxy rather than exposing directlyhttps://code.claude.com/docs/en/agent-sdk/secure-deployment.md(取得 2026-11-17)
利用者ごとの認証情報:保管庫 読了

Managed Agentsの保管庫(vault)を使うと、外部サービスの認証情報を一度登録し、セッションを作るときにIDで参照できます。自分でシークレットの保管の仕組みを動かしたり、呼び出しのたびにトークンを送ったりする必要がありません。
出典:Managed Agents vaults
Vaults and credentials are authentication primitives that let you register credentials for third-party services once and reference them by ID at session creation.https://platform.claude.com/docs/en/managed-agents/vaults.md(取得 2026-11-17)
認証の方法と、短い寿命のトークン 読了

Claude APIへの認証は、APIキーのほか、ワークロードIDの連携で得た短い寿命のアクセストークンも使えます。Claude Codeでは、claude.aiのアカウント、Claude Console、クラウドの事業者など、環境に応じた認証の方法を選べます。CIでは環境変数でキーを渡します。
出典:API overview
is your API key or a short-lived access token obtained fromhttps://platform.claude.com/docs/en/api/overview.md(取得 2026-11-17)
出典:Authentication
Claude Code supports multiple authentication methods depending on your setup.https://code.claude.com/docs/en/authentication.md(取得 2026-11-17)
認可されたアクセスの監視 読了

Claude Codeは、OpenTelemetryで、利用状況、費用、ツールの活動を組織全体で書き出せます。誰がどのように使っているかを監視し、異常な使われ方に気付けるようにします。
出典:Monitoring usage
Track Claude Code usage, costs, and tool activity across your organization by exporting telemetry data through OpenTelemetryhttps://code.claude.com/docs/en/monitoring-usage.md(取得 2026-11-17)
試験のポイント
- エージェントには鍵を見せない。プロキシで差し込む。
出典:Securely deploying AI agents
The agent can make API calls, but it never sees the credential itself.
https://code.claude.com/docs/en/agent-sdk/secure-deployment.md(取得 2026-11-17) - 外部サービスの認証情報は、保管庫に登録してIDで参照。
出典:Managed Agents vaults
you don’t need to run your own secret store
https://platform.claude.com/docs/en/managed-agents/vaults.md(取得 2026-11-17)