0% found this document useful (0 votes)
5 views

Chp.3 Database Integrity and Security Concepts (1) (1)

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Chp.3 Database Integrity and Security Concepts (1) (1)

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 26

Chp.

3
Database integrity and
security concepts

CHP.3
Role-Based Access Control for
multilevel security
 Role-based access control (RBAC) is a method of restricting
network access based on the roles of individual users within an
enterprise. Organizations use RBAC -- also called role-based
security -- to parse levels of access based on an employee's roles
and responsibilities.

or
 Role-based Access Control – The concept of Role-based
Access Control is to create a set of permissions and assign these
permissions to a user or group. With the help of these
permissions, only limited access to users can be provided
therefore level of security is increased.
Use view in security
enforcement
 Concept of view
 A database view is a subset of a database and is based on a
query that runs on one or more database tables. Database views
are saved in the database as named queries and can be used to
save frequently used, complex queries. There are two types of
database views: dynamic views and static views.
Mandatory access control (MAC)

 Mandatory access control (MAC) A means of restricting access to


system resources based on the sensitivity of the information
contained in the system resource and the formal authorization of
users to access information of such sensitivity.

 This makes the whole system centralized and under the control
of only one authority. Privacy: Data is set manually by an
administrator. No one other than admin can make changes in
category or list of users' accesses to any category. It can be
updated only by admin
Data integrity
 Data integrity is the overall completeness, accuracy and
consistency of data over its entire lifecycle. When data has
integrity, mechanisms have been put in place to ensure that
data-in-use, data-in-transit and data-at-rest cannot be changed
by an unauthorized person or program.
Domain integrity

 A domain is a collection of suitable values that a column may


contain in this context. Constraints and other steps that restrict
the format, sort, and amount of data entered can be used.
domain integrity constraints

 A domain constraint is a restriction on the values that can be


stored in a column.

 Additionaal
 For example, if you have a column for "age," domain integrity
constraints in DBMS would ensure that only values between 1
and 120 can be entered into that column. This ensures that only
valid data is entered into the database.
Domain Constraints

 1. Not Null:
 The NOT NULL constraint prevents a column from having a NULL
value.
2. Check Constraints –: It defines a condition that each row must
satisfy which means it restricts the value of a column between ranges
3 UNIQUE Constraint --A UNIQUE Constraint ensures that any value in
a column is unique.
4 DEFAULT Constraint
When no value is defined for a column, the DEFAULT Constraint
provides a default value.

4
Domain constraints
Domain constraints can be defined as the definition of a valid set of
values for an attribute.
 The data type of domain includes string, character, integer, time,
date, currency, etc. The value of the attribute must be available
in the corresponding domain.

Example:
Referential integrity

 The term "referential integrity" refers to a set of procedures that


ensure that data is stored and used consistently. Only necessary
modifications, additions, or deletions of data are made,
 Rules can include restrictions that prevent duplicate data entry,
ensure data accuracy, and/or prohibit the entry of data that does
not apply.
Database Security

 Database Security means keeping sensitive information safe


and prevent the loss of data. Security of data base is controlled
by Database Administrator (DBA).
 The following are the main control measures are used to provide
security of data in databases:
 Authentication :
Authentication is the process of confirmation that whether the
user log in only according to the rights provided to him to
perform the activities of data base. A particular user can login
only up to his privilege but he can’t access the other sensitive
data. The privilege of accessing sensitive data is restricted by
using Authentication.
2 Access Control :
The security mechanism of DBMS must include some provisions
for restricting access to the data base by unauthorized users.
2 Inference Control :
It is used to prevent the user from completing any
inference channel. This method protect sensitive
information from indirect disclosure. 2
3 statistical database security Statistical database
security focuses on the protection of confidential individual
values stored in so-called statistical databases and used for
statistical purposes..
4 Encryption :
This method is mainly used to protect sensitive data (such as credit card
numbers, OTP numbers) and other sensitive numbers. The data is
encoded using some encoding algorithms.
An unauthorized user who tries to access this encoded data will face
difficulty in decoding it, but authorized users are given decoding keys to
Methods for Database Security

1 discretionary access control methods


Discretionary access control is an identity-based access control
model that provides users with a certain amount of control over
their data.
This method is baded on the concept of access right and
mechanism for giving users such previleges.
A privilege is an action such as creating,executing,reading,updating
or deleting that a user is permitted to perform on database objects.
2 Granting And Revoking
Previleges
 A privilege is the ability to access a specific database rest
 database. Examples e ofprivileges include deleting a row, , creating a table or executing a procedure,
 There are two types of privileges as explained below:

 1. System Privileges: A system n privilege is the right to perfrom a particular action on a


particular
 Ype of object. For example, the privileges to ereate tables and to delete the roWs of table in
 database are system privileges. System privilege indicate user to CREATE, ALTER, or DROP
 database elements.

