sam
sam

Reputation: 10074

Encrypt mysql database so not even system admin can access data

Im looking for a way to encrypt a mysql DB so that only a logged in user can access their data, any other user will not be able to access the data, even if they are the system admin and are able to download the .sql file and browse it locally.

Is there a way to implement this ?

Background / Why I would want to do this - Someone was talking to me the other day about creating a web application for use in their industry, they wanted to produce the web app, use it in house, but also offer it to other companies in their industry as a SaaS platform, as a point of trust they wanted to setup their DB so that they could not access the data of what would be their users (which may also happen to be their competitors)

Upvotes: 1

Views: 209

Answers (1)

Rob_M
Rob_M

Reputation: 185

If each user/account holder has to provide a cryptographic key at login, which is stored in the session (not the database) then all their data could be encrypted (hashed) so that anyone with admin access would look at the tables and not see data.

There's no way to guarantee that the administrator, already having database access, couldn't get webserver access and intercept the key, however.

Upvotes: 1

Related Questions