You can use the Application Real-Time Monitoring Service (ARMS) console to connect your application to Application Security. This way, if you restart the local instances of the application, your application is protected. You do not need to modify the code of the application.
Prerequisites
- The application is a Java application monitored by Application Monitoring. This is because only Java applications can be connected to Application Security. For more information, see Overview.
- The ARMS agent meets the following requirements:
- In automatic upgrade scenarios, a containerized application or an Enterprise Distributed
Application Service (EDAS) application must use the ARMS agent V2.7.1.2 or later.
Note Automatic upgrade scenarios refer to the scenarios where you can automatically upgrade the ARMS agent by restarting applications or pods. For more information, see Update the ARMS agent for Java applications.a
- For a manual upgrade scenario, the ARMS agent must be V2.7.1.3 or later.
To view the version of the ARMS agent, perform the following operations: Log on to the ARMS console. In the left-side navigation pane, choose . Find the application and view the version of the ARMS agent. For information about how to upgrade an ARMS agent, see Update the ARMS agent for Java applications.
- In automatic upgrade scenarios, a containerized application or an Enterprise Distributed
Application Service (EDAS) application must use the ARMS agent V2.7.1.2 or later.
Authorization
Before you connect the application to Application Security, you must authorize ARMS to access Alibaba Cloud Security. Then, ARMS gains limited access to relevant resources that Application Security depends on.
Connect the application to Application Security in Application Monitoring
- If your application is deployed in a Container Service for Kubernetes (ACK) cluster:
Add the tag
armsSecAutoEnable: "on"
. For more information, see Install an ARMS agent for Java applications deployed in ACK. - If your application is deployed in another environment:
Add the startup parameter
-Darms.appsec.enable=true
. For more information, see Manually install an ARMS agent for a Java application.
Connect the application to Application Security in the ARMS console
If you have not activated Application Security when you connect the application to Application Monitoring, you can perform the following operations to connect the application to Application Security:
Set the prevention mode
After you connect the application to Application Security, you can set the prevention mode of the application. The following prevention modes are available: Monitor, Monitor and Block, and Disable. The default prevention mode is Monitor. If the application is running as expected for a period of time, you can change the prevention mode to Monitor and Block. This ensures that the application can be protected against attacks.
Disconnect the application from Application Security
Disconnect the application from Application Security in Application Monitoring
Use one of the following methods to disconnect your application from Application Security in Application Monitoring:
- If your application is deployed in an ACK cluster:
Delete the tag
armsSecAutoEnable: "on"
. - If your application is deployed in another environment:
Delete the startup parameter
-Darms.appsec.enable=true
.
Disconnect the application from Application Security in the ARMS console
To disconnect an application from Application Security, choose Cancel in the Actions column. In the message that appears, click OK. You must restart the local instances of the application to make the operation take effect.
in the left-side navigation pane. On the page that appears, find the application and clickWe recommend that you do not disconnect an application from Application Security only for the sake of application performance. After an application is connected to Application Security, the default prevention mode is Monitor. In Monitor mode, Application Security only reports attack alerts and does not block attacks. Therefore, the application is not affected. If you want to disable all security detection capabilities, you can change the prevention mode to Disable. In Disable mode, Application Security does not report attack alerts even if a security attack occurs.