テーマ: cloud
-
クラウドインスタンスのメタデータエンドポイント:IMDSv2 トークンとホップ制限 1 が SSRF を弱める理由
クラウド VM は、インスタンスのロールの一時認証情報を返せるリンクローカルのメタデータサービスを公開しています。サーバーサイドリクエストフォージェリの脆弱性やエージェントの取得ツールから、そこへ到達できます。AWS では、IMDSv2 のセッショントークンを必須にし、PUT 応答のホップ制限を 1 に保つことで、最も単純な経路を除去できます。
-
Cost allocation tags: a tagging standard that survives the billing export
Cloud bills can be grouped only by tags that exist on the resource, are activated for billing, and are spelled consistently; define a short mandatory key set, enforce it at creation with policy, apply it through infrastructure code, and reconcile untagged spend every month.
-
Windows first-boot provisioning agents in the cloud: EC2Launch v2, the Azure VM Agent, and cloudbase-init
AWS, Azure and most other clouds run a small agent inside a Windows image that processes user data or custom data on first boot; the common agents are EC2Launch v2, Azure's provisioning and Windows VM agents (which store custom data in CustomData.bin but do not execute it) and the open-source cloudbase-init. Each logs to a different location worth checking when provisioning appears to have silently failed.
-
Terraform の state:保存内容、ロックの理由、ドリフトの現れ方
state は設定内のリソースアドレスを実際のオブジェクトに対応付け、秘密情報を含む属性値を通常の JSON に保存する。ロック機能のあるリモートバックエンドは同時書き込みによる破損を防ぐ。Terraform 外での変更であるドリフトは、plan や refresh-only の実行で予期しない差分として現れる。
機械可読: JSON