0% found this document useful (0 votes)
4 views29 pages

Chapter 3 Database Security

Chapter 3 discusses database security, emphasizing the importance of protecting sensitive data from unauthorized access through various methods. It covers discretionary and mandatory access control, the use of views for security enforcement, encryption techniques, and the significance of statistical database security. Major security threats such as loss of confidentiality, integrity, and availability are also highlighted.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views29 pages

Chapter 3 Database Security

Chapter 3 discusses database security, emphasizing the importance of protecting sensitive data from unauthorized access through various methods. It covers discretionary and mandatory access control, the use of views for security enforcement, encryption techniques, and the significance of statistical database security. Major security threats such as loss of confidentiality, integrity, and availability are also highlighted.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Chapter 3- Database Security

By
Bharati A. Patil

1
■ Chapter 3 Database Security

■ 3.1 Introduction to database security concepts


■ 3.2 Methods for database security
■ 3.3 Discretionary access control method
■ 3.4 Mandatory access control and role based access
control for multilevel security
■ 3.5 Use of views in security enforcement
■ 3.6 Overview of encryption technique for security
■ 3.7 Statistical database security

2
Database Security

⮚ Security is an important issue in database


management because information stored in
database is valuable and sensitive.
⮚ Database security refers to protection of data

from unauthorized access.


⮚ Data has to be protected against misuse.

⮚ Security measures are defined at various levels.

3
Database Security

Security at all the levels are maintained to ensure database


security.
1) Database System: Users are grouped and allowed to
access only part of database e.g view
2) Operating System:
Security Should be strong e.g. Password.
3) Network Level:
DB can be accessed remotely through terminals.
4) Physical Security :Includes protection from fire, flood
or natural disasters.
5) Human Level: User must be authorized carefully.

4
Major Security Threats:
■ Threat is intentional or accidental event that affect the
system.
■ 1) Loss of confidentiality: Unauthorized users can access
the data.
■ 2) Loss of Privacy: Loss of protection of individuals
personal file.
■ 3) Loss of integrity: Refers to data corruption and invalid
data.
■ 4)Loss of availability: Hardware and Network problem
data to become unavailable to users.
■ 5)Theft and Fraud: Intentional security breaches of data
may happen.
5
Methods of Data Security:
1) Discretionary Access Control:
⮚Owner of a resource decides how it can be

shared.
⮚Based on Granting and Revoke Privilege.

⮚Grant :Granting privilege to user.

⮚Revoke: Taking back privilege from user.

⮚Privilege is action performed on database.

⮚E.g. read,update,delete,execute

⮚There are two levels are used for assigning

privilege.
6
■ 1)Account Level:
■ DBA specifies particular privilege to account or
user.
■ This privilege includes

1)Create Schema or create table privilege


2)Create view privilege
3)Alter privilege
4)Drop privilege
5)Modify privilege
6)Select Privilege

7
2)Relation Level(Table Level):
■The following privilege are used on Table Level.
1)Select privilege on R
2)Modify Privilege on R(Insert,Delete,Update)
3) References privilege on R
4)Specifying privilege using View
■ Syntax of Grant Command:
Grant privilege_name
On <tablename |Viewname>
To {User List| role_name}
[with Grant option]
8
■ Revoke Privilege:

■ Revoke privilege_name
■ On <table_name|view_name>
■ From {user_list|viewname>}[restrict|cascade]
■ Propagation of privilege using Grant Option:
■ E.g consider A1 is owner create two relations emp
and dept.
❖A1 can grant privilege to A2
Grant Insert ,delete on
Emp, dept to A2

9
❖ A1 can grant privilege to A3 with grant option
Grant select on
Emp,dept to A3 with grant option;
A3 can grant this privilege to A4.
Suppose A1 decides to revoke privilege from A3.
A1 can issue:
Revoke select on emp from A3 cascade;

10
Use of views in security enforcement:
■ View is virtual relation that does not exists in
database.
■ Suppose A1 wants to give limited resource access to

A3 and wants to allow A3 to propagate this privilege


to other.
■ A1 can create view
Create view A3Emp as
select name, birthdate
from emp where dno=5;
After view creation A1 can grant privilege to A3
Grant select on A3emp to A3 with Grant Option;
A1 allows A4 to update only salary attribute.
Grant update on emp (salary) to A4; 11
2) Role Based Access Control:
■ It is method of giving access to computer or
network resources based on roles of individual users
within organization.
■ User-----------🡪 Role----------------🡪 Rights
■ Access may be create or modify the file.
■ Role can be Principal, HOD, Student.
■ Access rights are associated with role.
■ User authentication themselves to the system.
■ Policy need not be changed when certain person left
the organization.
■ The Grant and Revoke Command is used to assign
and revoke privilege:
■ Create role user_name;
Create role admin;
Grant emp to admin;

■ Revoke emp from admin;

13
3) Mandatory Access Control
⮚ In MAC Users do not have the authority to
override the policies or permissions and it is totally
controlled centrally by security policy
administrator.
⮚ MAC is a system-wide policy which defines who is
allowed to have access.
⮚ Individual user cannot change that access rules.
⮚ MAC policies are defined by the system
administrator.

14
■ MAC can be classified into the following types:
1)Mutilevel Security: In this ,information and users
are classified into different levels according to their
sensitivity and trust.
⮚ In many database applications, an additional security

