Chapter 4- Database Security
Chapter 4- Database Security
Introduction
Security Goals
Companies collect vast amounts of data daily from operations and customer interactions.
Databases store this data and support business automation and decision-making.
databases.
Effective database security encompasses hardware, software, human resources, and the data
itself.
It ensures confidentiality, integrity, and availability of data through a range of tools and
measures.
5
INTRODUCTION … (3)
Only authorized personnel should have access, and all access must be logged.
Physical security is the foundation, but databases also face numerous internal and external
threats.
6
INTRODUCTION … (4)
The physical and/or the virtual database server and the underlying hardware
Database security is a complex and challenging endeavor that involves all aspects of
The more accessible and usable the database, the more vulnerable it is to security threats;
the more invulnerable the database is to threats, the more difficult it is to access and use.
8
SECURITY GOALS … (1)
Security refers to activities and measures to ensure the confidentiality, integrity, and
approach.
Confidentiality
Integrity, and
Availability
9
SECURITY GOALS … (2)
CONFIDENTIALITY
Confidentiality deals with ensuring that data is protected against unauthorized access, and if
the data are accessed by an authorized user, the data are used only for an authorized
purpose.
In other words, confidentiality entails safeguarding data against disclosure of any information
Data must be evaluated and classified according to the level of confidentiality: highly
restricted (very few people have access), confidential (only certain groups have access), and
INTEGRITY
Integrity, within the data security framework, is concerned with keeping data consistent, free
of errors, or anomalies. Integrity focuses on maintaining the data free of inconsistencies and
anomalies.
The DBMS plays a pivotal role in ensuring the integrity of the data in the database.
However, from the security point of view, integrity deals not only with the data in the
database but also with ensuring that organizational processes, users, and usage patterns
AVAILABILITY
Availability refers to the accessibility of data whenever required by authorized users and for
authorized purposes.
To ensure data availability, the entire system (not only the data component) must be protected
Service interruptions could be very costly for companies and users alike.
Database security is a broad area that addresses many issues, including the following:
Various legal and ethical issues regarding the right to access certain information for
example, some information may be deemed to be private and cannot be accessed legally by
unauthorized organizations or persons. In the United States, there are numerous laws
Policy issues at the governmental, institutional, or corporate level regarding what kinds of
information should not be made publicly available for example, credit ratings and personal
medical records.
13
DATABASE SECURITY ISSUES … (2)
System-related issues such as the system levels at which various security functions should
be enforced for example, whether a security function should be handled at the physical
The need in some organizations to identify multiple security levels and to categorize the
data and users based on these classifications for example, top secret, secret, confidential,
and unclassified. The security policy of the organization with respect to permitting access to
Excessive Privileges: When users are granted database privileges beyond what is necessary for their role, they
may exploit these to access confidential or sensitive information. In addition to strong hiring and oversight practices,
the key solution is query-level access control. This approach enforces the principle of least privilege by restricting
users to only the specific operations and data they genuinely require, minimizing the risk of unauthorized access.
Privilege Abuse: Users with legitimate access privileges may misuse them for unauthorized purposes. A strong
mitigation strategy is to implement fine-grained access control policies not just for what data is accessed, but also
how and under what conditions it is accessed. By enforcing policies based on factors like time of day, geographic
location, client application used, and volume of data retrieved, organizations can better detect and prevent misuse of
privileges.
Unauthorized Privilege Elevation: Attackers may exploit vulnerabilities to escalate their low-level access
privileges to higher-level ones, gaining unauthorized control or access to sensitive data and functions.
15
DATABASE SECURITY THREATS … (2)
Platform Vulnerabilities: The platform or OS may be vulnerable to leakage and corruption of data.
SQL injection: SQL injection is a technique where an attacker manipulates user input to inject malicious SQL queries
into a database. This can trick the server into executing unintended commands, potentially exposing sensitive
information. In more severe cases, attackers can gain unauthorized access to the entire database, alter or delete data,
and even perform administrative operations such as creating new users or changing permissions.
Denial of Service: This attack involves making the resource unavailable for the purpose it was designed. This means
Backup Exposure: The backup storage media remains unprotected from any attacks. As a result there are several
Threats to databases can result in the loss or degradation of some or all of the following commonly accepted
LOSS OF INTEGRITY.
Database integrity refers to the requirement that information be protected from improper modification.
Modification of data includes creating, inserting, and updating data; changing the status of data; and
deleting data.
Integrity is lost if unauthorized changes are made to the data by either intentional or accidental acts.
If the loss of system or data integrity is not corrected, continued use of the contaminated system or
LOSS OF AVAILABILITY.
Database availability refers to making objects available to a human user or a program who/which has a
legitimate right to those data objects. Loss of availability occurs when the user or program cannot access
these objects.
LOSS OF CONFIDENTIALITY.
The impact of unauthorized disclosure of confidential information can range from violation of the Data
Database Security Controls are mechanisms and measures put in place to protect databases from
unauthorized access, misuse, corruption, or loss. These controls ensure the confidentiality, integrity, and
1. ACCESS CONTROLS
Access control refers to mechanisms that regulate who can access the database and what actions they can
perform. The goal is to ensure that only authorized users can access data appropriate to their roles or
responsibilities.
18
DATABASE SECURITY CONTROLS … (1)
AUTHENTICATION
Authentication is the process of confirmation that whether the user log in only according to the rights
A particular user can login only up to his/her privilege but he/she can’t access the other sensitive data.
Common Methods:
AUTHORIZATION
Authorization is the process of determining and enforcing what an authenticated user is allowed to do
Once a user’s identity has been verified (via authentication), authorization defines their level of access
such as which data they can view, modify, or delete, and which database operations they are permitted to
perform.
2. ENCRYPTION CONTROL
This method is mainly used to protect sensitive data (such as credit card numbers, OTP numbers, password)
The data is encoded using some encoding algorithms. OTP=One time password
An unauthorized user who tries to access this encoded data will face difficulty in decoding it, but authorized
Data-at-Rest Encryption: Encrypts stored data to prevent unauthorized access if physical storage is
compromised.
Data-in-Transit Encryption: Secures data being transmitted across networks using SSL/TLS.
Column-level Encryption: Protects specific sensitive fields like credit card numbers or SSNs.
21
BEST PRACTICES OF DATABASE SECURITY … (1)
Because databases are network-accessible, any security threat to any component within or
portion of the network infrastructure is also a threat to the database, and any attack
Thus, database security must extend far beyond the confines of the database alone.
When evaluating database security in your environment to decide on your team’s top
Physical Security: Whether your database server is on-premises or in a cloud data center,
is in a cloud data center, your cloud provider takes care of this for you.
Administrative and network access controls: The practical minimum number of users
should have access to the database, and their permissions should be restricted to the
minimum levels necessary for them to do their jobs. Likewise, network access should be
User account and device security: Always be aware of who is accessing the database and
when and how the data is being used. Data monitoring solutions can alert you if data activities
are unusual or appear risky. All user devices connecting to the network housing the database
should be physically secure (in the hands of the right user only) and subject to security controls
at all times.
Encryption: All data, including data in the database and credential data, should be protected
with best-in-class encryption while at rest and in transit. All encryption keys should be handled
Database software security: Always use the latest version of your database management software, and
Application and web server security: Any application or web server that interacts with the database
can be a channel for attack and should be subject to ongoing security testing and best practice
management.
Backup security: All backups, copies or images of the database must be subject to the same (or
Auditing: Record all logins to the database server and operating system, and log all operations that are
performed on sensitive data as well. Database security standard audits should be performed regularly.
TEACHING YOU IS GOOD LUCK