Database Application Security Models

Slides:



Advertisements
Similar presentations
Chapter 23 Database Security and Authorization Copyright © 2004 Pearson Education, Inc.
Advertisements

Management Information Systems, Sixth Edition
Database Management System
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 5 Database Application Security Models.
Database Management: Getting Data Together Chapter 14.
System Administration Accounts privileges, users and roles
Chapter 4: Database Management. Databases Before the Use of Computers Data kept in books, ledgers, card files, folders, and file cabinets Long response.
Chapter 5 Database Application Security Models
CSC 2720 Building Web Applications Database and SQL.
View n A single table derived from other tables which can be a base table or previously defined views n Virtual table: doesn’t exist physically n Limitation.
Introduction to Web Applications Instructor: Enoch E. Damson.
Lecture 7 Access Control
Chapter 10 Overview  Implement Microsoft Windows Authentication Mode and Mixed Mode  Assign login accounts to database user accounts and roles  Assign.
DAT702.  Standard Query Language  Ability to access and manipulate databases ◦ Retrieve data ◦ Insert, delete, update records ◦ Create and set permissions.
Security Architecture Dr. Gabriel. Security Database security: –degree to which data is fully protected from tampering or unauthorized acts –Full understanding.
Introduction To Databases IDIA 618 Fall 2014 Bridget M. Blodgett.
ISOM MIS3150 Data and Info Mgmt Database Security Arijit Sengupta.
Session 5: Working with MySQL iNET Academy Open Source Web Development.
CST221: Database Systems Dr. Zhen Jiang Computer Science Department West Chester University West Chester, PA
PHP Programming with MySQL Slide 8-1 CHAPTER 8 Working with Databases and MySQL.
1 Advanced Database Course (ESED5204) Eng. Hanan Alyazji University of Palestine Software Engineering Department.
Database Technical Session By: Prof. Adarsh Patel.
Virtual Private Databases Dr. Gabriel. 2 Overview of Virtual Private Databases A VPD deals with data access VPD controls data access at the row or column.
2. Database System Concepts and Architecture
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
Web Design and Development for E-Business By Jensen J. Zhao Copyright 2003 Prentice Hall, Inc. Web Design and Development for E-Business Jensen J. Zhao.
Database Application Security Models Database Application Security Models 1.
CHAPTER 8: MANAGING DATA RESOURCES. File Organization Terms Field: group of characters that represent something Record: group of related fields File:
Chapter 7 Working with Databases and MySQL PHP Programming with MySQL 2 nd Edition.
SEC835 Practical aspects of security implementation Part 1.
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.
MICROSOFT SQL SERVER 2005 SECURITY  Special Purpose Logins and Users  SQL Server 2005 Authentication Modes  Permissions  Roles  Managing Server Logins.
Computer Security: Principles and Practice
NMED 3850 A Advanced Online Design January 12, 2010 V. Mahadevan.
Module 4: Managing Security. Overview Implementing an Authentication Mode Assigning Login Accounts to Users and Roles Assigning Permissions to Users and.
Module 11: Programming Across Multiple Servers. Overview Introducing Distributed Queries Setting Up a Linked Server Environment Working with Linked Servers.
First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown Chapter 5 – Database Security.
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.
PS Security By Deviprasad. Agenda Components of PS Security Security Model User Profiles Roles Permission List. Dynamic Roles Static Roles Building Roles/Rules.
6.1 © 2010 by Prentice Hall 6 Chapter Foundations of Business Intelligence: Databases and Information Management.
Dale Roberts 1 Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
CSCI 3140 Module 6 – Database Security Theodore Chiasson Dalhousie University.
Module 3 Designing and Implementing Tables. Module Overview Designing Tables Working with Schemas Creating and Altering Tables.
GOAL User Interactive Web Interface Update Pages by Club Officers Two Level of Authentication.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 16 Using Relational Databases.
Database Security. Multi-user database systems like Oracle include security to control how the database is accessed and used for example security Mechanisms:
Database Management Supplement 1. 2 I. The Hierarchy of Data Database File (Entity, Table) Record (info for a specific entity, Row) Field (Attribute,
Module 6: Data Protection. Overview What does Data Protection include? Protecting data from unauthorized users and authorized users who are trying to.
Chapter 5 : Integrity And Security  Domain Constraints  Referential Integrity  Security  Triggers  Authorization  Authorization in SQL  Views 
Privilege Management Chapter 22.
Chapter 13Introduction to Oracle9i: SQL1 Chapter 13 User Creation and Management.
CP476 Internet Computing Perl CGI and MySql 1 Relational Databases –A database is a collection of data organized to allow relatively easy access for retrievals,
Computer Security: Principles and Practice
Oracle 11g: SQL Chapter 7 User Creation and Management.
Dr. Chen, Oracle Database System (Oracle) 1 Chapter 7 User Creation and Management Jason C. H. Chen, Ph.D. Professor of MIS School of Business Gonzaga.
Introduction to MySQL  Working with MySQL and MySQL Workbench.
Database Security. Introduction to Database Security Issues (1) Threats to databases Loss of integrity Loss of availability Loss of confidentiality To.
LECTURE TWO Introduction to Databases: Data models Relational database concepts Introduction to DDL & DML.
Management Information Systems by Prof. Park Kyung-Hye Chapter 7 (8th Week) Databases and Data Warehouses 07.
Getting started with Accurately Storing Data
Database System Implementation CSE 507
Client/Server Databases and the Oracle 10g Relational Database
Chapter 2 Database System Concepts and Architecture
Server Concepts Dr. Charles W. Kann.
Designing Database Solutions for SQL Server
Chapter 8 Working with Databases and MySQL
Copyright © 2013 – 2018 by Curt Hill
Presentation transcript:

Database Application Security Models Dr. Gabriel

Definitions Application: Solves a problem Performs a specific business function Database: collection of related data files used by an application Application user: user within the application schema

Types of Users Types: Application administrator Application owner Administering app users No specific db privileges required Application owner Owner of app-related db objects Application user Use application Database administrator

Types of Users Database user Proxy user Schema owner Virtual user User with db privileges Proxy user DB user with specific roles and privileges Isolating app users from db Schema owner Owner of db objects Virtual user

Security Models Access Matrix Model: Represents two main entities: objects and subjects: Columns represent objects Rows represent subjects Objects: tables, views, procedures, database objects Subjects: users, roles, privileges, modules Authorization cell

Security Models (continued)

Security Models (continued) Access Modes Model: Based on the Take-Grant model Uses objects and subjects Specifies access modes: static and dynamic modes Access levels: a subject has access to objects at its level and all levels below it

Security Models (continued)

Security Models (continued)

Application Types Client/Server applications: Management Information System (MIS) department: Thirty year ago centralized information Developed mainframe projects Was a bottleneck Personal computer was introduced: developing need for client/server applications Based on the business model

Client/Server Applications

Client/Server Applications (continued) Provides a flexible and scalable structure Components: User interface Business logic Data access Components usually spread out over several tiers: Minimum two Normally, four to five

Client/Server Applications (continued)

Web Applications Evolved with the rise of dot-com and Web-based companies Uses the Web to connect and communicate to the server A Web application uses HTML pages created using: ActiveX Java applets or beans ASP (Active Server Pages)

Web Applications (continued)

Web Applications (continued) Components: Web browser layer Web server layer Application server layer Business logic layer Database server layer

Web Applications (continued)

Data Warehouse Applications Used in decision-support applications Collection of many types of data taken from a number of different databases Typically composed of a database server Accessed by software applications or reporting applications: online analytical processing (OLAP)

Data Warehouse Applications (continued)

Application Security Models Database role based Application role based Application function based Application role and function based Application table based

Security Model Based on Database Roles Application authenticates application users: maintain all users in a table Each user is assigned a role; roles have privileges assigned to them A proxy user is needed to activate assigned roles; all roles are assigned to the proxy user Model and privileges are database dependent

Security Model Based on Database Roles (continued)

Security Model Based on Database Roles (continued) Implementation in SQL Server: Use application roles: Special roles you that are activated at the time of authorization Require a password and cannot contain members Connect a user to the application role: overrules user’s privileges

Security Model Based on Database Roles (continued) Implementation in SQL Server (continued): Create and drop application roles using the command line: CREATE APPLICATION ROLE DROP APPLICATION ROLE You can activate application roles using SP_SETAPPROLE

Security Model Based on Database Roles (continued) Implementation in SQL Server (continued): Connect to database as the proxy user Validate the user name and password Retrieve the application role name Activate the application role Great article on app roles: SQL Server Security: Pros and Cons of Application Roles By Brian Kelley http://www.sqlservercentral.com/articles/Security/sqlserversecurityprosandconsofapplicationroles/1116/

Security Model Based on Database Roles (continued) Example CREATE LOGIN appuser WITH PASSWORD = 'appuserpwd' CREATE USER appuser FOR LOGIN appuser; CREATE APPLICATION ROLE approle WITH PASSWORD = 'approlepwd' create table t (col1 int, col2 int) insert into t values (1,2) grant select on t to approle select * from t SP_SETAPPROLE approle,'approlepwd'

Security Model Based on Application Roles Application roles are mapped to real business roles Application authenticates users Each user is assigned to an application role; application roles are provided with application privileges (read and write)

Security Model Based on Application Roles (continued)

Security Model Based on Application Roles (continued) Implementation in SQL Server Create a database user Connect the application to the database using this user Create stored procedures to perform all database operations

Security Model Based on Application Roles (continued) Example: grant select, insert, update, delete on t to appuser create table tusers (userid varchar(50) primary key, pwd varchar(50) not null) insert into tusers values ('bob','pwd') create proc pverifylogin @id varchar(50), @pwd varchar(50) as select count(*) from tusers where userid=@id and pwd=@pwd exec pverifylogin 'bob','pwd‘ exec pverifylogin 'bob','pwd2'

Security Model Based on Application Roles (continued) Example: CREATE SYMMETRIC KEY EncryptedData WITH ALGORITHM = DES ENCRYPTION BY PASSWORD='1234567' OPEN SYMMETRIC KEY EncryptedData DECRYPTION BY PASSWORD ='1234567' CREATE TABLE tencrypteddatatest (Data VARBINARY(255)) DECLARE @Key_GUID UNIQUEIDENTIFIER SELECT @Key_GUID = Key_GUID FROM sys.symmetric_keys WHERE Name = 'EncryptedData' INSERT INTO tencrypteddatatest (Data) VALUES (EncryptByKey(@Key_Guid, 'Bob', 1)) SELECT Data FROM tencrypteddatatest SELECT CONVERT(VARCHAR(20), DecryptByKey(tencrypteddatatest.Data, 1)) AS Data FROM tencrypteddatatest DROP TABLE tencrypteddatatest CLOSE SYMMETRIC KEY EncryptedData

Security Model Based on Application Functions Application authenticates users Application is divided into functions Considerations: Isolates application security from database Passwords must be securely encrypted Must use a real database user Granular privileges require more effort during implementation

Security Model Based on Application Functions (continued)

Security Model Based on Application Roles and Functions Combination of models Application authenticates users Application is divided into functions Highly flexible model

Security Model Based on Application Roles and Functions (continued)

Security Model Based on Application Tables Depends on the application to authenticate users Application provides privileges to the user based on tables; not on a role or a function User is assigned access privilege to each table owned by the application owner

Security Model Based on Application Tables Privileges: 0 -no access 1 –read only 2 – read and add 3 –read, add, and modify 4 – read, add, modify, and delete 5 – read, add, modify, delete, and admin

Security Model Based on Application Tables (continued)

Security Model Based on Application Tables (continued) Implementation in SQL Server: Grant authorization on application functions to the end user Alter authorization table from the security model based on database roles; incorporate the table and access columns required to support model

Application Security Models

Application Security Models (continued)

Data Encryption Passwords should be kept confidential and preferably encrypted Passwords should be compared encrypted: Never decrypt the data Hash the passwords and compare the hashes

Questions ?