Managing Security
Managing Security
Managing Security
Overview
Securables
Permissions
Principals
Windows Group
Domain User Account
Windows Local User Account
User
Database Role
Database Application Role
What Are Securables?
Securables
Permissions
Principals
Windows Group
Domain User Account Files
Local User Account Registry Keys
Windows
User Schema
Database Role
Database Application Role
SQL Server 2005 Permissions
Securables
Permissions
Principals
Windows Group
Domain User Account ACL Files
Local User Account Registry Keys
Windows
GRANT/REVOKE/DENY
CREATE
SQL Server Login ALTER
Server
DROP
Server Role CONTROL
SQL Server CONNECT
SELECT Database
EXECUTE
UPDATE
User DELETE Schema
INSERT
Database Role TAKE OWNERSHIP
Database Application Role VIEW DEFINITION
BACKUP
Lesson 2: Protecting the Server Scope
Pa$$w0rd
Role Description
sysadmin Perform any activity
dbcreator Create and alter databases
diskadmin Manage disk files
serveradmin Configure server-wide settings
Server permissions
USE master
GRANT ALTER ANY DATABASE
TO [ADVENTUREWORKS\Holly]
USE master
GRANT ALTER
ON LOGIN :: AWWebApp
TO [ADVENTUREWORKS\Holly]
Practice: Managing Logins
dbo user
Exists in all databases by default
Members of sysadmin role and the sa login account
are mapped to dbo
Any object a member of sysadmin creates
automatically belongs to dbo
Cannot be deleted
guest user
Exists in all databases by default
Disabled by default
Allows logins with no user account to access
the database
What Are Database Roles?
Database permissions
USE AdventureWorks
GRANT ALTER ANY USER
TO HRManager
USE AdventureWorks
GRANT SELECT
ON SCHEMA :: Sales
TO SalesUser
Schema-Scope Permissions
USE AdventureWorks
GRANT EXECUTE
ON TYPE :: Person.addressType
TO SalesUser
USE AdventureWorks
GRANT SELECT
ON Sales.Order
TO SalesUser
Practice: Managing Users
Encrypt Decrypt
Symmetric
Same key used to encrypt and decrypt
Asymmetric
Pair of values: public key and private key
One encrypts, the other decrypts
What Are Certificates?
Asymmetric Certificate
key
Symmetric key
When to Use Keys and Certificates
Data encryption
Code module signing
Impersonation context
Inter-server authentication
Demonstration: Using Certificates