DBA and IT Professional for ~9 years. Currently I am a Data Architect

Slides:



Advertisements
Similar presentations
How to sign up for MyMathLab. Procedure Click on student On a new tab, go to your class page at
Advertisements

Stored procedures and views You can see definitions for stored procedures and views in the demo databases but you can’t change them. For views, expand.
Week 6: Chapter 6 Agenda Automation of SQL Server tasks using: SQL Server Agent Scheduling Scripting Technologies.
WebGoat & WebScarab “What is computer security for $1000 Alex?”
Chapter 9 Auditing Database Activities
Module 13 Automating SQL Server 2008 R2 Management.
Lecture 18 Page 1 CS 111 Online Design Principles for Secure Systems Economy Complete mediation Open design Separation of privileges Least privilege Least.
How a little code can help with support.. Chris Barba – Developer at Cimarex Energy Blog:
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 6 Virtual Private Databases.
SCORCH – Fun Recipes for RunBooks MMS Minnesota 2014 Steve Jesok & Matthew #MMSSCOrch.
Attacking Applications: SQL Injection & Buffer Overflows.
Learningcomputer.com SQL Server 2008 – Administration, Maintenance and Job Automation.
Copyright © 2013 Curt Hill Database Security An Overview with some SQL.
SQL Injection Jason Dunn. SQL Overview Structured Query Language For use with Databases Purpose is to retrieve information Main Statements Select Insert.
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 9 Auditing Database Activities.
SQL SERVER 2008 Installation Guide A Step by Step Guide Prepared by Hassan Tariq.
Chapter 6 Virtual Private Databases
ASSIGNMENT 2 Salim Malakouti. Ticketing Website  User submits tickets  Admins answer tickets or take appropriate actions.
Primenumbers.co.uk This presentation will help you get the most out of this service.
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.
Dynamic SQL Writing Efficient Queries on the Fly ED POLLACK AUTOTASK CORPORATION DATABASE OPTIMIZATION ENGINEER.
SQL Advanced Monitoring Using DMV, Extended Events and Service Broker Javier Villegas – DBA | MCP | MCTS.
17 Copyright © 2006, Oracle. All rights reserved. Information Publisher.
WELCOME! SQL Server Security. Scott Gleason This is my 9 th Jacksonville SQL Saturday Over ten years DBA experience Director of Database Operations
Justin Scheitlin Daisey Fahringer
Defense In Depth: Minimizing the Risk of SQL Injection
SQL Database Management
Building a Home Grown Auditing Infrastructure for SQL Server
# 66.
Dynamic SQL Writing Efficient Queries on the Fly
Data Virtualization Tutorial: Introduction to SQL Script
Stored Procedures.
Outsourcing Database Administration
Section 13 - Integrating with Third Party Tools
Policy Based Management: Introduction & implementation
Dynamic SQL: Writing Efficient Queries on the Fly
Access, Users, Permissions
SQL Server Security For Everyone
Developing Production Quality SQL Code
Deploying and Configuring SSIS Packages
Dynamic SQL Writing Efficient Queries on the Fly
1Z0-148 Dumps Oracle Database 12c: Advanced PL/SQL Exam Just 1 day study required to pass exam 100% Passing Assurance.
Who Has What to Which? (The Permissions Superset)
Advanced Security Protecting Data from the DBA
DevOps Database Administration
Auditing in SQL Server 2008 DBA-364-M
Limiting SQL Server Exposure
Troubleshooting Service Broker
Marcos Freccia Stop everything! Top T-SQL tricks to a developer
DevOps Database Administration
James Blankenship March , 2018
5 WAYS TO BYPASS *OR ENSURE* SQL SERVER SECURITY MATT MARTIN
Making PowerShell Useful
In Class Program: Today in History
PT2520 Unit 9: Database Security II
Dynamic SQL: Writing Efficient Queries on the Fly
SQL Server Security For Everyone
Limiting SQL Server Exposure
1. 4 BECOME A PAGE ADMINISTRATOR
DBA for ~4+years, IT Professional for 7.5 years.
Making PowerShell Useful
Intermediate Security Topics in SQL SERver
Outsourcing Database Administration
ETL process management with TSQL
Dynamic Sql Not so scary?
DIY GP Maintenance Paul Johnson.
SSRS – Thinking Outside the Report
Secure your high performance code
Presentation transcript:

About Stephen.Mokszycki@outlook.com DBA and IT Professional for ~9 years. Currently I am a Data Architect Worked with SQL 7.0/2000/2005/2008/2012/2014/2016 I have worked in a large environment: 300+ Instances, ~6000 databases, 10s TBs of data. I have worked in a small environments: 5 instances, 60 databases, 1TB of data Automation is my passion.

SQL Self Service Repeatable, Automated, and Safe Leverage SQL Saturday #588 New York, NY

Overview: Outsourcing Database Administration to your Users How do we enable self service? And why? How do we secure it? How do we build it?

Why would you want to use a self service option? The little things are interruptive to the DBA(s). Empower the users safely, reducing time for both parties. DBAs have More time for the hard problems. Reduce administrative errors. And LESS WORK!

Securing Self Service : Controlled Access and Security Elevation (C. A Securing Self Service : Controlled Access and Security Elevation (C.A.S.E.) In order to create a self service option we have to grant people access. There are two ways to do this, the unsafe way and the safe way. Taking advantage of temporary security elevation is the key idea. Talk about TRUSTWORTHY and

How it normally works DBA Does Everything User Needs Something User Submits a ticket User pings DBA DBA pauses, reviews request DBA request more info User sends more details DBA reviews again DBA executes DBA follows up with user User confirms DBA Does Everything

The Two Options to Self Service Give the Helpdesk direct access aka SA Give Helpdesk Self Service via Controls HelpDesk Has Elevated Access HD tries to drop Login DBA has no clue Wrong Login is dropped! Business is down! DBA scrambles to figure out what happened. DBA URLT HelpDesk executes proc Tries to drop Login Action is blocked Action is logged DBA notified Business is safe. User URLT

How to secure it Make it SAFE Using role based permissions Passing parameters safely with QuoteName() and injection checks Executing procedures as OWNER Using existing tool sets: SQL and powershell. Using something scary: TRUSTWORTHY Database.

A Trustworthy Database Is Dangerous Trustworthy lets the dbo do anything he can normally do outside of the database. Because of this we have to be careful with what we allow our users can do. We have to leverage Stored Procs and Role based permissions. We have to have safe repeatable code, with repeatable outcomes. Remember the goal: give the users some access into the admin world without compromising the integrity of our Server.

How to Build a little leverage with SQL! Things you can use: A database, where users can ONLY execute a limited set of objects. TRUSTWORTHY and “sa” as the owner. An audit and SQL Injection Check ORIGINAL_LOGIN() EXECUTE AS OWNER QUOTENAME() A Separate Schema and Role

Auditing, and Verification Auditing is hard when our sprocs are executed as owner….. ORIGINAL_LOGIN() Verify with IS_Member(), this may be overkill. But it helps! LOG EVERYTHING! All Variables used Sproc name Who did it Date and Time Logs can drive alerts!

SQL INJECTION! Watch out for the clever ones! Encapsulate your string inputs with QUOTENAME() LOG LOG LOG! Evidence may be necessary. You need to know what happened.

Demo Audit, Verify, and Injection

Expanding from here Increase your injection checks Add additional safety checks Add more to the log function and log tables. Raise eventlog errors Dump the users output somewhere, incase you need it later. Don’t copy paste, make a sproc or a function! Reusable code! Never write it twice!