Securing SQL Server 2005 Anil Desai. Speaker Information Anil Desai –Independent consultant (Austin, TX) –Author of several SQL Server books –Instructor,

Slides:



Advertisements
Similar presentations
Week 6: Chapter 6 Agenda Automation of SQL Server tasks using: SQL Server Agent Scheduling Scripting Technologies.
Advertisements

Prepared by : Intesar G Ali - IT DepartmentPalestinian Land Authority 1 SQL Server 2005 Security Date :
Chapter 9 Security. Endpoints  A SQL Server endpoint is the point of entering into SQL Server.  It is implemented as a database object that defines.
Logins, Roles and Credentials Lesson 14. Skills Matrix.
SQL Server Basics for non-DBAs Anil Desai. Speaker Information Anil Desai –Independent consultant (Austin, TX) –Author of several SQL Server books –Instructor,
SQL Server Data Protection and High Availability Anil Desai.
Anil Desai SQL Saturday #35 (Dallas, TX).  Anil Desai ◦ Independent consultant (Austin, TX) ◦ Author of several SQL Server books ◦ Instructor, “Implementing.
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 4 Profiles, Password Policies, Privileges, and Roles.
Auditing Database DDL Changes with SQLVer. About PASS The PASS community encompasses everyone who uses the Microsoft SQL Server or Business Intelligence.
Brian Alderman | MCT, CEO / Founder of MicroTechPoint Pete Harris | Microsoft Senior Content Publisher.
Security in SQL Jon Holmes CIS 407 Fall Outline Surface Area Connection Strings Authenticating Permissions Data Storage Injections.
Chapter 10 Overview  Implement Microsoft Windows Authentication Mode and Mixed Mode  Assign login accounts to database user accounts and roles  Assign.
Managing and Monitoring SQL Server 2005 Shankar Pal Program Manager SQL Server, Redmond.
Mike Fal - SQL SERVER SECURITY GRANTING, CONTROLLING, AND AUDITING DATABASE ACCESS March 17, 2011.
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 3 Administration of Users.
Administration of Users Dr. Gabriel. 2 Documentation of User Administration Part of the administration process Reasons to document: –Provide a paper trail.
Introduction to SQL 2005 Security Nick Ward SQL Server Specialist Nick Ward SQL Server Specialist
Maintaining a Microsoft SQL Server 2008 Database SQLServer-Training.com.
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 3 Administration of Users.
Introduction to SQL Server 2000 Security Dave Watts CTO, Fig Leaf Software
Today’s Objectives Chapters 10 and 11 Security in SQL Server –Manage server logins and database users. –Manage server-level, database-level, and application.
Chapter 7: WORKING WITH GROUPS
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 4 Profiles, Password Policies, Privileges, and Roles.
Chapter 6 : Designing SQL Server Service-Level Security MCITP Administrator: Microsoft SQL Server 2005 Database Server Infrastructure Design Study Guide.
Course Topics Administering SQL Server 2012 Jump Start 01 | Install and Configure SQL Server04 | Manage Data 02 | Maintain Instances and Databases05 |
Security David Frommer Principal Architect Business Intelligence Microsoft Partner of the Year 2005 & 2007.
Chokchai Junchey Microsoft Product Specialist Certified Technical Training Center.
Being More Secure SQL Server 2005 Don Vilen Program Manager, SQL Server Microsoft Corporation.
MICROSOFT SQL SERVER 2005 SECURITY  Special Purpose Logins and Users  SQL Server 2005 Authentication Modes  Permissions  Roles  Managing Server Logins.
Module 4: Managing Security. Overview Implementing an Authentication Mode Assigning Login Accounts to Users and Roles Assigning Permissions to Users and.
© Wiley Inc All Rights Reserved. MCSE: Windows Server 2003 Active Directory Planning, Implementation, and Maintenance Study Guide, Second Edition.
October 1-2 Ølensvåg. AppFrame SQL – Security Session Code: SQL-201-Security Speaker(s): Jekaterina Golouchova.
Copyright © 2013 Curt Hill Database Security An Overview with some SQL.
Module 10 Assigning Server and Database Roles. Module Overview Working with Server Roles Working with Fixed Database Roles Creating User-defined Database.
1 Chapter Overview Performing Configuration Tasks Setting Up Additional Features Performing Maintenance Tasks.
Permissions Lesson 13. Skills Matrix Security Modes Maintaining data integrity involves creating users, controlling their access and limiting their ability.
Module 6: Data Protection. Overview What does Data Protection include? Protecting data from unauthorized users and authorized users who are trying to.
INTRO TO SQL SERVER SECURITY By Robert Biddle
Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.
SQL Server 2005 Implementation and Maintenance Chapter 6: Security and SQL Server 2005.
1 Chapter Overview Granting Database-Specific Permissions Using Application Roles Designing an Access and Permissions Strategy.
SQL Server Security Basics Starting with a good foundation Kenneth Fisher
Secure Data Access with SQL Server 2005 Doug Rees Associate Technologist, CM Group
Introduction to SQL Server  Working with MS SQL Server and SQL Server Management Studio.
Introduction to SQL Server for Windows Administrators Presented to WiNSUG 02/05/09 Bret Stateham Owner, Net Connex Blogs.netconnex.com.
SQL Server Security The Low Hanging Fruit. Lindsay Clark Database Administrator at American Credit Acceptance
Security, Security, Secuirty =tg= Thomas Grohser, NTT Data SQL Server MVP SQL Server Performance Engineering SQL Saturday #506 BI Edition April 30 th 2016,
SQL Server.  logins/users  roles  certificate  assymetric key 
WELCOME! SQL Server Security. Scott Gleason This is my 9 th Jacksonville SQL Saturday Over ten years DBA experience Director of Database Operations
SQL Database Management
SQL Implementation & Administration
Administrating a Database
Securing and Administering the Data
SQL Server Security & Intrusion Prevention
Microsoft SQL Server 2014 for Oracle DBAs Module 8
Chapter 5 : Designing Windows Server-Level Security Processes
A Technical Overview of Microsoft® SQL Server™ 2005 Beta 2
Access, Users, Permissions
SQL Server Security For Everyone
Common Security Mistakes
Designing Database Solutions for SQL Server
The Dirty Business of Auditing
SQL Server Security from the ground up
Bảo mật trong cơ sở dữ liệu
or: How I Learned to Stop Using EXECUTE AS and Love Certificates
Copyright © 2013 – 2018 by Curt Hill
PT2520 Unit 8: Database Security I
Administrating a Database
SQL Server Security from the ground up
We Need To Talk Security
Presentation transcript:

