MS SQL-SERVER 2016
I am currently using row level security on a database that has restrictions based on user name. This security protects rows on a table that stores application level settings - i.e. if you have bought it you can see it, if you are head office you can see everything.
The problem I have is that if you log in as SA, a simple "EXECUTE AS USER" call allows impersonation of the head office account. Is there any way to block SA from impersonating a particular user? Even if its password protected or similar.
REVOKE IMPERSONATE ON USER:: HeadOffice TO SA
Will not work. Since our clients host the SQL themselves they will always have the SA log in details, and anyone with a copy of SSMS and a bit of know how can work around the security quite easily. Either by impersonation or even just switching the security policy off.
I think the fact that clients will have SA access makes this idea a non-starter but would love to hear any suggestions that anyone has for security work arounds.
Many thanks.