• 製品
  • 使用を開始する
  • 関連ドキュメント
  • リソース

Opsgenie を Amazon Security Hub と統合する

概要

統合でできるようになること

Amazon Security Hub を使用すると、複数の AWS サービス (Amazon GuardDuty、Amazon Inspector、Amazon Macie などや AWS Partner ソリューション) からのセキュリティ アラートや調査結果を集約、整理、優先順位付けできます。

Amazon Security Hub 統合を使用して、Amazon Security Hub の結果を Opsgenie に転送します。Opsgenie は、オンコール スケジュールに基づいて適切な通知先を決定します。メール、テキスト メッセージ (SMS)、電話、iOS、Android のプッシュ通知によって通知し、アラートが承認されるかクローズされるまでアラートをエスカレートします。

統合による機能

Amazon Security Hub は、対応する CloudWatch イベント ルールに一致する結果を CloudWatch に送信します。ターゲットの SNS トピックを選択すると、結果に関連するイベント メッセージを SNS に公開して、最後に Opsgenie にこのメッセージを送信します。

また、Opsgenie は、Amazon Security Hub 統合によって作成された Opsgenie アラートに対して次のアクションが実行された場合に、Amazon Security Hub に更新を送り返すことができます。

  • Opsgenie でアラートが承認された場合に、Amazon Security Hub で結果のワークフロー ステータスが通知済みに更新される。

  • Opsgenie でアラートがクローズされた場合に、Amazon Security Hub で結果のワークフロー ステータスが解決済みに更新される。

  • Opsgenie でアラートにメモが追加された場合に、Amazon Security Hub で同じメモが結果に追加される。

  • Opsgenie でアラートの優先度が更新された場合に、Amazon Security Hub で結果の重大度が更新される。

統合をセットアップする

Amazon Security Hub は双方向の統合です。これを Opsgenie に追加し、(Opsgenie で作成されたアラートに対して何らかのアクションが実行されたときに) アラートの更新を Amazon Security Hub に送り返すように設定するには、次の一連の手順が必要です。

  • OpsgenieAmazon Security Hub 統合を追加する

  • Amazon Security Hub で統合を設定する

  • Opsgenie に SNS メッセージを送信するためのサブスクリプションを作成する

  • Amazon CloudWatch イベント ルールを作成する

  • Amazon EventBridge イベントでターゲットの SNS トピックを選択する

  • Amazon Security Hub に更新を送り返す

Amazon Security Hub 統合を追加する

Opsgenie の Free プランまたは Essentials プランを使用している、または Jira Service Management の Standard プランで Opsgenie を使用している場合は、チーム ダッシュボードからのみこの統合を追加できます。このプランでは、[設定] の [統合] ページが利用できません。

  1. [チーム] に移動して自分のチームを選択します。

  2. 左側のナビゲーションで [統合] を選択し、[統合を追加] を選択します。

統合をチーム ダッシュボードから追加すると、そのチーム統合の所有者になります。Opsgenie では、この統合を通じて受信したアラートはそのチームのみに割り当てられます。このセクションの残りの手順に従って、統合を設定してください。

OpsgenieAmazon Security Hub 統合を追加するには:

  1. [設定] > [統合] の順に移動します。

  2. [統合を追加] を選択します。

  3. 検索を実行して「Amazon Security Hub」を選択します。

  4. 次の画面で、統合の名前を入力します。

  5. オプション: 特定のチームが統合からのアラートを受信するようにする場合は、[Assignee team (担当者チーム)] のチームを選択します。

  6. [続行] を選択します。
    この時点で、統合が保存されます。

  7. [Steps to configure the integration (統合を設定するステップ)] セクションを展開して、統合エンドポイント URL をコピーします。
    この URL は、後ほど Amazon Security Hub で統合を設定する際に使用します。

  8. [統合をオンにする] を選択します。
    統合のために作成したルールは、統合をオンにした場合にのみ機能します。

