Lesson 1: Overview of SQL Server Security
What Are Principals?
Level | Principals |
Windows | Windows local user account
Windows domain user account
Windows group |
SQL | SQL Server login
SQL Server role |
Database | Database user
Database role
Application role |
What Are Securables?
The Server Scope
Logins
Endpoints
Databases
The Database Scope
Users
Roles
Application roles
Certificates
Symmetric keys
Asymmetric keys
Assemblies
Full-text catalogs
DDL events
Schemas
The Schema Scope
Tables
Views
Functions
Procedures
Types
Synonyms
Aggregates
SQL Server 2005 Permissions
Permissions are the rules that govern the level of access that principals havt to securables. You can grant, revoke, or deny access over SQL Server securables to SQL Server principal.
Lesson 2: Protecting the Server Scope
What Are SQL Server Authentication Modes?
How Password Policies Work
How to Manage SQL Server Logins
CREATE LOGIN login_name
{ WITH SQL_login_optioins
| FROM WINDOWS [ WITH
windows_login_options ] }
What Are Fixed Server Roles?
Role | Description |
sysadmin | Perform any activity |
dbcreator | Create and alter databases |
diskadmin | Manage disk files |
serveradmin | Configure server-wide settings |
securityadmin | Manage and audit server logins |
processadmin | Manage SQL Server processes |
bulkadmin | Run the BULK INSERT statement |
setupadmin | Configure replication and linked servers |
Requirements for Delegation
Whar Are Credentials?
Alternative representations of logins
Enable users connecting to SQL to connect to resources outside SQL Server
Usually consist of Windows user name and password
Creating a Credential
CREATE CREDENTIAL credential_name WITH IDENTITY = 'identity_name' [ , SECRET = 'secret' ]
Server-Scope Permissions
Server permissions
USE master
GRANT ALTER ANY DATABASE
TO [ADVENTUREWORKS\Holly]
Server scope securable permissions
USE master
GRANT ALTER
ON LOGIN :: AWWebApp
TO [ADVENTUREWORKS\Holly]
Lesson 3: Protecting the Database Scope
How to Manage Users
Provide access to individual databases
Can map to an individual user login or a Windows group login
Created using SQL Server Management Studio or CREATE USER statement
Special Users
dbo user
Exists in all databases by default
Members of sysadmin role and the sa login
Any object a member of sysadmin creates automatically belongs to dbo
Cannot be deleted
guest user
What Are Database Roles?
What Are Application Roles?
Application is associated with an application role
Alternative security context for a user only exists while the application is active
Create using SQL Server Management Studio or the CREATE APPLICATION ROLE statement
Database-Scope Permissions
Database permissions
USE AdventureWorks
GRANT ALTER ANY USER
TO HRManager
Database-scope securable permissions
USE AdventureWorks
GRANT SELECt
ON SCHEMA :: Sales
TO Salesuser
Schema-Scope Permissions
User-defined type permissions
USE AdventureWorks
GRANT EXECUTE
ON TYPE :: Person.addressType
TO SalesUser
All other schema-scope permissions
USE AdventureWorks
GRANT SELECT
ON Sales.Order
TO SalesUser
Lesson 4: Managing Keys and Certificates
What Are Keys?
What Are Certificates?
SQL Server Cryptography Architecture
Service master key - Database master key +- Asymmetric key - Symmetric key
|
+- Certificate
When to Use Keys and Certificates