Deploying a .NET IAST agent
You can deploy an IAST agent on the application server that supports Java, .NET, Node.js or PHP based applications. This section explains how to create a .NET agent type on your web server.
Before you begin
If the server running IAST is behind a proxy, the IAST .NET agent supports two ways
to configure an outbound HTTP proxy:
- System proxy settings, which are automatically detected from standard OS settings or the HTTP_PROXY, HTTPS_PROXY environment variables.
-
IAST-specific proxy settings, defined with the application’s own
environment variables. Configure them as
follows:
IAST_PROXY_HOST={proxy_ip} IAST_Deploy_dot_net.html
If the application-specific variables are set, they take precedence; otherwise, the system proxy is used. If neither is defined, the application connects directly. Proxy settings are read at startup; changes require a restart. Check the IAST log to verify that the proxy is configured correctly.
About this task
Procedure
-
Configure NuGet Package Source:
- Open Visual Studio and navigate to Menu > Tools > Options > NuGet Package Manager > Package Source.
-
Select the folder containing the
SecAgentpackage. - Click the + sign and give the new source a name.
- Identify Web Server Projects: The IAST Agent must only be installed on your web server projects that are typically responsible for serving web content (for example, ASP.NET Core or ASP.NET MVC projects). Identify these projects by looking for files such as Startup.cs, Controllers, or wwwroot folders.
-
Install the IAST Agent NuGet: In the Solution Explorer, right-click on the web
server project and select Manage NuGet Packages. Search for
com.HCL.AppScan.IAST.agentand select the first package in the results. Click Install. Repeat this step for each web server project in your solution. -
Set Environment Variable (for .NET Core only):If you're using .NET
Core, set the following environment variable:
"ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "SecagentCore" -
Verify Installation: Verify that the installation was successful.