Skip to content

Commit 1fc5142

Browse files
Linux setup page
1 parent df78fa1 commit 1fc5142

File tree

6 files changed

+283
-1
lines changed

6 files changed

+283
-1
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: Enabling AAP for .NET
3+
code_lang: dotnet
4+
type: multi-code-lang
5+
code_lang_weight: 0
6+
aliases:
7+
- /security_platform/application_security/getting_started/dotnet
8+
- /security/application_security/getting_started/dotnet
9+
- /security/application_security/threats/setup/threat_detection/dotnet
10+
- /security/application_security/threats_detection/dotnet
11+
further_reading:
12+
- link: "/security/application_security/add-user-info/"
13+
tag: "Documentation"
14+
text: "Adding user information to traces"
15+
- link: 'https://github.com/DataDog/dd-trace-dotnet'
16+
tag: "Source Code"
17+
text: '.NET Datadog library source code'
18+
- link: "/security/default_rules/?category=cat-application-security"
19+
tag: "Documentation"
20+
text: "OOTB App and API Protection Rules"
21+
- link: "/security/application_security/troubleshooting"
22+
tag: "Documentation"
23+
text: "Troubleshooting App and API Protection"
24+
---
25+
{{< partial name="app_and_api_protection/callout.html" >}}
26+
27+
{{< partial name="app_and_api_protection/dotnet/overview.html" >}}
28+
29+
## Environments
30+
31+
### Hosts
32+
{{< appsec-integrations >}}
33+
{{< appsec-integration name="Linux" avatar="linux" link="./linux" >}}
34+
<!--{{< appsec-integration name="macOS" avatar="apple" link="./macos" >}}-->
35+
<!--{{< appsec-integration name="Windows" avatar="windows" link="./windows" >}}-->
36+
{{< /appsec-integrations >}}
37+
<!--
38+
### Cloud and Container Platforms
39+
{{< appsec-integrations >}}
40+
{{< appsec-integration name="Docker" avatar="docker" link="./docker" >}}
41+
{{< appsec-integration name="Kubernetes" avatar="kubernetes" link="./kubernetes" >}}
42+
{{< /appsec-integrations >}}
43+
44+
### AWS
45+
{{< appsec-integrations >}}
46+
{{< appsec-integration name="AWS Fargate" avatar="amazon-ecs" link="./aws_fargate" >}}
47+
{{< /appsec-integrations >}}
48+
-->
49+
## Additional Resources
50+
51+
- [Troubleshooting Guide](dotnet/troubleshooting)
52+
- [Compatibility Information](dotnet/compatibility)
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
title: .NET Compatibility Requirements
3+
code_lang: dotnet
4+
type: multi-code-lang
5+
code_lang_weight: 10
6+
aliases:
7+
- /security/application_security/threats/setup/compatibility/dotnet
8+
---
9+
10+
## App and API Protection capabilities
11+
12+
The following App and API Protection capabilities are supported in the .NET library, for the specified tracer version:
13+
14+
| App and API Protection capability | Minimum .NET tracer version |
15+
| --------------------------------------- | ----------------------------|
16+
| Threat Detection | 2.23.0 |
17+
| Threat Protection | 2.26.0 |
18+
| Customize response to blocked requests | 2.27.0 |
19+
| Automatic user activity event tracking | 2.32.0 |
20+
| API Security | 2.42.0 |
21+
22+
The minimum tracer version to get all supported App and API Protection capabilities for .NET is 2.42.0.
23+
24+
**Note**: Threat Protection requires enabling [Remote Configuration][1], which is included in the listed minimum tracer version.
25+
26+
### Supported deployment types
27+
28+
Threat Detection is supported for the following deployment types:
29+
30+
- Docker
31+
- Kubernetes
32+
- Amazon ECS
33+
- AWS Fargate
34+
- AWS Lambda
35+
- Azure App Service
36+
37+
**Note**: Azure App Service is supported for **web applications only**. App and API Protection capabilities are not supported for Azure Functions.
38+
39+
## Language and framework compatibility
40+
41+
### Supported .NET versions
42+
43+
The Datadog .NET Tracing library is open source. View the [GitHub repository][2] for more information.
44+
45+
The .NET Tracer supports instrumentation from
46+
- .NET Framework 4.6.1 and newer versions
47+
- .NET Core 3.1 and newer versions
48+
49+
These are supported on the following architectures:
50+
- Linux (GNU) x86-64, ARM64
51+
- Alpine Linux (musl) x86-64, ARM64
52+
- macOS (Darwin) x86-64, ARM64
53+
- Windows (msvc) x86, x86-64
54+
55+
For a complete list of supported versions abd operating systems, see the [.NET Core tracer documentation][3] and [.NET Framework tracer documentation][4].
56+
57+
You must be running Datadog Agent v7.41.1+ for App and API Protection features.
58+
59+
## Integrations
60+
61+
The .NET tracer includes support for the following frameworks, data stores, and libraries:
62+
63+
### Web framework compatibility
64+
- ASP.NET MVC
65+
- ASP.NET Web API 2
66+
67+
### Data stores
68+
- OracleDB
69+
- ADO.NET
70+
- SQL Server
71+
- MySQL
72+
- SQLite
73+
- PostgreSQL
74+
75+
### Other
76+
- Kafka
77+
- GraphQL
78+
79+
For a complete list of supported integrations and their versions, see the [.NET Core tracer documentation][3] and [.NET Framework tracer documentation][4].
80+
81+
[1]: /agent/remote_config/#enabling-remote-configuration
82+
[2]: https://github.com/DataDog/dd-trace-dotnet
83+
[3]: /tracing/trace_collection/compatibility/dotnet-core
84+
[4]: /tracing/trace_collection/compatibility/dotnet-framework
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
---
2+
title: Set up App and API Protection for .NET on Linux
3+
code_lang: linux
4+
type: multi-code-lang
5+
code_lang_weight: 30
6+
further_reading:
7+
- link: "/security/application_security/how-it-works/"
8+
tag: "Documentation"
9+
text: "How App and API Protection Works"
10+
- link: "/security/default_rules/?category=cat-application-security"
11+
tag: "Documentation"
12+
text: "OOTB App and API Protection Rules"
13+
- link: "/security/application_security/troubleshooting"
14+
tag: "Documentation"
15+
text: "Troubleshooting App and API Protection"
16+
---
17+
{{% app_and_api_protection_dotnet_setup_options platform="linux" %}}
18+
19+
{{% app_and_api_protection_dotnet_overview %}}
20+
21+
## Prerequisites
22+
23+
- Linux operating system
24+
- .NET application
25+
- Root or sudo privileges
26+
- Systemd (for service management)
27+
- Your Datadog API key
28+
- Datadog .NET tracing library (see version requirements [here][1])
29+
30+
## 1. Installing the Datadog Agent
31+
32+
Install the Datadog Agent by following the [setup instructions for Linux hosts][2].
33+
34+
## 2. Enabling App and API Protection monitoring
35+
36+
{{% app_and_api_protection_navigation_menu %}}
37+
{{% appsec-remote-config-activation %}}
38+
39+
### Manually enabling App and API Protection monitoring
40+
41+
{{< tabs >}}
42+
{{% tab "AMD 64 Platforms" %}}
43+
44+
Download the latest [.NET Tracer package][3] that supports your operating system and architecture.
45+
46+
**Note on version**: replace <TRACER_VERSION> with the latest three component version of the library (ej: 3.21.0)
47+
48+
```bash
49+
wget -O datadog-dotnet-apm-<TRACER_VERSION>.tar.gz 'https://github.com/DataDog/dd-trace-dotnet/releases/download/v<TRACER_VERSION>'
50+
```
51+
52+
Run the following command to install the package and create the .NET tracer log directory `/var/log/datadog/dotnet` with the appropriate permissions:
53+
54+
```bash
55+
sudo tar -C /opt/datadog -xzf datadog-dotnet-apm-<TRACER_VERSION>.tar.gz && /opt/datadog/createLogPath.sh
56+
```
57+
{{% /tab %}}
58+
{{% tab "ARM 64 Platforms" %}}
59+
60+
Download the latest [.NET Tracer package][1] that supports your operating system and architecture.
61+
62+
**Note on version**: replace <TRACER_VERSION> with the latest three component version of the library (ej: 3.21.0)
63+
64+
```bash
65+
wget -O datadog-dotnet-apm-<TRACER_VERSION>.arm64.tar.gz 'https://github.com/DataDog/dd-trace-dotnet/releases/download/v<TRACER_VERSION>'
66+
```
67+
68+
Run the following command to install the package and create the .NET tracer log directory `/var/log/datadog/dotnet` with the appropriate permissions:
69+
70+
```bash
71+
sudo tar -C /opt/datadog -xzf datadog-dotnet-apm-<TRACER_VERSION>.arm64.tar.gz && /opt/datadog/createLogPath.sh
72+
```
73+
74+
{{% /tab %}}
75+
{{< /tabs >}}
76+
77+
{{% collapse-content title="APM Tracing Enabled" level="h4" %}}
78+
Set the required environment variables and start your .NET application:
79+
80+
```bash
81+
export CORECLR_ENABLE_PROFILING=1
82+
export CORECLR_PROFILER={846F5F1C-F9AE-4B07-969E-05C26BC060D8}
83+
export CORECLR_PROFILER_PATH=/opt/datadog/Datadog.Trace.ClrProfiler.Native.so
84+
export DD_DOTNET_TRACER_HOME=/opt/datadog
85+
export DD_SERVICE=<MY_SERVICE>
86+
export DD_ENV=<MY_ENV>
87+
export DD_APPSEC_ENABLED=true
88+
```
89+
{{% /collapse-content %}}
90+
91+
{{% collapse-content title="APM Tracing Disabled" level="h4" %}}
92+
To disable APM tracing while keeping App and API Protection enabled, you must set the APM tracing variable to false.
93+
```bash
94+
export CORECLR_ENABLE_PROFILING=1
95+
export CORECLR_PROFILER={846F5F1C-F9AE-4B07-969E-05C26BC060D8}
96+
export CORECLR_PROFILER_PATH=/opt/datadog/Datadog.Trace.ClrProfiler.Native.so
97+
export DD_DOTNET_TRACER_HOME=/opt/datadog
98+
export DD_SERVICE=<MY_SERVICE>
99+
export DD_ENV=<MY_ENV>
100+
export DD_APPSEC_ENABLED=true
101+
export DD_APM_TRACING_ENABLED=false
102+
```
103+
104+
{{% /collapse-content %}}
105+
106+
## 3. Run your application
107+
108+
Start your Java application with above settings.
109+
110+
{{% app_and_api_protection_verify_setup %}}
111+
112+
## Troubleshooting
113+
114+
If you encounter issues while setting up App and API Protection for your Java application, see the [.NET App and API Protection troubleshooting guide][4].
115+
116+
## Further Reading
117+
118+
{{< partial name="whats-next/whats-next.html" >}}
119+
120+
[1]: /security/application_security/setup/dotnet/compatibility
121+
[2]: /agent/?tab=Linux
122+
[3]: https://github.com/DataDog/dd-trace-dotnet/releases
123+
[4]: /security/application_security/setup/dotnet/troubleshooting