Securing SQL Server 2005 Anil Desai

Speaker Information Anil Desai –Independent consultant (Austin, TX) –Author of several SQL Server books –Instructor, “Implementing and Managing SQL Server 2005” (Keystone Learning) –Info: or

Agenda and Outline SQL Server Security Architecture Configuring Service Accounts Managing Logins and Server Permissions Database Users and Roles Managing Permissions Other Security Features –Encryption –DDL Triggers (Auditing) Monitoring Security with SQL Profiler

SQL Server Security Overview Layered Security Model: –Windows Level –SQL Server Level –Database Schemas (for database objects) Terminology: –Principals –Securables –Permissions Scopes and Inheritance

Security Overview (from Microsoft SQL Server 2005 Books Online)

Security Best Practices Make security a part of your standard process Use the principle of least privilege Implement defense-in-depth (layered security) Enable only required services and features Regularly review security settings Educate users about the importance of security Define security roles based on business rules

SQL Server Service Accounts Local Service Account –Permissions of “Users” group (limited) –No network authentication Network Service Account –Permissions of Users group –Network authentication with Computer account Domain User Accounts –Adds network access for cross-server functionality

SQL Server Services Instance-Specific (one service per instance) : –SQL Server –SQL Server Agent –Analysis Services –Reporting Services –Full-Text Search Instance-unaware –Notification Services –Integration Services –SQL Server Browser –SQL Server Active Directory Helper –SQL Writer

SQL Server Surface Area Configuration Default installation: Minimal services SAC for Services and Connections –Allow Remote Connections –Access to Reporting Services, SSIS, etc. SAC for Features –Remote queries –.NET CLR Integration –Database Mail –xp_cmdshell

Managing Logins Windows Logins –Authentication/Policy managed by Windows SQL Server Logins –Managed by SQL Server Based on Windows policies –Password Policy Options: HASHED (pw is already hashed) MUST_CHANGE CHECK_EXPIRATION CHECK_POLICY

Creating Logins Transact-SQL –CREATE LOGIN statement Replaces sp_AddLogin and sp_GrantLogin –SQL Server Logins –Windows Logins SQL Server Management Studio –Setting server authentication options –Login Auditing –Managing Logins

Managing Server Roles Built-In Server-Level Roles: –SysAdmin –ServerAdmin –SetupAdmin –SecurityAdmin –ProcessAdmin –DiskAdmin –DBCreator –BulkAdmin

