Course Code: Comp 324: Course Name: Database Management System II Lecture 4: Database Security and Authorization
Course Code: Comp 324: Course Name: Database Management System II Lecture 4: Database Security and Authorization
Romans 8:28
28
And we know that in all things God works
for the good of those who love him,
who have been called according to his
purpose.
Introduction
• In an organization, the organization’s data stored in the
database is considered an asset of the organization. Therefore
measures/policies should be taken in order to protect the
organization’s assets.
• Database security and authorization discusses the techniques
used to protect the database against unauthorized users from
accessing certain parts of the database or the whole database.
• Database security provides a controlled and protected access
to the data in the database, as well as, it should preserve the
integrity, consistency and the overall quality of data in the
database.
• Database security also encompasses other areas of security
such as physical security, network security, encryption etc.
• The goal of database security is to ensure that only authorized
users can perform authorized activities at authorized times.
Types of Database Security
Database security is a broad area that includes the following:
• Legal and ethical issues that regards the right to access certain
information.
• Policy issues at the governmental, institutional or corporate
level, that define what kinds of information should not be
made publicly available e.g. personal medical records.
• System related issues i.e. the system levels at which various
security functions should be enforced e.g. whether at physical
hardware level, operating system level, or at the dbms level.
• Identification of multiple security levels in some organizations,
and the categorization of data and users based on the levels.
For instance, top secret information, confidential information,
unclassified information etc.
Computer Security Goals
The computer security goals are:
• Confidentiality/Secrecy: refers to the secrecy of information
i.e. Information should not be disclosed to unauthorized
users.
• Integrity: refers to the trustworthiness of data or resources.
With regards to designing a secure database, database
integrity is where only authorized users should be allowed to
modify data.
• Availability: refers to the ability to use the information or
resource desired i.e. making data available to whomever
needs it, when and where they need it, an in a meaningful
form. With regards to database security, availability is where
authorized users should not be denied access.
Threats to databases
The threats to the database can result to the loss or degradation
of the security goals:
• Loss of integrity: Integrity is lost if unauthorized changes are
made to the data intentionally or accidentally. If not corrected,
it could lead to inaccuracy, fraud, or erroneous decisions.
• Loss of availability: Database availability refers to making
database objects available to programs or users who have the
legal right.
• Loss of confidentiality: Database confidentiality refers to the
protection of data from unauthorized disclosure. The impact of
unauthorized disclosure of confidential information can range
from violation of the data privacy act to the jeopardization of
national security. Unauthorized, unanticipated or unintentional
disclosure could result in loss of public confidence,
embarrassment, or legal action against the organization.
Counter measures against threats to database
1. Access Control: This is a security mechanism of a
dbms that includes provision for restricting access
to the database system as a whole i.e. it is a way to
control the data accessible by a given user. It is
handled by creating user accounts and passwords to
control the login process by the dbms.
2. Flow control: it prevents information from flowing
in such a way that it reaches unauthorized users.
Counter measures against threats to database
3. Data encryption: it is used to protect sensitive data e.g.
credit card numbers, that is being transmitted via a
communication network. Encryption consists of applying an
encryption algorithm to data using some pre-specified
encryption key. The resulting data has to be decrypted using
a decryption key to recover the original data.
4. Inference control: Inference refers to the use of legitimate
data to infer unknown information without having rights to
directly retrieve that information i.e. the ability to derive
unknown information based on retrieved information.
A dbms typically has a database security and authorization
subsystem that is responsible for ensuring the security of
portions of a database against unauthorized access. There are
two types of database security mechanisms: Discretionary
security mechanism and Mandatory security mechanism.
Types of database security mechanisms
Discretionary security mechanism: They are used to grant
privileges to users, including the capability to access specific
data files, records or fields in a specified mode e.g read, insert,
delete or update.
A privilege allows a user to access some data object in a
certain manner e.g. read or modify.
SQL supports discretionary access control through the GRANT
and REVOKE commands. The GRANT gives privileges to users
and the REVOKE command takes away privileges. Note: In
addition to GRANT and REVOKE commands, views are an
important component of the security mechanism provided by
relational dbms. By defining views on the base tables, the
needed information is presented to the user while the
restricted information is hidden from the user.
Types of database security mechanisms
Mandatory security mechanism: It is based on system-
wide policies that cannot be changed by individual
users.
They are used to enforce multilevel security by
classifying the data and users into various security
classes/levels and then implementing the appropriate
security policy of the organization.
Roles of DBA in Database Security
The DBA is responsible for the overall security of the database system.
The DBA has an account in the dbms –superuser account, which
provides powerful capabilities that are not available for regular dbms
accounts and users. The DBA can use the account to perform the
following types of actions:
• Account creation: This action creates a new account and password
for a user or group of users to enable access to the dbms.
• Priviledge granting: This action permits the DBA to grant certain
privileges to certain accounts
• Priviledge revocation: This action permits the DBA to revoke/cancel
certain priviledges that were previously given to certain accounts.
• Security level assignments: This action consists of assigning user
accounts to the appropriate security classification level.
Processing rights and responsibilities
During the project’s requirement’s specification phase, the
database development team must also determine the processing
rights and responsibilities of all users.
This implies that responsibilities go with processing rights i.e. for
instance, if the systems administrator deletes transaction data,
he/she has the responsibility to ensure that these deletions do
not adversely affect the organization’s operations.
These processing responsibilities are not enforced by the dbms,
they are encoded in manual procedures and explained to users
during system’s training.
Summary of the DBA responsibilities (1)
• The responsibilities of the DBA can be divided in the
following core areas:
1. Administration of the database
2. Administration of the DBMS
3. Administration of the Database Environment
1. Administration of the database
– Physical design
– Data standards and documentations
– Monitoring data usage and tuning database structures
– Data archiving
– Data backup and recovery
Summary of the DBA responsibilities(2)
2. Administration of the DBMS
– Installation of the dbms and it’s components
– Configuration control i.e. enforcing policies and procedures for
managing updates and changes to the dbms software.
– Monitoring the dbms usage and tuning the dbms i.e monitoring the
live runnings of database systems and tailoring elements of dbms
structure to ensure effective perfomance.
3. Administration of the database Environment
– Data control i.e establishing user groups, assigning passwords, granting
access to dbms facilities and databases etc
– Impact assessment i.e. assessing the impact of changes in the use of
data in the database systems.
– Privacy, security and integrity i.e. ensuring that the security policy of
data designed by the data administrator is adhered even to the physical
level.
– Training i.e. training of users in the principles and policies of database
use.
Features and functionalities of DBMS
• Starting, stopping and taking a database offline
• User functions e.g. establishing user groups,
assigning passwords, granting access to data,
granting access to dbms facilities,
• Data archiving, backup and recovery
• Enforcing security and integrity
• Importing and exporting data
• Monitoring data usage and tuning database systems
Lecture materials and further readings
Main
• Kroenke M.D., Database processing: Fundamentals, Design, and
Implementation, 8th Ed., Prentice Hall (2002)
• Ramakrishnan R. and Gehrke J., Database Management Systems, 3rd Ed.,
McGraw-Hill Science/Engineering/Math (2003)
• Elmasri.R and Navathe.B.S., Fundamentals of Database
Systems, 4th Ed., Pearson Addison Wesley.
Additional
• http://jite.org/documents/Vol9/JITEv9IIPp061-077Murray804.
pdf