

- Principle of least privilege in management password#
- Principle of least privilege in management series#
- Principle of least privilege in management windows#
The minimal permission to change tables/add new columns is the ALTER-permission on each individual table (it cannot be done on schema-level). (For example, for logging purposes, you need to include the timestamp of any new row.) Say you want to allow a developer to add a set of new columns to the existing tables. (This is a great example of Separation of Duties btw.) This is where a separation of the authenticating system from SQL Server has a real advantage.
Principle of least privilege in management windows#
This would not work if the Account were a Windows Domain or Azure Active Directory account. This can be an unwanted scenario as this would enable this person to essentially take over other accounts.
Principle of least privilege in management password#
Ok, so now this person can create new Logins, and maybe also Dropping them is ok.īut: With this permission comes the ability to change the password of any SQL Login (“ALTER LOGIN … WITH PASSWORD='NewPassword'). The minimal permission available is ALTER ANY LOGIN. You want to delegate the ability to create new Logins in SQL Server. Unfortunately, not everything is implemented to always ensure POLP. That was easy, wasn’t it? Example 2, creating user accounts As long as this schema really contains only objects that Shakti needs access to, this is a best practice as it greatly reduces the management and reporting overhead compared to granting permissions at the object-level.Īn alternative is to use stored procedures for all data access, which would allow even better control and completely hide the schema from Users. Instead of granting Select in the whole database, we chose to grant the user Shakti the permission at the schema scope. In the code-snippet below we see that there are many tables in different schemas (Application, Purchasing, Sales) within the database WideWorldImporters. There is no need to grant SELECT at the whole database, or to grant anything other than SELECT. Let’s look at some examples within the SQL Server engine (applying to on-prem as well as our Azure SQL-products): Example 1, read-access to dataĪ typical example within SQL Server would be: To allow a User to only read data from a small set of tables, ideally defined by a schema-boundary, we have the SELECT-Permission, grantable at the schema- (or even table-) level. Principle of Least Privilege in the SQL realm

Lateral movement is a common attack strategy to move from one target to the next: If the main target (for example the database server) cannot be breached into directly, attackers try to gain foothold in some other server in the system within the same network and then launch other attacks to try to get to the final goal, server by server or service by service. You see how one thing is connected to another in Security? Service account isolation also prevents lateral movement between services if an attacker gained access to one service. Read more on this topic here: SQL Server security - SQL Server | Microsoft DocsĪnd here: Surface Area Configuration - SQL Server | Microsoft Docs This would violate the principle of least privilege.īoth POLP and service account isolation help reducing the attack surface (aka attack surface reduction).

This security best practice is generally referred to as service account isolation and is related to POLP: Using distinct service accounts prevents increased privileges, which happens easily when you share an account to be used for multiple purposes and as a consequence, the privileges are merged. You may also know that Microsoft recommends separating service accounts. User Account Control (UAC) in Windows is a feature that Microsoft developed to assist administrators in working with least-privileges by default and elevate to higher permission only when needed. When developing an application, using a least-privileged user account (LUA) is the first rule of engagement. POLP is so crucial because initially it is the privileges that any attacker is targeting. When permissions are granted, we shall grant the least privileges possible. It demands that the required permissions for a task shall only grant access to the needed information or resources that a task requires. The first security principle that I am going to discuss is one that most System Administrators are familiar with: the “principle of least privilege” (short: POLP).

Principle of least privilege in management series#
(part 1 of my series of articles on security principles in Microsoft SQL Servers & Databases )
