From 4a85b8d41dd7af03c52cd9e82c2bc2f57896dff1 Mon Sep 17 00:00:00 2001 From: CarlesDD Date: Thu, 3 Jul 2025 17:17:24 +0200 Subject: [PATCH 01/12] bootstrapping the new setup pages for Node.js --- .../application_security/setup/nodejs.md | 174 ----------------- .../setup/nodejs/_index.md | 51 +++++ .../setup/nodejs/aws-fargate.md | 169 +++++++++++++++++ .../setup/nodejs/compatibility.md | 178 ++++++++++++++++++ .../setup/nodejs/docker.md | 122 ++++++++++++ .../setup/nodejs/kubernetes.md | 132 +++++++++++++ .../setup/nodejs/linux.md | 83 ++++++++ .../setup/nodejs/macos.md | 81 ++++++++ .../setup/nodejs/troubleshooting.md | 79 ++++++++ .../setup/nodejs/windows.md | 89 +++++++++ .../app_and_api_protection_nodejs_overview.md | 14 ++ ...and_api_protection_nodejs_setup_options.md | 9 + 12 files changed, 1007 insertions(+), 174 deletions(-) delete mode 100644 content/en/security/application_security/setup/nodejs.md create mode 100644 content/en/security/application_security/setup/nodejs/_index.md create mode 100644 content/en/security/application_security/setup/nodejs/aws-fargate.md create mode 100644 content/en/security/application_security/setup/nodejs/compatibility.md create mode 100644 content/en/security/application_security/setup/nodejs/docker.md create mode 100644 content/en/security/application_security/setup/nodejs/kubernetes.md create mode 100644 content/en/security/application_security/setup/nodejs/linux.md create mode 100644 content/en/security/application_security/setup/nodejs/macos.md create mode 100644 content/en/security/application_security/setup/nodejs/troubleshooting.md create mode 100644 content/en/security/application_security/setup/nodejs/windows.md create mode 100644 layouts/shortcodes/app_and_api_protection_nodejs_overview.md create mode 100644 layouts/shortcodes/app_and_api_protection_nodejs_setup_options.md diff --git a/content/en/security/application_security/setup/nodejs.md b/content/en/security/application_security/setup/nodejs.md deleted file mode 100644 index e167df856058d..0000000000000 --- a/content/en/security/application_security/setup/nodejs.md +++ /dev/null @@ -1,174 +0,0 @@ ---- -title: Enabling AAP for Node.js -code_lang: nodejs -type: multi-code-lang -code_lang_weight: 50 -aliases: - - /security_platform/application_security/getting_started/nodejs - - /security/application_security/getting_started/nodejs - - /security/application_security/enabling/tracing_libraries/threat_detection/nodejs/ - - /security/application_security/threats/setup/threat_detection/nodejs - - /security/application_security/threats_detection/nodejs - - /security/application_security/setup/aws/fargate/nodejs -further_reading: - - link: "/security/application_security/add-user-info/" - tag: "Documentation" - text: "Adding user information to traces" - - link: 'https://github.com/DataDog/dd-trace-js' - tag: "Source Code" - text: 'Node.js Datadog library source code' - - link: "/security/default_rules/?category=cat-application-security" - tag: "Documentation" - text: "OOTB App and API Protection Rules" - - link: "/security/application_security/troubleshooting" - tag: "Documentation" - text: "Troubleshooting App and API Protection" ---- - -You can monitor App and API Protection for Node.js apps running in Docker, Kubernetes, Amazon ECS, and AWS Fargate. - -{{% appsec-getstarted %}} - -## Enabling threat detection -### Get started - -1. **Update your Datadog Node.js library package** to at least version 5.0.0 (for Node 18+) or 4.0.0 (for Node 16+) or 3.10.0 (for Node.js 14+), by running one of these commands: - ```shell - npm install dd-trace@^5 - npm install dd-trace@^4 - npm install dd-trace@^3.10.0 - ``` - Use this [migration guide][1] to assess any breaking changes if you upgraded your library. - - App and API Protection is compatible with Express v4+ and Node.js v14+. For additional information, see [Compatibility][2]. - -2. **Where you import and initialize the Node.js library for APM, also enable AAP.** This might be either in your code or with environment variables. If you initialized APM in code, add `{appsec: true}` to your init statement: - {{< tabs >}} -{{% tab "In JavaScript code" %}} - -```js -// This line must come before importing any instrumented module. -const tracer = require('dd-trace').init({ - appsec: true -}) -``` - -{{% /tab %}} -{{% tab "In TypeScript code" %}} - -For TypeScript and bundlers that support EcmaScript Module syntax, initialize the tracer in a separate file in order to maintain correct load order. -```typescript -// server.ts -import './tracer'; // must come before importing any instrumented module. - -// tracer.ts -import tracer from 'dd-trace'; -tracer.init({ - appsec: true -}); // initialized in a different file to avoid hoisting. -export default tracer; -``` -If the default config is sufficient, or all configuration is done through environment variables, you can also use `dd-trace/init`, which loads and initializes in one step. -```typescript -import `dd-trace/init`; -``` -{{% /tab %}} - -{{< /tabs >}} - - **Or** if you initialize the APM library on the command line using the `--require` option to Node.js: - ```shell - node --require dd-trace/init app.js - ``` - Then use environment variables to enable AAP: - ```shell - DD_APPSEC_ENABLED=true node app.js - ``` - How you do this varies depending on where your service runs: - {{< tabs >}} -{{% tab "Docker CLI" %}} - -Update your configuration container for APM by adding the following argument in your `docker run` command: - -```shell -docker run [...] -e DD_APPSEC_ENABLED=true [...] -``` - -{{% /tab %}} -{{% tab "Dockerfile" %}} - -Add the following environment variable value to your container Dockerfile: - -```Dockerfile -ENV DD_APPSEC_ENABLED=true -``` - -{{% /tab %}} -{{% tab "Kubernetes" %}} - -Update your configuration yaml file container for APM and add the AppSec env variable: - -```yaml -spec: - template: - spec: - containers: - - name: - image: / - env: - - name: DD_APPSEC_ENABLED - value: "true" -``` - -{{% /tab %}} -{{% tab "Amazon ECS" %}} - -Update your ECS task definition JSON file, by adding this in the environment section: - -```json -"environment": [ - ..., - { - "name": "DD_APPSEC_ENABLED", - "value": "true" - } -] -``` - -{{% /tab %}} -{{% tab "AWS Fargate" %}} - -Initialize AAP in your code or set `DD_APPSEC_ENABLED` environment variable to `true` in your service invocation: -```shell -DD_APPSEC_ENABLED=true node app.js -``` - -{{% /tab %}} -{{< /tabs >}} - -{{% appsec-getstarted-2-plusrisk %}} - -{{< img src="/security/application_security/appsec-getstarted-threat-and-vuln_2.mp4" alt="Video showing Signals explorer and details, and Vulnerabilities explorer and details." video="true" >}} - - -If you need additional assistance, contact [Datadog support][6]. - -## Using AAP without APM tracing - -If you want to use Application & API Protection without APM tracing functionality, you can deploy with tracing disabled: - -1. Configure your tracing library with the `DD_APM_TRACING_ENABLED=false` environment variable in addition to the `DD_APPSEC_ENABLED=true` environment variable. -2. This configuration will reduce the amount of APM data sent to Datadog to the minimum required by App and API Protection products. - -For more details, see [Standalone App and API Protection][standalone_billing_guide]. -[standalone_billing_guide]: /security/application_security/guide/standalone_application_security/ - -## Further Reading - -{{< partial name="whats-next/whats-next.html" >}} - -[1]: https://github.com/DataDog/dd-trace-js/blob/master/MIGRATING.md -[2]: /security/application_security/setup/compatibility/nodejs -[4]: /agent/versions/upgrade_between_agent_minor_versions/ -[5]: https://app.datadoghq.com/security/appsec/vm -[6]: /help diff --git a/content/en/security/application_security/setup/nodejs/_index.md b/content/en/security/application_security/setup/nodejs/_index.md new file mode 100644 index 0000000000000..214b28e0881fc --- /dev/null +++ b/content/en/security/application_security/setup/nodejs/_index.md @@ -0,0 +1,51 @@ +--- +title: Enabling App and API Protection for Node.js +aliases: + - /security_platform/application_security/getting_started/nodejs + - /security/application_security/getting_started/nodejs + - /security/application_security/enabling/tracing_libraries/threat_detection/nodejs/ + - /security/application_security/threats/setup/threat_detection/nodejs + - /security/application_security/threats_detection/nodejs + - /security/application_security/setup/aws/fargate/nodejs +further_reading: + - link: "/security/application_security/add-user-info/" + tag: "Documentation" + text: "Adding user information to traces" + - link: 'https://github.com/DataDog/dd-trace-js' + tag: "Source Code" + text: 'Node.js Datadog library source code' + - link: "/security/default_rules/?category=cat-application-security" + tag: "Documentation" + text: "OOTB App and API Protection Rules" + - link: "/security/application_security/troubleshooting" + tag: "Documentation" + text: "Troubleshooting App and API Protection" +--- +{{< partial name="app_and_api_protection/callout.html" >}} + +{{% app_and_api_protection_nodejs_overview showSetup="false" %}} + +## Environments + +### Hosts +{{< appsec-integrations >}} +{{< appsec-integration name="Linux" avatar="linux" link="./linux" >}} +{{< appsec-integration name="macOS" avatar="apple" link="./macos" >}} +{{< appsec-integration name="Windows" avatar="windows" link="./windows" >}} +{{< /appsec-integrations >}} + +### Cloud and Container Platforms +{{< appsec-integrations >}} +{{< appsec-integration name="Docker" avatar="docker" link="./docker" >}} +{{< appsec-integration name="Kubernetes" avatar="kubernetes" link="./kubernetes" >}} +{{< /appsec-integrations >}} + +### AWS +{{< appsec-integrations >}} +{{< appsec-integration name="AWS Fargate" avatar="aws-fargate" link="./aws-fargate" >}} +{{< /appsec-integrations >}} + +## Additional Resources + +- [Troubleshooting Guide](./troubleshooting) +- [Compatibility Information](./compatibility) diff --git a/content/en/security/application_security/setup/nodejs/aws-fargate.md b/content/en/security/application_security/setup/nodejs/aws-fargate.md new file mode 100644 index 0000000000000..ee242248f0fc5 --- /dev/null +++ b/content/en/security/application_security/setup/nodejs/aws-fargate.md @@ -0,0 +1,169 @@ +--- +code_lang: aws-fargate +type: multi-code-lang +code_lang_weight: 60 +title: Setup App and API Protection for Node.js on AWS Fargate +further_reading: +- link: "/security/application_security/how-it-works/" + tag: "Documentation" + text: "How App and API Protection Works" +- link: "/security/default_rules/?category=cat-application-security" + tag: "Documentation" + text: "OOTB App and API Protection Rules" +- link: "/security/application_security/troubleshooting" + tag: "Documentation" + text: "Troubleshooting App and API Protection" +--- + +{{% app_and_api_protection_nodejs_overview %}} + +## Prerequisites + +- AWS Fargate environment +- Node.js application containerized with Docker +- AWS CLI configured with appropriate permissions +- Your Datadog API key +- Datadog Node.js tracing library (see version requirements [here][1]) + +## 1. Installing the Datadog Agent + +Install the Datadog Agent in your Fargate task definition: + +```json +{ + "containerDefinitions": [ + { + "name": "datadog-agent", + "image": "public.ecr.aws/datadog/agent:latest", + "environment": [ + { + "name": "DD_API_KEY", + "value": "" + }, + { + "name": "DD_APM_ENABLED", + "value": "true" + }, + { + "name": "DD_APM_NON_LOCAL_TRAFFIC", + "value": "true" + } + ] + } + ] +} +``` + +## 2. Enabling App and API Protection monitoring + +{{% app_and_api_protection_navigation_menu %}} + +{{% appsec-remote-config-activation %}} + +### Manually enabling App and API Protection monitoring + +Ensure your Dockerfile includes the Datadog Node.js library: + +```dockerfile +FROM node:18-alpine + +# Install the Datadog Node.js library +RUN npm install dd-trace + +# Copy your application files +COPY package*.json ./ +COPY . . +RUN npm install + +# Start the application with the Datadog tracer +CMD ["node", "--require", "dd-trace/init", "app.js"] +``` + +{{% collapse-content title="APM Tracing Enabled" level="h4" %}} + +Update your task definition to include the Node.js application container with App and API Protection configuration: + +```json +{ + "containerDefinitions": [ + { + "name": "your-nodejs-app", + "image": "your-nodejs-app-image", + "environment": [ + { + "name": "DD_APPSEC_ENABLED", + "value": "true" + }, + { + "name": "DD_SERVICE", + "value": "" + }, + { + "name": "DD_ENV", + "value": "" + } + ] + } + ] +} +``` + +{{% /collapse-content %}} + +{{% collapse-content title="APM Tracing Disabled" level="h4" %}} +To disable APM tracing while keeping App and API Protection enabled, you must set the APM tracing variable to false. + +Update your task definition to include the Node.js application container with App and API Protection configuration: + +```json +{ + "containerDefinitions": [ + { + "name": "your-nodejs-app", + "image": "your-nodejs-app-image", + "environment": [ + { + "name": "DD_APPSEC_ENABLED", + "value": "true" + }, + { + "name": "DD_APM_TRACING_ENABLED", + "value": "false" + }, + { + "name": "DD_SERVICE", + "value": "" + }, + { + "name": "DD_ENV", + "value": "" + } + ] + } + ] +} +``` + +{{% /collapse-content %}} + +## 3. Run your application + +Deploy your Fargate task with the updated configuration: + +```bash +aws ecs register-task-definition --cli-input-json file://task-definition.json +aws ecs run-task --cluster your-cluster --task-definition your-task-definition +``` + +{{% app_and_api_protection_verify_setup %}} + +## Troubleshooting + +If you encounter issues while setting up App and API Protection for your Node.js application, see the [Node.js App and API Protection troubleshooting guide][2]. + +## Further Reading + +{{< partial name="whats-next/whats-next.html" >}} + +[1]: /security/application_security/setup/nodejs/compatibility +[2]: /security/application_security/setup/nodejs/troubleshooting \ No newline at end of file diff --git a/content/en/security/application_security/setup/nodejs/compatibility.md b/content/en/security/application_security/setup/nodejs/compatibility.md new file mode 100644 index 0000000000000..5ee5653e72f6e --- /dev/null +++ b/content/en/security/application_security/setup/nodejs/compatibility.md @@ -0,0 +1,178 @@ +--- +title: Node.js Compatibility Requirements +code_lang: nodejs +type: multi-code-lang +code_lang_weight: 50 +aliases: + - /security/application_security/threats/setup/compatibility/nodejs +--- + +## App and API Protection capabilities + +The following App and API Protection capabilities are supported in the Node.js library, for the specified tracer version: + +| App and API Protection capability | Minimum Node.js tracer version | +|----------------------------------------|----------------------------------------------------| +| Threat Detection | 4.0.0 | +| Threat Protection | 4.0.0 | +| Customize response to blocked requests | 4.1.0 | +| Automatic user activity event tracking | 4.4.0 for Node.js 16+ | +| API Security | 4.30.0 for Node.js 16+, or 5.6.0 for Node.js 18+ | + +The minimum tracer version to get all supported App and API Protection capabilities for Node.js is 4.30.0. + + +**Note**: +- Threat Protection requires enabling [Remote Configuration][2], which is included in the listed minimum tracer version. + +### Supported deployment types +| Type | Threat Detection support | +|-------------|--------------------------| +| Docker | {{< X >}} | +| Kubernetes | {{< X >}} | +| Amazon ECS | {{< X >}} | +| AWS Fargate | {{< X >}} | +| AWS Lambda | {{< X >}} | + +## Language and framework compatibility + +### Node.js Version Support + +When the Node.js project drops support for an LTS major release line (when it goes End of Life), support for it is dropped in the next major version of `dd-trace`. +The last major supporting release line of `dd-trace` library supports that EOL version of Node.js for at least another year on a maintenance mode basis. + +Some issues cannot be solved in `dd-trace` and instead must be solved in Node.js. When this happens and the Node.js release in question is EOL, it's not possible to solve the issue without moving to another non-EOL release. +Datadog does not make new releases of `dd-trace` to provide specific support for non-LTS Node.js major release lines (odd numbered versions). + +For the best level of support, always run the latest LTS release of Node.js, and the latest major version of `dd-trace`. Whatever release line of Node.js you use, also use the latest version of Node.js on that release line, to ensure you have the latest security fixes. + +For more information about Node.js release, see the [official Node.js documentation][4]. + + + +### Operating system support + +The following operating systems are officially supported by `dd-trace`. Any operating system not listed is still likely to work, but with some features missing, for example App and API Protection capabilities, profiling, and runtime metrics. Generally speaking, operating systems that are actively maintained at the time of initial release for a major version are supported. + + +| Operating System | Architectures | Minimum Versions | +|------------------|---------------|------------------------------------------| +| Linux (glibc) | arm64, x64 | CentOS 7, Debian 9, RHEL 7, Ubuntu 14.04 | +| Linux (musl) | arm64, x64 | Alpine 3.13 | +| macOS | arm64, x64 | Catalina (10.15) | +| Windows | x64 | Windows 8.1, Windows Server 2012 | + + + + + +### Web framework compatibility + +- Attacker source HTTP request details +- Tags for the HTTP request (status code, method, etc) +- Distributed Tracing to see attack flows through your applications + +##### App and API Protection Capability Notes + +Although Threat Protection is available for express >= 4 versions, the blocking of payloads on the body is only supported for applications using `body-parser` library. + +| Framework | Versions | Threat Detection supported? | Threat Protection supported? | +|-----------|----------|-----------------------------|------------------------------| +| express | >=4 | {{< X >}} | {{< X >}} | +| nextjs | >=11.1 | {{< X >}} | | + + + + + +
If you would like to see support added for any of the unsupported capabilities or for your Node.js framework, let us know! Fill out this short form to send details.
+ + +### Networking framework compatibility + + +**Networking tracing provides:** + +- Distributed tracing through your applications +- Request-based blocking + +##### App and API Protection Capability Notes + + +| Framework | Threat Detection supported? | Threat Protection supported? | +|-----------|-----------------------------|------------------------------| +| http | {{< X >}} | {{< X >}} | +| https | {{< X >}} | {{< X >}} | + + +
If you don't see your framework of choice listed, let us know! Fill out this short form to send details.
+ +### Data store compatibility + + +**Datastore tracing provides:** + +- Timing request to response +- Query info (for example, a sanitized query string) +- Error and stacktrace capturing + +##### App and API Protection Capability Notes + +- **Threat Protection** also works at the HTTP request (input) layer, and so works for all databases by default, even those not listed in the table below. + + +| Framework | Versions | Threat Detection supported? | Threat Protection supported? | +|--------------------------|-----------|-----------------------------|------------------------------| +| [@apollo/server][43] | `>=4` | {{< X >}} | {{< X >}} | +| [apollo-server-core][44] | `>=3` | {{< X >}} | {{< X >}} | +| [cassandra-driver][28] | `>=3` | {{< X >}} | {{< X >}} | +| [couchbase][29] | `^2.4.2` | {{< X >}} | {{< X >}} | +| [elasticsearch][30] | `>=10` | {{< X >}} | {{< X >}} | +| [ioredis][31] | `>=2` | {{< X >}} | {{< X >}} | +| [knex][32] | `>=0.8` | {{< X >}} | {{< X >}} | +| [mariadb][5] | `>=3` | {{< X >}} | {{< X >}} | +| [memcached][33] | `>=2.2` | {{< X >}} | {{< X >}} | +| [mongodb-core][34] | `>=2` | {{< X >}} | {{< X >}} | +| [mysql][35] | `>=2` | {{< X >}} | {{< X >}} | +| [mysql2][36] | `>=1` | {{< X >}} | {{< X >}} | +| [oracledb][37] | `>=5` | {{< X >}} | {{< X >}} | +| [pg][38] | `>=4` | {{< X >}} | {{< X >}} | +| [redis][39] | `>=0.12` | {{< X >}} | {{< X >}} | +| [sharedb][40] | `>=1` | {{< X >}} | {{< X >}} | +| [tedious][41] | `>=1` | {{< X >}} | {{< X >}} | +| [sequelize][42] | `>=4` | {{< X >}} | {{< X >}} | + + +### User Authentication Frameworks compatibility + +**Integrations to User Authentication Frameworks provide:** + +- User login events, including the user IDs +- The Account Takeover detection monitoring the user login events + +| Framework | Minimum Framework Version | +|-----------------|---------------------------| +| passport-local | 1.0.0 | +| passport-http | 0.3.0 | + +[1]: /tracing/trace_collection/compatibility/nodejs/ +[2]: /agent/remote_config/#enabling-remote-configuration +[4]: https://github.com/nodejs/release#release-schedule +[5]: https://github.com/mariadb-corporation/mariadb-connector-nodejs +[28]: https://github.com/datastax/nodejs-driver +[29]: https://github.com/couchbase/couchnode +[30]: https://github.com/elastic/elasticsearch-js +[31]: https://github.com/luin/ioredis +[32]: https://knexjs.org +[33]: https://github.com/3rd-Eden/memcached +[34]: https://www.mongodb.com/docs/drivers/node/current/ +[35]: https://github.com/mysqljs/mysql +[36]: https://github.com/sidorares/node-mysql2 +[37]: https://oracle.github.io/node-oracledb/ +[38]: https://node-postgres.com +[39]: https://github.com/NodeRedis/node_redis +[40]: https://share.github.io/sharedb/ +[41]: http://tediousjs.github.io/tedious +[42]: https://github.com/sequelize/sequelize +[43]: https://github.com/apollographql/apollo-server +[44]: https://www.npmjs.com/package/apollo-server-core diff --git a/content/en/security/application_security/setup/nodejs/docker.md b/content/en/security/application_security/setup/nodejs/docker.md new file mode 100644 index 0000000000000..7db7d6225d839 --- /dev/null +++ b/content/en/security/application_security/setup/nodejs/docker.md @@ -0,0 +1,122 @@ +--- +title: Setup App and API Protection for Node.js in Docker +code_lang: docker +type: multi-code-lang +code_lang_weight: 10 +further_reading: +- link: "/security/application_security/how-it-works/" + tag: "Documentation" + text: "How App and API Protection Works" +- link: "/security/default_rules/?category=cat-application-security" + tag: "Documentation" + text: "OOTB App and API Protection Rules" +- link: "/security/application_security/troubleshooting" + tag: "Documentation" + text: "Troubleshooting App and API Protection" +--- +{{% app_and_api_protection_nodejs_setup_options platform="docker" %}} + +{{% app_and_api_protection_nodejs_overview %}} + +## Prerequisites + +- Docker installed on your host +- Node.js application containerized with Docker +- Your Datadog API key +- Datadog Node.js tracing library (see version requirements [here][1]) + +## 1. Installing the Datadog Agent + +Install the Datadog Agent by following the [setup instructions for Docker](/agent/?tab=cloud_and_container). + +## 2. Enabling App and API Protection monitoring + +{{% app_and_api_protection_navigation_menu %}} +{{% appsec-remote-config-activation %}} + +### Manually enabling App and API Protection monitoring + +{{% collapse-content title="APM Tracing Enabled" level="h4" %}} + +Add the Datadog Node.js library to your Dockerfile and configure environment variables: + +```dockerfile +FROM node:18-alpine + +# Install the Datadog Node.js library +RUN npm install dd-trace + +# Copy your application files +COPY package*.json ./ +COPY . . + +# Install dependencies +RUN npm install + +# Set environment variables +ENV DD_APPSEC_ENABLED=true +ENV DD_SERVICE= +ENV DD_ENV= + +# Start the application with the Datadog tracer +CMD ["node", "--require", "dd-trace/init", "app.js"] +``` + +{{% /collapse-content %}} + +{{% collapse-content title="APM Tracing Disabled" level="h4" %}} +To disable APM tracing while keeping App and API Protection enabled, you must set the APM tracing variable to false. + +Add the Datadog Node.js library to your Dockerfile and configure environment variables: + +```dockerfile +FROM node:18-alpine + +# Install the Datadog Node.js library +RUN npm install dd-trace + +# Copy your application files +COPY package*.json ./ +COPY . . + +# Install dependencies +RUN npm install + +# Set environment variables +ENV DD_APPSEC_ENABLED=true +ENV DD_APM_TRACING_ENABLED=false +ENV DD_SERVICE= +ENV DD_ENV= + +# Start the application with the Datadog tracer +CMD ["node", "--require", "dd-trace/init", "app.js"] +``` + +{{% /collapse-content %}} + +## 3. Run your application + +Build your image and then run your container. + +When running your container, make sure to: +1. Connect it to the same Docker network as the Datadog Agent +2. Set the required environment variables + +```bash +docker run -d \ + --name your-nodejs-app \ + your-nodejs-app-image +``` + +{{% app_and_api_protection_verify_setup %}} + +## Troubleshooting + +If you encounter issues while setting up App and API Protection for your Node.js application, see the [Node.js App and API Protection troubleshooting guide][2]. + +## Further Reading + +{{< partial name="whats-next/whats-next.html" >}} + +[1]: /security/application_security/setup/nodejs/compatibility +[2]: /security/application_security/setup/nodejs/troubleshooting \ No newline at end of file diff --git a/content/en/security/application_security/setup/nodejs/kubernetes.md b/content/en/security/application_security/setup/nodejs/kubernetes.md new file mode 100644 index 0000000000000..ebb5818a6b99b --- /dev/null +++ b/content/en/security/application_security/setup/nodejs/kubernetes.md @@ -0,0 +1,132 @@ +--- +title: Setup App and API Protection for Node.js in Kubernetes +code_lang: kubernetes +type: multi-code-lang +code_lang_weight: 20 +further_reading: +- link: "/security/application_security/how-it-works/" + tag: "Documentation" + text: "How App and API Protection Works" +- link: "/security/default_rules/?category=cat-application-security" + tag: "Documentation" + text: "OOTB App and API Protection Rules" +- link: "/security/application_security/troubleshooting" + tag: "Documentation" + text: "Troubleshooting App and API Protection" +--- +{{% app_and_api_protection_nodejs_setup_options platform="kubernetes" %}} + +{{% app_and_api_protection_nodejs_overview %}} + +## Prerequisites + +- Kubernetes cluster +- Node.js application containerized with Docker +- kubectl configured to access your cluster +- Helm (recommended for Agent installation) +- Your Datadog API key +- Datadog Node.js tracing library (see version requirements [here][1]) + +## 1. Installing the Datadog Agent + +Install the Datadog Agent by following the [setup instructions for Kubernetes](/agent/?tab=cloud_and_container). + +## 2. Enabling App and API Protection monitoring + +{{% app_and_api_protection_navigation_menu %}} +{{% appsec-remote-config-activation %}} + +### Manually enabling App and API Protection monitoring + +Ensure your Dockerfile includes the Datadog Node.js library: + +```dockerfile +FROM node:18-alpine + +# Install the Datadog Node.js library +RUN npm install dd-trace + +# Copy your application files +COPY package*.json ./ +COPY . . +RUN npm install + +# Start the application with the Datadog tracer +CMD ["node", "--require", "dd-trace/init", "app.js"] +``` + +{{% collapse-content title="APM Tracing Enabled" level="h4" %}} + +Update your Kubernetes deployment to include the required environment variables: + +```yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: your-nodejs-app +spec: + template: + spec: + containers: + - name: your-nodejs-app + image: your-nodejs-app-image + env: + - name: DD_APPSEC_ENABLED + value: "true" + - name: DD_SERVICE + value: "" + - name: DD_ENV + value: "" +``` + +{{% /collapse-content %}} + +{{% collapse-content title="APM Tracing Disabled" level="h4" %}} +To disable APM tracing while keeping App and API Protection enabled, you must set the APM tracing variable to false. + +Update your Kubernetes deployment to include the required environment variables: + +```yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: your-nodejs-app +spec: + template: + spec: + containers: + - name: your-nodejs-app + image: your-nodejs-app-image + env: + - name: DD_APPSEC_ENABLED + value: "true" + - name: DD_APM_TRACING_ENABLED + value: "false" + - name: DD_SERVICE + value: "" + - name: DD_ENV + value: "" +``` + +{{% /collapse-content %}} + +## 3. Run your application + +Apply your updated deployment: + +```bash +kubectl apply -f your-deployment.yaml +``` + +{{% app_and_api_protection_verify_setup %}} + +## Troubleshooting + +If you encounter issues while setting up App and API Protection for your Node.js application, see the [Node.js App and API Protection troubleshooting guide][2]. + +## Further Reading + +{{< partial name="whats-next/whats-next.html" >}} + +[1]: /security/application_security/setup/nodejs/compatibility +[2]: /security/application_security/setup/nodejs/troubleshooting \ No newline at end of file diff --git a/content/en/security/application_security/setup/nodejs/linux.md b/content/en/security/application_security/setup/nodejs/linux.md new file mode 100644 index 0000000000000..f806db5d797e4 --- /dev/null +++ b/content/en/security/application_security/setup/nodejs/linux.md @@ -0,0 +1,83 @@ +--- +title: Setup App and API Protection for Node.js on Linux +code_lang: linux +type: multi-code-lang +code_lang_weight: 30 +further_reading: +- link: "/security/application_security/how-it-works/" + tag: "Documentation" + text: "How App and API Protection Works" +- link: "/security/default_rules/?category=cat-application-security" + tag: "Documentation" + text: "OOTB App and API Protection Rules" +- link: "/security/application_security/troubleshooting" + tag: "Documentation" + text: "Troubleshooting App and API Protection" +--- +{{% app_and_api_protection_nodejs_setup_options platform="linux" %}} + +{{% app_and_api_protection_nodejs_overview %}} + +## Prerequisites + +- Linux operating system +- Node.js application +- Root or sudo privileges +- Systemd (for service management) +- Your Datadog API key +- Datadog Node.js tracing library (see version requirements [here][1]) + +## 1. Installing the Datadog Agent + +Install the Datadog Agent by following the [setup instructions for Linux hosts](/agent/?tab=Linux). + +## 2. Enabling App and API Protection monitoring + +{{% app_and_api_protection_navigation_menu %}} +{{% appsec-remote-config-activation %}} + +### Manually enabling App and API Protection monitoring + +Install the latest version of the Datadog Node.js library: + +```bash +npm install dd-trace +``` + +{{% collapse-content title="APM Tracing Enabled" level="h4" %}} + +Start your Node.js application with the Datadog library and App and API Protection enabled: + +```bash +DD_APPSEC_ENABLED=true DD_SERVICE= DD_ENV= node --require dd-trace/init app.js +``` + +{{% /collapse-content %}} + +{{% collapse-content title="APM Tracing Disabled" level="h4" %}} +To disable APM tracing while keeping App and API Protection enabled, you must set the APM tracing variable to false. + +Start your Node.js application with the Datadog library and App and API Protection enabled: + +```bash +DD_APPSEC_ENABLED=true DD_APM_TRACING_ENABLED=false DD_SERVICE= DD_ENV= node --require dd-trace/init app.js +``` + +{{% /collapse-content %}} + +## 3. Run your application + +Start your Node.js application with the configured settings. + +{{% app_and_api_protection_verify_setup %}} + +## Troubleshooting + +If you encounter issues while setting up App and API Protection for your Node.js application, see the [Node.js App and API Protection troubleshooting guide][2]. + +## Further Reading + +{{< partial name="whats-next/whats-next.html" >}} + +[1]: /security/application_security/setup/nodejs/compatibility +[2]: /security/application_security/setup/nodejs/troubleshooting \ No newline at end of file diff --git a/content/en/security/application_security/setup/nodejs/macos.md b/content/en/security/application_security/setup/nodejs/macos.md new file mode 100644 index 0000000000000..e1d105c54e601 --- /dev/null +++ b/content/en/security/application_security/setup/nodejs/macos.md @@ -0,0 +1,81 @@ +--- +title: Setup App and API Protection for Node.js on macOS +code_lang: macos +type: multi-code-lang +code_lang_weight: 40 +further_reading: +- link: "/security/application_security/how-it-works/" + tag: "Documentation" + text: "How App and API Protection Works" +- link: "/security/default_rules/?category=cat-application-security" + tag: "Documentation" + text: "OOTB App and API Protection Rules" +- link: "/security/application_security/troubleshooting" + tag: "Documentation" + text: "Troubleshooting App and API Protection" +--- +{{% app_and_api_protection_nodejs_overview %}} + +## Prerequisites + +- macOS operating system +- Node.js application +- Homebrew (recommended for Agent installation) +- Administrator privileges for some configuration steps +- Your Datadog API key +- Datadog Node.js tracing library (see version requirements [here][1]) + +## 1. Installing the Datadog Agent + +Install the Datadog Agent by following the [setup instructions for macOS](/agent/?tab=macOS). + +## 2. Enabling App and API Protection monitoring + +{{% app_and_api_protection_navigation_menu %}} +{{% appsec-remote-config-activation %}} + +### Manually enabling App and API Protection monitoring + +Install the latest version of the Datadog Node.js library: + +```bash +npm install dd-trace +``` + +{{% collapse-content title="APM Tracing Enabled" level="h4" %}} + +Start your Node.js application with the Datadog library and App and API Protection enabled: + +```bash +DD_APPSEC_ENABLED=true DD_SERVICE= DD_ENV= node --require dd-trace/init app.js +``` + +{{% /collapse-content %}} + +{{% collapse-content title="APM Tracing Disabled" level="h4" %}} +To disable APM tracing while keeping App and API Protection enabled, you must set the APM tracing variable to false. + +Start your Node.js application with the Datadog library and App and API Protection enabled: + +```bash +DD_APPSEC_ENABLED=true DD_APM_TRACING_ENABLED=false DD_SERVICE= DD_ENV= node --require dd-trace/init app.js +``` + +{{% /collapse-content %}} + +## 3. Run your application + +Start your Node.js application with the configured settings. + +{{% app_and_api_protection_verify_setup %}} + +## Troubleshooting + +If you encounter issues while setting up App and API Protection for your Node.js application, see the [Node.js App and API Protection troubleshooting guide][2]. + +## Further Reading + +{{< partial name="whats-next/whats-next.html" >}} + +[1]: /security/application_security/setup/nodejs/compatibility +[2]: /security/application_security/setup/nodejs/troubleshooting \ No newline at end of file diff --git a/content/en/security/application_security/setup/nodejs/troubleshooting.md b/content/en/security/application_security/setup/nodejs/troubleshooting.md new file mode 100644 index 0000000000000..efbfd2e95a008 --- /dev/null +++ b/content/en/security/application_security/setup/nodejs/troubleshooting.md @@ -0,0 +1,79 @@ +--- +title: Troubleshooting Node.js App and API Protection +--- + +## Common Issues + +### No security signals appearing + +If you don't see AAP threat information in the [Trace and Signals Explorer][1] for your Node.js application, follow these steps to troubleshoot the issue: + +1. **Verify Agent version** + - Ensure you're running Datadog Agent v7.41.1 or higher + - Check Agent status: `datadog-agent status` + +2. **Check Node.js tracer version** + - Confirm you're using Node.js tracer v4.30.0 or higher + - Verify the tracer is loaded: `node -e "console.log(require('dd-trace/package.json').version)"` + +3. **Verify environment variables** + - Ensure `DD_APPSEC_ENABLED=true` is set + - Check `DD_SERVICE` and `DD_ENV` are properly configured + - Verify `DD_APM_ENABLED=true` if using APM features + +4. **Check tracer initialization** + - Ensure `dd-trace/init` is required at the start of your application + - Verify the tracer is properly loaded before your application code + +### Application fails to start + +1. **Check Node.js version compatibility** + - Ensure you're using a supported Node.js version (see [compatibility requirements][2]) + - Verify Node.js version: `node --version` + +2. **Check dd-trace installation** + - Ensure `dd-trace` is properly installed: `npm list dd-trace` + - Reinstall if necessary: `npm install dd-trace` + +3. **Module loading errors** + - Check for conflicts with other tracing libraries + - Verify the tracer is required before other modules + +### Performance impact + +1. **High latency** + - Check Agent resource usage + - Verify network connectivity between Agent and Datadog + - Consider adjusting sampling rates + - Review [performance considerations][3] + +2. **High memory usage** + - Monitor Node.js process memory usage + - Check for memory leaks in your application + - Consider adjusting tracer configuration + +### Configuration issues + +1. **Environment variables not recognized** + - Ensure environment variables are set before starting the application + - Check for typos in environment variable names + - Verify that the tracer is initialized with the correct configuration + +2. **Tracer initialization problems** + - Make sure `require('dd-trace/init')` is the first line in your application + - Check for syntax errors in your tracer configuration + - Verify that the tracer is being imported correctly + +### Still having issues? + +If you're still experiencing problems: +1. Check the [Application Security Monitoring troubleshooting guide][1] +2. Review the [Node.js tracer documentation][4] +3. Enable debug logging: `DD_TRACE_DEBUG=true` +4. Contact [Datadog support][5] + +[1]: /security/application_security/troubleshooting +[2]: /security/application_security/setup/nodejs/compatibility +[3]: /tracing/trace_collection/compatibility/nodejs/#performance +[4]: /tracing/trace_collection/compatibility/nodejs/ +[5]: /help diff --git a/content/en/security/application_security/setup/nodejs/windows.md b/content/en/security/application_security/setup/nodejs/windows.md new file mode 100644 index 0000000000000..87e5fe8632fa3 --- /dev/null +++ b/content/en/security/application_security/setup/nodejs/windows.md @@ -0,0 +1,89 @@ +--- +title: Setup App and API Protection for Node.js on Windows +code_lang: windows +type: multi-code-lang +code_lang_weight: 50 +further_reading: +- link: "/security/application_security/how-it-works/" + tag: "Documentation" + text: "How App and API Protection Works" +- link: "/security/default_rules/?category=cat-application-security" + tag: "Documentation" + text: "OOTB App and API Protection Rules" +- link: "/security/application_security/troubleshooting" + tag: "Documentation" + text: "Troubleshooting App and API Protection" +--- +{{% app_and_api_protection_nodejs_overview %}} + +## Prerequisites + +- Windows operating system +- Node.js application +- Administrator privileges for some configuration steps +- Your Datadog API key +- Datadog Node.js tracing library (see version requirements [here][1]) + +## 1. Installing the Datadog Agent + +Install the Datadog Agent by following the [setup instructions for Windows](/agent/?tab=Windows). + +## 2. Enabling App and API Protection monitoring + +{{% app_and_api_protection_navigation_menu %}} +{{% appsec-remote-config-activation %}} + +### Manually enabling App and API Protection monitoring + +Install the latest version of the Datadog Node.js library: + +```powershell +npm install dd-trace +``` + +{{% collapse-content title="APM Tracing Enabled" level="h4" %}} + +Start your Node.js application with the Datadog library and App and API Protection enabled: + +```powershell +$env:DD_APPSEC_ENABLED="true" +$env:DD_SERVICE="" +$env:DD_ENV="" + +node --require dd-trace/init app.js +``` + +{{% /collapse-content %}} + +{{% collapse-content title="APM Tracing Disabled" level="h4" %}} +To disable APM tracing while keeping App and API Protection enabled, you must set the APM tracing variable to false. + +Start your Node.js application with the Datadog library and App and API Protection enabled: + +```powershell +$env:DD_APPSEC_ENABLED="true" +$env:DD_APM_TRACING_ENABLED="false" +$env:DD_SERVICE="" +$env:DD_ENV="" + +node --require dd-trace/init app.js +``` + +{{% /collapse-content %}} + +## 3. Run your application + +Start your Node.js application with the configured settings. + +{{% app_and_api_protection_verify_setup %}} + +## Troubleshooting + +If you encounter issues while setting up App and API Protection for your Node.js application, see the [Node.js App and API Protection troubleshooting guide][2]. + +## Further Reading + +{{< partial name="whats-next/whats-next.html" >}} + +[1]: /security/application_security/setup/nodejs/compatibility +[2]: /security/application_security/setup/nodejs/troubleshooting \ No newline at end of file diff --git a/layouts/shortcodes/app_and_api_protection_nodejs_overview.md b/layouts/shortcodes/app_and_api_protection_nodejs_overview.md new file mode 100644 index 0000000000000..d1cff92241d5b --- /dev/null +++ b/layouts/shortcodes/app_and_api_protection_nodejs_overview.md @@ -0,0 +1,14 @@ +{{ $showSetup := .Get "showSetup" | default "true" | eq "true" }} + +## Overview +App and API Protection works by leveraging the [Datadog Node.js library](https://github.com/DataDog/dd-trace-js/) to monitor and secure your Node.js service. The library integrates seamlessly with your existing application without requiring code changes. + +For detailed compatibility information, including supported Node.js versions, frameworks, and deployment environments, see [Node.js Compatibility Requirements](/security/application_security/setup/nodejs/compatibility). + +{{ if $showSetup }} +This guide explains how to set up App and API Protection (AAP) for Node.js applications. The setup involves: +1. Installing the Datadog Agent +2. Enabling App and API Protection monitoring +3. Running your Node.js application with the Datadog Agent +4. Verifying the setup +{{ end }} \ No newline at end of file diff --git a/layouts/shortcodes/app_and_api_protection_nodejs_setup_options.md b/layouts/shortcodes/app_and_api_protection_nodejs_setup_options.md new file mode 100644 index 0000000000000..99b40b15244ce --- /dev/null +++ b/layouts/shortcodes/app_and_api_protection_nodejs_setup_options.md @@ -0,0 +1,9 @@ +
+