content/en/security/application_security/setup/linux/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Learn how to set up App and API Protection (AAP) on your Linux services by selec
3232
{{< appsec-integration name="Java" avatar="java" link="/security/application_security/setup/java/linux" >}}
3333
{{< appsec-integration name="Go" avatar="go" link="/security/application_security/setup/go" >}}
3434
{{< appsec-integration name="Ruby" avatar="ruby" link="/security/application_security/setup/ruby" >}}
35-
{{< appsec-integration name=".NET" avatar="dotnet" link="/security/application_security/setup/dotnet" >}}
35+
{{< appsec-integration name=".NET" avatar="dotnet" link="/security/application_security/setup/dotnet/linux" >}}
3636
{{< appsec-integration name="PHP" avatar="php" link="/security/application_security/setup/php" >}}
3737
{{< /appsec-integrations >}}
3838

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{{ $showSetup := .Get "showSetup" | default "true" | eq "true" }}
2+
3+
## Overview
4+
App and API Protection leverages the [Datadog .NET library](https://github.com/DataDog/dd-trace-dotnet/) to monitor and secure your .NET service. The library integrates seamlessly with your existing application without requiring code changes.
5+
6+
For detailed compatibility information, including supported DOTNET versions, frameworks, and deployment environments, see [.NET Compatibility Requirements](/security/application_security/setup/dotnet/compatibility).
7+
8+
{{ if $showSetup }}
9+
This guide explains how to set up App and API Protection (AAP) for .NET applications. The setup involves:
10+
1. <a href="#1-installing-the-datadog-agent">Installing the Datadog Agent</a>.
11+
2. <a href="#2-enabling-app-and-api-protection-monitoring">Enabling App and API Protection monitoring</a>.
12+
3. <a href="#3-run-your-application">Running your .NET application with the Datadog Agent</a>.
13+
4. <a href="#4-verify-setup">Verifying the setup</a>.
14+
{{ end }}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<div class="alert alert-info">
2+
<p>You can enable App and API Protection for .NET services with the following setup options:</p>
3+
4+
<ol>
5+
<li>If your .NET service already has APM tracing set up and running, then skip to <a href="#automatically-enabling-app-and-api-protection-through-remote-configuration">service configuration</a>.</li>
6+
<li>If your .NET service doesn't have APM tracing set up, you can easily enable App and API Protection with Datadog's <a href="https://docs.datadoghq.com/tracing/trace_collection/automatic_instrumentation/single-step-apm/{{ .Get "platform" }}/">Automatic Installation</a>.</li>
7+
<li>Otherwise, continue reading the manual setup instructions below.</li>
8+
</ol>
9+
</div>

0 commit comments

Comments
 (0)