Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel,
n'hésitez pas à nous contacter.
You can monitor application security for .NET apps running in Docker, Kubernetes, Amazon ECS, and AWS Fargate.
In general, setting up Application Security Management (ASM) involves:
- Identifying services that are vulnerable or are under attack, which would most benefit from ASM. Find them on the Security tab of your Service Catalog.
- Updating to the latest Datadog library (the most recent APM tracing library).
- Enabling the library to collect the application security data from the services and send it to Datadog.
- Triggering security signals in your application and seeing how Datadog displays the resulting information.
Prerequisites
Enabling Code Security
If your service runs a tracing library version that supports code security vulnerability detection, enable the capability by setting the DD_IAST_ENABLED=true
environment variable and restarting your service.
To leverage code-level vulnerability detection capabilities for your service:
Update your Datadog Agent to at least version 7.41.1.
Update your tracing library to at least the minimum version needed to turn on code security. For details, see ASM capabilities support.
Add the DD_IAST_ENABLED=true
environment variable to your application configuration. For example, on Windows self-hosted, run the following PowerShell snippet as part of your application start-up script:
$target=[System.EnvironmentVariableTarget]::Process
[System.Environment]::SetEnvironmentVariable("DD_IAST_ENABLED","true",$target)
Or one of the following methods, depending on where your application runs:
In a Windows console:
rem Set environment variables
SET DD_IAST_ENABLED=true
rem Start application
dotnet.exe example.dll
Run the following PowerShell command as administrator to configure the necessary environment variables in the registry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
and restart IIS.
$target=[System.EnvironmentVariableTarget]::Machine
[System.Environment]::SetEnvironmentVariable("DD_IAST_ENABLED","true",$target)
net stop was /y
net start w3svc
Add the following to your application configuration:
Update your configuration container for APM by adding the following argument in your docker run command:
docker run -d --name app -e DD_IAST_ENABLED=true company/app:latest
Add the following environment variable value to your container Dockerfile:
Update your deployment configuration file for APM and add the ASM environment variable:
spec:
template:
spec:
containers:
- name: <CONTAINER_NAME>
image: <CONTAINER_IMAGE>/<TAG>
env:
- name: DD_IAST_ENABLED
value: "true"
Update your ECS task definition JSON file, by adding this in the environment section:
"environment": [
...,
{
"name": "DD_IAST_ENABLED",
"value": "true"
}
]
Add the following line to your container Dockerfile:
Further Reading
Documentation, liens et articles supplémentaires utiles: