

# SEC08-BP03 保管中のデータの保護を自動化する
<a name="sec_protect_data_rest_automate_protection"></a>

 自動化を利用して、保管中のデータの統制を検証し、適用します。 自動スキャンを使用してデータストレージソリューションの設定ミスを検出し、可能な場合はプログラムによる自動対応で修復を行います。 CI/CD プロセスに自動化を組み込んで、データストレージの設定ミスを検知し、本番環境に適用されないよう未然に防ぎます。

 **期待される成果:** 自動システムは、コントロールの設定ミス、不正アクセス、予期しない使用方法がないか、データストレージの場所をスキャンして監視します。 データストレージの設定ミスが検出されると、自動修復が開始します。 自動化されたプロセスによってデータのバックアップが作成され、イミュータブル (変更不可能) なコピーがバックアップ元の環境の外部に保管されます。

 **一般的なアンチパターン:** 
+  デフォルト設定で暗号化を有効にするオプションがサポートされているのに、そうしたオプションを検討しない。
+  バックアップと復旧の自動化戦略を策定する際に、運用上のイベントだけでなくセキュリティイベントも考慮していない。
+  ストレージサービスに対してパブリックアクセス設定を強制しない。
+  保管中のデータを保護するための統制の監視や監査をしていない。

 **このベストプラクティスを活用するメリット:** 自動化は、データストレージの場所の設定ミスのリスクを防ぐのに役立ちます。設定ミスが本番環境に入り込まないように阻止できます。このベストプラクティスは、設定ミスが起きた場合の検出と修正にも役立ちます。  

 **このベストプラクティスを活用しない場合のリスクレベル:** 中 