policy is needed that classifies users and data based


on security classes.
⮚ The need for multilevel security exists in military

,Government, industrial & corporate applications.

15
■ Typical Security Classes are:
■ 1) Top Secret(TS)

■ 2) Secret (S)

■ 3) Confidential (C)

■ 4) Unclassified(U)

Where TS is the highest level and U is the lowest.


This also defines different levels such as clearance
level, classification level and security level
1)Clearance Level:
Indicates how much trust or rights given to a person
with clearance.
2)Classification Level:
Indicates the level of sensitivity to be given for a
particular resource 16
■ The popular model for mandatory access control
called
■ Bell-Lapadula model
■ This model describes in terms of
1)Objects(e.g. Tables, views, rows, columns)
2)Subjects(e.g. Users, programs)
3) Security Classes
4) Clearances
■ Each database object is assigned security class.
■ Each subject is assigned clearance level.
■ The security classes are organized as follows:
TS > S > C > U 17
■ The following rules are for mandatory access
control were formulated by Bell model
■ 1) Simple security:

■ It states that process labeled with higher

classification i,.e subject S is not allowed read


access to an object (O) unless
class(S)>=class(O)
No subject can read an object whose security
classification level is higher than the subject
security clearance.

18
2) Star Property:(* Property)
A subject S is not allowed to write an object O unless
Class(S)<=class(O)
Not allowed subject from writing object that has
lower security clearance than subject security
clearance.
Violation allows information flows from higher level
to lower level.
⮚Programs may have viruses.

⮚Therefore a program running at the secret level is not

allowed to write unclassified data.


■Mandatory access control have high degree of

protection.
■MAC prevents illegal flow of information 19
■ Multilevel Relations and Ployinstantiation:
■ Multilevel table is table with property that users
with different security clearances will see a different
collection of rows when they access the same table.
■ The presence of data objects that appear to have
different values to users with different clearances is
called polyinstantiation.
■ Tid tname color security class
■ 1 doll white S
■ 2 jeep red C
■ 1 car violet C

20
4) Statistical Database Security
⮚ Statistical databases are mainly produced statistics
on various populations.(set of tuples of table)
⮚ The DB may contain confidential data on
individuals ,which should be protected from user
access.
⮚ Users are permitted to retrieve statistical
information on populations such as average, sum,
count, minimum and maximum.
⮚ Statistical DB prohibits the retrieval of individuals
data.
⮚ Only queries are allowed that contains statistical
aggregate function. 21
■ This is not permitted
■ Select sal from emp where empid=101;

■ But this is allowed


■ Select sum(sal)
■ From emp
■ Where dept=10;

22
5) Overview of encryption technique for
security
■ Encryption techniques are used to provide security
for highly sensitive data.
■ In such cases, data will be stored in an encrypted
form.
■ This encrypted data can not be read unless the user
knows to decrypt them.
■ Encryption technique scheme for authenticating
users to a database.
■ A good encryption technique should posses
following properties:
23
■ 1)Technique should be simple so authorized user
can encrypt and decrypt data.
■ 2) The encryption key should be difficult for any
intruder to determine.
■ The public key encryption scheme uses:
■ (Two keys private and public key)
■ 1)Plaintext: input plain text message
■ 2)Encryption algorithm
■ 3)Public and Private keys
■ 4)Ciphertext: scrambled or not readable Message
■ 5)Decryption algorithm
24
Database Security and DBA
■ 1) Account creation
■ 2)Privilege Granting
■ 3)Privilege Revoke
■ 4)Security Level Assignment

25
⮚Encryption Technique:
■ There are many techniques for encrypting the data. Simple
encryption technique don’t provide adequate security for
data, since any unauthorized user can break the code and
decrypt it.
■ An example of simple encryption technique is to substitute
each character with its next character in the alphabet.
■ Encryption algorithms are divided into two categories
symmetric and asymmetric.
■ In symmetric algorithm key ciphers use the same key, or
secret for encrypting and decrypting message file. The
data encryption standard (DES) is symmetric key method
of data encryption.
26
■ Asymmetric algorithm, also known as public-key
cryptography uses two different keys, one public and
one private.
■ Public key encryption is an alternative scheme, used
instead of the sample data encryption standard.
■ This technique has two keys, a public key and private
key. Each user has public and private key.
■ All public keys are published and can be seen by anyone.
Each private key is known to only one user to whom the
key belongs. The data encrypted using public key, but
decryption requires the private key. Since there are two
keys in this scheme, data transfer is very secure.
27
A good encryption technique should
posses following properties
■ 1. Should be relatively simple so that authorized users can encrypt and
decrypt data.
■ 2. The encryption key should be such that it is difficult for any intruder
to determine.
■ 1. Plaintext: This is data or readable message i.e fed to algorithm as
input.
■ 2. Encryption algorithm: Performs various transformations on the
plaintext.
■ 3. Public and Private keys: These are the pair of keys that have been
selected so that if one is used for encryption, other is used for
decryption.
■ 4. Ciphertext: Scrambled or not readable message produced as output.
5. Decryption algorithm: This algorithm accepts the cipher text and the
matching key and produces the original plaintext. Public key is made
for public and private key is known only by owner 28
29

You might also like