Chapter - 6 Database Security and Authorization
Chapter - 6 Database Security and Authorization
AUTHORIZATION
Chapter
1 -6 Introduction to Database Security Issues
Contents
2
Security types
Threats of database
Security mechanism
Here we discuss the techniques used for protecting the
database against persons who are not authorized to access
either certain parts of a database or the whole database.
Introduction to Database Security Issues
3
• Loss of integrity: (users should be able to modify things they are not
supposed to.)
user.)
o Confidentiality, integrity and availability, also known
The DBA has a DBA account in the DBMS - called system or superuser account,
Following are the major responsibilities of a DBA:
Account creation
Privilege granting
Privilege revocation
Security level assignment
Access Protection, User Accounts,
and Database Audits
11
To use Db user needs an account
The DBA will create a new account number and password
The user must log in to the DBMS using account number and password
The database system
keep track of all operations on the database that are applied by a certain user
in each login session
In the system log
If any tampering with the database is suspected,
a database audit is performed,
This consists of
reviewing the log -
to examine all accesses and operations applied to the database
during a certain time period.
A database log that is used mainly for security purposes is sometimes called an audit trail.
Discretionary Access Control Based on
Granting and Revoking Privileges
12
The typical method of enforcing discretionary access control in a database system
is based on the granting and revoking privileges.
Types of Discretionary Privileges
The account level: At this level, the DBA specifies the particular privileges that each account holds
independently of the relations in the database.
The relation (or table level): At this level, the DBA can control the privilege to access each individual
relation or view in the database.
The privileges at the account level apply to the capabilities provided to the account
itself and can include the following:
CREATE SCHEMA or CREATE TABLE or CREATE VIEW privilege;
The ALTER privilege
The DROP privilege;
Relation level:
The granting and revoking of privileges generally follow an authorization
model for discretionary privileges known as the access matrix model,
here the rows of a matrix M represents subjects (users, accounts, programs) and
the columns represent objects (relations, records, columns, views, operations).
Each position M(i, j) in the matrix represents the types of privileges (read, write,
update) that subject i holds on object j.
To control the granting and revoking of relation privileges, each relation R
in a database is assigned and owner account (created first)
The owner of a relation is given all privileges on that relation.
The owner account holder can pass privileges on any of the owned relation to
other users by granting privileges to their accounts.
14
User account A1 can create tables under the schema called EXAMPLE.
•
Suppose that A1 creates the two base relations EMPLOYEE and DEPARTMENT; A1 is then
owner of these two relations and hence all the relation privileges on each of them.
•
Suppose that A1 wants to grant A2 the privilege to insert and delete tuples in both of these
relations, but A1 does not want A2 to be able to propagate these privileges to additional
accounts:
Suppose that A1 wants to allow A3 to retrieve information from either of the two
tables and also to be able to propagate the SELECT privilege to other accounts.
A1 can issue the command:
Suppose that A1 wants to give back to A3 a limited capability to SELECT from the
EMPLOYEE relation and wants to allow A3 to be able to propagate the privilege.
The limitation is to retrieve only the NAME, BDATE, and ADDRESS attributes
and only for the tuples with DNO=5.
A1 then create the view:
CREATE VIEW A3EMPLOYEE AS SELECT NAME, BDATE, ADDRESS FROM
EMPLOYEE WHERE DNO = 5;
After the view is created, A1 can grant SELECT on the view A3EMPLOYEE to
A3 as follows:
GRANT SELECT ON A3EMPLOYEE TO A3 WITH GRANT OPTION;
Example(5)
23
− Bell-LaPadula Model
• Objects (e.g., tables, views, tuples)
• Subjects (e.g., users, user programs)
− Security classes:
− Top secret(TS), secret (S), confidential (C), unclassified (U): TS > S> C > U
• Each object and subject is assigned a class.
• Subject S can read object O only if class(S) >= class(O) (Simple Security
Property)
• Subject S can write object O only if class(S) <= class(O) (*-Property)
25
Question