Database Users and Roles Database Users –Logins map to database users Database Roles –Users can belong to multiple roles –Guest (does not require a user account) –dbo (Server sysadmin users) Application Roles –Used to support application code

Database Roles Built-in Database Roles: –db_accessadmin –db_BackupOperation –db_DataReader –db_DataWriter –db_DDLAdmin –db_DenyDataReader –db_DenyDataWriter –db_Owner –db_SecurityAdmin –public

Creating Database Users and Roles CREATE USER –Replaces sp_AddUser and sp_GrantDBAccess –Can specify a default schema –Managed with ALTER USER and DROP USER CREATE ROLE –Default owner is creator of the role SQL Server Management Studio –Working with Users and Roles

Understanding Database Schemas Schemas –Logical collection of related database objects –Part of full object name: Server.Database.Schema.Object –Default schema is “dbo” Managing Schemas –CREATE, ALTER, DROP SCHEMA –SQL Server Management Studio –Can assign default schemes to database users: WITH DEFAULT_SCHEMA ‘SchemaName’

Configuring Permissions Scopes of Securables –Server –Database –Schema –Objects Permission Settings: –GRANT –REVOKE –DENY Options –WITH GRANT OPTION –AS (Sets permissions using another user or role)

Managing Execution Permissions Transact-SQL Code can run under a specific execution context –By default, will execute as the caller EXECUTE AS clause: –Defined when creating an object or procedure –Options: CALLER (Default) SELF: Object creator Specified database username

Getting Security Information Procedures and Functions –sys.fn_builtin_permissions –Has_Perms_By_Name –CURRENT_USER –SETUSER –IS_MEMBER –SUSER_NAME / SUSER_ID –SCHEMA_NAME

Security Catalog Views Sys.Server_Permissions Sys.Server_Principals Sys.Database_Permissions Sys.Database_Principals Sys.Database_Role_Members

Other Security Options Encrypting Object Definitions –Use the WITH ENCRYPTION Clause –Stores the object definition in an encrypted format SQL Server Agent –Proxies based on subsystems allow lock- down by job step types Preventing SQL Injection attacks

Understanding Encryption Goals: –Authentication –Data Encryption Symmetric Encryption –Uses a single key Asymmetric Encryption –Uses a “key-pair” Public key: Can be distributed Private key: Stored securely –Certificates protect the public key

Understanding SQL Server Certificates Uses of Certificates –Data encryption –Service Broker endpoints –Digital signatures for objects –Web / HTTP connections SQL Server Certificates –Stored within user databases Notes: –Encryption overhead can be significant –Keys must be protected

SQL Server Encryption Encryption Hierarchy –Windows Level Stores Service Master Key –SQL Server Level Service Master Key –Database Master Key Certificates Asymmetric Keys –Encrypted Objects / Data (varbinary)

Encryption Hierarchy (from Microsoft SQL Server 2005 Books Online)

Managing Certificates Transact-SQL commands: –CREATE CERTIFICATE Stored within the user database Can use a password or a file –BACKUP CERTIFICATE Exports to a file –DROP CERTIFICATE Encrypting Data: –EncryptBy_____ (Cert, SymmetricKey, Passphrase, etc.) –DecryptBy_____()

Getting Certificate Information Information –Sys.Certificates –Sys.Asymmetric_Keys –Sys.Symmetric_Keys Cert_ID returns the certificate identifier CertProperty(Cert_ID, ‘PropertyName’) Start_Date, Expiry_Date, etc.

DDL Triggers Respond to Data Definition Language (DDL) commands –Examples: DROP_TABLE ALTER_TABLE CREATE_LOGIN Purpose: –Preventing certain changes –Logging / sending notifications of schema changes –Can rollback changes

DDL Triggers DDL triggers do not generate inserted/deleted tables Getting Details –EVENTDATA function returns details of the changes in XML format –Can query with XQUERY expressions DDL Trigger Scope: –Database-Level (stored within the same database) –Server-Level (stored in the master database)

Monitoring Security with SQL Profiler Options: –Log to a trace file or to a table –Run programmatically using SQL Trace SP’s “Security Auditing” Event Class –Audit Login / Audit Logoff –Audit Add DB User Event –Audit Addlogin Event

SQL Profiler: Security Auditing

For More Information Resources from Anil Desai –Web Site ( – –Keystone Learning Course: “Microsoft SQL Server 2005: Implementation and Maintenance (Exam )” –The Rational Guide to Managing Microsoft Virtual Server 2005 –The Rational Guide to Scripting Microsoft Virtual Server 2005