Module 5: Database Security

alt text

Access control mechanisms

Database access control is a method of allowing access to sensitive data only to users who are authorised to access such data and to restrict access to unauthorized persons. It includes two main components:

User Accounts

Login session

Database audit

Access Control Mechanisms

Authorization: determining whether a user should be allowed to execute the transaction they are attempting.

  1. Discretionary Access Control (DAC)
  1. Mandatory Access Control (MAC)
  1. Role-based Access Control (RBAC)

Discretionary Access Control

Based on Granting and Revoking privileges

alt text

Account level: privileges specified for each account, independent of relations in the account

Relation level: privileges for each relation or view

alt text

Mandatory Access Control (MAC)

Data and users are associated with security classes

alt text

Simple Security Property

Example:

alt text

Example:

alt text

Inference attacks and polyinstantiation

UPDATE EMPLOYEE
SET JobPerformance = ‘Excellent’
WHERE Name = ‘Smith’;

alt text

SQL Injection

Protection Techniques

SQL injection attacks can occur when SQL statements are used in programs

Bind variables (using parameterized statements)

Filtering input (input validation)

Function security