Chapter 2 - DB Security
Chapter 2 - DB Security
Database
Security
Database Security
Database Security is the mechanisms that protect the database against
intentional or accidental threats.
Database security is a very broad area that addresses many issues,
including the following:
– Legal and ethical issues regarding the right to access certain
information.
– Policy issues at the governmental, institutional, or corporate level as
to what kinds of information should not be made publicly available.
– System-related issues such as the system levels at which various
security functions should be enforced
– The need in some organizations to identify multiple security levels
and to categorize the data and users based on these classification.
Database security aims to minimize losses caused by anticipated events
Database Threat
Threat is any situation or event, whether intentional or accidental, that
may adversely affect a system and consequently the organization.
A threat may be caused by a situation or event involving a person, action, or
circumstance that is likely to bring harm to an organization. The harm may be
Tangible, such as loss of hardware, software, or data, or
Intangible, such as loss of credibility or client confidence.
The problem facing any organization is to identify all possible threats.
Therefore, as a minimum an organization should invest time and effort in
identifying the most serious threats.
Threat can be either intentional or unintentional, the impact remains the same.
Intentional threats involve people and may be commited by both authorized
users and unauthorized users, some of whom may be external to the
organization.
Database Threat
Any threat must be viewed as a potential breach of security which, if
successful, will have a certain impact.
The following table presents examples of various types of threat, listed
under the area on which they may have an impact.
Database Threat
The extent that an organization suffers as a result of a threat’s
succeeding depends upon a number of factors, such as the
existence of countermeasures and contingency plans.
For example, if a hardware failure occurs corrupting secondary
storage, all processing activity must cease until the problem is
resolved.
The recovery will depend upon a number of factors, which
include when the last backups were taken and the time
needed to restore the system.
An organization needs to identify the types of threat it may be
subjected to and initiate appropriate plans and
countermeasures
Database Security and Database administrator
The database administrator (DBA) is the central authority for
managing a database system.
The DBA has a DBA account in the DBMS, sometimes called a system or
superuser account, which provides powerful capabilities that are not
made available to regular database accounts and users.
Roles of DAS in database Security includes
- Account Creation: involves creating different accounts for different USERS
- Security Level Assignment: involves in assigning different users at
different categories of access levels.
- Privilege Grant: involves giving different levels of privileges for different
users and user groups.
- Privilege Revocation: involves denying or canceling previously granted
privileges for users due to various reasons.
- Account Deletion: involves in deleting an existing account of users or user
groups. Is similar with denying all privileges of users on the database.
Countermeasures – Computer-Based Controls
The types of countermeasure to threats on computer systems
range from physical controls to administrative
procedures.
In this section we focus on the following computer-based
security control techniques
Authorization
Access controls
Views
Backup and recovery
Encryption
Authorization
Authorization the granting of a right or privilege that enables a subject
to have legitimate access to a system or a system’s object.
The process of authorization involves Authentication of Subjects
requesting access to Objects, where
- Subject represents a user or program and
- Object represents a database table, view, procedure, trigger, or any
other object that can be created within the system.
Authentication is a mechanism that determines whether a user is who
he or she claims to be.
A system administrator is usually responsible for allowing users to have
access to a computer system by creating individual user accounts.
Each user is given a unique identifier, which is used by the operating
system to determine who they are.
Forms of Authorization
User authorization on the data
– Read Authorization: the user with this privilege is allowed only to
read the content of the data object.
– Insert Authorization: the user with this privilege is allowed only to
insert new records or items to the data object.
– Update Authorization: users with this privilege are allowed to
modify content of attributes but are not authorized to delete the
records.
– Delete Authorization: users with this privilege are only allowed to
delete a record and not anything else.
Forms of Authorization
User authorization on the database schema
– Index Authorization: deals with permission to create as
well as delete an index table for relation.
– Resource Authorization: deals with permission to
add/create a new relation in the database.
– Alteration Authorization: deals with permission to add as
well as delete attribute.
– Drop Authorization: deals with permission to delete tables
in a database
Access Controls
The usual way of supplying access controls to a database system is
dependent on the Granting and Revoking of Privileges within the
database.
A privilege allows a user to create or access (that is read, write, or modify)
some database object (such as a relation, view, or index) or to run certain
DBMS utilities.
a privilege should only be granted to a user if that user cannot accomplish
his or her work without that privilege.
A user who creates a database object such as a relation or a view
automatically gets all privileges on that object.
The database provides various types of access controls:
Discretionary Access Control (DAC) and
Mandatory Access Control (MAC)
Discretionary Access Controls
In discretionary access control each user is given appropriate access
rights (or privileges) on specific database objects.
This mechanism is based on the concepts of authorization identifiers,
ownership, and privileges.
An Authorization Identifier is a normal SQL identifier that is used to
establish the identity of a user.
– Each database user is assigned an authorization identifier by the Database
Administrator (DBA).
– Usually, the identifier has an associated username and password.
Each object that is created in SQL has an owner.
– The owner is identified by the authorization identifier defined in the
AUTHORIZATION clause of the schema to which the object belongs.
Privileges are the actions that a user is permitted to carry out on a given
base table or view.
Discretionary Access Controls
When a user creates a table using the CREATE TABLE statement, he or
she automatically becomes the owner of the table and receives full
privileges for the table.
Other users initially have no privileges on the newly created table.
To give them access to the table, the owner must explicitly grant them
the necessary privileges using the GRANT statement.
When a user creates a view with the CREATE VIEW statement, he or she
automatically becomes the owner of the view, but does not necessarily
receive full privileges on the view.
To create the view, a user must have SELECT (Read) privilege on all the
tables that make up the view and REFERENCES privilege on the named
columns of the view.
However, the view owner gets INSERT, UPDATE, and DELETE privileges
only if he or she holds these privileges for every table in the view.
Discretionary Access Controls
SQL supports only discretionary access control through the
GRANT and REVOKE statements.
The GRANT statement is used to grant privileges on database
objects to specific users.
- Normally the GRANT statement is used by the owner of a
table to give other users access to the data.
The REVOKE statement is used to take away privileges that
were granted with the GRANT statement.
A REVOKE statement can take away all or some of the
privileges that were previously granted to a user.
Mandatory Access Control (MAC)
The employee relation with two tuples displaying emp_ID as Emp003. The
primary key for this relation is (emp_ID and securityClass).
Now, users with clearance C see the first two tuples and the newly added
tuple, but users with clearance S or TS see all five tuples.
The result is a relation with two tuples with a emp_ID as Emp003, which
can be confusing.
The presence of data objects that appear to have different values to users
with different clearances is called polyinstantiation.
Views
View is dynamic result of one or more relational operations operating on
the base relations to produce another relation.
A view is a virtual relation that does not necessarily exist in the database
but can be produced upon request by a particular user, at the time of
request.
The view mechanism provides a powerful and flexible security mechanism
by hiding parts of the database from certain users.
The user is not aware of the existence of any attributes or rows that are
missing from the view.
A view can be defined over several relations with a user being granted the
appropriate privilege to use it, but not to use the base relations.
In this way, using a view is more restrictive than simply having certain
privileges granted to a user on the base relation(s).
Backup and Recovery