Chapter 4 Database Security and Authorization (1)
Chapter 4 Database Security and Authorization (1)
Database Security
and Authorization
Security Objectives
Prevent/detect/deter improper
Disclosure of information
Prevent/detect/deter Secrecy
Improper modification
of information
Integrity Availability
Prevent/detect/deter improper
Denial of access to services
2 Database Security
Secrecy: Users should not be able to see
things they are not supposed to.
E.g., A student can’t see other students’
grades.
Integrity: Users should not be able to
modify things they are not supposed to.
E.g., Only instructors can assign grades.
Availability: Users should be able to see
and modify things they are allowed to.
4 Database Security
Access Control
5 Database Security
Access Control
Subject: active entity that requests access to an object
- e.g., user or program
Object: passive entity accessed by a subject
- e.g., record, relation, file
Access right (privileges): how a subject is allowed to
access an object
- e.g., subject s can read object o
6 Database Security
Protection of object at different granularity levels
Database
Relation
Record
Attribute
Element
7 Database Security
Relation-Level
Granularity
Confidential relation
Person- Company- Salary
name name
Smith BB&C $43,982
8 Database Security
Tuple-level Granularity
Works
Person-name Company- Salary
name
Smith BB&C $43,982 Public
9 Database Security
Attribute-Level
Granularity
Works
Person- Company- Salary
name Publ. name Publ. Conf.
Smith BB&C $43,982
10 Database Security
Cell-Level Granularity
Works
Person- Company- Salary
name name
Smith P BB&C P $43,982 C
Dell C Bell C $97,900 C
Black P BB&C C $35,652 C
11 Database Security
Discretionary Access Control (DAC)
For each subject access right to the objects are
defined
(subject, object, +/- access mode)
User based
Grant and Revoke
Problems:
- Propagation of access rights
- Revocation of propagated access rights
12 Database Security
DAC by Grant and Revoke
Berhanu
13 Database Security
Implementation
File 1 File 2
Access Control List (column) Joe:Read Joe:Read
(ACL) Joe:Write Sam:Read
Joe:Own Sam:Write
Capability List (row) Sam:Own
Joe: File 1/Read, File 1/Write, File 1/Own, File 2/Read
Sam: File 2/Read, File 2/Write, File 2/Own
Subject Access Object
Access Control Triples Joe Read File 1
Joe Write File 1
Joe Own File 1
Joe Read File 2
Sam Read File 2
Sam Write File 2
Sam Own File 2
14 Database Security
Grant and Revoke
GRANT <privilege> ON <relation>
To <user>
[WITH GRANT OPTION]
------------------------------------------------------------------------------------------------------------------------------------
15 Database Security
Grant and Revoke
REVOKE <privileges> [ON <relation>]
FROM <user>
-------------------------------------------------------------------------------------------------------------------------
REVOKE SELECT* ON Student FROM Blue
REVOKE UPDATE ON Student FROM Black
REVOKE SELECT(NAME) ON Student FROM Brown
16 Database Security
Non-cascading Revoke
B E
A D
C F
A revokes D’s privileges
E
B
A
C F
17 Database Security
Cascading Revoke
B E
A D
C F
A revokes D’s privileges
B
A
18 Database Security
Query Modification
GRANT SELECT(NAME) ON Student TO Blue
WHERE COURSE=“CSCE 590”
Blue’s query:
SELECT *
FROM Student
Modified query:
SELECT NAME
FROM Student
WHERE COURSE=“CSCE 590”
19 Database Security
DAC Overview
Advantages:
Easy to implement
Disadvantages:
Inherent vulnerability
Maintenance of ACL or Capability lists
Maintenance of Grant/Revoke
20 Database Security
Mandatory Access Control (MAC)
Security label
- Top-Secret, Secret, Public
Objects:
Objects security classification
- File 1 is Secret, File 2 is Public
Subjects:
Subjects security clearances
- Brown is cleared to Secret, Black is cleared to Public
Dominance ()
- Top-Secret Secret Public
21 Database Security
MAC
Access rights:
rights defined by comparing the security
classification of the requested objects with the
security clearance of the subject
If access control rules are satisfied, access is
permitted
Otherwise access is rejected
Granularity of access rights!
22 Database Security
Multilevel Relation
Example
SSN (SSN) Course (Course) Grade (Grade)
111-22-3333 S CSCE 786 S A TS
444-55-6666 S CSCE 567 S C TS
24 Database Security
Statistical DB Security