CB3401 Unit 5
CB3401 Unit 5
Authentication
Authentication is a method of verifying the identity of a person who is accessing your
database. Note that authentication isn’t enough to protect data. An additional layer of security
is required
Authorization
Authorization, which determines whether a user should be allowed to access the data or make
the transaction he’s attempting. Without authentication and authorization, there is no data
security.
Any company whose employees connect to the Internet, thus, every company today, needs
some level of access control implemented.
Database Access Control
There are two basic SQL commands for implementing database access control.
Grant
The SQL command for granting privileges has the following syntax.
The first line of the command describes what we would like to grant. We can grant either
privileges - like SELECT - or an entire role, such as admin.
We can optionally scope our grant to a specific table.
Our grant must have a recipient, be it a particular user, role, or public. Public refers to the
entirety of users/roles that interact with the database.
We can optionally require users to identify themselves using a certain password if they wish
to revoke this grant.
Finally, we can optionally allow the grantee to further propagate their access with the WITH
GRANT OPTION clause.
For example, if we would like to grant Alice the ability to perform a SELECT on any table,
and propagate that access to others, we could issue the following command:
The first line of the command describes the privilege or role that we would like to revoke.
We can optionally scope our revocation to a specific table.
Finally, we must revoke access from a particular entity. This entity can be a user, role, or the
general public.
For example, to revoke the access we just gave to Alice, we issue the following command:
A discretionary access control system is a system in which a user with access to a certain
level of data can give access to the same level of data to someone else based on their
judgement and choice.
The first access-control list (ACL) is made by the administration but any access granted to
someone by someone already on the list is hard to monitor. Although the list can be checked,
revised, and updated anytime by the administration.
This process makes the flow of data much easier and a lot more user-friendly than any other
system. But, contrary to the flexibility it offers, this system is also less secure as the flow of
information can’t be administered regularly.
Due to the less secure passage, this system offers a flow of information, which makes it unfit
for organizations that require high-level security of their data such as in fields like - medical,
finance, military, government offices, etc.
As in any other system in this system also whether to give access to data or not to an
employee is decided by administration only. An important point worth mentioning here again
is that once the access is granted to a user only then they can give access to someone else, but
they cannot give access to any of the data to which they do not have access.
Uses:
Advantages:
User Friendly: Managing data and permissions is easier with DAC. The user interface
is very easy to operate thus no need to go through the pain of planning it all out at
once.
Flexible: While working, often a need to share data with co-workers comes up. DAC
system allows any user with access to certain information to grant access to others as
well, hence making the working process smooth.
Less Headache for Administration: DAC doesn’t require regular maintenance does
not take much time. Sharing of data is much easier as the administration does not need
to interfere whenever a piece of information is needed to be shared with a user.
Disadvantages:
Less Secure System:- As access can be given from one person to another, data is not
very well secured under DAC. Thus, it is not much feasible for the administration to
overview ACL now and then, which may lead to leakage of information to someone
outside the organization.
Hard to keep track of data:- As the DAC system is not centralized, the only way
administration can monitor data flow is by going through ACL. Thich is only
convenient in the case of a small organization where employees are fewer.
Conclusion:
As the DAC system is not much secure or one could say least secure among role, mandatory
and discretionary systems, it is not advisable to use where very confidential data is needed to
be protected. But its working flexibility makes it favorable for small organizations or offices
where the number of total employees is around 30-50.
Mandatory Access Control System (MAC)
Mandatory Access Control (MAC) is a system to allow or deny access to private information
in an organization. What makes MAC different from other system is that it works on a
hierarchy pattern. Under this system, the whole team force must be divided into categories
according to their roles and responsibility and according to the information they must be
allowed to see. To make that happen the administration needs to put a lot of efforts at the
time of planning the information flow properly. It would be only a one-time effort to set
things up in order, after that it would only require updates as per change in the position/role.
Under MAC, the access flows in a way that an employee with access to higher-level data will
also have access to the data available to their lower-level ranks. If we put it in simple words,
it like a flow chart of information and the person in middle will have access to ground level
data but not any level further up.
Often at workplaces where MAC system is to be used, categorizing the information flow in
different categories like - ground level, confidential, secret and top-secret is suggested. Every
system that an individual might be using would have been given prior access as per the
requirements.
Uses:
MAC has a wide range of usage in different sectors which requires a system that can
secure confidential data without any constant supervision.
Majorly used in sectors like - government offices, military, health care, financial,
engineering projects, etc.
Advantages:
High-level data protection (most secure system among role, mandatory and
discretionary system): With MAC, one can be sure that their most confidential data is
well protected and leaves no room for any leakage.
Centralized Information: Once data is set in a category it cannot be de-categorized by
anyone other than the head administrator. This makes the whole system centralized
and under the control of only one authority.
Privacy: Data is set manually by an administrator. No one other than admin can make
changes in category or list of users' accesses to any category. It can be updated only
by admin.
Disadvantages:
Careful Setting-Up Process: MAC must be set up with good care otherwise it will
make working chaotic. It is because sometimes a piece of information needs to be
shared among co-workers in the same organization but MAC restricts anyone to do
so.
Regular Update Required: It requires regular updating when new data is added or old
data is deleted. The administration is required to put some consideration into the
MAC system and ACL list now and then.
Lack of Flexibility: MAC system is not operationally flexible. It is not an easy task to
initially input all data and create an ACL that won’t create any trouble later.
Conclusion:
MAC is the most secure system due to which it is recommended in offices where highly
confidential data is needed to be protected and not in any private offices where a less secure
system would be enough.
Uses:
Bank or financial sector – vaults, locker rooms and data rooms must be well protected
to ensure safety
Storage rooms in hotels, hostels, offices, & warehouses
Commercial/Residential Apartments – To allow entry of only known individuals, thus
ensuring the safety of people living in the society.
Ease for Visitors – in offices or even in apartments, with RBAC, it is much easier and
faster to just enter OTP for entrance.
Advantages:
Improves Work Efficiency: Using RBAC makes it much easier for office
management to change access according to change in the role of office staff. This is
much more convenient to do rather than administering every entry and exit and
approving every time.
Security Against any Inside Information Leak: As the access to certain information or
room will only be given to a certain set of people responsible and trusted, it reduces
any type of leakage of confidential information or even entry of any unwanted
individual.
Time-Saving: Under RBAC Management, one would only require a card or password
(according to system functionality) to get access to any information/room. This is
contrary to prior methods wherein security officials use to ask and confirm ones’
credentials and then that person would be allowed to enter after everything seems
fine, which is very time-consuming.
Helps to Keep Record: RBAC system not only just ensures safety but, also records
data of entries and exits which makes it easy to analyze work hours as well.
Disadvantages:
Components of ABAC:
Benefits of ABAC:
Challenges of ABAC:
Adopting Attribute-Based Access Control (ABAC) offers many benefits, but it's essential to
be aware of its challenges:
Complex Implementation: Establishing ABAC requires defining a broad set of
attributes across users and resources. This complexity can be particularly challenging
for smaller organizations with limited technical resources, as it demands a deep
understanding of the operational and security dynamics. This complexity can be
alleviated by using best practices such as decoupling policy and code.
Intricate Policy Management: ABAC involves creating detailed, context-specific
policies, which can be numerous and intricate. This complexity necessitates
meticulous management to ensure policies remain relevant and effective as the
organization's needs evolve. These policies can be managed by creating or adopting a
policy management solution.
Performance Overhead: ABAC's detailed attribute evaluation process can impact
system performance. In scenarios requiring rapid access decisions or in large-scale
deployments, the resource intensity of processing multiple attributes and complex
policies can lead to latency issues.
Risk of Policy Conflicts: Given the granular nature of ABAC policies, there's a
potential for conflicting rules, especially when numerous attributes and conditions are
involved. Resolving these conflicts requires careful policy design and regular reviews
to maintain consistency and clarity in access control decisions.
Data synchronization: Applications often rely on data sources (Internal or external)
to aid in the decision-making process (Think of limiting access based on payment
status - information that is contained and managed in Stripe). Getting all the relevant
attribute data into your decision point in time can pose quite a challenge
(Though tools like OPAL can alleviate it).
Effectively addressing these challenges is crucial for organizations to harness the full
potential of ABAC, ensuring a robust, flexible, and efficient access control system.
Specify the set of tables to be included in the Extract Process. You can specify the name of a
single table and request that Move provide the names of all related tables. One table is
identified as the Start Table, or table from which data is first extracted.
Select relationships to be traversed to extract the data. Move has default rules for how
relationships are traversed between the specified tables. You can select from a list of all of
the relationships defined to the database and to the Optim™ Directory. (The relationships
contained in the Directory supplement the relationships contained in the database.)
Define criteria for the rows to be extracted by specifying:
A selection of rows chosen while browsing the data (Point and Shoot).
A sampling of rows, accomplished by extracting every nth row.
A maximum number of rows for a single table.
A maximum number of children per parent.
Grouping (e.g., extract 20 customers from each of the 50 states).
Establish Actions to be executed when data is extracted or inserted.
Ensure that the desired data is extracted using the Show Steps function to review how
Move will traverse the database.
When a user can get confidential information, without directly accessing it,that is an
inference attack. This information is sensitive and is above the reach of common
users. This kind of data mining takes place to have information about trade secrets,
without access to files. The inference attack helps the hacker to get some information
that is usually predicted, leaked, or analyzed but is authentic.
Conclusion:
In recent years, its database has become vulnerable to breaches. This is because technology
has not only benefited us but also left some options for the ones who enjoy cyber thefts.
Inference attacks are usually ignored because when discussing security, the main focus is
always the physical control and hindering of direct access. We ignore indirect access threats
to our database. So, be wary of rising mechanics and minds that affect our privacy indirectly.
Database encryption
Column-level encryption
In order to explain column-level encryption it is important to outline basic database
structure. A typical relational database is divided into tables that are divided
into columns that each have rows of data. Whilst TDE usually encrypts an entire
database, column-level encryption allows for individual columns within a database to
be encrypted. It is important to establish that the granularity of column-level
encryption causes specific strengths and weaknesses to arise when compared to
encrypting an entire database. Firstly, the ability to encrypt individual columns allows
for column-level encryption to be significantly more flexible when compared to
encryption systems that encrypt an entire database such as TDE. Secondly, it is
possible to use an entirely unique and separate encryption key for each column
within a database. This effectively increases the difficulty of generating rainbow
tables which thus implies that the data stored within each column is less likely to be
lost or leaked. The main disadvantage associated with column-level database
encryption is speed, or a loss thereof. Encrypting separate columns with different
unique keys in the same database can cause database performance to decrease,
and additionally also decreases the speed at which the contents of the database can
be indexed or searched.
Field-level encryption
Experimental work is being done on providing database operations (like searching or
arithmetical operations) on encrypted fields without the need to decrypt them. Strong
encryption is required to be randomized - a different result must be generated each
time. This is known as probabilistic encryption. Field-level encryption is weaker than
randomized encryption, but it allows users to test for equality without decrypting the
data.
Key management
The Symmetric & Asymmetric Database Encryption section introduced the concept
of public and private keys with basic examples in which users exchange keys. The
act of exchanging keys becomes impractical from a logistical point of view, when
many different individuals need to communicate with each-other. In database
encryption the system handles the storage and exchange of keys. This process is
called key management. If encryption keys are not managed and stored properly,
highly sensitive data may be leaked. Additionally, if a key management system
deletes or loses a key, the information that was encrypted via said key is essentially
rendered "lost" as well. The complexity of key management logistics is also a topic
that needs to be taken into consideration. As the number of application that a firm
uses increases, the number of keys that need to be stored and managed increases
as well. Thus it is necessary to establish a way in which keys from all applications
can be managed through a single channel, which is also known as enterprise key
management. Enterprise Key Management Solutions are sold by a great number of
suppliers in the technology industry. These systems essentially provide a centralised
key management solution that allows administrators to manage all keys in a system
through one hub. Thus it can be said that the introduction of enterprise key
management solutions has the potential to lessen the risks associated with key
management in the context of database encryption, as well as to reduce the
logistical troubles that arise when many individuals attempt to manually share keys.
Hashing
Hashing is used in database systems as a method to protect sensitive data such as
passwords; however it is also used to improve the efficiency of database
referencing. Inputted data is manipulated by a hashing algorithm. The hashing
algorithm converts the inputted data into a string of fixed length that can then be
stored in a database. Hashing systems have two crucially important characteristics
that will now be outlined. Firstly, hashes are "unique and repeatable". As an
example, running the word "cat" through the same hashing algorithm multiple times
will always yield the same hash, however it is extremely difficult to find a word that
will return the same hash that "cat" does. Secondly, hashing algorithms are not
reversible. To relate this back to the example provided above, it would be nearly
impossible to convert the output of the hashing algorithm back to the original input,
which was "cat".In the context of database encryption, hashing is often used in
password systems. When a user first creates their password it is run through a
hashing algorithm and saved as a hash. When the user logs back into the website,
the password that they enter is run through the hashing algorithm and is then
compared to the stored hash. Given the fact that hashes are unique, if both hashes
match then it is said that the user inputted the correct password. One example of a
popular hash function is SHA (Secure Hash Algorithm) 256.
Salting
One issue that arises when using hashing for password management in the context of
database encryption is the fact that a malicious user couldpotentially use an Input to
Hash table rainbow table for the specific hashing algorithm that the system uses. This
would effectively allow the individual to decrypt the hash and thus have access to
stored passwords. A solution for this issue is to 'salt' the hash. Salting is the process
of encrypting more than just the password in a database. The more information that is
added to a string that is to be hashed, the more difficult it becomes to collate rainbow
tables. As an example, a system may combine a user's email and password into a
single hash. This increase in the complexity of a hash means that it is far more difficult
and thus less likely for rainbow tables to be generated. This naturally implies that the
threat of sensitive data loss is minimised through salting hashes.
Pepper
Some systems incorporate a "pepper" in addition to salts in their hashing systems.
Pepper systems are controversial, however it is still necessary to explain their use. A
pepper is a value that is added to a hashed password that has been salted. This
pepper is often unique to one website or service, and it is important to note that the
same pepper is usually added to all passwords saved in a database. In theory the
inclusion of peppers in password hashing systems has the potential to decrease the
risk of rainbow (Input: Hash) tables, given the system-level specificity of peppers,
however the real world benefits of pepper implementation are highly disputed.
Application-level encryption
In application-level encryption, the process of encrypting data is completed by the
application that has been used to generate or modify the data that is to be encrypted.
Essentially this means that data is encrypted before it is written to the database. This
unique approach to encryption allows for the encryption process to be tailored to
each user based on the information (such as entitlements or roles) that the
application knows about its users.
According to Eugene Pilyankevich, "Application-level encryption is becoming a good
practice for systems with increased security requirements, with a general drift toward
perimeter-less and more exposed cloud systems”.