Adb Chap-2-Database Security and Authorization
Adb 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.
Any database access request will have the following three major
components.
Requested Operation (Access privilege):
What kind of operation is requested by a specific query?
Requested Object (resources or object ) :
On which resource or data of the database is the operation sought
to be applied?
Requesting User (Subject):
Who is the user requesting the operation on the specified object?
…
Note: Different users, depending on the power of the user, can have
one or the combination of the above forms of authorization on
different data objects.
Database Security and the DBA
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;
A1 can issue:
GRANT UPDATE
ON EMPLOYEE (E_SALARY)
TO A4;
…
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.