Managing KVDBs
At their core, KVDBs provide a secure way for assigned members to exchange encrypted entries.
- KVDBs allow users to access key-value databases.
- Each Context can contain any number of KVDBs with a unique identifier (
kvdbId
) used to distinguish them. - KVDBs do not need to have unique names or assigned public keys.
Permissions
KVDBs differentiate two types of users - Managers and Regular Users. The table below shows the differences in their permissions:
Activity | User | Manager |
---|---|---|
Sending entries | yes | yes |
Editing KVDB | no | yes |
Deleting entries | only their own | all entries |
The values above are the default policy values defined by PrivMX. To read more about Policies and learn how to modify them, go to Policies.
Initial Assumptions
The initial assumptions for all the code examples below are as follows:
Creating KVDBs
To create a KVDB, you need a name and a list of public key - userID pairs. Due to the fact that each KVDB is inside a Context, all the public keys have to be registered inside the given Context. You can do it using PrivMX Bridge API.
After creating a KVDB, all the users with management rights will be able to edit the KVDB.
Below you can see some examples of creating KVDBs that function as a database feature in your application, with access management capabilities.
Three additional options are available when changing the list of users inside a KVDB:
force
- applies an update, without checking the current version;generateNewKey
- generate new symmetric encryption key for KVDB. It's useful when a user is removed and you want to prevent them from accessing any new data in the KVDB.
We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.