Amazon Security Hub で統合を設定する

  1. カスタム Security Hub アクションを作成します。

  2. CloudFormation テンプレートを使用して、CloudWatch イベントにおける Security Hub の結果に対するルールを作成し、CloudWatch イベント ターゲットの SNS トピックを作成します。

  3. Opsgenie に統合を追加する際にコピーした URL を CloudFormation テンプレートの SNSSubEndpoint に貼り付けます。

  4. (ステップ 1 で作成したカスタム Security Hub アクションの ARN を入力した後) 以下をコピーして、CloudFormation テンプレートの EventPatternParameter に貼り付けます。

    1 2 3 4 5 6 7 8 9 10 11 { "source": [ "aws.securityhub" ], "detail-type": [ "Security Hub Findings - Custom Action" ], "resources": [ "< CUSTOM ACTION ARN YOU CREATED IN SECURITY HUB >" ] }
  5. 設定が正常に完了すると、Opsgenie で確認のアラートが作成されます。

  6. [Send alert updates back to Amazon Security Hub (アラートの更新を Amazon Security Hub に送り返す)] を選択して、送信機能を有効にします。

  7. Opsgenie が IAM ロールを通じて Security Hub リソースにアクセスすることを許可します。
    CloudFormation テンプレートを使用して IAM ロールを作成します。

  8. IAM ロールの ARN をコピーして、AmazonSecurityHub Role ARN に貼り付けます。

  9. Security Hub をセットアップした AWS リージョンを選択します。

Opsgenie に SNS メッセージを送信するためのサブスクリプションを作成する

ターゲットの SNS トピックを選択すると、結果に関連するイベント メッセージを SNS に公開できます。

  1. AWS SNS に移動し、[トピック] > [トピックを作成] を選択します。

  2. [Subscription (サブスクリプション)] タブで、[Create subscription (サブスクリプションの作成)] を選択します。
    これにより、SNS メッセージが Opsgenie に送信される方法を指定します。

  3. [Protocol (プロトコル)] フィールドで、エンドポイント タイプとして [HTTPS] を選択します。

  4. [Endpoint (エンドポイント)] フィールドに、Opsgenie に統合を追加する際にコピーした API エンドポイント URL を入力します。

Amazon CloudWatch イベント ルールを作成する

Amazon CloudWatch イベント ルールを作成して、Amazon Security Hub がルールに一致する結果を CloudWatch に送信できるようにします。

  1. Amazon CloudWatch アカウントで、[Events (イベント)] > [Rules (ルール)] を選択します。

  2. [ルールを作成] を選択します。

  3. [Event Source (イベント ソース)] セクションで、[Event Pattern (イベント パターン)] オプションを選択します。

  4. ドロップダウン メニューから [Build event pattern to match all events (すべてのイベントに一致するようにイベント パターンを作成)] を選択します。

  5. イベント パターン プレビューで [Edit (編集)] を選択し、このセクションに記載されているスクリプトをコピーして貼り付けます。

  6. [Targets (ターゲット)] セクションで、ドロップダウン メニューから [SNS topic (SNS トピック)] を選択し、事前に作成したトピックを選択します。

  7. [Configure details (詳細の設定)] を選択し、名前、説明、その他の情報を入力します。

  8. [ルールを作成] を選択します。

イベント パターンのプレビューのスクリプト

次のスクリプトをコピーして、イベント ソースイベント パターン プレビュー セクションに貼り付けます。

イベント パターン プレビュー スクリプト (JSON 形式)

1 2 3 4 5 6 7 8 9 10 11 { "source": [ "aws.securityhub" ], "detail-type": [ "Security Hub Findings - Custom Action" ], "resources": [ <custom action arn you created in security hub> ] }

Amazon EventBridge イベントでターゲットの SNS トピックを選択する