## 実装のガイダンス 
<a name="implementation-guidance"></a>

 保管中のデータを保護するためのあらゆる取り組みにおいて、自動化は重要です。「[SEC01-BP06 標準的なセキュリティ統制のデプロイを自動化する](https://docs.aws.amazon.com/wellarchitected/latest/framework/sec_securely_operate_automate_security_controls.html)」では、[AWS CloudFormation](https://aws.amazon.com/cloudformation/) などの infrastructure as code (IaC) テンプレートを使用してリソース設定をキャプチャする方法を説明します。 これらのテンプレートはバージョン管理システムにコミットされ、CI/CD パイプラインを通じて AWS でリソースをデプロイするために使用されます。 データストレージソリューションの設定 (Amazon S3 バケットの暗号化設定など) を自動化する場合にも、これらの手法が同様に適用されます。  

 IaC テンプレートで定義された設定にミスがないか、[AWS CloudFormation Guard](https://docs.aws.amazon.com/cfn-guard/latest/ug/what-is-guard.html) のルールを CI/CD パイプライン内で使用してチェックできます。 [AWS Config](https://aws.amazon.com/config/) を使用して、CloudFormation やその他の IaC ツールでまだ利用できない設定をモニタリングし、設定ミスを確認できます。 「[SEC04-BP04 非準拠リソースの修復を開始する](https://docs.aws.amazon.com/wellarchitected/latest/framework/sec_detect_investigate_events_noncompliant_resources.html)」で説明されているように、設定ミスに対して Config が生成するアラートは自動的に修正できます。

 アクセス許可管理の戦略に自動化を組み込むことも、自動データ保護の要素として不可欠です。「[SEC03-BP02 最小特権のアクセスを付与する](https://docs.aws.amazon.com/wellarchitected/latest/framework/sec_permissions_least_privileges.html)」および「[SEC03-BP04 アクセス許可を継続的に削減する](https://docs.aws.amazon.com/wellarchitected/latest/framework/sec_permissions_continuous_reduction.html)」では、最小特権アクセスポリシーの設定について説明します。[AWS Identity and Access Management Access Analyzer](https://aws.amazon.com/iam/access-analyzer/) によってポリシーは継続的に監視され、権限を削減できる場合はレポートが出力されます。 アクセス許可のモニタリングを自動化するだけでなく、[Amazon GuardDuty](https://aws.amazon.com/guardduty/) を設定して、[EBS ボリューム](https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_finding-types-ec2.html) (EC2 インスタンスを介して)、[S3 バケット](https://docs.aws.amazon.com/guardduty/latest/ug/s3-protection.html)、およびサポートされる[Amazon Relational Database Service データベース](https://docs.aws.amazon.com/guardduty/latest/ug/rds-protection.html)で異常なデータアクセス動作を監視できます。

 許可されていない場所に機密データが保存されていることを検知する場合にも、自動化が活躍します。「[SEC07-BP03 識別および分類を自動化する](https://docs.aws.amazon.com/wellarchitected/latest/framework/sec_data_classification_auto_classification.html)」では、[Amazon Macie](https://aws.amazon.com/macie/) を使用して S3 バケットで予期しない機密データをモニタリングし、自動応答を開始するアラートを生成する方法について説明します。

 「[REL09 バックアップデータ](https://docs.aws.amazon.com/wellarchitected/latest/reliability-pillar/back-up-data.html)」のプラクティスに従って、自動データバックアップおよびリカバリ戦略を開発します。データのバックアップと復旧は、運用上のイベントと同様、セキュリティイベントから復旧するために重要です。

### 実装手順
<a name="implementation-steps"></a>

1.  データストレージの設定を IaC テンプレートに取り込みます。 CI/CD パイプラインで自動チェックを行い、設定ミスを検出します。

   1.  IaC テンプレートには [CloudFormation](https://aws.amazon.com/cloudformation/) を、テンプレートの設定ミスをチェックするには [CloudFormationGuard](https://docs.aws.amazon.com/cfn-guard/latest/ug/what-is-guard.html) を使用できます。

   1.  [AWS Config](https://aws.amazon.com/config/) を使用して、プロアクティブ評価モードでルールを実行します。この設定を使用して、リソースの作成前に CI/CD パイプラインのステップとしてリソースのコンプライアンスを確認します。

1.  データストレージの設定ミスがないか、リソースを監視します。

   1.  [AWS Config](https://aws.amazon.com/config/) を設定して、データストレージリソースの制御設定の変更をモニタリングし、設定ミスの検出時に修復アクションを呼び出すアラートを生成するようにします。

   1.  自動修復の詳細については、「[SEC04-BP04 非準拠リソースの修復を開始する](https://docs.aws.amazon.com/wellarchitected/latest/framework/sec_detect_investigate_events_noncompliant_resources.html)」を参照してください。

1.  データアクセス許可を自動化により継続的に監視し、削減します。

   1.  [IAM Access Analyzer](https://aws.amazon.com/iam/access-analyzer/) を継続的に実行して、アクセス許可を削減できる場合にアラートを生成できます。

1.  異常なデータアクセス動作を監視し、警告します。

   1.  [GuardDuty](https://aws.amazon.com/guardduty/) は、EBS ボリューム、S3 バケット、RDS データベースなどのデータストレージリソースについて、既知の脅威シグネチャとベースラインアクセス動作からの逸脱を監視します。

1.  機密データが予期しない場所に保存されていないか監視し、警告します。

   1.  [Amazon Macie](https://aws.amazon.com/macie/) を使用して、S3 バケットの機密データを継続的にスキャンします。

1.  暗号化した安全なデータバックアップの作成を自動化します。

   1.  [AWS Backup](https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html) は、AWS の各データソースのバックアップを作成できるマネージドサービスです。 [Elastic Disaster Recovery](https://aws.amazon.com/disaster-recovery/) を使用すると、サーバーワークロード全体をコピーし、秒単位の目標復旧時点 (RPO) を提供する継続的なデータ保護を実現できます。 両方のサービスを連携するよう設定し、データバックアップの作成とフェイルオーバー先へのコピーを自動化できます。 そうしておくことで、運用上のイベントやセキュリティイベントの影響を受けた場合でも、データが常時利用可能になります。

## リソース
<a name="resources"></a>

 **関連するベストプラクティス:** 
+  [SEC01-BP06 標準的なセキュリティ統制のデプロイを自動化する](https://docs.aws.amazon.com/wellarchitected/latest/framework/sec_securely_operate_automate_security_controls.html) 
+  [SEC03-BP02 最小特権のアクセスを付与する](https://docs.aws.amazon.com/wellarchitected/latest/framework/sec_permissions_least_privileges.html) 
+  [SEC03-BP04 アクセス許可を継続的に削減する](https://docs.aws.amazon.com/wellarchitected/latest/framework/sec_permissions_continuous_reduction.html) 
+  [SEC04-BP04 非準拠リソースの修復を開始する](https://docs.aws.amazon.com/wellarchitected/latest/framework/sec_detect_investigate_events_noncompliant_resources.html) 
+  [SEC07-BP03 識別および分類を自動化する](https://docs.aws.amazon.com/wellarchitected/latest/framework/sec_data_classification_auto_classification.html) 
+  [REL09-BP02 バックアップを保護し、暗号化する](https://docs.aws.amazon.com/wellarchitected/latest/reliability-pillar/rel_backing_up_data_secured_backups_data.html) 
+  [REL09-BP03 データバックアップを自動的に実行する](https://docs.aws.amazon.com/wellarchitected/latest/reliability-pillar/rel_backing_up_data_automated_backups_data.html) 

 **関連ドキュメント:** 
+  [AWS 規範ガイダンス: Automatically encrypt existing and new Amazon EBS volumes](https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/automatically-encrypt-existing-and-new-amazon-ebs-volumes.html) 
+  [Ransomware Risk Management on AWS Using the NIST Cyber Security Framework (CSF)](https://docs.aws.amazon.com/whitepapers/latest/ransomware-risk-management-on-aws-using-nist-csf/ransomware-risk-management-on-aws-using-nist-csf.html) 

 **関連する例:** 
+  [How to use AWS Config proactive rules and AWS CloudFormation Hooks to prevent creation of noncompliant cloud resources](https://aws.amazon.com/blogs/mt/how-to-use-aws-config-proactive-rules-and-aws-cloudformation-hooks-to-prevent-creation-of-non-complaint-cloud-resources/) 
+  [Automate and centrally manage data protection for Amazon S3 with AWS Backup](https://aws.amazon.com/blogs/storage/automate-and-centrally-manage-data-protection-for-amazon-s3-with-aws-backup/) 
+  [AWS re:Invent 2023 - Implement proactive data protection using Amazon EBS snapshots](https://www.youtube.com/watch?v=d7C6XsUnmHc) 
+  [AWS re:Invent 2022 - Build and automate for resilience with modern data protection](https://www.youtube.com/watch?v=OkaGvr3xYNk) 

 **関連ツール**: 
+  [AWS CloudFormation Guard](https://docs.aws.amazon.com/cfn-guard/latest/ug/what-is-guard.html) 
+  [AWS CloudFormation Guard Rules Registry](https://github.com/aws-cloudformation/aws-guard-rules-registry) 
+  [IAM Access Analyzer](https://aws.amazon.com/iam/access-analyzer/) 
+  [Amazon Macie](https://aws.amazon.com/macie/) 
+  [AWS Backup](https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html) 
+  [Elastic Disaster Recovery](https://aws.amazon.com/disaster-recovery/) 