An ACL consists of ACL entries. An ACL entry consists of a subject and an action.
This topic explains how to update an ACL by configuring ACL entries.
An ACL entry consists of a subject and an action.
A subject defines "to whom" the permission is to be granted.
The subject can be one of the following:
Any existing user.
Any existing group.
Any existing thing.
Any authenticated users (any users who are logged in and any things with the access tokens).
Anonymous users (any users or things, either with or without their access tokens).
The "any authenticated user" and "anonymous users" are only entities usable as an ACL entry's subject; you cannot specify them in other usages (e.g. login). The KiiAnyAuthenticatedUser and KiiAnonymousUser, used in the client SDKs, only have the relationship with KiiSubject (and do not have any relationship with KiiUser).
An action defines "which action" the permission allows to the subject.
The table below lists the actions for ACL entries. The action names vary depending on the SDK but the content is the same. The names listed in this table are used with the REST APIs.
|Create buckets in the scope.
|Create topics in the scope.
|Create KiiObjects in the bucket.
|Query KiiObjects in the bucket.
|Read KiiObjects in the bucket.
|Drop the bucket with KiiObjects in it.
|Read the KiiObject.
|Update and delete the KiiObject.
|Subscribe to the topic.
|Send push messages to the topic.
The class chart above does not include a class for the scope actions because only the REST APIs can modify the scope ACL.
A bucket, KiiObject, and topic have a different set of actions. The BucketAction, ObjectAction, and TopicAction represent actions achievable on a bucket, KiiObject, and topic, respectively.
In order to update an ACL, you create new and/or changed ACL entries on the client and send a change request to Kii Cloud.
For example, suppose that a KiiObject on the server has four ACL entries and you need to delete Bob's write permission and add Charlie's read permission.
KiiACLEntry class of the Kii Cloud SDK has a Boolean value
grant as a parameter in addition to a subject and an action.
grant specifies if the permission should be granted or revoked.
On the client, create an ACL entry with
grant=true for the permission to be granted and another ACL entry with
grant=false for the permission to be revoked. Send the created ACL entries to the server to update the KiiObject's ACL.
You can customize only a bucket's ACL in the developer portal.
For more information, see Changing an existing bucket's ACL.