This product is not supported for your selected Datadog site. ().

Docker、Kubernetes、Amazon ECS、AWS Fargate 上で動作する Java アプリのアプリケーション セキュリティを監視できます。

Prerequisites

1-Click Enablement
If your service is running with an Agent with Remote Configuration enabled and a tracing library version that supports it, hover over the Not Enabled indicator in the AAP Status column and click Enable AAP. There's no need to re-launch the service with the DD_APPSEC_ENABLED=true or --enable-appsec flags.

Enabling threat detection

詳細はこちら

  1. Update your Datadog Java library to at least version 0.94.0 (at least version 1.1.4 for Software Composition Analysis detection features):

    wget -O dd-java-agent.jar 'https://dtdg.co/latest-java-tracer'
    
    curl -Lo dd-java-agent.jar 'https://dtdg.co/latest-java-tracer'
    
    ADD 'https://dtdg.co/latest-java-tracer' dd-java-agent.jar
    

    サービスで使用している言語とフレームワークのバージョンが AAP 機能に対応しているかは、互換性 を参照してください。

  2. AAP を有効化して Java アプリケーションを実行します。 コマンド ラインから:

    java -javaagent:/path/to/dd-java-agent.jar -Ddd.appsec.enabled=true -Ddd.service=<MY SERVICE> -Ddd.env=<MY_ENV> -jar path/to/app.jar
    

    または、アプリケーションが実行される場所に応じて、以下の方法のいずれかを使用します。

    注: 読み取り専用ファイルシステムは現在サポートされていません。アプリケーションは書き込み可能な /tmp ディレクトリへのアクセス権を持っている必要があります。

    APM 用の構成コンテナを更新するには、docker run コマンドに以下の引数を追加します。

    docker run [...] -e DD_APPSEC_ENABLED=true [...]
    

    コンテナの Dockerfile に以下の環境変数の値を追加します。

    ENV DD_APPSEC_ENABLED=true
    

    APM 用にデプロイ構成ファイルを更新し、AAP 環境変数を追加します:

    spec:
      template:
        spec:
          containers:
            - name: <CONTAINER_NAME>
              image: <CONTAINER_IMAGE>/<TAG>
              env:
                - name: DD_APPSEC_ENABLED
                  value: "true"
    

    以下を環境セクションに追加して、ECS タスク定義 JSON ファイルを更新します。

    "environment": [
      ...,
      {
        "name": "DD_APPSEC_ENABLED",
        "value": "true"
      }
    ]
    

    サービス起動時に -Ddd.appsec.enabled フラグまたは DD_APPSEC_ENABLED 環境変数を true に設定します。

    java -javaagent:dd-java-agent.jar \
         -Ddd.appsec.enabled=true \
         -jar <YOUR_SERVICE>.jar \
         <YOUR_SERVICE_FLAGS>
    

    After this configuration is complete, the library collects security data from your application and sends it to the Agent. The Agent sends the data to Datadog, where out-of-the-box detection rules flag attacker techniques and potential misconfigurations so you can take steps to remediate.

  3. To see App and API Protection threat detection in action, send known attack patterns to your application. For example, trigger the Security Scanner Detected rule by running a file that contains the following curl script:

    for ((i=1;i<=250;i++)); 
    do
    # Target existing service's routes
    curl https://your-application-url/existing-route -A dd-test-scanner-log;
    # Target non existing service's routes
    curl https://your-application-url/non-existing-route -A dd-test-scanner-log;
    done

    Note: The dd-test-scanner-log value is supported in the most recent releases.

    A few minutes after you enable your application and send known attack patterns to it, threat information appears in the Application Signals Explorer and vulnerability information appears in the Vulnerabilities explorer.

さらにサポートが必要な場合は、Datadog サポートにお問い合わせください。

その他の参考資料