Background
The Wireless Security Guard client SDK, paired with the Wireless Security Guard image service, is one of the foundational dependency capabilities of mPaaS and is widely used across mPaaS products. To further enhance the compatibility of mPaaS products in various scenarios and meet higher requirements in areas such as compliance, mPaaS introduces the Blue Shield capability as an alternative to the Wireless Security Guard capability. This supports scenarios where Wireless Security Guard may not suffice.
Current status
mPaaS has completed the adaptation and testing required to support switching from Wireless Security Guard to Blue Shield in Android baseline versions 10.2.3.23 and later. If you are using baseline 10.1.68 or an earlier version, you must upgrade to the latest 10.2.3 version.
Upgrade the baseline
Upgrade the baseline version to 10.2.3.23 or later.
Current baseline: 10.1.68 main baseline
See the mPaaS 10.2.3 Upgrade Guide to upgrade to the latest 10.2.3 baseline and perform the necessary adaptations.
The current baseline is a custom baseline
If you are using a custom baseline, search for the DingTalk group number 145930007362 to join the group. Alternatively, you can submit a ticket to consult with our after-sales and technical support staff about whether you can switch to the 10.2.3 baseline.
Upgrade the toolchain and switch to Blue Shield
Install Android Studio Flamingo | 2022.2.1 or later and mPaaS plugin 3.0.230609 or later.
Remove the Wireless Security Guard component
In the build.gradle file of the app module, remove the securityguard-build dependency library using gradle exclude.
configurations.all {
exclude group: 'com.alipay.android.phone.thirdparty', module:
'securityguard-build'
}Add the Blue Shield component
Add the Blue Shield component SDK dependency.
implementation 'com.mpaas.android:blueshield'// Blue Shield SDK dependencyAdd the logging component SDK dependency.
implementation 'com.mpaas.android:logging'// Logging component SDK dependencyUpgrade the easyconfig plugin dependency.
classpath 'com.android.boost.easyconfig:easyconfig:2.8.0'Generate a Blue Shield image (Optional)
Check whether the absBase64Code in the config file has a value. If it does, skip this step. If it does not, follow the instructions below to generate a Blue Shield image.
If you are using a public cloud environment and the value of absBase64Code in the .config file downloaded from the mPaaS console is empty, confirm that you have uploaded a correctly signed APK before you download the file. Then, download the file again. For more information, see Fill in configuration information and upload a signed APK.
Follow the steps shown in the figures below and enter the required information to generate the Blue Shield image:


Description of key input items in the figure:
Release Apk : The release apk package packaged by the mPaaS project, you must sign the package.
MD5: After the release apk package is uploaded, it will be filled in automatically, that is, the
public md5 keyof the apk package.mPaaS config File: Click Download Configuration on the mPaaS console to download the .config file and import it.
appSecret: View in the mPaaS console, as shown in the following figure.

Other items appId, packageName, outPath will be automatically identified and filled in after the above information is passed in.
Finally, add the generated image to the assets folder of your project.
Check if the Blue Shield image is configured successfully
Drag the apk package to Android Studio to see if there is abs_1222.jpg in the assets directory of apk. If there is, the Blue Shield picture is successfully configured.

Configure the switch to Blue Shield
Add the meta-data to the AndroidManifest.xml file.
<!--Description of the value: antGroup specifies Blue Shield-->
<meta-data
android:name="mpaas_security_mode"
android:value="antGroup"/>The mpaas_security_mode option is for the RPC signing tool.
List of libraries that support Blue Shield updates
Mobile Gateway Service
Mobile Scheduling Center
Mobile Sync Service
Multimedia
Mini Program
Location Service
Unified Storage
Some internal dependent components
Ant Dynamic Card
Test validation scope
After you switch to Blue Shield, use the preceding change checklist to perform regression testing on the App.