Share a scenario
This topic describes how to share a scenario with other users.
Prerequisites
You have built and saved a scenario. For more information, see Build a scenario.
Unauthorized disclosure of access links, passwords, or authentication tokens can create security risks and cause financial losses. Share access permissions with caution.
Enable access to a scenario
In the scenario editing workbench, click the Share
icon on the right side of the top toolbar.NoteIf you are previewing the scenario, you can also click the Share
icon in the upper-right corner of the preview page to configure access permissions.In the dialog box that appears, you can view the external access status for the scenario.
The Share IoT Digital Twin Scenario switch is off by default.
Turn on the Share IoT Digital Twin Scenario switch to enable external access to the scenario.
By default, the dialog box displays the link and password for external access. Click Copy Link and Password to share this information with other users.
Click a tab under Access Restrictions to switch the access permission type.
Password + Token: Allows access with both a password and an authentication token. Users with whom you share the scenario can use either method to view it.
The token-based access method is used for integration, which lets you embed the scenario page into your business system.
Token Only: Allows access only with an authentication token.
Click the Close
icon in the upper-right corner of the dialog box.
(Optional) Update a password or reset a token
After you enable password or token authentication, you can perform the following operations:
After you update a password or reset a token, the old credentials become invalid. Any active user sessions are immediately terminated. Users must use the new password or token to access the scenario again.
Operation |
Procedure |
Update access password |
In the Access Restrictions area, under Access Password, click an icon to the right of the password field to modify, reset, or copy the password.
|
Reset token |
In the Access Restrictions area, under Token Authentication, click an icon to the right of the token field to reset or copy the token.
|
Other User Access Scenarios
Users who have the shared link can view the scenario. The steps to access the scenario depend on the enabled authentication method.
Using a password
Open the shared link in a browser.
Enter the access password.
Click OK.
Using an authentication token
Use the provided scenario link (original URL) and token to construct a new URL in the following format.
${originalURL}?signature=${signature}×tamp=${timestamp}.Important${timestamp}: The current time in milliseconds. The value oftimestampin the URL must be the same as the value used for the signature calculation.${signature}: The signature string. Calculate the signature using the hmacmd5 signature algorithm with the expressionhmac_md5(token, sceneId${sceneId}timestamp${timestamp}).token: The value of the authentication token.${sceneId}: The ID of the scenario.
You must implement the signature calculation function using a public library that supports the specified signature algorithm.
Enter the new URL in a browser.
Other service access scenarios
IoT Digital Twin Component: A component for the IoT Platform application development service that you can use to display an IoT Digital Twin Engine scenario page in a web application.
(Modify): Follow the on-screen prompts to manually change the password.
(Reset): IoT Platform assigns a new password.
(Copy): Copy the password.