Chap-2-Database Security and Authorization
Chap-2-Database Security and Authorization
by
Nibretu K
Session Plan
•Topic/Title: Database security and authorization
•Session objectives: At the end of this session, students will be
able to:
• Define database security and authorization
• Understand about access control mechanisms
• Discretionary Access Control
• Mandatory Access Control
• Role-Based Access Control
• Encryption/Decryption
• Identify issues related to database Security
•Teaching method: Gap Lecture, Question & answer, and
Brainstorming.
•Assessment method: Oral Question, class activity
Outline
•Database security and authorization
•Access control mechanisms
• Discretionary Access Control
• Mandatory Access Control
• Role-Based Access Control
• Encryption/Decryption
•Major issues related to database Security
…
What is database security?
For example:
Disclosure or modification of military information
could cause danger to national security.
Integrity
Availability
…
Secrecy
Information should not be disclosed to unauthorized
users.
user.
Protects against a wide variety of threats.
Unauthorized access
Unapproved modification of data
Lack of data confidentiality
…
Basic elements of Access control
Subject:
An entity capable of access resources.
It is often a software process.
Eg: owner, group, role,,etc
Object:
Resources to which access is controlled.
Eg: files, records, blocks, programs,,,etc.
Access right:
Describe ways in which a subject may access an object.
Eg: read, write, update, delete…etc
…
Two types of AC:
Discretionary AC
Mandatory AC
Discretionary Access Control
Based on the concept of privileges, and mechanisms for
giving users such privileges.
Recall
What are the three types of database languages?
Privilege
A permission given by a DBA.
It provides right to execute a particular types of SQL
statement.
Syntax:
GRANT privilege_name
ON object_name
TO {user_name | public | role_name}
…
Example 1:
Suppose that the DBA creates four accounts:A1, A2, A3,
A4 and wants only A1 to be able to create relations. Then
the DBA must issue the following GRANT command in
SQL.
GRANT select
ON EMPLOYEE, DEPARTMENT
TO A3 with grant option;
…
A3 can grant the SELECT privilege on the EMPLOYEE
relation to A4 by issuing:
GRANT SELECT
ON EMPLOYEE
TO A4;
GRANT SELECT
ON A3EMPLOYEE
TO A3 WITH GRANT OPTION;
…
Example 6:
Finally, suppose that A1 wants to allow A4 to update
only the E_SALARY attribute of EMPLOYEE;
Revoke :
Revoke user privileges on database objects if any
granted.
REVOKE privilege_name
ON object_name
FROM {user_name | public | role_name}
Example:
REVOKE SELECT
ON EMPLOYEE
FROM A4
All-or-Nothing method:
A user either has or does not have a certain
privilege.
…
It classifies data and users based on security classes.
Typical security classes are:
Top
secret (TS)
Secret (S)
Confidential (C) and
Unclassified (U)
Where TS is the highest level and U the lowest:
TS ≥ S ≥ C ≥ U.
…
Each database object is assigned a security class;
Each user is assigned clearance for a security class,
and rules are imposed on reading and writing of
database objects by users.