Authorization model introduces Talos authentication/authorization-related concepts and configuration rules
PUT_MESSAGE = 1 // Message Write
GET_MESSAGE = 2 // Message Read
FULL_MESSAGE_CONTROL = 3 // Message R+W
DESCRIBE_TOPIC = 4 // Topic Read
PUT_MESSAGE_AND_DESCRIBE_TOPIC = 5 // Message Write & Topic Read
GET_MESSAGE_AND_DESCRIBE_TOPIC = 6 // Message Read & Topic Read
TOPIC_READ_AND_MESSAGE_FULL_CONTROL = 7 // Topic Read & Message R+W
CHANGE_TOPIC = 8 // Topic Write
FULL_TOPIC_CONTROL = 12 // Topic R+W
FULL_CONTROL = 15 // Topic & Message R+W
CHANGE_PERMISSION = 16 // Permission Admin
ADMIN = 31 // All Admin
With Talos, the authenticated identity of the client after logging in is as follows:
The corresponding permission for the above identity is as follows:
Topic Read & Message R+W
permission of any Topic; it can be authorized by Developer. Please note that only permissions below or equal to TOPIC_READ_AND_MESSAGE_FULL_CONTROL
are allowed decentralization. More advanced permissions such as Topic Write and Permission operations are not allowed to be decentralized; only the Owner Developer of the Topic has these advanced permissionsEvery user who uses Talos needs to apply for a developer account on the Xiaomi Open Platform and create a cloud service key to get AppKey and AppSecret for one or more group Apps to be used to configure login Credential when using SDK;
When configuring Credential to log in, different identities correspond to different user types, as follows:
DEV_XIAOMI, Credential configuration uses AccountKey/AccountSecret to pass SDK signature authentication; the identity after the authentication is that of a Developer, and the Owner of all Topic created for this has all the permissions of all Topic under the developer name;
APP_SECRET, Credential configuration uses AppKey/AppSecret to pass SDK signature authentication; the identity after authentication is that of AppRoot. The Owner of the Topic needs to authorize to have the corresponding permissions;
DEV_XIAOMI_SSO
APP_XIAOMI_SSO
APP_ACCESS_TOKEN,OAuth认证
APP_ANONYMOUS, Anonymous login. After authentication, the Guest whose identity is the application terminal needs the authorization of the Owner to make the corresponding access;
In the following scenario, the issue of authorized identity configuration may be involved, that is, the use of Grantee configuration, as described below
Grantee needs to configure GrantType and Identifier; their correspondence is as follows: