-
Notifications
You must be signed in to change notification settings - Fork 5
Postgresql Datastores
Etienne Dublé edited this page Sep 29, 2017
·
4 revisions
This page describes how a postgresql datastore attached to a daemon (i.e. referenced in the daemon's configuration file) is managed in Sakura.
The code of the postgresql db driver and the hub code saving metadata in the central db follow these principles.
For security reasons, users and rights are configured right into the postgresql service.
A sakura user with login <user>
is mapped to a postgresql user sakura_<user>
.
User rights are implemented as follows:
User right | Implementation |
---|---|
datastore read access (i.e. connect there) |
sakura_<user> exists |
datastore write access (i.e. create databases there) |
sakura_<user> has CREATEDB grant |
database read access |
sakura_<user> has CONNECT privilege on this database |
database write access |
sakura_<user> has CREATE grant on this database |
database ownership |
sakura_<user> is OWNER of this database |
Metadata not involved in data processing is stored in the Hub's central database.
metadata type | Implementation | Default value |
---|---|---|
database name | centraldb.Database.name field | postgresql db name |
database short description | centraldb.Database.short_desc field | none |
database creation date | centraldb.Database.created field | none |
database tags | centraldb.DatabaseTags table | none |
database contacts | centraldb.DatabaseContacts table | The database owner |
metadata type | Implementation | Default value |
---|---|---|
table name | centraldb.DBTable.name field | postgresql table name |
table short description | centraldb.DBTable.short_desc field | none |
table creation date | centraldb.DBTable.created field | none |
metadata type | Implementation | Default value |
---|---|---|
column tags | centraldb.DBColumnTags table | none |