Object Privileges: An object privilege is a privilege or right to perform a particular action


 Specific table, view, sequence, procedure, function or package. For example, the privilege to
 delete rows from the table DEPT is an object privilege. Object privileges allows user to EXECUTE,
 SELECT, INSERT or DELETE data from database objects to which the privileges apply.
1 Grant command

1. GRANT Command:
GRANT command is used to provide access or privileges on the database objects to the
grant command is used to confer authorization.
GRANT command has the following syntax
GRANT privilege_name
ON <tablename | viewname>
TO (user list | role_name)
[WITH GRANT OPTION]:
Thus,
Where, privilege_name is the access right or privilege granted to the user like SELECT,
INSERT,
UPDATE, DELETE etc., WITH GRANT OPTION - allows a user to grant access rights to other
users.
2 Revoke Command

In PL/PgSQL, a REVOKE command is İnchuded for the purpose of canceling privlleges,


The REVOkE
command is sed to remove or cancel the given privilleges or access rigths Irom the
user
Syntax:
REVOKE privilege_nam
ON <tablename viewname>
FROM { user list | role_name) [restrict | cascade ]

RESTRICT keyword, the privilege will be revoked only from the specifled user.
3 Audit Trail

 Audit trail is a log of all changes (insert/update/delete) to the


database along with information such as which user performed
the change and when the change was performed.
 Database auditing involves observing a database so as to be
aware of the actions of database users.
 1. DAC :
DAC is identity-based access control. DAC mechanisms will be
controlled by user identification such as username and password.
DAC is discretionary because the owners can transfer objects or
any authenticated information to other users. In simple words,
the owner can determine the access privileges.
 Examples- Permitting the Linux file operating system is an
example of DAC.
MAC :

 2. MAC :
The operating system in MAC will provide access to the user
based on their identities and data. For gaining access, the user
has to submit their personal information. It is very secure
because the rules and restrictions are imposed by the admin and
will be strictly followed. MAC settings and policy management will
be established in a secure network and are limited to system
administrators.

Examples- Access level of windows for ordinary users, admins,
and guests are some of the examples of MAC
Concept of view
Views in SQL are kind of virtual tables. A view also has rows and columns as they
are in a real table in the database. We can create a view by selecting fields from
one or more tables present in the database. A View can either have all the rows of a
table or specific rows based on certain condition.
syntax
CREATE VIEW view_name AS
SELECT column1, column2.....
FROM table_name
WHERE condition;
view_name: Name for the View
table_name: Name of the table
condition: Condition to select rows
DELETING VIEWS or Dropping
views
what if a created View is not needed any more? Obviously we will want to
delete it. SQL allows us to delete an existing View. We can delete or drop a
View using the DROP statement.
Syntax:
DROP VIEW view_name;
view_name: Name of the View which we want to delete.
Ex.
For example, if we want to delete the View MarksView, we can do this as:

DROP VIEW MarksView;


encryption techniques for sequrity

 Data Encryption is a method of preserving data confidentiality by


transforming it into ciphertext, which can only be decoded using
a unique decryption key produced at the time of the encryption.
 Data encryption converts data into a different form (code) that
can only be accessed by people who have a secret key (formally
known as a decryption key) or password. Data that has not been
encrypted is referred to as plaintext, and data that has been
encrypted is referred to as ciphertext. Encryption is one of the
most widely used and successful data protection technologies in
today’s corporate world.
Concept of Encryption

In encryption, the message to be encrypted is known as plaintext. The plaintext is transformed by a


function that is parameterized by a key. The output of the encryption process is knowm as the cipher
text.
The process of converting the plaintext to ciphertext is called as encryption and process of converting
the ciphertext to plaintext is called as decryption. Encryption is performed at the transmitting end
and decryption is performed at the receiving end.
For encryption process we need the encryption key and for decryption process we need decryption
key as shown in Fig.
Without the knowledge of decryption key intruder cannot break the ciphertext to plaintext. This
process is also called as Cryptography.
statistical database security

 Certain databases may contain confidential or secret data of


individuals of country like (Aadhaar numbers, PAN card numbers) and
this database should not be accessed by attackers. So, therefore it
should be protected from user access. The database which contains
details of huge population is called Statistical databases and it is used
mainly to produce statistics on various populations. But Users are
allowed to retrieve certain statistical information of population like
averages of population of particular state/district etc and their sum,
count, maximum, minimum, and standard deviations, etc. It is the
responsibility of ethical hackers to monitor Statistical Database security
statistical users are not permitted to access individual data, such as
income of specific person, phone number, Debit card numbers of
specified person in database because Statistical database security
techniques prohibit retrieval of individual data. It is also responsibility
of DBMS to provide confidentiality of data about individuals.

You might also like