ターゲットの SNS トピックを選択すると、結果に関する関連イベント メッセージを SNS に公開して、最後に Opsgenie にこのメッセージを送信します。

  1. Amazon EventBridge に移動し、[Rules (ルール)] を選択します。

  2. [ルールを作成] を選択します。

  3. [ステップ 1] に、そのルールの [名前] と [説明] を入力します。

  4. [Rule type (ルール タイプ)] として [Rule with an event patterns (イベント パターンを持つルール)] を選択し、[Next (次へ)] を選択します。

  5. [ステップ 2] で、[イベント ソース] として [AWS events and EventBrigde partner events (AWS イベントおよび EventBrigde パートナー イベント)] を選択します。

  6. [Event source (イベント ソース)] として [AWS services (AWS サービス)] を選択します。

  7. [AWS サービス] として [Security Hub] を選択します。

  8. [イベント タイプ] セクションで、セキュリティ ハブで作成したカスタム アクションを選択します。

  9. 次へ をクリックします。

  10. ステップ 3 で、[Target types (ターゲット タイプ)] のドロップダウン メニューから [SNS topic (SNS トピック)] を選択し、[Topic (トピック)] フィールドで事前に作成したトピックを選択します。

  11. 次へ をクリックします。

  12. [ステップ 5] で、ルールを確認し、作成します。

Amazon Security Hub にアラートの更新を送り返す