You can enable App and API Protection for Node.js services with the following setup options:

+ +
    +
  1. If your Node.js service already has APM tracing set up and running, then skip to service configuration
  2. +
  3. If your Node.js service doesn't have APM tracing set up, you can easily enable App and API Protection with Datadog's Automatic Installation
  4. +
  5. Otherwise, keep reading the following manual setup instructions
  6. +
+
\ No newline at end of file From dbac1b413349283ad52d332ba63babf985fb0858 Mon Sep 17 00:00:00 2001 From: CarlesDD Date: Thu, 3 Jul 2025 17:40:22 +0200 Subject: [PATCH 02/12] Reorg shortcodes --- .../setup/nodejs/aws-fargate.md | 8 ++-- .../setup/nodejs/docker.md | 8 ++-- .../setup/nodejs/kubernetes.md | 8 ++-- .../setup/nodejs/linux.md | 8 ++-- .../setup/nodejs/macos.md | 8 ++-- .../setup/nodejs/windows.md | 8 ++-- ...tection_nodejs_remote_config_activation.md | 6 +++ ..._and_api_protection_nodejs_verify_setup.md | 6 +++ ...api_protection_nodejs_navigation_menu.html | 47 +++++++++++++++++++ .../app_and_api_protection_nodejs_overview.md | 0 ...and_api_protection_nodejs_setup_options.md | 0 11 files changed, 83 insertions(+), 24 deletions(-) create mode 100644 layouts/shortcodes/aap/aap_and_api_protection_nodejs_remote_config_activation.md create mode 100644 layouts/shortcodes/aap/aap_and_api_protection_nodejs_verify_setup.md create mode 100644 layouts/shortcodes/aap/app_and_api_protection_nodejs_navigation_menu.html rename layouts/shortcodes/{ => aap}/app_and_api_protection_nodejs_overview.md (100%) rename layouts/shortcodes/{ => aap}/app_and_api_protection_nodejs_setup_options.md (100%) diff --git a/content/en/security/application_security/setup/nodejs/aws-fargate.md b/content/en/security/application_security/setup/nodejs/aws-fargate.md index ee242248f0fc5..11f0da8347092 100644 --- a/content/en/security/application_security/setup/nodejs/aws-fargate.md +++ b/content/en/security/application_security/setup/nodejs/aws-fargate.md @@ -56,9 +56,9 @@ Install the Datadog Agent in your Fargate task definition: ## 2. Enabling App and API Protection monitoring -{{% app_and_api_protection_navigation_menu %}} +{{% app_and_api_protection_nodejs_navigation_menu %}} -{{% appsec-remote-config-activation %}} +{{% aap_and_api_protection_nodejs_remote_config_activation %}} ### Manually enabling App and API Protection monitoring @@ -155,7 +155,7 @@ aws ecs register-task-definition --cli-input-json file://task-definition.json aws ecs run-task --cluster your-cluster --task-definition your-task-definition ``` -{{% app_and_api_protection_verify_setup %}} +{{% aap_and_api_protection_nodejs_verify_setup %}} ## Troubleshooting @@ -166,4 +166,4 @@ If you encounter issues while setting up App and API Protection for your Node.js {{< partial name="whats-next/whats-next.html" >}} [1]: /security/application_security/setup/nodejs/compatibility -[2]: /security/application_security/setup/nodejs/troubleshooting \ No newline at end of file +[2]: /security/application_security/setup/nodejs/troubleshooting diff --git a/content/en/security/application_security/setup/nodejs/docker.md b/content/en/security/application_security/setup/nodejs/docker.md index 7db7d6225d839..12b4f6ed08c40 100644 --- a/content/en/security/application_security/setup/nodejs/docker.md +++ b/content/en/security/application_security/setup/nodejs/docker.md @@ -31,8 +31,8 @@ Install the Datadog Agent by following the [setup instructions for Docker](/agen ## 2. Enabling App and API Protection monitoring -{{% app_and_api_protection_navigation_menu %}} -{{% appsec-remote-config-activation %}} +{{% app_and_api_protection_nodejs_navigation_menu %}} +{{% aap_and_api_protection_nodejs_remote_config_activation %}} ### Manually enabling App and API Protection monitoring @@ -108,7 +108,7 @@ docker run -d \ your-nodejs-app-image ``` -{{% app_and_api_protection_verify_setup %}} +{{% aap_and_api_protection_nodejs_verify_setup %}} ## Troubleshooting @@ -119,4 +119,4 @@ If you encounter issues while setting up App and API Protection for your Node.js {{< partial name="whats-next/whats-next.html" >}} [1]: /security/application_security/setup/nodejs/compatibility -[2]: /security/application_security/setup/nodejs/troubleshooting \ No newline at end of file +[2]: /security/application_security/setup/nodejs/troubleshooting diff --git a/content/en/security/application_security/setup/nodejs/kubernetes.md b/content/en/security/application_security/setup/nodejs/kubernetes.md index ebb5818a6b99b..8b6c0471be67d 100644 --- a/content/en/security/application_security/setup/nodejs/kubernetes.md +++ b/content/en/security/application_security/setup/nodejs/kubernetes.md @@ -33,8 +33,8 @@ Install the Datadog Agent by following the [setup instructions for Kubernetes](/ ## 2. Enabling App and API Protection monitoring -{{% app_and_api_protection_navigation_menu %}} -{{% appsec-remote-config-activation %}} +{{% app_and_api_protection_nodejs_navigation_menu %}} +{{% aap_and_api_protection_nodejs_remote_config_activation %}} ### Manually enabling App and API Protection monitoring @@ -118,7 +118,7 @@ Apply your updated deployment: kubectl apply -f your-deployment.yaml ``` -{{% app_and_api_protection_verify_setup %}} +{{% aap_and_api_protection_nodejs_verify_setup %}} ## Troubleshooting @@ -129,4 +129,4 @@ If you encounter issues while setting up App and API Protection for your Node.js {{< partial name="whats-next/whats-next.html" >}} [1]: /security/application_security/setup/nodejs/compatibility -[2]: /security/application_security/setup/nodejs/troubleshooting \ No newline at end of file +[2]: /security/application_security/setup/nodejs/troubleshooting diff --git a/content/en/security/application_security/setup/nodejs/linux.md b/content/en/security/application_security/setup/nodejs/linux.md index f806db5d797e4..fb28485174df0 100644 --- a/content/en/security/application_security/setup/nodejs/linux.md +++ b/content/en/security/application_security/setup/nodejs/linux.md @@ -33,8 +33,8 @@ Install the Datadog Agent by following the [setup instructions for Linux hosts]( ## 2. Enabling App and API Protection monitoring -{{% app_and_api_protection_navigation_menu %}} -{{% appsec-remote-config-activation %}} +{{% app_and_api_protection_nodejs_navigation_menu %}} +{{% aap_and_api_protection_nodejs_remote_config_activation %}} ### Manually enabling App and API Protection monitoring @@ -69,7 +69,7 @@ DD_APPSEC_ENABLED=true DD_APM_TRACING_ENABLED=false DD_SERVICE=}} [1]: /security/application_security/setup/nodejs/compatibility -[2]: /security/application_security/setup/nodejs/troubleshooting \ No newline at end of file +[2]: /security/application_security/setup/nodejs/troubleshooting diff --git a/content/en/security/application_security/setup/nodejs/macos.md b/content/en/security/application_security/setup/nodejs/macos.md index e1d105c54e601..8ea5c8512f276 100644 --- a/content/en/security/application_security/setup/nodejs/macos.md +++ b/content/en/security/application_security/setup/nodejs/macos.md @@ -31,8 +31,8 @@ Install the Datadog Agent by following the [setup instructions for macOS](/agent ## 2. Enabling App and API Protection monitoring -{{% app_and_api_protection_navigation_menu %}} -{{% appsec-remote-config-activation %}} +{{% app_and_api_protection_nodejs_navigation_menu %}} +{{% aap_and_api_protection_nodejs_remote_config_activation %}} ### Manually enabling App and API Protection monitoring @@ -67,7 +67,7 @@ DD_APPSEC_ENABLED=true DD_APM_TRACING_ENABLED=false DD_SERVICE=}} [1]: /security/application_security/setup/nodejs/compatibility -[2]: /security/application_security/setup/nodejs/troubleshooting \ No newline at end of file +[2]: /security/application_security/setup/nodejs/troubleshooting diff --git a/content/en/security/application_security/setup/nodejs/windows.md b/content/en/security/application_security/setup/nodejs/windows.md index 87e5fe8632fa3..7b642aeaa951c 100644 --- a/content/en/security/application_security/setup/nodejs/windows.md +++ b/content/en/security/application_security/setup/nodejs/windows.md @@ -30,8 +30,8 @@ Install the Datadog Agent by following the [setup instructions for Windows](/age ## 2. Enabling App and API Protection monitoring -{{% app_and_api_protection_navigation_menu %}} -{{% appsec-remote-config-activation %}} +{{% app_and_api_protection_nodejs_navigation_menu %}} +{{% aap_and_api_protection_nodejs_remote_config_activation %}} ### Manually enabling App and API Protection monitoring @@ -75,7 +75,7 @@ node --require dd-trace/init app.js Start your Node.js application with the configured settings. -{{% app_and_api_protection_verify_setup %}} +{{% aap_and_api_protection_nodejs_verify_setup %}} ## Troubleshooting @@ -86,4 +86,4 @@ If you encounter issues while setting up App and API Protection for your Node.js {{< partial name="whats-next/whats-next.html" >}} [1]: /security/application_security/setup/nodejs/compatibility -[2]: /security/application_security/setup/nodejs/troubleshooting \ No newline at end of file +[2]: /security/application_security/setup/nodejs/troubleshooting diff --git a/layouts/shortcodes/aap/aap_and_api_protection_nodejs_remote_config_activation.md b/layouts/shortcodes/aap/aap_and_api_protection_nodejs_remote_config_activation.md new file mode 100644 index 0000000000000..24677ef4640af --- /dev/null +++ b/layouts/shortcodes/aap/aap_and_api_protection_nodejs_remote_config_activation.md @@ -0,0 +1,6 @@ +### Automatically enabling App and API Protection through Remote Configuration +
+APM Tracing cannot be disabled for the time being with remote config. +
+

