マネージドサービス部 佐竹です。
2024年11月から12月にかけて AWS Security Hub では Interface 型の VPC Endpoint に関する新しい Control、つまりはセキュリティチェック項目が多数追加されています。Interface VPC Endpoint に関しては少々思うところがあるため、セキュリティとコストの観点でブログを記載していきます。
- 2024年12月23日 追記
- はじめに
- Central configuration で Security Hub を運用していると
- Security Hub に追加された新規のコントロールについて
- コントロール追加によるスコアの下落にどう対処するか
- 余談: EC2 の VPC エンドポイントは?
- 関連する AWS 公式ドキュメント
- まとめ
2024年12月23日 追記
本ブログの記事でアップデートとして紹介、解説しました Interface VPC Endpoint に関する新規追加の「5+25+84」個のコントロールですが、追加された最初の5つを残し AWS 公式のドキュメントヒストリー ごと削除されました。
よって、現在は以下の6つのみが VPC Endpoint のコントロールとして残っている状態です。
1. [EC2.10] Amazon EC2 should be configured to use VPC endpoints that are created for the Amazon EC2 service 2. [EC2.55] VPCs should be configured with an interface endpoint for ECR API 3. [EC2.56] VPCs should be configured with an interface endpoint for Docker Registry 4. [EC2.57] VPCs should be configured with an interface endpoint for Systems Manager 5. [EC2.58] VPCs should be configured with an interface endpoint for Systems Manager Incident Manager Contacts 6. [EC2.60] VPCs should be configured with an interface endpoint for Systems Manager Incident Manager
ここから以下は「25+84」個のコントロールが追加され、12月23日に削除されるまでの解説記事となります。
はじめに
弊社は今年、マネージドセキュリティサービスとして「サバソック」をリリースしました。このサービスは AWS のセキュリティにかけるコストが限られているエンドユーザ様に対して「安心・安価・スピーディー」をキーワードに提供する、セキュリティの導入運用サービスです。
またこれらのリリースの前より、我々はカスタマーサクセスマネージャーとして長らく AWS Security Hub の導入とその改善運用に携わってきました。
このため、Security Hub を導入中のお客様において「AWS Foundational Security Best Practices v1.0.0 (FSBP)」のセキュリティコントロールが増えることは、運用上のインパクトをもたらします。
ということで、まずは簡単に運用の現場でどのようなことが起きているのか、ざっくりと記載します。
Central configuration で Security Hub を運用していると
Security Hub を AWS 組織全体で利用する場合には、そのコントロールを制御するにあたり「Central configuration」を利用すると良いでしょう。Security Hub の導入においても運用においても、管理面で非常にメリットのある機能となっています。
さらに、特定の Security Hub のコントロールを「無効化(Disabled)」としたい場合には、以下の通り Central configuration の設定「Custom policy」で「Disable specific controls」を利用するケースが多いと感じます。
本機能を利用すれば、組織全体において「不要なコントロールを無効化した状態」で、Security Hub の FSBP 標準を管理運用することがより手軽に行えます。
さて、この「Security Hub Central Configuration」における「Disable specific controls」設定ですが、All other controls will be enabled, including new controls
と説明書きにあるように、「新しいコントロールを含む他のすべてのコントロールが有効になる」動きをします。
これはつまり、今回新規に追加されたセキュリティコントロールは自動的に新規に有効化されることとなります。結果、弊社の Security Hub の検証アカウントにおいても、これらの新規コントロールが配備されております。
実際にマネジメントコンソールで確認してみます。
この通り、Interface VPC Endpoint を利用していないサービスでは「Failed」として検出されています。
そして結果的に Security Hub 全体のスコアが下落してしまっています*1。このような状況に陥ってしまった利用者様も多い状況とお見受けします。
Security Hub に追加された新規のコントロールについて
ではここから、Security Hub に追加された新規のセキュリティコントロールについて記載していきます。
まず、2024年11月15日時点で、AWS は以下の5つのコントロールを追加しています。
1. [EC2.55] VPCs should be configured with an interface endpoint for ECR API 2. [EC2.56] VPCs should be configured with an interface endpoint for Docker Registry 3. [EC2.57] VPCs should be configured with an interface endpoint for Systems Manager 4. [EC2.58] VPCs should be configured with an interface endpoint for Systems Manager Incident Manager Contacts 5. [EC2.60] VPCs should be configured with an interface endpoint for Systems Manager Incident Manager
FSBP 標準もこのアップデート対象ですため、Security Hub を利用されているおよそ全ての利用者に影響があったと推測しています。Severity は全て Medium
です。
さらに、2024年12月10日時点で、AWS は以下の25のコントロールを追加しました。同様に FSBP 標準にも組み込まれており、Severity は全て Medium
です。
1. [EC2.61] VPCs should be configured with an interface endpoint for Systems Manager Quick Setup 2. [EC2.62] VPCs should be configured with an interface endpoint for CloudWatch Logs 3. [EC2.63] VPCs should be configured with an interface endpoint for Systems Manager Messages 4. [EC2.64] VPCs should be configured with an interface endpoint for Message Delivery Service 5. [EC2.65] VPCs should be configured with an interface endpoint for Secrets Manager 6. [EC2.66] VPCs should be configured with an interface endpoint for API Gateway 7. [EC2.67] VPCs should be configured with an interface endpoint for CloudWatch 8. [EC2.68] VPCs should be configured with an interface endpoint for AWS KMS 9. [EC2.69] VPCs should be configured with an interface endpoint for SQS 10. [EC2.70] VPCs should be configured with an interface endpoint for STS 11. [EC2.71] VPCs should be configured with an interface endpoint for SNS 12. [EC2.72] VPCs should be configured with an interface endpoint for S3 13. [EC2.73] VPCs should be configured with an interface endpoint for Lambda 14. [EC2.74] VPCs should be configured with an interface endpoint for ECS 15. [EC2.75] VPCs should be configured with an interface endpoint for Elastic Load Balancing 16. [EC2.76] VPCs should be configured with an interface endpoint for CloudFormation 17. [EC2.77] VPCs should be configured with an interface endpoint for EventBridge 18. [EC2.78] VPCs should be configured with an interface endpoint for EC2 Auto Scaling 19. [EC2.79] VPCs should be configured with an interface endpoint for SageMaker AI API 20. [EC2.80] VPCs should be configured with an interface endpoint for SageMaker AI Feature Store Runtime 21. [EC2.81] VPCs should be configured with an interface endpoint for SageMaker AI Metrics Service 22. [EC2.82] VPCs should be configured with an interface endpoint for SageMaker AI Runtime 23. [EC2.83] VPCs should be configured with an interface endpoint for SageMaker AI Runtime for FIPS 24. [EC2.84] VPCs should be configured with an interface endpoint for SageMaker AI notebook 25. [EC2.85] VPCs should be configured with an interface endpoint for SageMaker AI studio
この時点で、FSBP 標準に「Failed」となってしまったセキュリティコントロールが、短期間で「30」も増えたことになります*2。
そして追い打ちをかけるように、「NIST Special Publication 800-53 Revision 5」においては、さらに以下の84のコントロールが追加されています。念のためですが、FSBP 標準には組み込まれていません。
1. [EC2.86] VPCs should be configured with an interface endpoint for AWS Glue 2. [EC2.87] VPCs should be configured with an interface endpoint for Kinesis Data Streams 3. [EC2.88] VPCs should be configured with an interface endpoint for Transfer Family for SFTP 4. [EC2.89] VPCs should be configured with an interface endpoint for CloudTrail 5. [EC2.90] VPCs should be configured with an interface endpoint for RDS 6. [EC2.91] VPCs should be configured with an interface endpoint for ECS Agent 7. [EC2.92] VPCs should be configured with an interface endpoint for ECS Telemetry 8. [EC2.93] VPCs should be configured with an interface endpoint for GuardDuty 9. [EC2.94] VPCs should be configured with an interface endpoint for SES 10. [EC2.95] VPCs should be configured with an interface endpoint for EFS 11. [EC2.96] VPCs should be configured with an interface endpoint for Athena 12. [EC2.97] VPCs should be configured with an interface endpoint for Firehose 13. [EC2.98] VPCs should be configured with an interface endpoint for Step Functions 14. [EC2.99] VPCs should be configured with an interface endpoint for Storage Gateway 15. [EC2.100] VPCs should be configured with an interface endpoint for Amazon MWAA 16. [EC2.101] VPCs should be configured with an interface endpoint for Amazon MWAA for FIPS 17. [EC2.102] VPCs should be configured with an interface endpoint for Amazon MWAA environment 18. [EC2.103] VPCs should be configured with an interface endpoint for Amazon MWAA FIPS environment 19. [EC2.104] VPCs should be configured with an interface endpoint for Amazon MWAA operator 20. [EC2.105] VPCs should be configured with an interface endpoint for DataSync 21. [EC2.106] VPCs should be configured with an interface endpoint for CodePipeline 22. [EC2.107] VPCs should be configured with an interface endpoint for EKS 23. [EC2.108] VPCs should be configured with an interface endpoint for EBS direct APIs 24. [EC2.109] VPCs should be configured with an interface endpoint for CodeCommit 25. [EC2.110] VPCs should be configured with an interface endpoint for X-Ray 26. [EC2.111] VPCs should be configured with an interface endpoint for CodeBuild 27. [EC2.112] VPCs should be configured with an interface endpoint for AWS Config 28. [EC2.113] VPCs should be configured with an interface endpoint for RDS Data API 29. [EC2.114] VPCs should be configured with an interface endpoint for Service Catalog 30. [EC2.115] VPCs should be configured with an interface endpoint for Amazon EMR 31. [EC2.116] VPCs should be configured with an interface endpoint for CodeCommit 32. [EC2.117] VPCs should be configured with an interface endpoint for App Mesh 33. [EC2.118] VPCs should be configured with an interface endpoint for Elastic Beanstalk 34. [EC2.119] VPCs should be configured with an interface endpoint for AWS Private CA 35. [EC2.120] VPCs should be configured with an interface endpoint for ElastiCache 36. [EC2.121] VPCs should be configured with an interface endpoint for CodeArtifact API 37. [EC2.122] VPCs should be configured with an interface endpoint for CodeArtifact repositories 38. [EC2.123] VPCs should be configured with an interface endpoint for Amazon Redshift 39. [EC2.124] VPCs should be configured with an interface endpoint for CodeDeploy 40. [EC2.125] VPCs should be configured with an interface endpoint for Amazon Managed Service for Prometheus 41. [EC2.126] VPCs should be configured with an interface endpoint for Application Auto Scaling 42. [EC2.127] VPCs should be configured with an interface endpoint for S3 Multi-Region Access Points 43. [EC2.128] VPCs should be configured with an interface endpoint for AMB Query 44. [EC2.129] VPCs should be configured with an interface endpoint for AMB Access Bitcoin 45. [EC2.130] VPCs should be configured with an interface endpoint for AMB Bitcoin Testnet 46. [EC2.131] VPCs should be configured with an interface endpoint for EFS 47. [EC2.132] VPCs should be configured with an interface endpoint for AWS Backup 48. [EC2.133] VPCs should be configured with an interface endpoint for DMS 49. [EC2.134] VPCs should be configured with an interface endpoint for CodeDeploy 50. [EC2.135] VPCs should be configured with an interface endpoint for Amazon AppStream API 51. [EC2.136] VPCs should be configured with an interface endpoint for Amazon AppStream Streaming 52. [EC2.137] VPCs should be configured with an interface endpoint for Elastic Beanstalk 53. [EC2.138] VPCs should be configured with an interface endpoint for AWS CodeConnections API 54. [EC2.139] VPCs should be configured with an interface endpoint for AWS CodeStar Connections API 55. [EC2.140] VPCs should be configured with an interface endpoint for Amazon Redshift Data API 56. [EC2.141] VPCs should be configured with an interface endpoint for Amazon Textract 57. [EC2.142] VPCs should be configured with an interface endpoint for Keyspaces 58. [EC2.143] VPCs should be configured with an interface endpoint for AWS MGN 59. [EC2.144] VPCs should be configured with an interface endpoint for Image Builder 60. [EC2.145] VPCs should be configured with an interface endpoint for Step Functions 61. [EC2.146] VPCs should be configured with an interface endpoint for Auto Scaling 62. [EC2.147] VPCs should be configured with an interface endpoint for Amazon Bedrock 63. [EC2.148] VPCs should be configured with an interface endpoint for Batch 64. [EC2.149] VPCs should be configured with an interface endpoint for Amazon EKS 65. [EC2.150] VPCs should be configured with an interface endpoint for Amazon Comprehend 66. [EC2.151] VPCs should be configured with an interface endpoint for App Runner 67. [EC2.152] VPCs should be configured with an interface endpoint for EMR Serverless 68. [EC2.153] VPCs should be configured with an interface endpoint for Lake Formation 69. [EC2.154] VPCs should be configured with an interface endpoint for Amazon FSx 70. [EC2.155] VPCs should be configured with an interface endpoint for Amazon EMR on EKS 71. [EC2.156] VPCs should be configured with an interface endpoint for IoT Core Data 72. [EC2.157] VPCs should be configured with an interface endpoint for IoT Core Credentials 73. [EC2.158] VPCs should be configured with an interface endpoint for IoT Core Fleet Hub 74. [EC2.159] VPCs should be configured with an interface endpoint for Elastic Disaster Recovery 75. [EC2.160] VPCs should be configured with an interface endpoint for CloudHSM 76. [EC2.161] VPCs should be configured with an interface endpoint for Amazon Rekognition 77. [EC2.162] VPCs should be configured with an interface endpoint for Amazon Managed Service for Prometheus 78. [EC2.163] VPCs should be configured with an interface endpoint for Elastic Inference Runtime 79. [EC2.164] VPCs should be configured with an interface endpoint for CloudWatch 80. [EC2.165] VPCs should be configured with an interface endpoint for Amazon Bedrock 81. [EC2.166] VPCs should be configured with an interface endpoint for Security Hub 82. [EC2.167] VPCs should be configured with an interface endpoint for DynamoDB 83. [EC2.168] VPCs should be configured with an interface endpoint for Access Analyzer 84. [EC2.169] VPCs should be configured with an interface endpoint for Amazon Transcribe Medical
なお公式ドキュメントでは [EC2.169] が [EC2.168] と重複した番号で表記されているなど少々ミスがあります*3。
コントロール追加によるスコアの下落にどう対処するか
さて、これまで見てきたように、FSBP 標準では合計30の Interface VPC Endpoint に関する Security Hub Control が追加されました。NIST Special Publication 800-53 Revision 5
標準に至っては、「5+25+84=114」の追加です。
しかもこれらすべてが Interface VPC Endpoint に関する項目です。
確かに、Interface 型の VPC Endpoint (PrivateLink とも言われるものです) を使用すると、Public IP アドレスなしに VPC からプライベートに各種 AWS サービスへと接続することができるようになります。これは Interface VPC Endpoint が各サービスに対して、入口となる ENI を各 VPC 内に提供してくれるため、なのですが。
前提: Interface VPC Endpoint のコストに関する注意事項
しかし、このサービスにはご存知の通り「相当の保守費用が発生」します。
上記料金ページを確認して頂ければわかる通りなのですが、東京リージョンでは以下の費用です。
- 各 AZ の VPC エンドポイント 1 つあたりの料金 (USD/時間)
- USD 0.014
1時間あたり「$0.014」です。また冗長化構成を取っている場合は、2つのアベイラビリティーゾーン(AZ)に対して必要です。
この場合、1つのサービスに対する Interface VPC Endpoint は単純計算で年間「$0.014 * 2 AZ * 24 * 365 = $245.28」の費用がかかります。
もし、今回追加された FSBP 標準のコントロールに対して、30個の Interface VPC Endpoint を全て作成したとします。この場合「構築して保持しているだけ」でかかる年間の費用が「$0.014 * 2 AZ * 24 * 365 * 30 Endpoint= $7,358.4」まで増加します。これは2024年12月16日現在の為替相場で、年間113万円程度の費用となります。
さらにですが NIST Special Publication 800-53 Revision 5
へ対応するために、114個とも 2AZ で作成した場合は、(恐ろしいことに)年間利用料は「$27,961.92」にまで到達し、430万円程度の費用にまで跳ね上がってしまいます。
Interface VPC Endpoint の数 | 対象 Availability Zone | 年間費用 | 年間費用円換算 |
---|---|---|---|
1 | 1 AZ | $122.64 | 18,887円 |
1 | 2 AZ | $245.28 | 37,773円 |
30 | 2 AZ | $7,358.4 | 1,133,193円 |
114 | 2 AZ | $27,961.92 | 4,306,136円 |
コストの観点から見ると「安易に Interface VPC Endpoint を多数作ることは予算の関係から危ぶまれる」ということがご理解いただけたかと存じます。
さて、ここまでの費用をかけて Interface VPC Endpoint に関するセキュリティコントロールをクリアすべきでしょうか?
対応方法1: 全ての Interface VPC Endpoint に関するコントロールを無効化する
正直なところ、これらのセキュリティコントロールが不要であれば、これらをまとめて無効化してしまうのが早道でしょう。
対応例としては、Central configuration の「Disable specific controls」において、「Controls to disable」で interface endpoint for
等と検索し、検索結果の全てにチェックを入れて更新し無効化します。
AWS CLI での対応例(実行編)
Central configuration ではなく、個別の AWS アカウントごとに実施する場合は AWS CLI batch-update-standards-control-associations
を利用すると良いでしょう。ユーザ様環境でも利用実績があります。
以下はそのコマンドの例です。先の脚注の通りですが、[EC2.83] は除外しています*4。改行は可読性のために付与していますが、削除してご利用ください。
aws securityhub batch-update-standards-control-associations --standards-control-association-updates '[{"SecurityControlId": "EC2.61","StandardsArn": "arn:aws:securityhub:ap-northeast-1::standards/aws-foundational-security-best-practices/v/1.0.0","AssociationStatus": "DISABLED","UpdatedReason": "disabled by Serverworks"}, {"SecurityControlId": "EC2.62","StandardsArn": "arn:aws:securityhub:ap-northeast-1::standards/aws-foundational-security-best-practices/v/1.0.0","AssociationStatus": "DISABLED","UpdatedReason": "disabled by Serverworks"}, {"SecurityControlId": "EC2.63","StandardsArn": "arn:aws:securityhub:ap-northeast-1::standards/aws-foundational-security-best-practices/v/1.0.0","AssociationStatus": "DISABLED","UpdatedReason": "disabled by Serverworks"}, {"SecurityControlId": "EC2.64","StandardsArn": "arn:aws:securityhub:ap-northeast-1::standards/aws-foundational-security-best-practices/v/1.0.0","AssociationStatus": "DISABLED","UpdatedReason": "disabled by Serverworks"}, {"SecurityControlId": "EC2.65","StandardsArn": "arn:aws:securityhub:ap-northeast-1::standards/aws-foundational-security-best-practices/v/1.0.0","AssociationStatus": "DISABLED","UpdatedReason": "disabled by Serverworks"}, {"SecurityControlId": "EC2.66","StandardsArn": "arn:aws:securityhub:ap-northeast-1::standards/aws-foundational-security-best-practices/v/1.0.0","AssociationStatus": "DISABLED","UpdatedReason": "disabled by Serverworks"}, {"SecurityControlId": "EC2.67","StandardsArn": "arn:aws:securityhub:ap-northeast-1::standards/aws-foundational-security-best-practices/v/1.0.0","AssociationStatus": "DISABLED","UpdatedReason": "disabled by Serverworks"}, {"SecurityControlId": "EC2.68","StandardsArn": "arn:aws:securityhub:ap-northeast-1::standards/aws-foundational-security-best-practices/v/1.0.0","AssociationStatus": "DISABLED","UpdatedReason": "disabled by Serverworks"}, {"SecurityControlId": "EC2.69","StandardsArn": "arn:aws:securityhub:ap-northeast-1::standards/aws-foundational-security-best-practices/v/1.0.0","AssociationStatus": "DISABLED","UpdatedReason": "disabled by Serverworks"}, {"SecurityControlId": "EC2.70","StandardsArn": "arn:aws:securityhub:ap-northeast-1::standards/aws-foundational-security-best-practices/v/1.0.0","AssociationStatus": "DISABLED","UpdatedReason": "disabled by Serverworks"}, {"SecurityControlId": "EC2.71","StandardsArn": "arn:aws:securityhub:ap-northeast-1::standards/aws-foundational-security-best-practices/v/1.0.0","AssociationStatus": "DISABLED","UpdatedReason": "disabled by Serverworks"}, {"SecurityControlId": "EC2.72","StandardsArn": "arn:aws:securityhub:ap-northeast-1::standards/aws-foundational-security-best-practices/v/1.0.0","AssociationStatus": "DISABLED","UpdatedReason": "disabled by Serverworks"}, {"SecurityControlId": "EC2.73","StandardsArn": "arn:aws:securityhub:ap-northeast-1::standards/aws-foundational-security-best-practices/v/1.0.0","AssociationStatus": "DISABLED","UpdatedReason": "disabled by Serverworks"}, {"SecurityControlId": "EC2.74","StandardsArn": "arn:aws:securityhub:ap-northeast-1::standards/aws-foundational-security-best-practices/v/1.0.0","AssociationStatus": "DISABLED","UpdatedReason": "disabled by Serverworks"}, {"SecurityControlId": "EC2.75","StandardsArn": "arn:aws:securityhub:ap-northeast-1::standards/aws-foundational-security-best-practices/v/1.0.0","AssociationStatus": "DISABLED","UpdatedReason": "disabled by Serverworks"}, {"SecurityControlId": "EC2.76","StandardsArn": "arn:aws:securityhub:ap-northeast-1::standards/aws-foundational-security-best-practices/v/1.0.0","AssociationStatus": "DISABLED","UpdatedReason": "disabled by Serverworks"}, {"SecurityControlId": "EC2.77","StandardsArn": "arn:aws:securityhub:ap-northeast-1::standards/aws-foundational-security-best-practices/v/1.0.0","AssociationStatus": "DISABLED","UpdatedReason": "disabled by Serverworks"}, {"SecurityControlId": "EC2.78","StandardsArn": "arn:aws:securityhub:ap-northeast-1::standards/aws-foundational-security-best-practices/v/1.0.0","AssociationStatus": "DISABLED","UpdatedReason": "disabled by Serverworks"}, {"SecurityControlId": "EC2.79","StandardsArn": "arn:aws:securityhub:ap-northeast-1::standards/aws-foundational-security-best-practices/v/1.0.0","AssociationStatus": "DISABLED","UpdatedReason": "disabled by Serverworks"}, {"SecurityControlId": "EC2.80","StandardsArn": "arn:aws:securityhub:ap-northeast-1::standards/aws-foundational-security-best-practices/v/1.0.0","AssociationStatus": "DISABLED","UpdatedReason": "disabled by Serverworks"}, {"SecurityControlId": "EC2.81","StandardsArn": "arn:aws:securityhub:ap-northeast-1::standards/aws-foundational-security-best-practices/v/1.0.0","AssociationStatus": "DISABLED","UpdatedReason": "disabled by Serverworks"}, {"SecurityControlId": "EC2.82","StandardsArn": "arn:aws:securityhub:ap-northeast-1::standards/aws-foundational-security-best-practices/v/1.0.0","AssociationStatus": "DISABLED","UpdatedReason": "disabled by Serverworks"}, {"SecurityControlId": "EC2.84","StandardsArn": "arn:aws:securityhub:ap-northeast-1::standards/aws-foundational-security-best-practices/v/1.0.0","AssociationStatus": "DISABLED","UpdatedReason": "disabled by Serverworks"}, {"SecurityControlId": "EC2.85","StandardsArn": "arn:aws:securityhub:ap-northeast-1::standards/aws-foundational-security-best-practices/v/1.0.0","AssociationStatus": "DISABLED","UpdatedReason": "disabled by Serverworks"}]'
AWS CLI での対応例(確認編)
また、以下の AWS CLI batch-get-security-controls
が設定の確認に利用できます*5。
aws securityhub batch-get-security-controls --security-control-ids '["EC2.61","EC2.62","EC2.63","EC2.64","EC2.65","EC2.66","EC2.67","EC2.68","EC2.69","EC2.70","EC2.71","EC2.72","EC2.73","EC2.74","EC2.75","EC2.76","EC2.77","EC2.78","EC2.79","EC2.80","EC2.81","EC2.82","EC2.83","EC2.84","EC2.85"]' --query 'SecurityControls[].[SecurityControlId,SecurityControlStatus]' --output table
以下は返り値の例です。
-------------------------- |BatchGetSecurityControls| +----------+-------------+ | EC2.61 | DISABLED | | EC2.62 | DISABLED | | EC2.63 | DISABLED | | EC2.64 | DISABLED | | EC2.65 | DISABLED | | EC2.66 | DISABLED | | EC2.67 | DISABLED | | EC2.68 | DISABLED | | EC2.69 | DISABLED | | EC2.70 | DISABLED | | EC2.71 | DISABLED | | EC2.72 | DISABLED | | EC2.73 | DISABLED | | EC2.74 | DISABLED | | EC2.75 | DISABLED | | EC2.76 | DISABLED | | EC2.77 | DISABLED | | EC2.78 | DISABLED | | EC2.79 | DISABLED | | EC2.80 | DISABLED | | EC2.81 | DISABLED | | EC2.82 | DISABLED | | EC2.84 | DISABLED | | EC2.85 | DISABLED | +----------+-------------+
対応方法2: Interface VPC Endpoint を1アカウントへ集約する
2023年11月に公開しました、以下に紹介するエンジニアブログ内で詳しく解説したこともありますが、AWS においてマルチアカウントの状況下で、全てのアカウントに Interface VPC Endpoint を作成するのはコストとして膨大な金額を発生させる可能性があります。
そのため、「Interface 型 VPC Endpoint を Transit Gateway と Route 53 で集約しする」ことが重要です。もし、今回の対応でどうしても Interface VPC Endpoint をマルチアカウントで作成せざるを得ない場合は、上記ブログも合わせてご確認ください。
対応方法3: 特定のサービスのみ Interface VPC Endpoint を構築する
先の集約ブログにも記載しておりますが、以下のようなサービスは、Interface VPC Endpoint 作成し、利用するケースも多いと感じます。
- com.amazonaws.ap-northeast-1.ec2
- com.amazonaws.ap-northeast-1.ec2messages
- com.amazonaws.ap-northeast-1.ssm
- com.amazonaws.ap-northeast-1.ssmmessages
- com.amazonaws.ap-northeast-1.logs
- com.amazonaws.ap-northeast-1.monitoring
- com.amazonaws.ap-northeast-1.events
- com.amazonaws.ap-northeast-1.kms
- com.amazonaws.ap-northeast-1.lambda
- com.amazonaws.ap-northeast-1.sqs
- com.amazonaws.ap-northeast-1.sns
第3の対応方法としては「自社で利用しているサービスでのみ VPC Endpoint を構築する」こととしてセキュリティコントロールを有効のままとし、それ以外のサービスについては「コントロールを無効化する」対処を取る組み合わせも考えられます。
ここまでが私の考える対応方法3種の紹介でした。
余談: EC2 の VPC エンドポイントは?
先の一覧には「Amazon EC2」の Interface VPC Endpoint を作成するコントロールが含まれていません。なぜかと言うと、既に存在しているためです。
以下がそのコントロールになります。
1. [EC2.10] Amazon EC2 should be configured to use VPC endpoints that are created for the Amazon EC2 service
そして本コントロールを含めると、FSBP 標準では「31個」の Interface VPC Endpoint を作成する必要が出てきます。
関連する AWS 公式ドキュメント
以下は Security Hub のドキュメント更新履歴です。
November 15, 2024
New security controls
The following new Security Hub controls are available. These controls are part of AWS Foundational Security Best Practices v1.0.0 and NIST SP 800-53 Rev. 5, and they evaluate whether a virtual private cloud (VPC) that you manage has an interface VPC endpoint for an AWS service or AWS resource.
---[以下翻訳]---
次の新しい Security Hub コントロールが利用可能です。これらのコントロールは、AWS Foundational Security Best Practices v1.0.0 および NIST SP 800-53 Rev. 5 の一部であり、管理する仮想プライベートクラウド (VPC) に AWS サービスまたは AWS リソースのインターフェイス VPC エンドポイントがあるかどうかを評価します。
December 10, 2024
New security controls
Security Hub released 25 new security controls, EC2.61 – EC2.85. These controls are part of AWS Foundational Security Best Practices v1.0.0 and NIST SP 800-53 Rev. 5, and they evaluate whether a virtual private cloud (VPC) that you manage has an interface VPC endpoint for an AWS service or AWS resource.
---[以下翻訳]---
Security Hub は、EC2.61 ~ EC2.85 の 25 個の新しいセキュリティコントロールをリリースしました。これらのコントロールは、AWS Foundational Security Best Practices v1.0.0 および NIST SP 800-53 Rev. 5 の一部であり、管理する仮想プライベートクラウド (VPC) に AWS サービスまたは AWS リソースのインターフェイス VPC エンドポイントがあるかどうかを評価します。
December 13, 2024
New security controls
Security Hub released 84 new security controls, EC2.86 – EC2.169. These controls are part of NIST SP 800-53 Rev. 5, and they evaluate whether a virtual private cloud (VPC) that you manage has an interface VPC endpoint for an AWS service or AWS resource.
---[以下翻訳]---
Security Hub は、EC2.86 ~ EC2.169 の 84 個の新しいセキュリティコントロールをリリースしました。これらのコントロールは NIST SP 800-53 Rev. 5 の一部であり、管理する仮想プライベートクラウド (VPC) に AWS サービスまたは AWS リソースのインターフェイス VPC エンドポイントがあるかどうかを評価します。
まとめ
2024年11月から12月にかけて多数追加されました Security Hub の Interface VPC Endpoint に関するコントロールに対し、セキュリティとコストの観点で注意事項を記載しました。
特に利用頻度の高い Security Hub AWS Foundational Security Best Practices v1.0.0 (FSBP) 標準においては、この短期間で「5+25=30個」のコントロールが追加されることとなりました。
本文でもご紹介した通り、Interface VPC Endpoint には利用料が発生します。
- 各 AZ の VPC エンドポイント 1 つあたりの料金 (USD/時間)
- USD 0.014
そして Interface VPC Endpoint の利用料は「塵も積もれば山となる」の通り、数が増えるにつれ「想定外の金額にまで」膨れ上がってしまうこともあります。具体的には以下の通りの試算となります*6。
まとめの一覧では [EC2.10] を加味し、FSBP における全 31 の VPC Endpoint を作成した場合と、NIST Special Publication 800-53 Revision 5
に従って全 115 の VPC Endpoint を作成した場合のコストも記載しました。
Interface VPC Endpoint の数 | 対象 Availability Zone | 年間費用 | 年間費用円換算 |
---|---|---|---|
1 | 1 AZ | $122.64 | 18,887円 |
1 | 2 AZ | $245.28 | 37,773円 |
30 | 2 AZ | $7,358.4 | 1,133,193円 |
31 ※[EC2.10] を含める場合 | 2 AZ | $7,603.68 | 1,170,967円 |
114 | 2 AZ | $27,961.92 | 4,306,136円 |
115 ※[EC2.10] を含める場合 | 2 AZ | $28,207.2 | 4,343,909円 |
手間はかかりますが、対応における事前のコスト試算は重要です。「コストを鑑みず安易に Interface VPC Endpoint を多数作成したこと」で「予算の関係から存続が危ぶまれる」事態になり得る可能性もあります。セキュリティは重要な観点ですが、クラウドコストが跳ね上がることで「持続可能性」が損なわれてしまうのも問題です。
特に今回の件においては「セキュリティだけにフォーカスする」のではなく、コストともバランスを取りながら継続的な Security Hub の対応を(サステナブルに)実施頂ければ幸いです。
では、またお会いしましょう。
*1:本スコアは、100% の維持が可能であれば望ましいものとなります
*2:補足ですが [EC2.83] は東京リージョンでは存在しないコントロールです https://aws.amazon.com/jp/compliance/fips/
*3:追って修正されるとは思われます
*4:東京リージョンでは [EC2.83] を含めるとエラーになるためです
*5:東京リージョンでも本 AWS CLI の場合は [EC2.83] を含めてもエラーとはなりません
*6:現在、為替相場は154円程度で推移
佐竹 陽一 (Yoichi Satake) エンジニアブログの記事一覧はコチラ
マネージドサービス部所属。AWS資格全冠。2010年1月からAWSを利用してきています。2021-2022 AWS Ambassadors/2023-2024 Japan AWS Top Engineers/2020-2024 All Certifications Engineers。AWSのコスト削減、最適化を得意としています。