Opsgenie で次の手順を実行して、アラートの更新を Amazon Security Hub に送り返します。

  1. OpsgenieAmazon Security Hub 統合ページから、[Send alert updates back to Amazon Security Hub (アラートの更新を Amazon Security Hub に送り返す] チェックボックスを選択します。

  2. Opsgenie が IAM ロールを使用してセキュリティ ハブ リソースにアクセスできるようにします。CloudFormation テンプレートを使用して、Opsgenie がセキュリティ ハブ リソースにアクセスできるようにするロールを作成できます。

  3. CloudFormation テンプレートへのすべての入力パラメーター (統合ページの API URL (事前入力)、Opsgenie Aws AccountId (事前入力)、RoleName など) が正しいことを確認します。ロール名は opsgenieSecurityHubRole* 形式である必要があります。

  4. 前のステップで作成した IAM ロールの ARN をコピーして、AmazonSecurityHub Role ARN に貼り付けます。

  5. Security Hub が有効になっているリージョンを選択します。

Amazon Security Hub からのペイロードの例

サンプル ペイロード (JSON 形式)

1 2 3 4 5 6 7 8 9 10 11 { "Type": "Notification", "MessageId": "96d4c7c2-999e-57ab-aade", "TopicArn": "arn:aws:sns:us-west-2:test", "Message": "{\"version\":\"0\",\"id\":\"3ee38987-e0ce--91a1\",\"detail-type\":\"EC2 Instance State-change Notification\",\"source\":\"aws.ec2\",\"account\":\"abc\",\"time\":\"2017-09-11T10:49:41Z\",\"region\":\"us-west-2\",\"resources\":[\"arn:aws:ec2:us-west-2:asdf:instance/i-abc\"],\"detail\":{\"actionName\":\"custom-action-name\",\"actionDescription\":\"description of the action\",\"findings\":[{\"AwsAccountId\": \"abc\",\"Compliance\": {\"Status\": \"PASSED\"},\"Confidence\": 42,\"CreatedAt\": \"2017-03-22T13:22:13.933Z\",\"Criticality\": 99,\"Description\": \"The version of openssl found on instance i-abcd1234 is known to contain a vulnerability.\",\"FirstObservedAt\": \"2017-03-22T13:22:13.933Z\",\"GeneratorId\": \"acme-vuln-9ab348\",\"Id\": \"us-west-2/111111111111/98aebb2207407c87f51e89943f12b1ef\",\"LastObservedAt\": \"2017-03-23T13:22:13.933Z\",\"Malware\": [{\"Name\": \"Stringler\",\"Type\": \"COIN_MINER\",\"Path\": \"/usr/sbin/stringler\",\"State\": \"OBSERVED\"}],\"Network\": {\"Direction\": \"IN\",\"Protocol\": \"TCP\",\"SourceIpV4\": \"1.2.3.4\",\"SourceIpV6\": \"FE80:CD00:0000:0CDE:1257:0000:211E:729C\",\"SourcePort\": \"42\",\"SourceDomain\": \"here.com\",\"SourceMac\": \"00:0d:83:b1:c0:8e\",\"DestinationIpV4\": \"2.3.4.5\",\"DestinationIpV6\": \"FE80:CD00:0000:0CDE:1257:0000:211E:729C\",\"DestinationPort\": \"80\",\"DestinationDomain\": \"there.com\"},\"Note\": {\"Text\": \"Don't forget to check under the mat.\",\"UpdatedBy\": \"jsmith\",\"UpdatedAt\": \"2018-08-31T00:15:09Z\"},\"Process\": {\"Name\": \"syslogd\",\"Path\": \"/usr/sbin/syslogd\",\"Pid\": 12345,\"ParentPid\": 56789,\"LaunchedAt\": \"2018-09-27T22:37:31Z\",\"TerminatedAt\": \"2018-09-27T23:37:31Z\"},\"ProductArn\": \"arn:aws:securityhub:us-east-1:111111111111:product/111111111111/default\",\"ProductFields\": {\"generico/secure-pro/Count\": \"6\",\"Service_Name\": \"cloudtrail.amazonaws.com\",\"aws/inspector/AssessmentTemplateName\": \"My daily CVE assessment\",\"aws/inspector/AssessmentTargetName\": \"My prod env\",\"aws/inspector/RulesPackageName\": \"Common Vulnerabilities and Exposures\"},\"RecordState\": \"ACTIVE\",\"RelatedFindings\": [{ \"ProductArn\": \"arn:aws:securityhub:us-west-2::product/aws/guardduty\",\"Id\": \"123e4567-e89b-12d3-a456-426655440000\" },{ \"ProductArn\": \"arn:aws:securityhub:us-west-2::product/aws/guardduty\",\"Id\": \"AcmeNerfHerder--x189dx7824\" }],\"Remediation\": {\"Recommendation\": {\"Text\": \"Run sudo yum update and cross your fingers and toes.\",\"Url\": \"http://myfp.com/recommendations/dangerous_things_and_how_to_fix_them.html\"}},\"Resources\": [{\"Type\": \"AwsEc2Instance\",\"Id\": \"i-cafebabe\",\"Partition\": \"aws\",\"Region\": \"us-west-2\",\"Tags\": {\"billingCode\": \"Lotus-1-2-3\",\"needsPatching\": \"true\"},\"Details\": {\"AwsEc2Instance\": {\"Type\": \"i3.xlarge\",\"ImageId\": \"ami-abcd1234\",\"IpV4Addresses\": [ \"54.194.252.215\", \"192.168.1.88\" ],\"IpV6Addresses\": [ \"2001:db8:1234:1a2b::123\" ],\"KeyName\": \"my_keypair\",\"IamInstanceProfileArn\": \"arn:aws:iam:::instance-profile/AdminRole\",\"VpcId\": \"vpc-11112222\",\"SubnetId\": \"subnet-56f5f633\",\"LaunchedAt\": \"2018-05-08T16:46:19.000Z\"}}}],\"SchemaVersion\": \"2018-10-08\",\"Severity\": {\"Product\": 8.3,\"Normalized\": 25},\"SourceUrl\": \"string\",\"ThreatIntelIndicators\": [{\"Type\": \"IPV4_ADDRESS\",\"Value\": \"8.8.8.8\",\"Category\": \"BACKDOOR\",\"LastObservedAt\": \"2018-09-27T23:37:31Z\",\"Source\": \"Threat Intel Weekly\",\"SourceUrl\": \"http://threatintelweekly.org/backdoors/8888\"}],\"Title\": \"title\",\"Types\": [\"Software and Configuration Checks/Vulnerabilities/CVE\"],\"UpdatedAt\": \"123578964332\",\"UserDefinedFields\": {\"reviewedByCio\": \"true\",\"comeBackToLater\": \"Check this again on Monday\"},\"VerificationState\": \"string\",\"WorkflowState\": \"NEW\"}]}}", "Timestamp": "2017-09-11T10:49:42.630Z", "SignatureVersion": "1", "Signature": "sign", "SigningCertURL": "https://sns.us-west-2.amazonaws.com/SimpleNotification.pem", "UnsubscribeURL": "https://sns.us-west-2.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-west-2:" }

その他のヘルプ