Showing posts with label Database Protection. Show all posts
Showing posts with label Database Protection. Show all posts

Wednesday, 6 August 2014

Database Protection | DISCRETIONARY ACCESS CONTROL | access control


DISCRETIONARY ACCESS CONTROL

The typically method of enforcing discretionary access control in a database system is based on the granting and revoking privileges.

1. GRANTING PRIVILEGES
The grant command is used to provide system level privileges .System level privileges are those privileges that you need to actually do something on the system.
EXAMPLE- Your grant system privileges to a user so that they can
  • Connect to the database
  • Create objects(create table,index)
  • Perform DBA activities like backup and database 
  • Alter session related parameters
2 .REVOKING PRIVILEGES- 
The revoke command is used to revoke system level privileges that were previously granted with the grant command. Simple enter the privilege you wish to revoke in the body of the revoke command. 

EXAMPLE OF GRANT AND REVOKE PRIVILEGES-
  • Suppose that DBA(Data base administer) creates four accounts A1,A2,A3 and A4 and wants only A1 to be able to create base relations, then the DBA must issue the following GRANT command in SQL.               
          GRANT CREATE TABLE TO A1;
  • Suppose that A1 creates two base relations EMPLOYEE AND DEPARTMENT.Hence A1 is then the owner of these two relations. 
EMPLOYEE RELATION  
NAME
SSN
BDATE
ADDRESS
SALARY
DNO
          
DEPARTMENT RELATION
DNUMBER
DNAME
MGR_SSN
  • Next suppose that A1 wants to grant to account A2 ,the privilege to insert and delete tuples in both of these relations.However A1 does not want A2 to be able to propagate these privileges to additional accounts then A1 can issue the following command.
GRANT INSERT ,DELETE ON EMPLOYEE,DEPARTMENT TO A2;

          Here A2 has not given the Grant Option.
  • Now suppose that A1 wants to allow account A3 to retrieve information from either of the two tables. A1 can issue the following command.
GRANT SELECT ON EMPLOYEE ,DEPARTMENT TO A3 WITH GRANT OPTION;

          The clause with GRANT OPTION means that A3 can now propagate the privileges to other              accounts by using GRANT.
          E.G.- A3 can grant the SELECT privilege on the EMPLOYEE relation to A4 by issuing the following command. 

GRANT SELECT ON EMPLOYEE TO A4;
  • Now suppose that A1 decides to revoke the SELECT privilege on the EMPLOYEE relation from A3 .A1 then can issue this command.
REVOKE SELECT ON EMPLOYEE FROM A3;

         The DBMS must now automatically revoke the SELECT privilege on EMPLOYEE from A4 too because A3 granted that privilege to A4 and A3 does not have the privilege any more.

Database Protection |access control mechachanism | mandatory access control mechanism


MANDATORY ACCESS CONTROL MECHANISM

INTRODUCTION-
  • In many applications an additional security policy is needed that classifies data and users based on security classes.This approach is known as mandatory access control.
  • The need for multilevel security exists in government military and intelligence applications as well as many industrial and corporate applications.
TYPICAL SECURITY CLASSES
  • TS(Top Secret)
  • Secret(S)
  • Confidential(C)
  • Unclassified(U)  
      TS>=S>=C>=U
  • TS is the highest level
  • U is the lowest level
The commonly used model for multilevel security known as BELL - LAPADULA MODEL

BELL - LAPADULA MODEL
  • Classifies each subject(user,account,program) and object (relation,tuple,column,view,operation) into one of the security classifications TS,S,U or C.
  • We will refer to the clearance of a subject S as class(S) and to the classification of an object O as class(O).
Two restrictions are enforced on data access based on the subject/ object classifications.
  1. A subject S is not allowed read access to an object O unless class(S) >= class(O). This is known as simple security property and intuitive .
  2. A subject S is not allowed to write an object O unless class(S) <= class(O).This is known as star property and is less intuitive.

A multilevel relation scheme R with n attributes would be represented as-
R ( A1,C1,A2,C2-------------------An ,Cn,TC)

Database Protection | access control | ROLE BASED ACCESS CONTROL


ROLE BASED ACCESS CONTROL

1. Role based access control (RBAC) emerged rapidly in the 1990s as a proven technology for managing and enforcing security in large scale enterprise wide systems.

2 Permissions are associated with roles and users are assigned to appropriate roles.Roles can be created using the CREATE ROLE and DESTROY  ROLE command.

3. The GRANT and REVOKE commands discussed under DAC can then be used to assign and revoke privileges from roles.

4. RBAC ensures that only authorized user are given access to certain data and resources.

5. Roles models have several desirable features such as flexibility,policy neutrality ,better support for security management and administration and others aspects that make them attractive candidates for developing secure wed based applications.

6. RBAC model provides a natural mechanism for addressing the security issues related to the execution of tasks and workflows.

7. Easier deployment over the internet has been another reason for the success of RBAC models.

Database Protection |ENCRYPTION


ENCRYPTION

INTRODUCTION- Encryption is a technique for transforming information on a computer in such a way that it becomes unreadable.So, even if someone is able to gain access to a computer with personal data on it ,they likely won't be able to do anything with the data unless they have complicated,expensive software or the original data key.


TYPES OF ENCRYPTION- Two types of encryption are-
  1. SYMMETRIC METHODS
  2. ASYMMETRIC METHODS 
1. SYMMETRIC METHODS-
  • Symmetric encryption is also known as private-key cryptography and is called so because the key used to encrypt and decrypt the  message must remain same..
  • Using this method a sender encrypts the data with one key and then sends the data (CIPHER TEXT) and the receiver use the key to decry-pt the data. 

2. ASYMMETRIC METHODS- 
  • Asymmetric method or public key cryptography is different than the previous method because it uses two keys for encryption or decryption
  • .A public key is freely available to everyone and is used to encrypt messages and a different private key is used by the recipient to decry-pt messages.

Database Protection | firewalls


FIREWALLS

INTRODUCTION-
  • The term firewall originally referred to a wall intended to confine a fire or potential fire within a building. Later uses refer to similar structures, such as the metal sheet separating the engine compartment of a vehicle or aircraft from the passenger compartment.
  • In computing, a firewall is a software or hardware-based network security system that controls the incoming and outgoing network traffic based on applied rule set. 
  • A firewall establishes a barrier between a trusted, secure internal network and another network (e.g., the Internet) that is not assumed to be secure and trusted.
  • Many personal computer operating systems include software-based firewalls to protect against threats from the public Internet.
  •  Many routers that pass data between networks contain firewall components and, conversely, many firewalls can perform basic routing functions.



Database Protection | digital signatures


DIGITAL SIGNATURES

AT SENDER SIDE
  • Message is divided into two parts.Firstly through hash function message digest is made.Message digest is the smallest version of the message.
  • Secondly the message is encrypted i.e. cipher text is made and then the combination of both i.e. encrypted  message + message digest is sent to the receiver.
AT RECEIVER SIDE
  • At receiver side through hash function a new message digest is made and also through decryption method.
  • If both the message digest are same then we can say that the received message is correct or without error.