readonly-users

Readonly users for DB

As of now, datafi only support read operations to datasources like SQL, NoSQL dbs. As a best practice to improve security, we would advice you to create a new user to your DB with read-only access to connect to datafi. Some of the sample options are given bellow, If you need help with creating a read-only user for your DB please reachout to us at [email protected] .

Add read-only user in postgress

CREATE USER youruser WITH ENCRYPTED PASSWORD 'yourpass';
GRANT SELECT ON ALL TABLES IN SCHEMA public TO youruser;

Add read-only user in MySQL

USE master
CREATE LOGIN datafi WITH PASSWORD='$password' --password has to be complex (letters, numbers, signs)
USE $database
CREATE USER datafi FOR LOGIN datafi
ALTER USER datafi WITH DEFAULT_SCHEMA=db_datareader
EXEC sp_addrolemember N'db_datareader', N'datafi'
EXEC sp_addrolemember N'db_ddladmin', N'datafi'
GRANT SELECT ON sys.database_files TO datafi