1# Using Secure Shield Mode
2
3The Secure Shield mode is <!--RP1--><!--RP1End-->a system-level security mode provided for users with high security requirements. This mode restricts basic device capabilities to enhance security and effectively defend against targeted attacks through the remote attack surface.
4
5## HTML5 Features Restricted by ArkWeb
6
7When the Secure Shield mode is enabled, ArkWeb reduces the attack surface by restricting the following HTML5 features:
8
9- The WebAssembly capability.
10
11- The WebGL and WebGL2 capability.
12
13- The preview function of PDF Viewer.
14
15- The MathML capability.
16
17- The speech recognition capability of the Web Speech API.
18
19- The **RTCDataChannel** API.
20
21- The **MediaDevices.getUserMedia** API, which is used to prompt users to allow access to the media input device.
22
23- The Service Worker capability.
24
25- Non-proxy UDP traffic. This prevents WebRTC from disclosing the real source IP address.
26
27- The JIT capability.
28
29## Evaluating Impacts On Applications
30
31To evaluate the impact and compatibility of applications in Secure Shield mode, go to **Settings** > **Privacy & security** > **Secure Shield mode** to enable this mode.
32
33<!--RP2--><!--RP2End-->
34
35> **NOTE**
36>
37> To evaluate the compatibility of a debug version (not released on AppGallery), you need to enable the developer option and then enable the Secure Shield mode.
38
39When an application is running, you can check whether the corresponding functions are affected in the following ways:
40
41- Check whether WebAssembly APIs are called in the frontend code. WebAssembly provides the capability of running low-level languages such as C and C++ on the web, which is usually used in high-performance scenarios such as games and encoding and decoding. In Secure Shield mode, WebAssembly cannot be called.
42
43- Check whether WebGL APIs are called in the frontend code. WebGL provides the 3D graphics drawing capability, which cannot be called in shield daemon mode.
44
45- Check whether the PDF file can be displayed online. If the Secure Shield mode is enabled, the PDF file cannot be displayed online. For example, the loadUrl API cannot be used to load the PDF link.
46
47- Check whether the HTML page contains the MathML syntax embedded in the \**<\math>** tag. In the Secure Shield mode, the MathML syntax cannot be properly parsed and displayed.
48
49- Check whether APIs such as **SpeechRecognition** and **SpeechSynthesis** are called in the frontend code. In the Shield Guard mode, they cannot be called.
50
51- Check whether WebRTC APIs such as **RTCDataChannel** and **createDataChannel** are called in the frontend code. These APIs can be used to establish a bidirectional data channel to implement real-time data exchange between peers in WebRTC and cannot be called in the Secure Shield mode.
52
53- Check whether the **MediaDevices.getUserMedia** API is called in the frontend code. This API is used to request users to access streaming media devices (such as cameras and microphones). In the Secure Shield mode, the exception information "can't use getUserMedia on advancedSecurityMode!" is displayed when this API is called.
54
55- Check whether ServiceWorker APIs are called in the frontend code. This mechanism is used to implement capabilities such as offline cache, network request interception, and notification push, which cannot be created in Secure Shield mode.
56
57- Check whether non-proxy UDP transmission is used in WebRTC. In Secure Shield mode, non-proxy UDP transmission is not allowed. When network connectivity is involved, network functions and performance in WebRTC scenarios need to be verified and evaluated.
58
59- Check whether JIT is used. In the Secure Shield mode, the JS performance needs to be evaluated for applications because JIT involves performance optimization.
60