Downloading and deploying Node.js IAST agent type
You can deploy an IAST agent on the tested application's web server that supports Java, .NET, or Node.js based applications. This section explains about creating Node.js agent type on your web server.
Before you begin
- You have to create an application in the Portfolio tab of the Monitor view in AppScan Enterprise. For more information on creating application in AppScan Enterprise, see Creating an application.
About this task
Procedure
- Log in to the AppScan Enterprise Server application.
- Go to the Monitor page > Portfolio tab to view the list of applications available.
-
Click the application to which you want to download an IAST agent.
The application page is displayed. For more information on creating an application, see Creating an application
-
On the left pane, click the IAST Agents.
The IAST agents page is displayed on the right-pane.
-
Click Create a new Agent.
The Getting started with IAST page is displayed.
-
Click Create a new Agent.
The IAST agent creation page is displayed.
-
From the Agent Type drop-down list, select
Node.js if the application you are testing is a Node.js based application.
- In the Agent Name box, enter a unique name for the agent you are creating for the application. The agent name can contain alphanumeric and special characters with a length of maximum 30 characters.
- Click Download Agent. The Check your downloads folder message is displayed and the hclsoftware-secagent.tgz file is downloaded to the system’s default download folder.
- Copy the hclsoftware-secagent.tgz file to a folder in your web server.
-
You must install the Node.js agent type, using the following command:
.npm install hclsoftware-secagent.tgz
- Open the application's package.json file and edit the script start value.
-
In the start script parameter
node index.js
insert the script parameter-r @hclsoftware/secagent/src/last.js
after thenode
value as illustrated in the following screen shot. - Run your tested application using the npm start command.