May 17, 2011 SQL SERVER SECURITY GRANTING, CONTROLLING, AND AUDITING DATABASE ACCESS. Mike Fal - www.mikefal.net



Similar documents

MAGIC THipPro - SQL Server Installation - using the example of

Microsoft SQL Server Security & Auditing. March 23, 2011 ISACA Chapter Meeting

Minimizing the use of sa in Microsoft Dynamics GP. Copyright Fastpath, Inc. 2011

mylittleadmin for MS SQL Server Quick Start Guide

Feature. Auditing SQL Server Databases Using CAATs

Microsoft SQL Server Security Best Practices

Video Administration Backup and Restore Procedures

IMPORTANT: The person who installs and sets up the PCS Axis database on the central database server

Violating The Corporate Database. Presented by Dan Cornforth Brightstar, IT Security Summit, April 2006

Setup and configuration for Intelicode. SQL Server Express

FaxCore 2007 Application-Database Backup & Restore Guide :: Microsoft SQL 2005 Edition

Avatier Identity Management Suite

DATABASE ADMINISTRATION SQL SERVER STANDARDS

SQL Server Crib Sheet Compendium

Safexpert Installation instructions MS SQL Server 2008 R2

In this topic we will cover the security functionality provided with SAP Business One.

Upgrade Guide BES12. Version 12.1

FaxCore 2007 Database Migration Guide :: Microsoft SQL 2008 Edition

Separation of Duties in SQL Server 2014

MICROSOFT EXAM QUESTIONS & ANSWERS

1 of 10 1/31/2014 4:08 PM

Symantec Enterprise Security Manager Modules for Microsoft SQL Server Databases User s Guide and Reference

SQL Server Hardening

FaxCore Ev5 Database Migration Guide :: Microsoft SQL 2008 Edition

Cisco Process Orchestrator Installation Guide

3 Setting up Databases on a Microsoft SQL 7.0 Server

Version 14.5 Inmagic DB/Text for SQL Administrator s Guide [12/09/13]

WhatsUp Gold v16.1 Installation and Configuration Guide

Training module 2 Installing VMware View

4cast Server Specification and Installation

Table of Contents SQL Server Option

NTP Software VFM Administration Web Site for Azure

Version Inmagic DB/Text for SQL Administrator s Guide

Installation & Configuration Guide

Achieving PCI COMPLIANCE with the 2020 Audit & Control Suite.

mylittlebackup for SQL Server 2000, 2005 & 2008 Installation Guide

An Esri White Paper February 2011 Best Practices for Storing the ArcGIS Data Reviewer Workspace in an Enterprise Geodatabase for SQL Server

NNT CIS Microsoft SQL Server 2008R2 Database Engine Level 1 Benchmark Report 0514a

risk advisory TAX Finance & Accounting Dave Elliott, CIPP/G/C, CISSP, CISA Chip Zodrow Paul Rozek, CGEIT

Manage Your Shop with Policy Based Management & Central Management Server

Version 4.61 or Later. Copyright 2013 Interactive Financial Solutions, Inc. All Rights Reserved. ProviderPro Network Administration Guide.

Moving a Romexis Database to an Existing SQL Instance

INSTRUCTION MANUAL AND REFERENCE FOR IT DEPARTMENTS

Implementing Microsoft SQL Server 2008 Exercise Guide. Database by Design

Notes Transfer instructions INTRODUCTION More information

AVALANCHE MC 5.3 AND DATABASE MANAGEMENT SYSTEMS

WhatsUp Gold v16.2 Installation and Configuration Guide

MS SQL Server Database Management

Microsoft Corporation. Project Server 2010 Installation Guide

ADO and SQL Server Security

RSA Security Analytics

1. SQL Monitor 2 documentation About SQL Monitor Requirements Supported platforms and hardware guidelines

General DBA Best Practices

Windows NT Server Operating System Security Features Carol A. Siegel Payoff

SQL Server Hardening

Supporting HIPAA Compliance with Microsoft SQL Server 2008

Getting to Know the SQL Server Management Studio

