3

I have a unique request from my boss. I'm the only software developer for my company, so I'm doing everything from the initial design to the database design. I regularly design and maintain the databases and the same with the front end. We do not have a Database Administrator. My unique request is to deny myself from seeing a single column (I'm designing and developing a payroll application) and that column is their pay rate and total pay of the paycheck. I know many companies have DBA's that will cut out that data or put false data in those columns when needed on the development server. I'm able to do everything the DBA should be able to do, besides deny myself access to those columns. I don't think it can be done. I have tried denying myself access to those columns in SQL but then I couldn't query anything within my applications. Does anyone have any suggestions on how to solve this issue? I have researched but I've come up empty besides the column solution. Thanks.

Humpy
  • 2,004
  • 2
  • 22
  • 45
  • 3
    Somebody has to hold the keys to the kingdom. So make your boss the "sa", and he can create accounts/give access. And run upgrade scripts on production. – granadaCoder Mar 03 '14 at 13:57
  • Yep, I have also thought about that too. He's always traveling to other locations and is rarely in the office. But this may be the only solution. Thanks for the suggestion. – Humpy Mar 03 '14 at 13:59
  • Always a good condition, don't trust your admins and developers. Your boss is also doing the daily backups, because bachup needs read all rights? And of curse, backup-files must be stored unter boss's pillow. – coding Bott Mar 03 '14 at 14:17
  • Currently, I'm doing everything with the databases. I'm doing all the back-up's and everything. – Humpy Mar 03 '14 at 14:40

2 Answers2

0

you could use multiple database accounts :
- Your account without acces to these columns
- Another account for your application with the right to access the columns

Gilles V.
  • 1,412
  • 13
  • 20
  • I thought of that, but they don't want me to see the data within those columns at all. Right now, I would import the data and I'd be able to see all of the data. So I could see how much our staff makes. They want me to stop myself from seeing just that information. It's a pretty unique situation. I'm leading towards just signing a form from HR saying I won't tell the world how much our employees make. – Humpy Mar 03 '14 at 13:55
0

Encryption is really your only recourse here. The easiest would be to encrypt/decrypt the data on the client. If that's not an option, take a look at the various T-SQL encryption options (e.g. DECRYPTBYKEY, DECRYPTBYASYMKEY, etc). Either way, get the key out of your control so they can't even say "but you could restore a backup to your own server and change the permissions".

Ben Thul
  • 31,080
  • 4
  • 45
  • 68