How Do I Configure Permission Authentication for Log Reporting via the Device SDKs?
LTS provides iOS, Android, Web, applet, and quick app SDKs for mobile devices to report logs. This section describes how to configure permission authentication in different scenarios.
Using the iOS and Android SDKs
When using these SDKs to report logs to LTS, you are advised to use AK/SK authentication. For security purposes, create an IAM user and grant the minimum permissions to the IAM user. The procedure is as follows:
- Log in to the IAM console.
- On the Users page, click Create User.
- On the basic information configuration page, select Programmatic access for Access Type, deselect Management console access, select Access key for Credential Type, and retain the default values for other parameters.
- Click Next. You do not need to add the user to any user group.
- Click Create. The IAM user will be displayed in the user list. For more operations, see Creating an IAM User.
- Download the access key (AK/SK) generated for the user.
The new user's AK/SK is restricted to reporting logs to LTS. They do not have permission to access the console or read/write other cloud services.
- Use the obtained AK/SK to report logs to LTS using the iOS SDK or Android SDK. For details, see Using SDKs to Ingest Logs to LTS.
Using the Web/Applet/Quick App SDKs
To use the web, Baidu applet, DingTalk applet, WeChat applet, Alipay applet, or quick app SDK to report logs to LTS, you must enable the anonymous write function for your log stream. However, enabling this function means logs are not authenticated and could lead to dirty data.
- Log in to the LTS console.
- On the Log Management page, locate the desired log group and click
.
- Click Create Log Stream.
- On the displayed page, enable Anonymous Write. This function is applicable when devices report logs via SDKs. By enabling it, you grant the log stream permission for anonymous writing, which means no valid authentication will be performed. This may lead to the generation of dirty data.
- Click OK. For details, see Managing Log Streams.
- After enabling anonymous write, use the web, Baidu applet, DingTalk applet, WeChat applet, Alipay applet, or quick app SDK to report logs to LTS. For details, see .
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot