4

I'm writing application on C# (WPF) for Windows. I need to store data for this application (in database, i think). But i need to secure this data (from modification). I'm planning to distribute this application, so filesystem protect doesn't fit for this situation. Also i wanna use NoSql database. My question is which NoSQL database support data protection and can be installed with minimum efforts as embedded with application database?

Upd: So, which is the better Single user NoSQL DB, no security, for redistributable WPF application?

mr_squall
  • 2,215
  • 22
  • 19
  • So what you want is essentially a read-only single-user database? – Philipp Sep 24 '12 at 12:24
  • 1
    "so filesystem protect doesn't fit for this situation" - but if the database is served from local files then the user is still free to change the files aren't they? They can install the client for the embedded database you're using and open, modify and replace the files with that. What exact protection are you hoping for - some level of obfuscation? Cryptographically signed data? You can probably sign data files as easy as you can a database, and in any case the user would be free to drop in their own signing keys into their copy of your app to sidestep that anyway. – Rup Sep 24 '12 at 12:27
  • I need data storage on client pc and i need that only my program can operate with this data. Before i used MySql database. I hope that users can't change data files. But i need another solution. – mr_squall Sep 24 '12 at 13:06
  • I don't think there's anything you can do to stop a determined end-user with admin access to the machine from modifying the data, sorry, even if you go back to a MySQL database. – Rup Sep 24 '12 at 14:28
  • All data stored on a user's machine is owned by that user, not by you. That is the way Windows works and you can't change it. If you want to store data only you can change, not the user, you must store it on your own machine and make it available to users via the internet or something. Switching file systems, using a database, encryption, noSql, "data protection", and so on will not change that fact. – Dour High Arch Sep 24 '12 at 18:16
  • 1
    So, which is the better Single user NoSQL DB for redistributable WPF application? – mr_squall Sep 25 '12 at 06:28
  • There is no reason to close this question. – Kieren Johnstone Sep 25 '12 at 07:36
  • "Better" how? Smallest size? Cheapest? What databases are you already using? Also, why must you use a NoSQL database" You have not told us what you are doing. – Dour High Arch Sep 25 '12 at 16:26

1 Answers1

2

When the data is on the users hard drive, there is no way to prevent the user from accessing it.

Storing it in an obscure format, like some uncommon database, wouldn't make it much harder. Even encrypting the database wouldn't be an insurmountable barrier. You need to store the decryption key somewhere inside your application where a determinded hacker will find it when searching for it long enough.

When you really want to protect your data, there is no way around storing it on your own server and let the program access it via the Internet. I would recommend to use a webservice for that.

This will, of course, mean some additional cost for you as you have to pay for the server. But you also get some additional perks for that:

  • You can give each user an own username and password. That makes it a lot harder to pirate your product (too many IPs from different networks using the same username = likely software pirates)
  • Updating your database doesn't require any deployment on the users machines
  • You can write "cloud" all over your marketing material :)
Philipp
  • 67,764
  • 9
  • 118
  • 153
  • Unfortunately in Russia many companies (our clients) doesn't have Internet =( So, maybe you can give me advice which NoSQL database i can embed in my application? – mr_squall Sep 24 '12 at 16:43
  • I meant NoSql database with no security in this case. – mr_squall Sep 24 '12 at 17:56