The Real MCTS SQL Server 2008 Exam 432

SQL Backup and Restore using CDP

HP Device Manager 4.7

Microsoft Dynamics AX 2012 Installation Guide. Microsoft Corporation Published: April 2011 This content is preliminary and is subject to change.

SHARING FILE SYSTEM RESOURCES

Dell InTrust Preparing for Auditing Microsoft SQL Server

Tool Tip. SyAM Management Utilities and Non-Admin Domain Users

Exploring Organizational Security and Auditing

Portal User Guide. Customers. Version 1.1. May of 5

Violating Database - Enforced Security Mechanisms

Division of IT Security Best Practices for Database Management Systems

Summary This article contains information about an installation of EdgeSight 5.4 Web Server using SQL 2008 R2 (DB and RS) in a lab environment.

STEALTHbits Technologies, Inc. StealthAUDIT v5.1 System Requirements and Installation Notes

Approved SCOM Health Check Report Installation Guide

WhatsUp Gold v16.3 Installation and Configuration Guide

TSM for Windows Installation Instructions: Download the latest TSM Client Using the following link:

SpectraPro. SLQ Server databases

Table of Contents. CHAPTER 1 About This Guide CHAPTER 2 Introduction CHAPTER 3 Database Backup and Restoration... 15

1. SQL Monitor 3 documentation About SQL Monitor Quick start guide Requirements Supported platforms and

DBMoto 6.5 Setup Guide for SQL Server Transactional Replications

GUIDE TO SYBASE SECURITY

DocAve 6 High Availability

Using Delphix Server with Microsoft SQL Server (BETA)

Moving Components of an Amicus Premium Installation

WhatsUp Gold v16.2 Database Migration and Management Guide

IT Infrastructure Preparation for StruxureWare Power Monitoring Expert 8.0 Installation

Security and Azure SQL Database

Setting Up ALERE with Client/Server Data

Moving the TRITON Reporting Databases

Author: Ryan J Adams. Overview. Policy Based Management. Terminology

Pre-Installation Guide

SQL SERVER Anti-Forensics. Cesar Cerrudo

SteelEye Protection Suite for Windows Microsoft SQL Server Recovery Kit. Administration Guide

Polar Help Desk Installation Guide

SOLAARsecurity. Administrator Software Manual Issue 2

Transcription:

May 17, 2011 SQL SERVER SECURITY GRANTING, CONTROLLING, AND AUDITING DATABASE ACCESS

Mike Fal Working with SQL Server since MSSQL 7. Currently supporting 100+ servers with varying requirements. Blog www.mikefal.net Twitter - @Mike_Fal SpeakerRate - http://speakerrate.com/speakers/15287-mikefal

The importance of security Primary goal Protecting the data! Security Tools that control access to the data. Risk Can someone gain unauthorized access? How likely is it?

Scope How do we manage access? Grant/Revoke/Deny Authentication types Server roles Database roles How can we audit login access? Views Queries

Getting Access How do we control database logins?

Logins and Users Access is managed on two levels Logins Access to the server Users Access to a database

Authentication Types Windows pass-through Uses Active Directory accounts Passwords controlled by domain policy Direct Database Login Accounts used only by SQL Server. Passwords controlled by local computer policy Can override policy and expiration enforcement

Editing Password Policies Local Policy Editor Administrative tools -> Local Security Policy

Creating a Login Use the GUI: Security->Users->Right Click, New Login T-SQL: CREATE LOGIN <login name> FROM WINDOWS CREATE LOGIN <login name> WITH PASSWORD <password>

Creating a user Use the GUI: Security->Users->Right Click, New User T-SQL: CREATE USER <user name> FROM LOGIN <login name>

Query Logins Use sys.server_principals and sys.sql_logins views select sp.name, sp.type_desc, sp.default_database_name, sl.is_policy_checked, sl.is_expiration_checked from sys.server_principals sp left join sys.sql_logins sl on (sp.principal_id = sl.principal_id) where sp.type not in ('R','C') order by name

Controlling Access How do you stop the monkey business?