You can enable remote configuration on your services dashboard. +Simply check the box for the service you want to enable App and API Protection for under "Activate on your APM services".

diff --git a/layouts/shortcodes/aap/aap_and_api_protection_nodejs_verify_setup.md b/layouts/shortcodes/aap/aap_and_api_protection_nodejs_verify_setup.md new file mode 100644 index 0000000000000..e357fc69ccbc9 --- /dev/null +++ b/layouts/shortcodes/aap/aap_and_api_protection_nodejs_verify_setup.md @@ -0,0 +1,6 @@ +## 4. Verify setup +To verify that App and API Protection is working correctly: + +1. Send some traffic to your application +2. Check the [Application Signals Explorer](https://app.datadoghq.com/security/appsec) in Datadog +3. Look for security signals and vulnerabilities diff --git a/layouts/shortcodes/aap/app_and_api_protection_nodejs_navigation_menu.html b/layouts/shortcodes/aap/app_and_api_protection_nodejs_navigation_menu.html new file mode 100644 index 0000000000000..f3bf483f70c26 --- /dev/null +++ b/layouts/shortcodes/aap/app_and_api_protection_nodejs_navigation_menu.html @@ -0,0 +1,47 @@ + + + diff --git a/layouts/shortcodes/app_and_api_protection_nodejs_overview.md b/layouts/shortcodes/aap/app_and_api_protection_nodejs_overview.md similarity index 100% rename from layouts/shortcodes/app_and_api_protection_nodejs_overview.md rename to layouts/shortcodes/aap/app_and_api_protection_nodejs_overview.md diff --git a/layouts/shortcodes/app_and_api_protection_nodejs_setup_options.md b/layouts/shortcodes/aap/app_and_api_protection_nodejs_setup_options.md similarity index 100% rename from layouts/shortcodes/app_and_api_protection_nodejs_setup_options.md rename to layouts/shortcodes/aap/app_and_api_protection_nodejs_setup_options.md From dbe6eee78a1db069e657a46ae0494a49e066cd0a Mon Sep 17 00:00:00 2001 From: CarlesDD Date: Thu, 3 Jul 2025 17:57:59 +0200 Subject: [PATCH 03/12] Reorg shortcodes --- .../security/application_security/setup/nodejs/aws-fargate.md | 4 ++-- .../en/security/application_security/setup/nodejs/docker.md | 4 ++-- .../security/application_security/setup/nodejs/kubernetes.md | 4 ++-- .../en/security/application_security/setup/nodejs/linux.md | 4 ++-- .../en/security/application_security/setup/nodejs/macos.md | 4 ++-- .../en/security/application_security/setup/nodejs/windows.md | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/content/en/security/application_security/setup/nodejs/aws-fargate.md b/content/en/security/application_security/setup/nodejs/aws-fargate.md index 11f0da8347092..a1a75b5e3a4db 100644 --- a/content/en/security/application_security/setup/nodejs/aws-fargate.md +++ b/content/en/security/application_security/setup/nodejs/aws-fargate.md @@ -58,7 +58,7 @@ Install the Datadog Agent in your Fargate task definition: {{% app_and_api_protection_nodejs_navigation_menu %}} -{{% aap_and_api_protection_nodejs_remote_config_activation %}} +{{% aap/aap_and_api_protection_nodejs_remote_config_activation %}} ### Manually enabling App and API Protection monitoring @@ -155,7 +155,7 @@ aws ecs register-task-definition --cli-input-json file://task-definition.json aws ecs run-task --cluster your-cluster --task-definition your-task-definition ``` -{{% aap_and_api_protection_nodejs_verify_setup %}} +{{% aap/aap_and_api_protection_nodejs_verify_setup %}} ## Troubleshooting diff --git a/content/en/security/application_security/setup/nodejs/docker.md b/content/en/security/application_security/setup/nodejs/docker.md index 12b4f6ed08c40..7e226b2423cce 100644 --- a/content/en/security/application_security/setup/nodejs/docker.md +++ b/content/en/security/application_security/setup/nodejs/docker.md @@ -32,7 +32,7 @@ Install the Datadog Agent by following the [setup instructions for Docker](/agen ## 2. Enabling App and API Protection monitoring {{% app_and_api_protection_nodejs_navigation_menu %}} -{{% aap_and_api_protection_nodejs_remote_config_activation %}} +{{% aap/aap_and_api_protection_nodejs_remote_config_activation %}} ### Manually enabling App and API Protection monitoring @@ -108,7 +108,7 @@ docker run -d \ your-nodejs-app-image ``` -{{% aap_and_api_protection_nodejs_verify_setup %}} +{{% aap/aap_and_api_protection_nodejs_verify_setup %}} ## Troubleshooting diff --git a/content/en/security/application_security/setup/nodejs/kubernetes.md b/content/en/security/application_security/setup/nodejs/kubernetes.md index 8b6c0471be67d..784e44cd3a054 100644 --- a/content/en/security/application_security/setup/nodejs/kubernetes.md +++ b/content/en/security/application_security/setup/nodejs/kubernetes.md @@ -34,7 +34,7 @@ Install the Datadog Agent by following the [setup instructions for Kubernetes](/ ## 2. Enabling App and API Protection monitoring {{% app_and_api_protection_nodejs_navigation_menu %}} -{{% aap_and_api_protection_nodejs_remote_config_activation %}} +{{% aap/aap_and_api_protection_nodejs_remote_config_activation %}} ### Manually enabling App and API Protection monitoring @@ -118,7 +118,7 @@ Apply your updated deployment: kubectl apply -f your-deployment.yaml ``` -{{% aap_and_api_protection_nodejs_verify_setup %}} +{{% aap/aap_and_api_protection_nodejs_verify_setup %}} ## Troubleshooting diff --git a/content/en/security/application_security/setup/nodejs/linux.md b/content/en/security/application_security/setup/nodejs/linux.md index fb28485174df0..9800bf0ddf1d6 100644 --- a/content/en/security/application_security/setup/nodejs/linux.md +++ b/content/en/security/application_security/setup/nodejs/linux.md @@ -34,7 +34,7 @@ Install the Datadog Agent by following the [setup instructions for Linux hosts]( ## 2. Enabling App and API Protection monitoring {{% app_and_api_protection_nodejs_navigation_menu %}} -{{% aap_and_api_protection_nodejs_remote_config_activation %}} +{{% aap/aap_and_api_protection_nodejs_remote_config_activation %}} ### Manually enabling App and API Protection monitoring @@ -69,7 +69,7 @@ DD_APPSEC_ENABLED=true DD_APM_TRACING_ENABLED=false DD_SERVICE= Date: Thu, 3 Jul 2025 18:24:19 +0200 Subject: [PATCH 04/12] Reorg shortcodes --- .../en/security/application_security/setup/nodejs/_index.md | 2 +- .../application_security/setup/nodejs/aws-fargate.md | 4 ++-- .../en/security/application_security/setup/nodejs/docker.md | 6 +++--- .../application_security/setup/nodejs/kubernetes.md | 6 +++--- .../en/security/application_security/setup/nodejs/linux.md | 6 +++--- .../en/security/application_security/setup/nodejs/macos.md | 4 ++-- .../security/application_security/setup/nodejs/windows.md | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/content/en/security/application_security/setup/nodejs/_index.md b/content/en/security/application_security/setup/nodejs/_index.md index 214b28e0881fc..7069dfe269db3 100644 --- a/content/en/security/application_security/setup/nodejs/_index.md +++ b/content/en/security/application_security/setup/nodejs/_index.md @@ -23,7 +23,7 @@ further_reading: --- {{< partial name="app_and_api_protection/callout.html" >}} -{{% app_and_api_protection_nodejs_overview showSetup="false" %}} +{{% aap/aap_and_api_protection_nodejs_overview showSetup="false" %}} ## Environments diff --git a/content/en/security/application_security/setup/nodejs/aws-fargate.md b/content/en/security/application_security/setup/nodejs/aws-fargate.md index a1a75b5e3a4db..a4e6d3c369b70 100644 --- a/content/en/security/application_security/setup/nodejs/aws-fargate.md +++ b/content/en/security/application_security/setup/nodejs/aws-fargate.md @@ -15,7 +15,7 @@ further_reading: text: "Troubleshooting App and API Protection" --- -{{% app_and_api_protection_nodejs_overview %}} +{{% aap/aap_and_api_protection_nodejs_overview %}} ## Prerequisites @@ -56,7 +56,7 @@ Install the Datadog Agent in your Fargate task definition: ## 2. Enabling App and API Protection monitoring -{{% app_and_api_protection_nodejs_navigation_menu %}} +{{% aap/aap_and_api_protection_nodejs_navigation_menu %}} {{% aap/aap_and_api_protection_nodejs_remote_config_activation %}} diff --git a/content/en/security/application_security/setup/nodejs/docker.md b/content/en/security/application_security/setup/nodejs/docker.md index 7e226b2423cce..55844e3d6bb46 100644 --- a/content/en/security/application_security/setup/nodejs/docker.md +++ b/content/en/security/application_security/setup/nodejs/docker.md @@ -14,9 +14,9 @@ further_reading: tag: "Documentation" text: "Troubleshooting App and API Protection" --- -{{% app_and_api_protection_nodejs_setup_options platform="docker" %}} +{{% aap/aap_and_api_protection_nodejs_setup_options platform="docker" %}} -{{% app_and_api_protection_nodejs_overview %}} +{{% aap/aap_and_api_protection_nodejs_overview %}} ## Prerequisites @@ -31,7 +31,7 @@ Install the Datadog Agent by following the [setup instructions for Docker](/agen ## 2. Enabling App and API Protection monitoring -{{% app_and_api_protection_nodejs_navigation_menu %}} +{{% aap/aap_and_api_protection_nodejs_navigation_menu %}} {{% aap/aap_and_api_protection_nodejs_remote_config_activation %}} ### Manually enabling App and API Protection monitoring diff --git a/content/en/security/application_security/setup/nodejs/kubernetes.md b/content/en/security/application_security/setup/nodejs/kubernetes.md index 784e44cd3a054..d315e0a05d9f1 100644 --- a/content/en/security/application_security/setup/nodejs/kubernetes.md +++ b/content/en/security/application_security/setup/nodejs/kubernetes.md @@ -14,9 +14,9 @@ further_reading: tag: "Documentation" text: "Troubleshooting App and API Protection" --- -{{% app_and_api_protection_nodejs_setup_options platform="kubernetes" %}} +{{% aap/aap_and_api_protection_nodejs_setup_options platform="kubernetes" %}} -{{% app_and_api_protection_nodejs_overview %}} +{{% aap/aap_and_api_protection_nodejs_overview %}} ## Prerequisites @@ -33,7 +33,7 @@ Install the Datadog Agent by following the [setup instructions for Kubernetes](/ ## 2. Enabling App and API Protection monitoring -{{% app_and_api_protection_nodejs_navigation_menu %}} +{{% aap/aap_and_api_protection_nodejs_navigation_menu %}} {{% aap/aap_and_api_protection_nodejs_remote_config_activation %}} ### Manually enabling App and API Protection monitoring diff --git a/content/en/security/application_security/setup/nodejs/linux.md b/content/en/security/application_security/setup/nodejs/linux.md index 9800bf0ddf1d6..dba5ac7b2ac66 100644 --- a/content/en/security/application_security/setup/nodejs/linux.md +++ b/content/en/security/application_security/setup/nodejs/linux.md @@ -14,9 +14,9 @@ further_reading: tag: "Documentation" text: "Troubleshooting App and API Protection" --- -{{% app_and_api_protection_nodejs_setup_options platform="linux" %}} +{{% aap/aap_and_api_protection_nodejs_setup_options platform="linux" %}} -{{% app_and_api_protection_nodejs_overview %}} +{{% aap/aap_and_api_protection_nodejs_overview %}} ## Prerequisites @@ -33,7 +33,7 @@ Install the Datadog Agent by following the [setup instructions for Linux hosts]( ## 2. Enabling App and API Protection monitoring -{{% app_and_api_protection_nodejs_navigation_menu %}} +{{% aap/aap_and_api_protection_nodejs_navigation_menu %}} {{% aap/aap_and_api_protection_nodejs_remote_config_activation %}} ### Manually enabling App and API Protection monitoring diff --git a/content/en/security/application_security/setup/nodejs/macos.md b/content/en/security/application_security/setup/nodejs/macos.md index 6077bed80b781..741fed0c5592d 100644 --- a/content/en/security/application_security/setup/nodejs/macos.md +++ b/content/en/security/application_security/setup/nodejs/macos.md @@ -14,7 +14,7 @@ further_reading: tag: "Documentation" text: "Troubleshooting App and API Protection" --- -{{% app_and_api_protection_nodejs_overview %}} +{{% aap/aap_and_api_protection_nodejs_overview %}} ## Prerequisites @@ -31,7 +31,7 @@ Install the Datadog Agent by following the [setup instructions for macOS](/agent ## 2. Enabling App and API Protection monitoring -{{% app_and_api_protection_nodejs_navigation_menu %}} +{{% aap/aap_and_api_protection_nodejs_navigation_menu %}} {{% aap/aap_and_api_protection_nodejs_remote_config_activation %}} ### Manually enabling App and API Protection monitoring diff --git a/content/en/security/application_security/setup/nodejs/windows.md b/content/en/security/application_security/setup/nodejs/windows.md index f29fb3be748aa..dcea78c44f1eb 100644 --- a/content/en/security/application_security/setup/nodejs/windows.md +++ b/content/en/security/application_security/setup/nodejs/windows.md @@ -14,7 +14,7 @@ further_reading: tag: "Documentation" text: "Troubleshooting App and API Protection" --- -{{% app_and_api_protection_nodejs_overview %}} +{{% aap/aap_and_api_protection_nodejs_overview %}} ## Prerequisites @@ -30,7 +30,7 @@ Install the Datadog Agent by following the [setup instructions for Windows](/age ## 2. Enabling App and API Protection monitoring -{{% app_and_api_protection_nodejs_navigation_menu %}} +{{% aap/aap_and_api_protection_nodejs_navigation_menu %}} {{% aap/aap_and_api_protection_nodejs_remote_config_activation %}} ### Manually enabling App and API Protection monitoring From c70e8979cce5160d62ade130a296e631fcfb2ac7 Mon Sep 17 00:00:00 2001 From: CarlesDD Date: Thu, 3 Jul 2025 18:58:31 +0200 Subject: [PATCH 05/12] Reorg shortcodes --- ...ptions.md => app_and_api_protection_nodejs_setup_options.html} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename layouts/shortcodes/aap/{app_and_api_protection_nodejs_setup_options.md => app_and_api_protection_nodejs_setup_options.html} (100%) diff --git a/layouts/shortcodes/aap/app_and_api_protection_nodejs_setup_options.md b/layouts/shortcodes/aap/app_and_api_protection_nodejs_setup_options.html similarity index 100% rename from layouts/shortcodes/aap/app_and_api_protection_nodejs_setup_options.md rename to layouts/shortcodes/aap/app_and_api_protection_nodejs_setup_options.html From a5ba55a158ee5ec6a2cafe51ef0f7b939aeaca2b Mon Sep 17 00:00:00 2001 From: CarlesDD Date: Thu, 3 Jul 2025 20:31:37 +0200 Subject: [PATCH 06/12] Reorg shortcodes --- ...ptions.html => app_and_api_protection_nodejs_setup_options.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename layouts/shortcodes/aap/{app_and_api_protection_nodejs_setup_options.html => app_and_api_protection_nodejs_setup_options.md} (100%) diff --git a/layouts/shortcodes/aap/app_and_api_protection_nodejs_setup_options.html b/layouts/shortcodes/aap/app_and_api_protection_nodejs_setup_options.md similarity index 100% rename from layouts/shortcodes/aap/app_and_api_protection_nodejs_setup_options.html rename to layouts/shortcodes/aap/app_and_api_protection_nodejs_setup_options.md From d230a4fd385178fe70772c170a964dd4d4e7d8fb Mon Sep 17 00:00:00 2001 From: CarlesDD Date: Thu, 3 Jul 2025 20:42:20 +0200 Subject: [PATCH 07/12] Fix typo in shortcode names --- ...nu.html => aap_and_api_protection_nodejs_navigation_menu.html} | 0 ...dejs_overview.md => aap_and_api_protection_nodejs_overview.md} | 0 ..._options.md => aap_and_api_protection_nodejs_setup_options.md} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename layouts/shortcodes/aap/{app_and_api_protection_nodejs_navigation_menu.html => aap_and_api_protection_nodejs_navigation_menu.html} (100%) rename layouts/shortcodes/aap/{app_and_api_protection_nodejs_overview.md => aap_and_api_protection_nodejs_overview.md} (100%) rename layouts/shortcodes/aap/{app_and_api_protection_nodejs_setup_options.md => aap_and_api_protection_nodejs_setup_options.md} (100%) diff --git a/layouts/shortcodes/aap/app_and_api_protection_nodejs_navigation_menu.html b/layouts/shortcodes/aap/aap_and_api_protection_nodejs_navigation_menu.html similarity index 100% rename from layouts/shortcodes/aap/app_and_api_protection_nodejs_navigation_menu.html rename to layouts/shortcodes/aap/aap_and_api_protection_nodejs_navigation_menu.html diff --git a/layouts/shortcodes/aap/app_and_api_protection_nodejs_overview.md b/layouts/shortcodes/aap/aap_and_api_protection_nodejs_overview.md similarity index 100% rename from layouts/shortcodes/aap/app_and_api_protection_nodejs_overview.md rename to layouts/shortcodes/aap/aap_and_api_protection_nodejs_overview.md diff --git a/layouts/shortcodes/aap/app_and_api_protection_nodejs_setup_options.md b/layouts/shortcodes/aap/aap_and_api_protection_nodejs_setup_options.md similarity index 100% rename from layouts/shortcodes/aap/app_and_api_protection_nodejs_setup_options.md rename to layouts/shortcodes/aap/aap_and_api_protection_nodejs_setup_options.md From 8ac55a21fab0b6045f968067457e70b57bc4cc43 Mon Sep 17 00:00:00 2001 From: CarlesDD Date: Fri, 4 Jul 2025 07:28:00 +0200 Subject: [PATCH 08/12] Rework compatibility page --- .../setup/nodejs/compatibility.md | 43 +++++++------------ 1 file changed, 15 insertions(+), 28 deletions(-) diff --git a/content/en/security/application_security/setup/nodejs/compatibility.md b/content/en/security/application_security/setup/nodejs/compatibility.md index 5ee5653e72f6e..7cbb83574d6ad 100644 --- a/content/en/security/application_security/setup/nodejs/compatibility.md +++ b/content/en/security/application_security/setup/nodejs/compatibility.md @@ -11,21 +11,21 @@ aliases: The following App and API Protection capabilities are supported in the Node.js library, for the specified tracer version: -| App and API Protection capability | Minimum Node.js tracer version | -|----------------------------------------|----------------------------------------------------| -| Threat Detection | 4.0.0 | -| Threat Protection | 4.0.0 | -| Customize response to blocked requests | 4.1.0 | -| Automatic user activity event tracking | 4.4.0 for Node.js 16+ | -| API Security | 4.30.0 for Node.js 16+, or 5.6.0 for Node.js 18+ | +| App and API Protection capability | Minimum Node.js tracer version | +|----------------------------------------|--------------------------------------------------| +| Threat Detection | 4.0.0 | +| Threat Protection | 4.0.0 | +| Customize response to blocked requests | 4.1.0 | +| Automatic user activity event tracking | 4.4.0 | +| API Security | 4.30.0 | The minimum tracer version to get all supported App and API Protection capabilities for Node.js is 4.30.0. - **Note**: - Threat Protection requires enabling [Remote Configuration][2], which is included in the listed minimum tracer version. ### Supported deployment types + | Type | Threat Detection support | |-------------|--------------------------| | Docker | {{< X >}} | @@ -34,6 +34,7 @@ The minimum tracer version to get all supported App and API Protection capabilit | AWS Fargate | {{< X >}} | | AWS Lambda | {{< X >}} | + ## Language and framework compatibility ### Node.js Version Support @@ -48,13 +49,10 @@ For the best level of support, always run the latest LTS release of Node.js, and For more information about Node.js release, see the [official Node.js documentation][4]. - - ### Operating system support The following operating systems are officially supported by `dd-trace`. Any operating system not listed is still likely to work, but with some features missing, for example App and API Protection capabilities, profiling, and runtime metrics. Generally speaking, operating systems that are actively maintained at the time of initial release for a major version are supported. - | Operating System | Architectures | Minimum Versions | |------------------|---------------|------------------------------------------| | Linux (glibc) | arm64, x64 | CentOS 7, Debian 9, RHEL 7, Ubuntu 14.04 | @@ -62,10 +60,6 @@ The following operating systems are officially supported by `dd-trace`. Any oper | macOS | arm64, x64 | Catalina (10.15) | | Windows | x64 | Windows 8.1, Windows Server 2012 | - - - - ### Web framework compatibility - Attacker source HTTP request details @@ -74,23 +68,18 @@ The following operating systems are officially supported by `dd-trace`. Any oper ##### App and API Protection Capability Notes -Although Threat Protection is available for express >= 4 versions, the blocking of payloads on the body is only supported for applications using `body-parser` library. +Although Threat Protection is available for express >= 4 versions, the blocking of payloads on the body is only supported for applications using either the [`body-parser`][45] or [`multer`][46] libraries. | Framework | Versions | Threat Detection supported? | Threat Protection supported? | |-----------|----------|-----------------------------|------------------------------| -| express | >=4 | {{< X >}} | {{< X >}} | -| nextjs | >=11.1 | {{< X >}} | | - - - - +| express | `>=4` | {{< X >}} | {{< X >}} | +| fastify | `>=2` | {{< X >}} | {{< X >}} | +| nextjs | `>=11.1` | {{< X >}} | |
If you would like to see support added for any of the unsupported capabilities or for your Node.js framework, let us know! Fill out this short form to send details.
- ### Networking framework compatibility - **Networking tracing provides:** - Distributed tracing through your applications @@ -98,7 +87,6 @@ Although Threat Protection is available for express >= 4 versions, the blocking ##### App and API Protection Capability Notes - | Framework | Threat Detection supported? | Threat Protection supported? | |-----------|-----------------------------|------------------------------| | http | {{< X >}} | {{< X >}} | @@ -109,7 +97,6 @@ Although Threat Protection is available for express >= 4 versions, the blocking ### Data store compatibility - **Datastore tracing provides:** - Timing request to response @@ -120,7 +107,6 @@ Although Threat Protection is available for express >= 4 versions, the blocking - **Threat Protection** also works at the HTTP request (input) layer, and so works for all databases by default, even those not listed in the table below. - | Framework | Versions | Threat Detection supported? | Threat Protection supported? | |--------------------------|-----------|-----------------------------|------------------------------| | [@apollo/server][43] | `>=4` | {{< X >}} | {{< X >}} | @@ -142,7 +128,6 @@ Although Threat Protection is available for express >= 4 versions, the blocking | [tedious][41] | `>=1` | {{< X >}} | {{< X >}} | | [sequelize][42] | `>=4` | {{< X >}} | {{< X >}} | - ### User Authentication Frameworks compatibility **Integrations to User Authentication Frameworks provide:** @@ -176,3 +161,5 @@ Although Threat Protection is available for express >= 4 versions, the blocking [42]: https://github.com/sequelize/sequelize [43]: https://github.com/apollographql/apollo-server [44]: https://www.npmjs.com/package/apollo-server-core +[45]: https://www.npmjs.com/package/body-parser +[46]: https://www.npmjs.com/package/multer From 01c1c8bba8a61742ed4048aa5ae800a4e2da04c2 Mon Sep 17 00:00:00 2001 From: CarlesDD Date: Fri, 4 Jul 2025 08:54:02 +0200 Subject: [PATCH 09/12] Remove old compatibility page for Node.js --- .../setup/compatibility/nodejs.md | 181 ------------------ 1 file changed, 181 deletions(-) delete mode 100644 content/en/security/application_security/setup/compatibility/nodejs.md diff --git a/content/en/security/application_security/setup/compatibility/nodejs.md b/content/en/security/application_security/setup/compatibility/nodejs.md deleted file mode 100644 index b347738ea1efe..0000000000000 --- a/content/en/security/application_security/setup/compatibility/nodejs.md +++ /dev/null @@ -1,181 +0,0 @@ ---- -title: Node.js Compatibility Requirements -code_lang: nodejs -type: multi-code-lang -code_lang_weight: 50 -aliases: - - /security/application_security/threats/setup/compatibility/nodejs ---- - -## App and API Protection capabilities - -The following App and API Protection capabilities are supported in the Node.js library, for the specified tracer version: - -| App and API Protection capability | Minimum Node.js tracer version | -|----------------------------------------|----------------------------------------------------| -| Threat Detection | 4.0.0 | -| Threat Protection | 4.0.0 | -| Customize response to blocked requests | 4.1.0 | -| Automatic user activity event tracking | 4.4.0 for Node.js 16+ | -| API Security | 4.30.0 for Node.js 16+, or 5.6.0 for Node.js 18+ | - -The minimum tracer version to get all supported App and API Protection capabilities for Node.js is 4.30.0. - - -**Note**: -- Threat Protection requires enabling [Remote Configuration][2], which is included in the listed minimum tracer version. - -### Supported deployment types -| Type | Threat Detection support | -|-------------|--------------------------| -| Docker | {{< X >}} | -| Kubernetes | {{< X >}} | -| Amazon ECS | {{< X >}} | -| AWS Fargate | {{< X >}} | -| AWS Lambda | {{< X >}} | - -## Language and framework compatibility - -### Node.js Version Support - -When the Node.js project drops support for an LTS major release line (when it goes End of Life), support for it is dropped in the next major version of `dd-trace`. -The last major supporting release line of `dd-trace` library supports that EOL version of Node.js for at least another year on a maintenance mode basis. - -Some issues cannot be solved in `dd-trace` and instead must be solved in Node.js. When this happens and the Node.js release in question is EOL, it's not possible to solve the issue without moving to another non-EOL release. -Datadog does not make new releases of `dd-trace` to provide specific support for non-LTS Node.js major release lines (odd numbered versions). - -For the best level of support, always run the latest LTS release of Node.js, and the latest major version of `dd-trace`. Whatever release line of Node.js you use, also use the latest version of Node.js on that release line, to ensure you have the latest security fixes. - -For more information about Node.js release, see the [official Node.js documentation][4]. - - - -### Operating system support - -The following operating systems are officially supported by `dd-trace`. Any operating system not listed is still likely to work, but with some features missing, for example App and API Protection capabilities, profiling, and runtime metrics. Generally speaking, operating systems that are actively maintained at the time of initial release for a major version are supported. - - -| Operating System | Architectures | Minimum Versions | -|------------------|---------------|------------------------------------------| -| Linux (glibc) | arm64, x64 | CentOS 7, Debian 9, RHEL 7, Ubuntu 14.04 | -| Linux (musl) | arm64, x64 | Alpine 3.13 | -| macOS | arm64, x64 | Catalina (10.15) | -| Windows | x64 | Windows 8.1, Windows Server 2012 | - - - - - -### Web framework compatibility - -- Attacker source HTTP request details -- Tags for the HTTP request (status code, method, etc) -- Distributed Tracing to see attack flows through your applications - -##### App and API Protection Capability Notes - -Although Threat Protection is available for express >= 4 versions, the blocking of payloads on the body is only supported for applications using either the [`body-parser`][45] or [`multer`][46] libraries. - -| Framework | Versions | Threat Detection supported? | Threat Protection supported? | -|-----------|----------|-----------------------------|------------------------------| -| express | `>=4` | {{< X >}} | {{< X >}} | -| fastify | `>=2` | {{< X >}} | {{< X >}} | -| nextjs | `>=11.1` | {{< X >}} | | - - - - - -
If you would like to see support added for any of the unsupported capabilities or for your Node.js framework, let us know! Fill out this short form to send details.
- - -### Networking framework compatibility - - -**Networking tracing provides:** - -- Distributed tracing through your applications -- Request-based blocking - -##### App and API Protection Capability Notes - - -| Framework | Threat Detection supported? | Threat Protection supported? | -|-----------|-----------------------------|------------------------------| -| http | {{< X >}} | {{< X >}} | -| https | {{< X >}} | {{< X >}} | - - -
If you don't see your framework of choice listed, let us know! Fill out this short form to send details.
- -### Data store compatibility - - -**Datastore tracing provides:** - -- Timing request to response -- Query info (for example, a sanitized query string) -- Error and stacktrace capturing - -##### App and API Protection Capability Notes - -- **Threat Protection** also works at the HTTP request (input) layer, and so works for all databases by default, even those not listed in the table below. - - -| Framework | Versions | Threat Detection supported? | Threat Protection supported? | -|--------------------------|-----------|-----------------------------|------------------------------| -| [@apollo/server][43] | `>=4` | {{< X >}} | {{< X >}} | -| [apollo-server-core][44] | `>=3` | {{< X >}} | {{< X >}} | -| [cassandra-driver][28] | `>=3` | {{< X >}} | {{< X >}} | -| [couchbase][29] | `^2.4.2` | {{< X >}} | {{< X >}} | -| [elasticsearch][30] | `>=10` | {{< X >}} | {{< X >}} | -| [ioredis][31] | `>=2` | {{< X >}} | {{< X >}} | -| [knex][32] | `>=0.8` | {{< X >}} | {{< X >}} | -| [mariadb][5] | `>=3` | {{< X >}} | {{< X >}} | -| [memcached][33] | `>=2.2` | {{< X >}} | {{< X >}} | -| [mongodb-core][34] | `>=2` | {{< X >}} | {{< X >}} | -| [mysql][35] | `>=2` | {{< X >}} | {{< X >}} | -| [mysql2][36] | `>=1` | {{< X >}} | {{< X >}} | -| [oracledb][37] | `>=5` | {{< X >}} | {{< X >}} | -| [pg][38] | `>=4` | {{< X >}} | {{< X >}} | -| [redis][39] | `>=0.12` | {{< X >}} | {{< X >}} | -| [sharedb][40] | `>=1` | {{< X >}} | {{< X >}} | -| [tedious][41] | `>=1` | {{< X >}} | {{< X >}} | -| [sequelize][42] | `>=4` | {{< X >}} | {{< X >}} | - - -### User Authentication Frameworks compatibility - -**Integrations to User Authentication Frameworks provide:** - -- User login events, including the user IDs -- The Account Takeover detection monitoring the user login events - -| Framework | Minimum Framework Version | -|-----------------|---------------------------| -| passport-local | 1.0.0 | -| passport-http | 0.3.0 | - -[1]: /tracing/trace_collection/compatibility/nodejs/ -[2]: /agent/remote_config/#enabling-remote-configuration -[4]: https://github.com/nodejs/release#release-schedule -[5]: https://github.com/mariadb-corporation/mariadb-connector-nodejs -[28]: https://github.com/datastax/nodejs-driver -[29]: https://github.com/couchbase/couchnode -[30]: https://github.com/elastic/elasticsearch-js -[31]: https://github.com/luin/ioredis -[32]: https://knexjs.org -[33]: https://github.com/3rd-Eden/memcached -[34]: https://www.mongodb.com/docs/drivers/node/current/ -[35]: https://github.com/mysqljs/mysql -[36]: https://github.com/sidorares/node-mysql2 -[37]: https://oracle.github.io/node-oracledb/ -[38]: https://node-postgres.com -[39]: https://github.com/NodeRedis/node_redis -[40]: https://share.github.io/sharedb/ -[41]: http://tediousjs.github.io/tedious -[42]: https://github.com/sequelize/sequelize -[43]: https://github.com/apollographql/apollo-server -[44]: https://www.npmjs.com/package/apollo-server-core -[45]: https://www.npmjs.com/package/body-parser -[46]: https://www.npmjs.com/package/multer From a9c2d69e4416e4e042790cd1b2a5c71bbe101b7f Mon Sep 17 00:00:00 2001 From: CarlesDD Date: Mon, 14 Jul 2025 18:27:38 +0200 Subject: [PATCH 10/12] Fix links --- .../security/application_security/setup/aws/fargate/_index.md | 2 +- content/en/security/application_security/setup/docker/_index.md | 2 +- .../en/security/application_security/setup/kubernetes/_index.md | 2 +- content/en/security/application_security/setup/linux/_index.md | 2 +- content/en/security/application_security/setup/macos/_index.md | 2 +- .../en/security/application_security/setup/windows/_index.md | 1 + content/en/security/guide/aws_fargate_config_guide.md | 2 +- 7 files changed, 7 insertions(+), 6 deletions(-) diff --git a/content/en/security/application_security/setup/aws/fargate/_index.md b/content/en/security/application_security/setup/aws/fargate/_index.md index 891c72cf3a1c7..fc2c75fb4f939 100644 --- a/content/en/security/application_security/setup/aws/fargate/_index.md +++ b/content/en/security/application_security/setup/aws/fargate/_index.md @@ -28,7 +28,7 @@ Learn how to set up App and API Protection (AAP) on your AWS Fargate tasks by se {{< appsec-integrations >}} {{< appsec-integration name="Python" avatar="python" link="/security/application_security/setup/python" >}} - {{< appsec-integration name="Node.js" avatar="node" link="/security/application_security/setup/nodejs" >}} + {{< appsec-integration name="Node.js" avatar="node" link="/security/application_security/setup/nodejs/aws-fargate" >}} {{< appsec-integration name="Java" avatar="java" link="/security/application_security/setup/java/aws-fargate" >}} {{< appsec-integration name="Go" avatar="go" link="/security/application_security/setup/go" >}} {{< appsec-integration name="Ruby" avatar="ruby" link="/security/application_security/setup/ruby" >}} diff --git a/content/en/security/application_security/setup/docker/_index.md b/content/en/security/application_security/setup/docker/_index.md index a0f6f08b36db2..ab75c7f97820e 100644 --- a/content/en/security/application_security/setup/docker/_index.md +++ b/content/en/security/application_security/setup/docker/_index.md @@ -28,7 +28,7 @@ Learn how to set up App and API Protection (AAP) on your Docker containers by se {{< appsec-integrations >}} {{< appsec-integration name="Python" avatar="python" link="/security/application_security/setup/python" >}} - {{< appsec-integration name="Node.js" avatar="node" link="/security/application_security/setup/nodejs" >}} + {{< appsec-integration name="Node.js" avatar="node" link="/security/application_security/setup/nodejs/docker" >}} {{< appsec-integration name="Java" avatar="java" link="/security/application_security/setup/java/docker" >}} {{< appsec-integration name="Go" avatar="go" link="/security/application_security/setup/go" >}} {{< appsec-integration name="Ruby" avatar="ruby" link="/security/application_security/setup/ruby" >}} diff --git a/content/en/security/application_security/setup/kubernetes/_index.md b/content/en/security/application_security/setup/kubernetes/_index.md index 1290a1b0851ac..41642a6469235 100644 --- a/content/en/security/application_security/setup/kubernetes/_index.md +++ b/content/en/security/application_security/setup/kubernetes/_index.md @@ -28,7 +28,7 @@ Learn how to set up App and API Protection (AAP) on your Kubernetes services by {{< appsec-integrations >}} {{< appsec-integration name="Python" avatar="python" link="/security/application_security/setup/python" >}} - {{< appsec-integration name="Node.js" avatar="node" link="/security/application_security/setup/nodejs" >}} + {{< appsec-integration name="Node.js" avatar="node" link="/security/application_security/setup/nodejs/kubernetes" >}} {{< appsec-integration name="Java" avatar="java" link="/security/application_security/setup/java/kubernetes" >}} {{< appsec-integration name="Go" avatar="go" link="/security/application_security/setup/go" >}} {{< appsec-integration name="Ruby" avatar="ruby" link="/security/application_security/setup/ruby" >}} diff --git a/content/en/security/application_security/setup/linux/_index.md b/content/en/security/application_security/setup/linux/_index.md index 9ca9b1ac127a8..7ac926844b611 100644 --- a/content/en/security/application_security/setup/linux/_index.md +++ b/content/en/security/application_security/setup/linux/_index.md @@ -28,7 +28,7 @@ Learn how to set up App and API Protection (AAP) on your Linux services by selec {{< appsec-integrations >}} {{< appsec-integration name="Python" avatar="python" link="/security/application_security/setup/python" >}} - {{< appsec-integration name="Node.js" avatar="node" link="/security/application_security/setup/nodejs" >}} + {{< appsec-integration name="Node.js" avatar="node" link="/security/application_security/setup/nodejs/linux" >}} {{< appsec-integration name="Java" avatar="java" link="/security/application_security/setup/java/linux" >}} {{< appsec-integration name="Go" avatar="go" link="/security/application_security/setup/go" >}} {{< appsec-integration name="Ruby" avatar="ruby" link="/security/application_security/setup/ruby" >}} diff --git a/content/en/security/application_security/setup/macos/_index.md b/content/en/security/application_security/setup/macos/_index.md index 06ea34c79fa80..a9804cf383e6c 100644 --- a/content/en/security/application_security/setup/macos/_index.md +++ b/content/en/security/application_security/setup/macos/_index.md @@ -28,7 +28,7 @@ Learn how to set up App and API Protection (AAP) on your macOS services by selec {{< appsec-integrations >}} {{< appsec-integration name="Python" avatar="python" link="/security/application_security/setup/python" >}} - {{< appsec-integration name="Node.js" avatar="node" link="/security/application_security/setup/nodejs" >}} + {{< appsec-integration name="Node.js" avatar="node" link="/security/application_security/setup/nodejs/macos" >}} {{< appsec-integration name="Java" avatar="java" link="/security/application_security/setup/java/macos" >}} {{< appsec-integration name="Go" avatar="go" link="/security/application_security/setup/go" >}} {{< appsec-integration name="Ruby" avatar="ruby" link="/security/application_security/setup/ruby" >}} diff --git a/content/en/security/application_security/setup/windows/_index.md b/content/en/security/application_security/setup/windows/_index.md index 5e4c80bc97f94..6ac8f4c96a599 100644 --- a/content/en/security/application_security/setup/windows/_index.md +++ b/content/en/security/application_security/setup/windows/_index.md @@ -27,6 +27,7 @@ Learn how to set up App and API Protection (AAP) on your Windows services by sel {{< appsec-integrations >}} + {{< appsec-integration name="Node.js" avatar="node" link="/security/application_security/setup/nodejs/windows" >}} {{< appsec-integration name="Java" avatar="java" link="/security/application_security/setup/java/windows" >}} {{< appsec-integration name=".NET" avatar="dotnet" link="/security/application_security/setup/dotnet" >}} {{< /appsec-integrations >}} diff --git a/content/en/security/guide/aws_fargate_config_guide.md b/content/en/security/guide/aws_fargate_config_guide.md index 8594620cf285d..d216554daf228 100644 --- a/content/en/security/guide/aws_fargate_config_guide.md +++ b/content/en/security/guide/aws_fargate_config_guide.md @@ -423,7 +423,7 @@ For step-by-step instructions, see [AWS Configuration Guide for Cloud SIEM][17]. [11]: /security/application_security/setup/aws/fargate/dotnet/?tab=awsfargate [12]: /security/application_security/setup/aws/fargate/dotnet/?tab=awsfargate [13]: /security/application_security/setup/aws/fargate/ruby/?tab=awsfargate -[14]: /security/application_security/setup/aws/fargate/nodejs/?tab=awsfargate +[14]: /security/application_security/setup/nodejs/aws-fargate [15]: /security/application_security/setup/aws/fargate/python/?tab=awsfargate [16]: /security/application_security/ [17]: /security/cloud_siem/guide/aws-config-guide-for-cloud-siem/ From 7f5d3871380142c6473713169f695d62d650bcdf Mon Sep 17 00:00:00 2001 From: CarlesDD Date: Tue, 15 Jul 2025 16:02:11 +0200 Subject: [PATCH 11/12] Revert "Remove old compatibility page for Node.js" This reverts commit 01c1c8bba8a61742ed4048aa5ae800a4e2da04c2. --- .../setup/compatibility/nodejs.md | 181 ++++++++++++++++++ 1 file changed, 181 insertions(+) create mode 100644 content/en/security/application_security/setup/compatibility/nodejs.md diff --git a/content/en/security/application_security/setup/compatibility/nodejs.md b/content/en/security/application_security/setup/compatibility/nodejs.md new file mode 100644 index 0000000000000..b347738ea1efe --- /dev/null +++ b/content/en/security/application_security/setup/compatibility/nodejs.md @@ -0,0 +1,181 @@ +--- +title: Node.js Compatibility Requirements +code_lang: nodejs +type: multi-code-lang +code_lang_weight: 50 +aliases: + - /security/application_security/threats/setup/compatibility/nodejs +--- + +## App and API Protection capabilities + +The following App and API Protection capabilities are supported in the Node.js library, for the specified tracer version: + +| App and API Protection capability | Minimum Node.js tracer version | +|----------------------------------------|----------------------------------------------------| +| Threat Detection | 4.0.0 | +| Threat Protection | 4.0.0 | +| Customize response to blocked requests | 4.1.0 | +| Automatic user activity event tracking | 4.4.0 for Node.js 16+ | +| API Security | 4.30.0 for Node.js 16+, or 5.6.0 for Node.js 18+ | + +The minimum tracer version to get all supported App and API Protection capabilities for Node.js is 4.30.0. + + +**Note**: +- Threat Protection requires enabling [Remote Configuration][2], which is included in the listed minimum tracer version. + +### Supported deployment types +| Type | Threat Detection support | +|-------------|--------------------------| +| Docker | {{< X >}} | +| Kubernetes | {{< X >}} | +| Amazon ECS | {{< X >}} | +| AWS Fargate | {{< X >}} | +| AWS Lambda | {{< X >}} | + +## Language and framework compatibility + +### Node.js Version Support + +When the Node.js project drops support for an LTS major release line (when it goes End of Life), support for it is dropped in the next major version of `dd-trace`. +The last major supporting release line of `dd-trace` library supports that EOL version of Node.js for at least another year on a maintenance mode basis. + +Some issues cannot be solved in `dd-trace` and instead must be solved in Node.js. When this happens and the Node.js release in question is EOL, it's not possible to solve the issue without moving to another non-EOL release. +Datadog does not make new releases of `dd-trace` to provide specific support for non-LTS Node.js major release lines (odd numbered versions). + +For the best level of support, always run the latest LTS release of Node.js, and the latest major version of `dd-trace`. Whatever release line of Node.js you use, also use the latest version of Node.js on that release line, to ensure you have the latest security fixes. + +For more information about Node.js release, see the [official Node.js documentation][4]. + + + +### Operating system support + +The following operating systems are officially supported by `dd-trace`. Any operating system not listed is still likely to work, but with some features missing, for example App and API Protection capabilities, profiling, and runtime metrics. Generally speaking, operating systems that are actively maintained at the time of initial release for a major version are supported. + + +| Operating System | Architectures | Minimum Versions | +|------------------|---------------|------------------------------------------| +| Linux (glibc) | arm64, x64 | CentOS 7, Debian 9, RHEL 7, Ubuntu 14.04 | +| Linux (musl) | arm64, x64 | Alpine 3.13 | +| macOS | arm64, x64 | Catalina (10.15) | +| Windows | x64 | Windows 8.1, Windows Server 2012 | + + + + + +### Web framework compatibility + +- Attacker source HTTP request details +- Tags for the HTTP request (status code, method, etc) +- Distributed Tracing to see attack flows through your applications + +##### App and API Protection Capability Notes + +Although Threat Protection is available for express >= 4 versions, the blocking of payloads on the body is only supported for applications using either the [`body-parser`][45] or [`multer`][46] libraries. + +| Framework | Versions | Threat Detection supported? | Threat Protection supported? | +|-----------|----------|-----------------------------|------------------------------| +| express | `>=4` | {{< X >}} | {{< X >}} | +| fastify | `>=2` | {{< X >}} | {{< X >}} | +| nextjs | `>=11.1` | {{< X >}} | | + + + + + +
If you would like to see support added for any of the unsupported capabilities or for your Node.js framework, let us know! Fill out this short form to send details.
+ + +### Networking framework compatibility + + +**Networking tracing provides:** + +- Distributed tracing through your applications +- Request-based blocking + +##### App and API Protection Capability Notes + + +| Framework | Threat Detection supported? | Threat Protection supported? | +|-----------|-----------------------------|------------------------------| +| http | {{< X >}} | {{< X >}} | +| https | {{< X >}} | {{< X >}} | + + +
If you don't see your framework of choice listed, let us know! Fill out this short form to send details.
+ +### Data store compatibility + + +**Datastore tracing provides:** + +- Timing request to response +- Query info (for example, a sanitized query string) +- Error and stacktrace capturing + +##### App and API Protection Capability Notes + +- **Threat Protection** also works at the HTTP request (input) layer, and so works for all databases by default, even those not listed in the table below. + + +| Framework | Versions | Threat Detection supported? | Threat Protection supported? | +|--------------------------|-----------|-----------------------------|------------------------------| +| [@apollo/server][43] | `>=4` | {{< X >}} | {{< X >}} | +| [apollo-server-core][44] | `>=3` | {{< X >}} | {{< X >}} | +| [cassandra-driver][28] | `>=3` | {{< X >}} | {{< X >}} | +| [couchbase][29] | `^2.4.2` | {{< X >}} | {{< X >}} | +| [elasticsearch][30] | `>=10` | {{< X >}} | {{< X >}} | +| [ioredis][31] | `>=2` | {{< X >}} | {{< X >}} | +| [knex][32] | `>=0.8` | {{< X >}} | {{< X >}} | +| [mariadb][5] | `>=3` | {{< X >}} | {{< X >}} | +| [memcached][33] | `>=2.2` | {{< X >}} | {{< X >}} | +| [mongodb-core][34] | `>=2` | {{< X >}} | {{< X >}} | +| [mysql][35] | `>=2` | {{< X >}} | {{< X >}} | +| [mysql2][36] | `>=1` | {{< X >}} | {{< X >}} | +| [oracledb][37] | `>=5` | {{< X >}} | {{< X >}} | +| [pg][38] | `>=4` | {{< X >}} | {{< X >}} | +| [redis][39] | `>=0.12` | {{< X >}} | {{< X >}} | +| [sharedb][40] | `>=1` | {{< X >}} | {{< X >}} | +| [tedious][41] | `>=1` | {{< X >}} | {{< X >}} | +| [sequelize][42] | `>=4` | {{< X >}} | {{< X >}} | + + +### User Authentication Frameworks compatibility + +**Integrations to User Authentication Frameworks provide:** + +- User login events, including the user IDs +- The Account Takeover detection monitoring the user login events + +| Framework | Minimum Framework Version | +|-----------------|---------------------------| +| passport-local | 1.0.0 | +| passport-http | 0.3.0 | + +[1]: /tracing/trace_collection/compatibility/nodejs/ +[2]: /agent/remote_config/#enabling-remote-configuration +[4]: https://github.com/nodejs/release#release-schedule +[5]: https://github.com/mariadb-corporation/mariadb-connector-nodejs +[28]: https://github.com/datastax/nodejs-driver +[29]: https://github.com/couchbase/couchnode +[30]: https://github.com/elastic/elasticsearch-js +[31]: https://github.com/luin/ioredis +[32]: https://knexjs.org +[33]: https://github.com/3rd-Eden/memcached +[34]: https://www.mongodb.com/docs/drivers/node/current/ +[35]: https://github.com/mysqljs/mysql +[36]: https://github.com/sidorares/node-mysql2 +[37]: https://oracle.github.io/node-oracledb/ +[38]: https://node-postgres.com +[39]: https://github.com/NodeRedis/node_redis +[40]: https://share.github.io/sharedb/ +[41]: http://tediousjs.github.io/tedious +[42]: https://github.com/sequelize/sequelize +[43]: https://github.com/apollographql/apollo-server +[44]: https://www.npmjs.com/package/apollo-server-core +[45]: https://www.npmjs.com/package/body-parser +[46]: https://www.npmjs.com/package/multer From c79e01d423a555aec8b24ac0750ef5bef6da43eb Mon Sep 17 00:00:00 2001 From: CarlesDD Date: Fri, 18 Jul 2025 16:25:03 +0200 Subject: [PATCH 12/12] Minor edits for style and consistency --- .../setup/nodejs/aws-fargate.md | 4 +- .../setup/nodejs/docker.md | 8 +- .../setup/nodejs/kubernetes.md | 4 +- .../setup/nodejs/linux.md | 4 +- .../setup/nodejs/macos.md | 4 +- .../setup/nodejs/troubleshooting.md | 86 +++++++++---------- .../setup/nodejs/windows.md | 4 +- 7 files changed, 57 insertions(+), 57 deletions(-) diff --git a/content/en/security/application_security/setup/nodejs/aws-fargate.md b/content/en/security/application_security/setup/nodejs/aws-fargate.md index a4e6d3c369b70..945b1a0e44b6a 100644 --- a/content/en/security/application_security/setup/nodejs/aws-fargate.md +++ b/content/en/security/application_security/setup/nodejs/aws-fargate.md @@ -2,7 +2,7 @@ code_lang: aws-fargate type: multi-code-lang code_lang_weight: 60 -title: Setup App and API Protection for Node.js on AWS Fargate +title: Set up App and API Protection for Node.js on AWS Fargate further_reading: - link: "/security/application_security/how-it-works/" tag: "Documentation" @@ -23,7 +23,7 @@ further_reading: - Node.js application containerized with Docker - AWS CLI configured with appropriate permissions - Your Datadog API key -- Datadog Node.js tracing library (see version requirements [here][1]) +- Datadog Node.js tracing library (see [version requirements][1]) ## 1. Installing the Datadog Agent diff --git a/content/en/security/application_security/setup/nodejs/docker.md b/content/en/security/application_security/setup/nodejs/docker.md index 55844e3d6bb46..b509670fcfee8 100644 --- a/content/en/security/application_security/setup/nodejs/docker.md +++ b/content/en/security/application_security/setup/nodejs/docker.md @@ -1,5 +1,5 @@ --- -title: Setup App and API Protection for Node.js in Docker +title: Set up App and API Protection for Node.js in Docker code_lang: docker type: multi-code-lang code_lang_weight: 10 @@ -23,7 +23,7 @@ further_reading: - Docker installed on your host - Node.js application containerized with Docker - Your Datadog API key -- Datadog Node.js tracing library (see version requirements [here][1]) +- Datadog Node.js tracing library (see [version requirements][1]) ## 1. Installing the Datadog Agent @@ -99,8 +99,8 @@ CMD ["node", "--require", "dd-trace/init", "app.js"] Build your image and then run your container. When running your container, make sure to: -1. Connect it to the same Docker network as the Datadog Agent -2. Set the required environment variables +1. Connect it to the same Docker network as the Datadog Agent. +2. Set the required environment variables. ```bash docker run -d \ diff --git a/content/en/security/application_security/setup/nodejs/kubernetes.md b/content/en/security/application_security/setup/nodejs/kubernetes.md index d315e0a05d9f1..ca34a787f0b2f 100644 --- a/content/en/security/application_security/setup/nodejs/kubernetes.md +++ b/content/en/security/application_security/setup/nodejs/kubernetes.md @@ -1,5 +1,5 @@ --- -title: Setup App and API Protection for Node.js in Kubernetes +title: Set up App and API Protection for Node.js in Kubernetes code_lang: kubernetes type: multi-code-lang code_lang_weight: 20 @@ -25,7 +25,7 @@ further_reading: - kubectl configured to access your cluster - Helm (recommended for Agent installation) - Your Datadog API key -- Datadog Node.js tracing library (see version requirements [here][1]) +- Datadog Node.js tracing library (see [version requirements][1]) ## 1. Installing the Datadog Agent diff --git a/content/en/security/application_security/setup/nodejs/linux.md b/content/en/security/application_security/setup/nodejs/linux.md index dba5ac7b2ac66..c0fc99e8c2871 100644 --- a/content/en/security/application_security/setup/nodejs/linux.md +++ b/content/en/security/application_security/setup/nodejs/linux.md @@ -1,5 +1,5 @@ --- -title: Setup App and API Protection for Node.js on Linux +title: Set up App and API Protection for Node.js on Linux code_lang: linux type: multi-code-lang code_lang_weight: 30 @@ -25,7 +25,7 @@ further_reading: - Root or sudo privileges - Systemd (for service management) - Your Datadog API key -- Datadog Node.js tracing library (see version requirements [here][1]) +- Datadog Node.js tracing library (see [version requirements][1]) ## 1. Installing the Datadog Agent diff --git a/content/en/security/application_security/setup/nodejs/macos.md b/content/en/security/application_security/setup/nodejs/macos.md index 741fed0c5592d..bd3c987bbea03 100644 --- a/content/en/security/application_security/setup/nodejs/macos.md +++ b/content/en/security/application_security/setup/nodejs/macos.md @@ -1,5 +1,5 @@ --- -title: Setup App and API Protection for Node.js on macOS +title: Set up App and API Protection for Node.js on macOS code_lang: macos type: multi-code-lang code_lang_weight: 40 @@ -23,7 +23,7 @@ further_reading: - Homebrew (recommended for Agent installation) - Administrator privileges for some configuration steps - Your Datadog API key -- Datadog Node.js tracing library (see version requirements [here][1]) +- Datadog Node.js tracing library (see [version requirements][1]) ## 1. Installing the Datadog Agent diff --git a/content/en/security/application_security/setup/nodejs/troubleshooting.md b/content/en/security/application_security/setup/nodejs/troubleshooting.md index efbfd2e95a008..6838baec6c8cf 100644 --- a/content/en/security/application_security/setup/nodejs/troubleshooting.md +++ b/content/en/security/application_security/setup/nodejs/troubleshooting.md @@ -8,69 +8,69 @@ title: Troubleshooting Node.js App and API Protection If you don't see AAP threat information in the [Trace and Signals Explorer][1] for your Node.js application, follow these steps to troubleshoot the issue: -1. **Verify Agent version** - - Ensure you're running Datadog Agent v7.41.1 or higher - - Check Agent status: `datadog-agent status` +1. Verify Agent version: + - Ensure you're running Datadog Agent v7.41.1 or higher. + - Check Agent status: `datadog-agent status`. -2. **Check Node.js tracer version** - - Confirm you're using Node.js tracer v4.30.0 or higher - - Verify the tracer is loaded: `node -e "console.log(require('dd-trace/package.json').version)"` +2. Check Node.js tracer version: + - Confirm you're using Node.js tracer v4.30.0 or higher. + - Verify the tracer is loaded: `node -e "console.log(require('dd-trace/package.json').version)"`. -3. **Verify environment variables** - - Ensure `DD_APPSEC_ENABLED=true` is set - - Check `DD_SERVICE` and `DD_ENV` are properly configured - - Verify `DD_APM_ENABLED=true` if using APM features +3. Verify environment variables: + - Ensure `DD_APPSEC_ENABLED=true` is set. + - Check `DD_SERVICE` and `DD_ENV` are properly configured. + - Verify `DD_APM_ENABLED=true` if using APM features. -4. **Check tracer initialization** - - Ensure `dd-trace/init` is required at the start of your application - - Verify the tracer is properly loaded before your application code +4. Check tracer initialization: + - Ensure `dd-trace/init` is required at the start of your application. + - Verify the tracer is properly loaded before your application code. ### Application fails to start -1. **Check Node.js version compatibility** - - Ensure you're using a supported Node.js version (see [compatibility requirements][2]) - - Verify Node.js version: `node --version` +1. Check Node.js version compatibility: + - Ensure you're using a supported Node.js version (see [compatibility requirements][2]). + - Verify Node.js version: `node --version`. -2. **Check dd-trace installation** - - Ensure `dd-trace` is properly installed: `npm list dd-trace` - - Reinstall if necessary: `npm install dd-trace` +2. Check dd-trace installation: + - Ensure `dd-trace` is properly installed: `npm list dd-trace`. + - Reinstall if necessary: `npm install dd-trace`. -3. **Module loading errors** - - Check for conflicts with other tracing libraries - - Verify the tracer is required before other modules +3. Module loading errors: + - Check for conflicts with other tracing libraries. + - Verify the tracer is required before other modules. ### Performance impact -1. **High latency** - - Check Agent resource usage - - Verify network connectivity between Agent and Datadog - - Consider adjusting sampling rates - - Review [performance considerations][3] +1. High latency: + - Check Agent resource usage. + - Verify network connectivity between Agent and Datadog. + - Consider adjusting sampling rates. + - Review [performance considerations][3]. -2. **High memory usage** - - Monitor Node.js process memory usage - - Check for memory leaks in your application - - Consider adjusting tracer configuration +2. High memory usage: + - Monitor Node.js process memory usage. + - Check for memory leaks in your application. + - Consider adjusting tracer configuration. ### Configuration issues -1. **Environment variables not recognized** - - Ensure environment variables are set before starting the application - - Check for typos in environment variable names - - Verify that the tracer is initialized with the correct configuration +1. Environment variables not recognized: + - Ensure environment variables are set before starting the application. + - Check for typos in environment variable names. + - Verify that the tracer is initialized with the correct configuration. -2. **Tracer initialization problems** - - Make sure `require('dd-trace/init')` is the first line in your application - - Check for syntax errors in your tracer configuration - - Verify that the tracer is being imported correctly +2. Tracer initialization problems: + - Make sure `require('dd-trace/init')` is the first line in your application. + - Check for syntax errors in your tracer configuration. + - Verify that the tracer is being imported correctly. ### Still having issues? If you're still experiencing problems: -1. Check the [Application Security Monitoring troubleshooting guide][1] -2. Review the [Node.js tracer documentation][4] -3. Enable debug logging: `DD_TRACE_DEBUG=true` -4. Contact [Datadog support][5] +1. Check the [Application Security Monitoring troubleshooting guide][1]. +2. Review the [Node.js tracer documentation][4]. +3. Enable debug logging: `DD_TRACE_DEBUG=true`. +4. Contact [Datadog support][5]. [1]: /security/application_security/troubleshooting [2]: /security/application_security/setup/nodejs/compatibility diff --git a/content/en/security/application_security/setup/nodejs/windows.md b/content/en/security/application_security/setup/nodejs/windows.md index dcea78c44f1eb..d66e4ab048086 100644 --- a/content/en/security/application_security/setup/nodejs/windows.md +++ b/content/en/security/application_security/setup/nodejs/windows.md @@ -1,5 +1,5 @@ --- -title: Setup App and API Protection for Node.js on Windows +title: Set up App and API Protection for Node.js on Windows code_lang: windows type: multi-code-lang code_lang_weight: 50 @@ -22,7 +22,7 @@ further_reading: - Node.js application - Administrator privileges for some configuration steps - Your Datadog API key -- Datadog Node.js tracing library (see version requirements [here][1]) +- Datadog Node.js tracing library (see [version requirements][1]) ## 1. Installing the Datadog Agent