Grant Upload Permissions
Do the following steps to authorize a user uploading into one or more stores.
1. Connect to Coredatastore UI
- Connect to the host via ssh; make sure your ssh client has port-forwarding enabled from a local port of your choice to the exposed port of the cordatastore container.
- Lets say your local port is 5985; within your local browser open http://localhost:5985/_utils
- Login as admin.
2. Manage Permissions
User permissions are based on a) group memberships and b) acls (access control lists)
- Groups refer to 0..n users.
- ACLs
- refer to 0..n groups.
- point to 1 store.
Add Group Membership
Open the groups
database, select a group
document OR create a new one.
The structure of a group
document:
{ "_id": "sandbox.developers", "displayName": "sandbox developers", "docType": "group", "users": [ "1", "23" ] }
To add or remove a user to/from a group, simply add or remove the users name from the users
array.
Properties:
doc._id = ""
//ID of the group; provide a talking name, that describes what the group is made for
We recommend the pattern"<store>.<role>"
, because groups are the foundation for acls.
* store = the store, the group is made for.
* role = the role, the group members will have within this store.doc.displayName
//will be used within the ui (comes later )doc.users
//array of user-names (name
-property of user documents)
Manage ACLs for a store
To grant upload permissions for one or more stores, the related acl documents for each of the stores need to be existing.
Open the acls
database, select a group
document OR create a new one.
The structure of a group
document:
{ "_id": "sandbox", "displayName": "sandbox acl", "docType": "acl", "store": "sandbox", "permissions": { "sandbox.developers": { "upload": true } } }
To add or remove a group
to/from a acl
, simply add or remove the group-id from the permissions
object.
Properties:
doc._id = ""
//id of the acl document
We recommend to named it like the store, the acls points to.doc.displayName
//will be used within the ui (comes later )doc.store
//name of the store, the acls points todoc.
permissions
//object with permission (currently only 'upload' is supported)