Best Practices Understand your business needs. Keep access as restrictive as possible.

Access Levels Server Level Start/stop services Grant access Create databases Perform bulk operations Database Level Query and modify data Create objects

Explicit Permissions Assumption is no access unless granted GRANT give user privileges on an object Does not override implicit denied permissions Examples: grant select on customers to test grant insert on orders to test grant delete,update on customers to test

Explicit Permissions DENY remove user privileges on an object Overrides any implicit permission grants Examples: deny select on customers to test deny insert on orders to test deny delete,update on customers to test

Explicit Permissions REVOKE resets user privileges on an object In other words, removes explicit grant or deny Examples: revoke select on customers to test revoke insert on orders to test revoke delete,update on customers to test

Permission Types Many different permissions to use: SELECT, INSERT, UPDATE, DELETE Tables EXECUTE, VIEW DEFINITION Stored Procedures ALTER, DROP Objects (tables, databases, etc) Roles provide a way to better manage permissions.

Server Roles SYSADMIN Perform any action on the server. SECURITYADMIN Manage server level permissions. SERVERADMIN Manage server configurations and start/stop services. PROCESSADMIN Kill processes running on the instance. SETUPADMIN Add/remove linked servers. BULKADMIN Able to run BULK INSERT and execute bulk operations. DISKADMIN Manage server disk files. DBCREATOR Create, alter, drop, and restore databases. PUBLIC Generic role that all users are a member of. http://msdn.microsoft.com/en-us/library/ms188659.aspx

Server Roles Access can be granted via individual GRANTs or roles. SYSADMIN and SECURITYADMIN are the critical server roles. SQL Denali allows you to make custom server roles. Add logins to roles either by GUI or sp_addsrvrolemember select r.name [Server Role], u.name [Login], u.type_desc [User Type] from (select name,principal_id from sys.server_principals where type = 'R') r join sys.server_role_members rm on (r.principal_id = rm.role_principal_id) join (select name,type_desc,principal_id from sys.server_principals where type!= 'R') u on (rm.member_principal_id = u.principal_id)

Database Roles DB_OWNER - Perform all activities on the database. DB_SECURITYADMIN Manages role membership and permissions on the database. DB_ACCESSADMIN Manages login access to the database. DB_BACKUPOPERATOR Can backup the database. DB_DDLADMIN Able to run any DDL command. DB_DATAWRITER Able to modify data in all user tables. DB_DATAREADER Able to read data in all user tables. DB_DENYDATAWRITER Denied the ability to modify data in all user tables. DB_DENYDATAREADER Denied the ability to modify data in all user tables.

Database Roles Access can be granted via individual GRANTs or roles. Custom roles can be created within a database. Add users to roles using GUI or sp_addrolemember. select r.name role_name, u.name db_login, u.type_desc from (select name,principal_id from sys.database_principals where type = 'R') r join sys.database_role_members rm on (r.principal_id = rm.role_principal_id) join (select name,type_desc,principal_id from sys.database_principals where type!= 'R') u on (rm.member_principal_id = u.principal_id )

Auditing Monitoring user access

General Practices Create some basic reports Excel or Reporting Services. Watch out for escalating permissions (DBO and SA versus other roles). Nested permissions: AD groups and changing members xp_logininfo

Auditing Role Access Server and Database Role queries. sys.server_principals and sys.server_role_members for Server Roles sys.database_principals and sys. database_role_members for Database Roles

Auditing Specific Access sys.database_permissions to show individual object grants select pr.name, pe.type, o.name, o.type_desc, pe.permission_name, state_desc from sys.database_principals pr join sys.database_permissions pe on (pr.principal_id = pe.grantee_principal_id) join sys.objects o on (pe.major_id = o.object_id) where pe.state in ('W','G') and o.type = 'U' order by pr.name

Summary Types of authentication Windows pass through and Direct Database Login. Roles Tools to manage access Auditing Perform regular reviews of your security

Questions HUH? www.mikefal.net @Mike_Fal http://speakerrate.com/speakers/15287-mike-fal