Docsity

Database Security and Authorization: A Comprehensive Guide to Access Control Mechanisms, Lecture notes of Database Management Systems (DBMS)

Partial preview of the text

Download Database Security and Authorization: A Comprehensive Guide to Access Control Mechanisms and more Lecture notes Database Management Systems (DBMS) in PDF only on Docsity!

Security and Authorization

Oct 2017

10–1 Security and Authorization (1.1.0)

  • There are 3 main objectives when designing a secure database application: 1. Secrecy : Information should not be disclosed to unauthorized users. 2. Integrity : Only authorized users should be allowed to modify data.
  1. Availability : Authorized users should not be denied access.
  • To achieve them we need a security policy

Introduction

  • Most users need to access only a small part of the database to carry out their tasks
  • The DBMS provides 2 main approaches to access control:
    1. Discretionary^ access control (DAC). Users are given access rights or privileges on the objects in the database that can be passed from one users to other users.
  1. Mandatory^ access control (MAC). The access rights cannot be changed by users.
  • Using DAC a user could give access to sensitive information to an unauthorized user. MAC makes sure this does not happen.

Access Control

  • SQL supports DAC using the GRANT and REVOKE commands

GRANT privileges ON object TO users [WITH GRANT

  • For our purposes, an object is base table, a view.
  • The privileges are: - SELECT : The right to access (read) all the columns (and future columns) of a table and all its rows

Discretionary AC (DAC)

  • The privileges are (cont...) - DELETE : The right to delete a row - REFERENCES(column-name) : The right to define foreign keys (in other table) that refer to the column ’column-name’
  • Users who have a privilege with the GRANT OPTION can pass it to other users

Discretionary AC (cont...)

  • A user who creates a table has all the privileges on that table, and the ability to GRANT rights to others
  • A user who creates a view : - has the privileges on that view that he or she has on every one of the underlying views or base tables, - must have SELECT on each underlying view or table - has INSERT , DELETE , or UPDATE on each underlying table, and the view is update-able , the user gets the same rights on the view.

show the sid, or bid of the reserved boat. Also, it only shows sailors with rating bigger than 6.

Views

  • Only the owner of the schema can execute the statements CREATE , ALTER , DROP to create a table, a view. etc.
  • The right to execute these commands cannot be granted to others or revoked.

Schema

  • DAC has some weaknesses
  • Users might GRANT rights to the wrong users
  • A popular model for MAC is the Bell-LaPadula model - Objects (tables, views, ...) are accessed by subjects (users, groups, programs) - There are security classes. Every object belongs to a security class

Mandatory AC (MAC)

- And clearances. Each subject is assigned a clearance for each security class (whether the user can or cannot access the given security class)

Mandatory AC (MAC)

  • The model imposes 2 restrictions on all reads and writes to the

DB objects:

  • Simple Security Property. Subject S is allowed to read object O

only if class(S) ≥ class(O)

- For example, a user with T S clearance can read a table with C clearance, but a user with C clearance will not be allowed to read a table in the T S class.

  • It makes sense that only people with clearance equal or above can read a given object
  • *-Property : A subject S is allowed to write object O if

class(S) ≤ class(0).

- For example, a user with clearance S can write only objects with S or T S classification.

  • It looks strange, but the rational is: a user cannot, by mistake or willingly, write sensitive data (say TS) to a table that is low sensitive (say U class)