Data and Databases

In this chapter:

  • database terms and concepts

  • security requirements: C-I–A; reliability, types of integrity

  • access control; sensitive data, disclosure, inference, aggregation

  • data mining and big data

P rotecting data is at the heart of many secure systems, and many users (people, programs, or systems) rely on a database management system to manage the protection of structured data. For this reason, we devote this chapter to the security of databases and database management systems as an example of how application security can be designed and implemented for a specific task.

Databases are essential to many business and government organizations, holding data that reflect the organization’s core activities. Often, when business processes are reengineered to make them more effective and more in tune with new or revised goals, one of the first systems to receive careful scrutiny is the set of databases supporting the business processes. Thus, databases are more than software-related repositories. Their organization and contents are considered valuable corporate assets that must be carefully protected.

However, the protection provided by database management systems has had mixed results. Over time, we have improved our understanding of database security problems, and several good controls have been developed. But there are still more security concerns for which no controls are available.

We begin this chapter with a brief summary of database terminology. We then consider the security requirements for database management systems. Two major security problems—integrity and secrecy—are explained in a database context. We continue the chapter by studying two important (but related) database security problems: inference and multilevel data. Both problems are complex, and there are no immediate solutions. However, by understanding the problems, we become more sensitive to ways of reducing potential threats to the data. Finally, we conclude the chapter by looking at big data collection and data mining, a technology for deriving patterns from one or more databases. Data mining involves many of the security issues we raise in this chapter.

7.1 Introduction to Databases

We begin by describing a database and defining terminology related to its use. We draw on examples from what is called the relational database because it is one of the most widely used types. However, the concepts described here apply to any type of database. We first define the basic concepts and then use them to discuss security concerns.

Concept of a Database

A database is a collection of data and a set of rules that organize the data by specifying certain relationships among the data. Through these rules, the user describes a logical format for the data. The data items are stored in a file, but the precise physical format of the file is of no concern to the user. A database administrator is a person who defines the rules that organize the data and also controls who should have access to what parts of the data. The user interacts with the database through a program called a database manager or a database management system (DBMS) , informally known as a front end .

Components of Databases

The database file consists of records , each of which contains one related group of data. As shown in the example in Table 7-1 , a record in a name and address file consists of one name and address. Each record contains fields or elements , the elementary data items themselves. The fields in the name and address record are NAME, ADDRESS, CITY, STATE, and ZIP (where ZIP is the U.S. postal code). This database can be viewed as a two-dimensional table, where a record is a row and each field of a record is an element of the table.

A database is a collection of tables, each containing records having one or more fields or elements.

Table 7-1 Example of a Database

ADAMS

212 Market St.

Columbus

OH

43210

BENCHLY

501 Union St.

Chicago

IL

60603

CARTER

411 Elm St.

Columbus

OH

43210

Not every database is easily represented as a single, compact table. The database in Figure 7-1 logically consists of three files with possibly different uses. These three files could be represented as one large table, but that depiction may not improve the utility of or access to the data.

An illustration shows Database of Several Related Tables.

FIGURE 7-1 Database of Several Related Tables

The first table shows the following data: ADAMS, 212 Market St., Columbus, OH, 43210; BENCHLY, 501 Union St., Chicago, IL 60603; CARTER, 411 Elm St., Columbus, OH, 43210. The second table shows the following data: ADAMS, Charles; ADAMS, Edward; BENCHLY, Zeke; CARTER, Marlene; CARTER, Beth; CARTER, Ben; CARTER, Lisabeth; CARTER, Mary. The third table shows the following data: 43210, CMH; 60603, ORD. An arrow from the ADAM of the first table points at the two ADAMs of the second table. Arrows from 43210, and 60603 point at the CMH of the third table.

The logical structure of a database is called a schema . A particular user may have access to only part of the database, called a subschema . The overall schema of the database in Figure 7-1 is detailed in Table 7-2 . The three separate blocks of the figure are examples of subschemas, although other subschemas of this database can be defined. We can use schemas and subschemas to present to users only those elements they want or need to see. For example, if Table 7-1 represents the employees at a company, the subschema on the lower left of Figure 7-1 can list employee names without revealing personal information such as home address.

Table 7-2 Schema of Database from Figure 7-1

Name First Address City State Zip Airport
ADAMS Charles 212 Market St. Columbus OH 43210 CMH
ADAMS Edward 212 Market St. Columbus OH 43210 CMH
BENCHLY Zeke 501 Union St. Chicago IL 60603 ORD
CARTER Marlene 411 Elm St. Columbus OH 43210 CMH
CARTER Beth 411 Elm St. Columbus OH 43210 CMH
CARTER Ben 411 Elm St. Columbus OH 43210 CMH
CARTER Lisabeth 411 Elm St. Columbus OH 43210 CMH
CARTER Mary 411 Elm St. Columbus OH 43210 CMH

The rules of a database identify the columns with names. The name of each column is called an attribute of the database. A relation is a set of columns. For example, using the database in Table 7-2 , we see that NAME–ZIP is a relation formed by taking the NAME and ZIP columns, as shown in Table 7-3 . The relation specifies clusters of related data values, in much the same way that the relation “mother of” specifies a relationship among pairs of humans. In this example, each cluster contains a pair of elements, a NAME and a ZIP. Other relations can have more columns, so each cluster may be a triple, a 4-tuple, or an n -tuple (for some value n ) of elements.

Relations in a database show some connection among data in tables.

Table 7-3 Relation in a Database

Name Zip
ADAMS 43210
BENCHLY 60603
CARTER 43210
Queries

Users interact with database managers through commands to the DBMS that retrieve, modify, add, or delete fields and records of the database. A command is called a query . Database management systems have precise rules of syntax for queries. Most query languages use an English-like notation, and many are based on SQL, a structured query language originally developed by IBM. We have written the example queries in this chapter to resemble English sentences so that they are easy to understand. For example, the query

SELECT NAME='ADAMS'

Users extract data through use of queries.

retrieves all records having the value ADAMS in the NAME field.

The result of executing a query is a subschema. One way to form a subschema of a database is by selecting records meeting certain conditions. For example, we might select records in which ZIP=43210, producing the result shown in Table 7-4 .

Table 7-4 Results of a Select Query

Name First Address City State Zip Airport
ADAMS Charles 212 Market St. Columbus OH 43210 CMH
ADAMS Edward 212 Market St. Columbus OH 43210 CMH
CARTER Marlene 411 Elm St. Columbus OH 43210 CMH
CARTER Beth 411 Elm St. Columbus OH 43210 CMH
CARTER Ben 411 Elm St. Columbus OH 43210 CMH
CARTER Lisabeth 411 Elm St. Columbus OH 43210 CMH
CARTER Mary 411 Elm St. Columbus OH 43210 CMH

Other, more complex, selection criteria are possible, with logical operators such as and (∧) and or (∨), and comparisons such as less than (<). An example of a select query is

Click here to view code image

SELECT (ZIP='43210') ^ (NAME='ADAMS')

After having selected records, we may project these records onto one or more attributes. The select operation identifies certain rows from the database, and a project operation extracts the values from certain fields (columns) of those records. The result of a select-project operation is the set of values of specified attributes for the selected records. For example, we might select records meeting the condition ZIP=43210 and project the results onto the attributes NAME and FIRST, as in Table 7-5 . The result is the list of first and last names of people whose addresses have zip code 43210.

Table 7-5 Results of a Select–Project Query

ADAMS

Charles

ADAMS

Edward

CARTER

Marlene

CARTER

Beth

CARTER

Ben

CARTER

Lisabeth

CARTER

Mary

Notice that we do not have to project onto the same attribute(s) on which the selection is done. For example, we can build a query using ZIP and NAME but project the result onto FIRST:

Click here to view code image

SHOW FIRST WHERE (ZIP='43210') ^ (NAME='ADAMS')

The result would be a list of the first names of people whose last names are ADAMS and ZIP is 43210 .

We can also merge two subschema on a common element by using a join query. The result of this operation is a subschema whose records have the same value for the common element. For example, Figure 7-2 shows that the subschema NAME–ZIP and the subschema ZIP–AIRPORT can be joined on the common field ZIP to produce the subschema NAME–AIRPORT.

An illustration shows the Result of a Select hyphen Project hyphen Join Query.

FIGURE 7-2 Result of a Select–Project–Join Query

The first table: 1. Project NAME-ZIP shows the following data: ADAMS, 43210; BENCHLY, 60603; CARTER, 43210. 2. Project ZIP-AIRPORT shows the following data: 43210, CMH; 60603, ORD. 3. Join on ZIP shows a line connecting 43210s from the first table connecting to 43210 in the second table; 60603 connecting to 60603 of the second table. The fourth table shows the following data: 4. Result: ADAMS, CMH; BENCHLY, ORD; CARTER, CMH.

Users extract data through use of queries.

Advantages of Using Databases

The concept behind a database is this: A database is a single collection of data, stored and maintained at one central location, to which many people have access as needed. However, the actual implementation may involve some other physical storage arrangement or access. The essence of a good database is that the users are unaware of the physical arrangements; the unified logical arrangement is all they see. As a result, a database offers many advantages over a simple file system:

Databases support controlled, shared access to a single repository of data.

  • shared access , so that many users can use one common, centralized set of data

  • controlled access ,so that only authorized users are allowed to view or to modify data values

  • minimal redundancy , so that individual users do not have to collect and maintain their own sets of data

  • data consistency , so that a change to a data value affects all users of the data value

  • data integrity , so that data values are protected against accidental or malicious undesirable changes

You should notice many familiar security concepts in this list. Although security is only one of several motivations for using a database, some users appreciate having a degree of secure access.

A DBMS is designed to provide these advantages efficiently. However, as often happens, the objectives can conflict with each other. In particular, as we shall see, security interests can conflict with performance. This clash is not surprising because measures taken to enforce security often increase the computing system’s size or complexity. In the future, however, computing and transmission speeds are likely to become faster, so the security impact on data retrieval is likely to be negligible. What is surprising, though, is that security interests may also reduce the system’s ability to provide data to users by limiting certain queries that would otherwise seem innocuous.

7.2 Security Requirements of Databases

The basic security requirements of database systems are not unlike those of other computing systems we study throughout this book. The basic problems—access control, exclusion of spurious data, authentication of users, and reliability—have appeared in many contexts in earlier chapters. Following is a list of requirements for database security:

  • Physical database integrity . The data of a database are immune from physical problems, such as power failures, and someone can reconstruct the database if it is destroyed by a catastrophe.

  • Logical database integrity . The structure of the database is preserved. With logical integrity of a database, a modification to the value of one field does not affect other fields, for example.

  • Element integrity. The data contained in each element are accurate.

  • Auditability. It is possible to track who or what has accessed the elements in the database.

  • Access control. A user is allowed to access only authorized data, and different users can be restricted to different modes of access (such as read or write).

  • User authentication. Every user is positively identified, both for the audit trail and for permission to access certain data.

  • Availability . Users can access the database in general and all the data for which they are authorized.

We briefly examine each of these requirements.

Integrity of the Database

If a database is to serve as a central repository of data, users must be able to trust that the data values are accurate. This condition implies that the database administrator must be assured that updates are performed only by authorized individuals. It also implies that the data must be protected from corruption, either by an outside, possibly malicious program action or by an outside force such as fire or power failure. Two situations can affect the integrity of a database: when the whole database is damaged (as happens, for example, if its storage medium is damaged) or when individual data items are corrupted or unreadable.

Integrity of the database as a whole is the responsibility of the DBMS, the operating system, and the (human) computing system manager. From the perspective of the operating system and the computing system manager, databases and DBMSs are files and programs, respectively. Therefore, one way of protecting the database as a whole is to regularly back up all files on the system. These periodic backups can be adequate controls against catastrophic failure.

Sometimes an administrator needs to be able to reconstruct the database at the point of a failure. For instance, when the power fails suddenly, a bank’s clients may be in the middle of making transactions or students may be registering online for their classes. In these cases, owners want to be able to restore the systems to a stable point without forcing users to redo their recently completed transactions.

To handle these situations, the DBMS must maintain a log of transactions. For example, suppose the banking system is designed so that a message is generated in a log (electronic or paper or both) each time a transaction is processed. In the event of a system failure, the system can obtain accurate account balances by reverting to a backup copy of the database and reprocessing all later transactions from the log.

Element Integrity

The integrity of database elements—called element integrity —is their correctness or accuracy. Ultimately, authorized users are responsible for entering correct data in databases. However, users and programs make mistakes collecting data, computing results, and entering values. Therefore, DBMSs sometimes take special action to help catch errors as they are made and correct errors after they are inserted.

This corrective action can be taken in three ways: by field checks, through access control, and with change log.

First, the DBMS can apply field checks , activities that test for appropriate values in a position. A field might be required to be numeric, an uppercase letter, or one of a set of acceptable characters. The check ensures that a value falls within specified bounds or is not greater than the sum of the values in two other fields. These checks prevent simple errors as the data are entered. ( Sidebar 7-1 demonstrates the importance of element integrity.)

Databases achieve integrity of the data set, its structure, and its individual elements.

Sidebar 7-1 Element Integrity Failure Crashes Network

Stephen Crocker and Mary Bernstein [ CRO89 ] studied catastrophic failures of what was then known as the ARPANET, the predecessor of today’s internet. Several failures came from problems with the routing tables used to direct traffic through the network.

A 1971 error was called the “black hole.” A hardware failure caused one node to declare that it was the best path to every other node in the network. This node sent this declaration to other nodes, which soon propagated the erroneous posting throughout the network. This node soon became the black hole of the network because all traffic was routed to it but never made it to the real destination. (The node believed it was the best path to everywhere, so whenever it received a packet, the node dispatched it to itself again, thus putting all traffic into an infinite loop around that one node.)

The ARPANET used simple tables, not a full-featured DBMS, so there was no checking of new values before they were installed in the distributed routing tables. Had there been a database, integrity-checking software could have checked for errors in the newly distributed values and raised a flag for human review.

A second integrity action is afforded by access control . To see why, consider life without databases. Data files may contain data from several sources, and redundant data may be stored in several different places. For example, a student’s mailing address may be stored in many different campus files: in the registrar’s office for formal correspondence, in the food service office for dining hall privileges, at the bookstore for purchases, and in the financial aid office for accounting. Indeed, the student may not even be aware that each separate office has the address on file. If the student moves from one residence to another, each of the separate files requires correction.

Without a database, you can imagine the risks to the data’s integrity. First, at a given time, some data files could show the old address (they have not yet been updated) and others show the new address (they have already been updated). Second, there is always the possibility that someone mis-entered a data field, again leading to files with incorrect information. Third, the student may not even be aware of some files and, therefore, not know to notify the file owner about updating the address information. These problems are addressed by databases. They enable collection and control of this data at one central source, ensuring the student and users of having the correct address.

However, the centralization is easier said than done. Who owns this shared central file? Who is authorized to update which elements? What if two people apply conflicting modifications? What if modifications are applied out of sequence? How are duplicate records detected? What action is taken when duplicates are found? These are policy questions that must be resolved by the database administrator. Sidebar 7-2 describes how these issues are addressed for managing the configuration of programs; similar formal processes are needed for managing changes in databases.

Sidebar 7-2 Configuration Management and Access Control

Software engineers must address access control when they manage the configuration, development, and maintenance of large computer systems. A major system’s code and related documents (such as the requirements documents, designs, test plans, and change logs) actually constitute a database. In many instances, multiple developers want to make changes to a system at the same time: to fix a new problem, add a new feature, and update user documentation all at once, for example. So the configuration management database must help ensure that the correct and most recent changes are stored correctly and completely.

Keep in mind that the DBMS stores information not only about the data items it holds but also about the documents related to the database’s requirements, design, and more. For anything but the smallest collection of data, a DBMS is a necessary tool for designing, storing, and querying information. The proliferation of versions and releases can be controlled in three primary ways [ PFL10a ]:

  • Separate files . A separate file can be kept for each different version or release. For instance, version 1 may exist for machines that store all data in main memory, and version 2 is for machines that must put some data out to a disk. Suppose the common functions are the same in both versions, residing in components C 1 through C k , but memory management is done by component M 1 for version 1 and M 2 for version 2. If new functionality is to be added to the memory management routines, keeping both versions current and correct may be difficult; the results must be the same from the user’s point of view.

  • Deltas . One version of the system is deemed the main version, and all other versions are considered to be variations from the main version. The database keeps track only of the differences, in a file called a delta file. The delta contains commands that are “applied” to the main version to transform it into the alternative version. This approach saves storage space but can become unwieldy.

  • Conditional compilation . All versions are handled by a single file, and conditional statements are used to determine which statements apply under which conditions. In this case, shared code appears only once, so only one correction is needed if a problem is found. But the code in this single file can be very complex and difficult to maintain.

In any of these three cases, controlled access to the configuration files is critical. Two programmers fixing different problems sometimes need to make changes to the same component. If they do not coordinate access, the second programmer can inadvertently undo (or worse, wreck) the changes of the first programmer, resulting in not only recurrence of the initial problems but also introduction of additional problems. For this reason, files are controlled in several ways, including being locked while one programmer makes changes and being subject to a group of people called a configuration control board who ensure that no changed file is put back into production without the proper checking and testing. Shari Lawrence Pfleeger and Joanne Atlee write in more detail about these techniques [ PFL10a ].

The third means of providing database integrity is maintaining a change log for the database. A change log lists every change made to the database; it contains both original and modified values. Using this log, a database administrator can undo any changes that were made in error. For example, a library fine might erroneously be posted against Charles W. Robertson, instead of Charles M. Robertson, flagging Charles W. Robertson as ineligible to participate in varsity athletics. Upon discovering this error, the database administrator obtains Charles W.’s original eligibility value from the log and corrects the database.

Auditability

For some applications, administrators may want to generate an audit record of all access (read or write) to a database. Such a trace can help to maintain the database’s integrity, or at least to discover after the fact who had affected what values and when. A second advantage, as we see later, is that users can access protected data incrementally; that is, no single access reveals protected data, but a set of sequential accesses viewed together reveals the data, much like discovering the clues in a detective novel. In this case, an audit trail can identify which clues a user has already been given, as a guide to whether to tell the user more.

Granularity can become an impediment in auditing. Audited events in operating systems are actions like open file or call procedure ; they are seldom as specific as write record 3, execute instruction I, or change 12 to 13 in record 5. To be useful for maintaining integrity, database audit trails should include accesses at the record, field, and even element levels. This detail is prohibitive for most database applications.

Furthermore, the DBMS may access a record but not report the data to a user, as when the user performs a select operation. For example, a residence hall advisor might want a count of all students who have failed elementary French, and the DBMS reports 462. To get that number, the system had to inspect all student records and note those with failing grades, and it performed this lookup on behalf of the advisor who is appropriately listed in the log as receiving the data. Thus, in a sense, the advisor accessed all those student grades, although from the number 462 the advisor cannot determine the grade of any individual student. (Accessing a record or an element without transferring to the user the data received is called the pass-through problem .) Thus, a log of all records accessed directly may both overstate and understate what a user actually learns. The problem is even more nuanced than what we describe here, and we consider some intricacies of disclosure later in this chapter.

Access Control

Databases are often separated logically by user access privileges. For example, all users can be granted access to general data, but only the personnel department can obtain salary data and only the marketing department can obtain sales data. Databases are useful because they centralize the storage and maintenance of data. Limited access is both a responsibility and a benefit of this centralization.

The database administrator specifies who should be allowed access to which data, at the view, relation, field, record, or even element level. The DBMS must enforce this policy, granting access to all specified data or no access where prohibited. Furthermore, the number of modes of access can be many. A user or program may have the right to read, change, delete, or append to a value, add or delete entire fields or records, or reorganize the entire database.

Superficially, access control for a database seems like access control for an operating system or any other component of a computing system. However, the database problem is more nuanced, as we see throughout this chapter. Operating system objects, such as files, are unrelated items, whereas records, fields, and elements are related. Although a user probably cannot determine the contents of one file by reading others, a user might be able to determine one data element just by reading others. The problem of obtaining data values from others is called inference , and we consider it in depth later in this chapter.

It is important to notice that you can access data by inference without needing direct access to the secure object itself. Restricting inference may mean prohibiting certain paths to prevent possible inferences. However, restricting access to control inference also limits queries from users who do not intend unauthorized access to values. Moreover, attempts to check requested accesses for possible unacceptable inferences may actually degrade the DBMS’s performance.

Finally, size or granularity is different between operating system objects and database objects. An operating system can readily control access to files, as we explain in Chapter 5 . However, an access control list for several hundred files is much easier to implement than an access control list for a database with several hundred tables of perhaps a hundred fields each. Size affects the efficiency of processing. Operating systems do not usually “see into” a file to control access to items within a file.

DBMSs implement their own access control at a level finer than what an operating system handles.

User Authentication

The DBMS can require rigorous user authentication. For example, a DBMS might insist that a user pass both specific password and time-of-day checks. This authentication exceeds the authentication performed by the operating system. Typically, the DBMS runs as an application program on top of the operating system. This system design means that there is no trusted path from the DBMS to the operating system, so the DBMS must be suspicious of any data it receives, including a user identity from the operating system. Thus, the DBMS is forced to do its own authentication.

We must also keep usability in mind. A user has just logged into a network and then perhaps separately authenticated to the operating system. Now the DBMS is demanding authentication again. Furthermore, the DBMS authentication credential is unrelated to the others, creating potentially three different strategies for the user to conquer. Other applications requiring authentication as well can place an additional burden on the user. Here we have two competing security principles: We recognize the vulnerability of using the same password for different systems, but then we persist in levying demands on the user. Authentication is certainly important, but system designers need to keep the limitations of human users in mind.

Availability

A DBMS has aspects of both a program and a system. It is a program that uses other hardware and software resources, yet to many users it is the only application run. Users often take the DBMS for granted, employing it as an essential tool with which to perform particular tasks. But when the system is not available—busy serving other users or down to be repaired or upgraded—the users are very aware of a DBMS’s unavailability. For example, two users may request the same record, and the DBMS must arbitrate; one user is bound to be denied access for a while as the second user is serviced. Or the DBMS may withhold some nonsensitive data to avoid revealing other more sensitive data, leaving the requesting user unhappy. We examine these problems in more detail later in this chapter. Problems like these result in high availability requirements for a DBMS.

Integrity/Confidentiality/Availability

The three aspects of computer security—integrity, confidentiality, and availability—clearly relate to DBMSs. As we have described, integrity applies to the individual elements of a database as well as to the database as a whole. Integrity is also a property of the structure of the database (elements in one table correspond one to one with those of another) and of the relationships of the database. (Records having the same unique identifier, called a key, are related.) Thus, integrity is a major concern in the design of DBMSs. We look more closely at integrity issues in the next section.

Confidentiality is likewise a critical issue with databases, which are often used to implement controlled sharing of sensitive data. Access to data can be direct (you request a record and the database provides it) or indirect (you request some records and from those results infer or intuit other data). Controlling direct access employs the access control techniques we describe in Chapters 2 and 5 . Indirect access, however, is more difficult to control, and we explore it in more depth later in this chapter.

Finally, availability is important because of the shared access motivation underlying database development. However, availability conflicts with confidentiality. The last sections of the chapter address how to provide availability in an environment in which confidentiality is also important.

7.3 Reliability and Integrity

Databases amalgamate data from many sources, and users expect a DBMS to provide access to the data in a reliable way. When software engineers say a software system is reliable , they mean that the software runs for very long periods of time without failing. Users certainly expect a DBMS to be reliable since the data usually are key to business or organizational needs—and sometimes even to health and safety. You want your doctor to be able to retrieve your medical records before surgery, for instance. Moreover, users entrust their data to a DBMS and rightly expect it to protect the data from loss or damage. Concerns for reliability and integrity are general security issues, but they are more apparent with databases.

A DBMS guards against loss or damage in several ways, which we study in this section. However, the controls we consider are not absolute: No control can prevent an authorized user from inadvertently entering an acceptable but incorrect value.

Database concerns about reliability and integrity can be viewed from at least three dimensions:

  • Database integrity: concern that the database as a whole is protected against damage, as from the failure of a disk drive or the corruption of the master database index. These concerns are addressed by operating system integrity controls and recovery procedures.

  • Element integrity: concern that the value of a specific data element is written or changed only by authorized users. Proper access controls protect a database from corruption by unauthorized users.

  • Element accuracy: concern that only correct values are written into the elements of a database. Checks on the values of elements can help prevent insertion of improper values. Also, constraint conditions can detect incorrect values.

Protection Features from the Operating System

In Chapter 5 we discuss the protection an operating system provides for its users. A responsible system administrator backs up the files of a database periodically along with other user files. During normal execution, the operating system’s standard access control facilities protect the files from outside access. Finally, the operating system performs certain integrity checks for all data as a part of normal read and write operations for I/O devices. These controls provide basic security for databases, but the database manager must enhance them.

Two-Phase Update

If the computing system fails in the middle of data modification, the database manager must determine what (if anything) needs correction or restoration to its previous state. If a user is in the middle of modifying a data element when the failure occurred, and especially if it was a long field or a record consisting of several attributes, only some of the changed data might have been written to permanent storage. Therefore, after the failure, the database file would contain incorrect data that had not been fully updated. Even if errors of this type were spotted easily (which they are not), a more subtle problem occurs when several fields are updated but no single field appears to be in obvious error. Think of a name and address database in which the name was updated but the address had not yet been; in this case, one person’s address is associated with another’s name. Both fields appear reasonable, but they do not match logically. The solution to this problem, proposed first by Lampson and Sturgis [ LAM76 ] and adopted by most DBMSs, uses a two-phase update: intent-and-commit followed by making the changes permanent.

Update Technique

During the first phase, called the intent phase, the DBMS gathers the resources it needs to perform the update. It may gather data, create dummy records, open files, lock out other users, and calculate final answers; in short, it does everything to prepare for the update, but it makes no changes to the database. The first phase is repeatable an unlimited number of times because it takes no permanent action. If the system fails during execution of the first phase, no harm is done because all these steps can be restarted and repeated after the system resumes processing.

The last event of the first phase, called committing , involves the writing of a commit flag to the database. The commit flag means that the DBMS has passed the point of no return: After committing, the DBMS begins the second phase: making permanent changes.

During the second phase, no actions from before the commit can be repeated, but the update activities of phase two can be repeated as often as needed. If the system fails during the second phase, the database may contain incomplete data, but the system can repair these data by re-performing all activities of the second phase. After the second phase has been completed, the database is fully updated, and its data items can be made available again for other actions. The last event of the second phase is clearing or erasing the commit flag, meaning that the database is fully stable.

Two-Phase Update Example

Consider a database that contains the inventory of a company’s office supplies. The company’s central stockroom stores paper, pens, paper clips, and the like, and different departments requisition items as they need them. The company buys in bulk to obtain the best prices. Each department has a budget for office supplies, so a charging mechanism can recover the cost of supplies from the department that uses them. Also, the central stockroom monitors quantities of supplies on hand so that new supplies can be ordered when stock becomes low.

Suppose the accounting department requisitions 50 boxes of paper clips. Assume that there are 107 boxes in stock, and the stockroom policy specifies that a new order is placed when the quantity in stock falls below 100. Here are the steps for fulfilling this order using an automated stockroom system that employs a DBMS. After the stockroom system receives the requisition,

  1. The stockroom system checks the database to determine that 50 boxes of paper clips are on hand. If not, the stockroom system rejects the requisition, and no transfer of paper clips takes place.

  2. If the DBMS response indicates that enough paper clips are in stock, the stockroom system deducts 50 from the inventory figure in the database ( 107 - 50 \= 57 ).

  3. The stockroom then uses the DBMS to charge accounting’s supplies budget (also in the database) for 50 boxes of paper clips.

  4. The stockroom system checks its remaining quantity on hand (57) to determine whether the number of boxes of paper clips is below the reorder point. Because it is, the stockroom system generates a notice to order more paper clips, and the item is flagged as “on order” in the database.

  5. The stockroom system prepares a delivery order, enabling 50 boxes of paper clips to be sent to accounting.

All five of these steps must be completed in the order listed. At each step, the database must be accurate so that the transaction can be processed correctly.

But suppose a failure occurs while these steps are being processed. If the failure occurs before step 1 is complete, no harm ensues because the entire transaction can be restarted. However, during steps 2, 3, and 4, changes are made to elements in the database. If a failure occurs then, the values in the database may be inconsistent. Worse, the transaction cannot be reprocessed because a requisition would be deducted twice or a department would be charged twice, or two delivery orders would be prepared (depending on where the failure occurs).

When a two-phase commit is used, shadow values are maintained for key points in the process. That is, a shadow data value is computed and stored locally during the intent phase, and it is copied to the actual database during the commit phase. In our paper clip example, operations on the database would be performed as follows for a two-phase commit.

Intent:

  1. Check the value of COMMIT-FLAG in the database. If it is set, this phase cannot be performed. Halt or loop, checking COMMIT-FLAG until it is clear.

  2. Compare number of boxes of paper clips on hand to number requisitioned; if more are requisitioned than are on hand, halt.

  3. Compute TCLIPS = ONHAND − REQUISITION .

  4. Obtain BUDGET, the current supplies budget remaining for accounting department. Compute TBUDGET = BUDGET − COST , where COST is the cost of 50 boxes of clips.

  5. Check whether TCLIPS is below reorder point; if so, set TREORDER = TRUE ; else set TREORDER = FALSE .

Commit:

  1. Set COMMIT-FLAG in database.

  2. Copy TCLIPS to CLIPS in database.

  3. Copy TBUDGET to BUDGET in database.

  4. Copy TREORDER to REORDER in database.

  5. Prepare notice to deliver paper clips to accounting department. Indicate transaction completed in log.

  6. Clear COMMIT-FLAG.

With this example, each step of the intent phase depends only on unmodified values from the database and the previous results of the intent phase. Each variable beginning with T is a shadow variable used only in this transaction. The steps of the intent phase can be repeated an unlimited number of times without affecting the integrity of the database.

Once the DBMS begins the commit phase, it writes a COMMIT flag. When this flag is set, the DBMS will not perform any steps of the intent phase. Intent steps cannot be performed after committing because database values are modified in the commit phase. Notice, however, that the steps of the commit phase can be repeated an unlimited number of times, again with no negative effect on the correctness of the values in the database.

The one remaining flaw in this logic occurs if the system fails after writing the “transaction complete” message in the log but before clearing the commit flag in the database. It is a simple matter to work backward through the transaction log to find completed transactions for which the commit flag is still set and to clear those flags. Or, one can simply repeat all steps of the commit phase, which end by clearing the commit flag.

Redundancy/Internal Consistency

Many DBMSs maintain additional information to detect internal inconsistencies in data. The additional information ranges from a few check bits to duplicate or shadow fields, depending on the importance of the data.

Error Detection and Correction Codes

One form of redundancy is error detection and correction codes, such as parity bits, Hamming codes [ HAM50 ], and cyclic redundancy checks. (We introduce such codes in Chapter 2 .) These codes can be applied to single fields, records, or the entire database. Each time a data item is placed in the database, the appropriate check codes are computed and stored; each time a data item is retrieved, a similar check code is computed and compared to the stored value. If the values are unequal, they signify to the DBMS that an error has occurred in the database. Some of these codes point out the place of the error; others show precisely what the correct value should be. The more information provided, the more space required to store the codes.

Shadow Fields

Multiple attributes or entire records can be duplicated in a database. If the data are irreproducible, this second copy can provide an immediate replacement if an error is detected. Obviously, redundant fields require substantial storage space.

Recovery

In addition to these error correction processes, a DBMS can maintain a log of user accesses, particularly changes. In the event of a failure, the database is reloaded from a backup copy, and all later changes are then applied from the audit log.

Concurrency/Consistency

Database systems are often multiuser systems. Accesses by two users sharing the same database must be constrained so that neither interferes with the other. Simple locking is done by the DBMS. If two users attempt to read the same data item, there is no conflict because both obtain the same value.

If both users try to modify the same data items, we often assume that there is no conflict because each knows what to write; the value to be written does not depend on the previous value of the data item. However, this supposition is not quite accurate.

DBMSs serve multiple users at once by enforcing concurrency and sequencing.

To see how concurrent modification can get us into trouble, suppose that the database consists of seat reservations for a particular airline flight. (We describe a simpler version of this problem in Chapter 3 ; here we show a detailed solutions.) Agent A, booking a seat for passenger Mock, submits a query to find what seats are available. The agent knows that Mock prefers a right aisle seat, and the agent finds that seats 5D, 11D, and 14D are open. At the same time, Agent B is trying to book seats for a family of three traveling together. In response to a query, the database indicates that 8A–B–C and 11D–E–F are the two remaining groups of three adjacent unassigned seats. Agent A submits the update command

Click here to view code image

SELECT (SEAT-NO = '11D')
ASSIGN 'MOCK,E' TO PASSENGER-NAME

while Agent B submits the update sequence

Click here to view code image

SELECT (SEAT-NO = '11D')
ASSIGN 'EDWARDS,S' TO PASSENGER-NAME

as well as commands for seats 11E and 11F. Then two passengers have been booked into the same seat (which would be uncomfortable, to say the least).

Both agents have acted properly: Each sought a list of empty seats, chose one seat from the list, and updated the database to show to whom the seat was assigned. The difficulty in this situation is the time delay between reading a value from the database and writing a modification of that value. During the delay time, another user has accessed the same data.

To resolve this problem, a DBMS treats the entire query–update cycle as a single atomic operation. The command from the agent must now resemble “read the current value of seat PASSENGER-NAME for seat 11D; if it is ‘UNASSIGNED’, modify it to ‘MOCK,E’ (or ‘EDWARDS,S’).” The read–modify cycle must be completed as an uninterrupted item without allowing any other users access to the PASSENGER-NAME field for seat 11D. The second agent’s request to book would not be considered until after the first agent’s had been completed; at that time, the value of PASSENGER-NAME would no longer be ‘UNASSIGNED.’

A final problem in concurrent access is read–write. Suppose one user is updating a value when a second user wishes to read it. If the read is done while the write is in progress, the reader may receive data that are only partly updated. Consequently, the DBMS locks any read requests (as well as other write requests) until a write has been completed. (Note that two or more concurrent read requests cause no problem.)

7.4 Database Disclosure

As we describe in Chapter 9 , more data are being collected about more people than ever before. In the past, a single company, organization, or government office knew only about its clients or patrons; little sharing occurred among organizations. And the number or kinds of places that collected data were small. Yes, we expect offices to keep records on us, but not to include every surveillance camera, street corner, cash register, and website we visit. Computers have made feasible not only the collection but also the sharing of these massive amounts of data. Indeed, companies called data aggregators build their business on collecting data about people and then selling it for a profit.

Databases can hold physical characteristics, such as height, weight, or residential address. But they can also contain thoughts, preferences, opinions, activities (or their descriptions), fantasies, friends, and connections that have been expressed or captured online. By aggregating and analyzing these items, people and algorithms can draw inferences that may or may not be accurate: Jan lives in postal code KT1. The mean income in postal code KT1 is very high. High-end cars are expensive. Ergo, Jan may be interested in buying high-end cars. In the next section we explore how people and computers analyze such databases for connections that can lead to unacceptable data disclosure.

Sensitive Data

Some databases contain what is called sensitive data. As a working definition, let us say that sensitive data are data that should not be made public. Determining which data items and fields are sensitive depends both on the individual database and the underlying meaning of the data. Obviously, some databases, such as a catalog of wildflowers, contain no sensitive data; other databases, such as defense-related ones, are wholly sensitive. These two cases—nothing sensitive and everything sensitive—are the easiest to handle because they can be covered by access controls to the database as a whole. Someone either is or is not an authorized user. The operating system can readily provide these controls.

The more difficult problem, which is also the more interesting one, is the case in which some but not all of the elements in the database are sensitive, especially if the degree of sensitivity can vary by time or context. For example, a university database might contain student data consisting of name, financial aid, dorm, drug use, sex, parking fines, and grade point average (GPA). An example of this database is shown in Table 7-6 . Name and dorm are probably the least sensitive; financial aid, parking fines, and drug use the most; sex and grade average somewhere in between. That is, many people may have legitimate access to name, some to sex and grade average, and relatively few to financial aid, parking fines, or drug use. Indeed, knowledge of the existence of some fields, such as drug use, may itself be sensitive. Thus, security concerns not only the data elements but their context and meaning.

Table 7-6 Example Database

Name Sex GPA Aid Fines Drugs Dorm
Adams M 2.3 5,000 45. 1 Holmes
Bailey M 3.4 0 0. 0 Grey

Furthermore, we must account for different degrees of sensitivity. For instance, although all the fields are highly sensitive, the financial aid, parking fines, and drug-use fields may not have the same kinds of access restrictions. Our security requirements may demand that a few people be authorized to see each field, but no one be authorized to see all three. The challenge of the access control problem is to limit users’ access so that they can obtain only the data to which they have legitimate access. Alternatively, the access control problem forces us to ensure that sensitive data are not released to unauthorized people.

Several factors can make data sensitive.

  • Inherently sensitive . The value itself may be so revealing that it is sensitive. Examples are the locations of defensive missiles or the median income of barbers in a town with only one barber.

  • From a sensitive source . The source of the data may indicate a need for confidentiality. An example is information from an informer whose identity would be compromised if the information were disclosed.

  • Declared sensitive . The database administrator or the owner of the data may have declared the data to be sensitive. Examples are classified military data or the name of the anonymous donor of a piece of art.

  • Part of a sensitive attribute or record . In a database, an entire attribute or record may be classified as sensitive. Examples are the salary attribute of a personnel database or a record describing a secret space mission.

  • Sensitive in relation to previously disclosed information . Some data become sensitive in the presence of other data. For example, the longitude coordinate of a secret gold mine reveals little, but the longitude coordinate in conjunction with the latitude coordinate pinpoints the mine.

All of these factors must be considered when the sensitivity of the data is being determined.

Databases protect sensitive data by controlling direct or indirect access to the data.

Types of Disclosures

We all know that some data are sensitive. However, sometimes even characteristics of the data are sensitive. In this section we see that even descriptive information about data (such as their existence or whether they have an element that is nonzero) is a form of disclosure.

Exact Data

The most serious disclosure is the exact value of a sensitive data item itself. The user may know that sensitive data are being requested, or the user may request general data without knowing that some items are sensitive. A faulty database manager may even deliver sensitive data by accident, without the user’s having requested it. In all these cases, the result is the same: The security of the sensitive data has been breached.

Bounds

Another exposure is disclosing bounds on a sensitive value, that is, indicating that a sensitive value, y , is between two values, L and H . Sometimes, by using a narrowing technique not unlike the binary search, the user may first determine that L ≤ y ≤ H and then see whether L ≤ y ≤ H / 2 , and so forth, thereby permitting the user to determine y to any desired precision. In another case, merely revealing that a value such as the athletic scholarship budget or the number of CIA agents exceeds a certain amount may be a serious breach of security.

Sometimes, however, bounds are a useful way to present sensitive data. It is common to release upper and lower bounds for data without identifying the specific records. For example, a company may announce that its salaries for programmers range from $80,000 to $120,500. If you are a programmer earning $108,000, you would suppose you are fairly well off, so you have the information you want; however, the announcement does not reveal who are the highest- and lowest-paid programmers.

Negative Result

Sometimes we can word a query to determine a negative result . That is, we can learn that z is not the value of y . For example, knowing that 0 is not the total number of felony convictions for a person reveals that the person was convicted of a felony. The distinction between 1 and 2 or 46 and 47 felonies is not as sensitive as the distinction between 0 and 1. Therefore, in some cases, disclosing that a value is not 0 can be a significant disclosure. Similarly, if a student does not appear on the honors list, you can infer that the person’s grade point average is below 3.50. This information is not too revealing, however, because the range of grade point averages from 0.0 to 3.49 is rather wide.

Existence

In some cases, the existence of data is itself a sensitive piece of data, regardless of the actual value. For example, an employer may not want employees to know that their telephone use is being monitored. In this case, discovering a NUMBER OF PERSONAL TELEPHONE CALLS field in a personnel file would reveal sensitive data.

Probable Value

Finally, it may be possible to determine the probability that a certain element has a certain value. To see how, suppose you want to find out whether the president of the United States is registered in the Tory party. Knowing that the president is in the database, you submit two queries to the database:

A database manager can control access by direct queries; disclosure can occur in more subtle ways that are harder to control.

Click here to view code image

Count(Residence="1600 Pennsylvania Avenue") = 4
Count(Residence="1600 Pennsylvania Avenue" ^ Tory=TRUE) = 1

From these queries you conclude there is a 25% likelihood that the president is a registered Tory.

Direct Inference

Inference is a way to infer or derive sensitive data from nonsensitive data. The inference problem is a subtle vulnerability in database security.

The database in Table 7-7 illustrates the inference problem; this database has the same form as the one introduced in Table 7-6 , but we have added more data to make some points related to multiple data items. Recall that AID is the amount of financial aid a student is receiving. FINES is the amount of parking fines still owed. DRUGS is the result of a drug-use survey: 0 means never used and 3 means frequent user. Obviously this information should be kept confidential. We assume that AID, FINES, and DRUGS are sensitive fields, although only when the values are related to a specific individual. In this section we look at ways to determine sensitive data values from the database.

Table 7-7 Database to Illustrate Inferences

Name Sex GPA Aid Fines Drugs Dorm
Adams M 2.3 5,000 45. 1 Holmes
Bailey M 3.4 0 0. 0 Grey
Chin F 4.0 3,000 20. 0 West
Dewitt M 3.2 1,000 35. 3 Grey
Earhart F 2.2 2,000 95. 1 Holmes
Fein F 2.4 1,000 15. 0 West
Groff M 2.4 4,000 0. 3 West
Hill F 3.1 5,000 10. 2 Holmes
Koch F 2.0 0 0. 1 West
Liu F 3.8 0 10. 2 Grey
Majors M 2.3 2,000 0. 2 Grey
Direct Attack

In a direct attack , a user tries to determine values of sensitive fields by seeking them directly with queries that yield few records. The most successful technique is to form a query so specific that it matches exactly one data item.

In Table 7-7 a sensitive query might be

List NAME where
      SEX=M ^ DRUGS=1

This query discloses that for record ADAMS, DRUGS \= 1 . However, it is an obvious attack because it selects people for whom DRUGS \= 1 , and the DBMS might reject the query because it selects records for a specific value of the sensitive attribute DRUGS.

A less obvious query is

List NAME where
     (SEX=M ^ DRUGS=1) ∨
     (SEX≠M ^ SEX≠F) ∨
     (DORM=AYRES)

On the surface, this query looks as if it should conceal drug usage by selecting other non-drug-related records as well. However, this query retrieves only one record, revealing a name that corresponds to the sensitive DRUG value. The DBMS needs to know that SEX has only two possible values, so that the second clause will select no records. Even if that were possible, the DBMS would also need to know that no records exist with DORM=AYRES, even though AYRES might in fact be an acceptable value for DORM.

Inference by Arithmetic

Another procedure, used by the U.S. Census Bureau and other organizations that gather sensitive data, is to release only statistics. The organizations suppress individual names, addresses, or other characteristics by which a single individual can be recognized. Only neutral statistics, such as count, sum, and mean, are released.

The indirect attack seeks to infer a final result based on one or more intermediate statistical results. But this approach requires work outside the database itself. In particular, a statistical attack seeks to use some apparently anonymous statistical measure to infer individual data. In the following sections we present several examples of indirect attacks on databases that report statistics.

Sum

An attack by sum tries to infer a value from a reported sum. For example, with the sample database in Table 7-7 , it might seem safe to report student aid total by sex and dorm. Such a report is shown in Table 7-8 . This seemingly innocent report reveals that no female living in Grey is receiving financial aid. Thus, we can infer that any female living in Grey (such as Liu) is certainly not receiving financial aid. This approach often allows us to determine a negative result.

Table 7-8 Inference from Negative Result

Sex Holmes Grey West Total
M 5,000 3,000 4,000 12,000
F 7,000 0 4,000 11,000
Total 12,000 3,000 8,000 23,000
Count

The count can be combined with the sum to produce some even more revealing results. Often these two statistics are released for a database to allow users to determine average values. (Conversely, if count and mean are released, sum can be deduced.)

Table 7-9 shows the count of records for students by dorm and sex. This table is innocuous by itself. Combined with the sum table, however, this table demonstrates that the two males in Holmes and West are receiving financial aid in the amount of $5,000 and $4,000, respectively. We can obtain the names by selecting the subschema of NAME, DORM, which is not sensitive because it delivers only low-security data on the entire database.

Table 7-9 Inference from Count and Sum Results

Sex Holmes Grey West Total
M 1 3 1 5
F 2 1 3 6
Total 3 4 4 11
Mean

The arithmetic mean (average) allows exact disclosure if the attacker can manipulate the subject population. As a trivial example, consider salary. Given the number of employees, the mean salary for a company and the mean salary of all employees except the president, it is easy to compute the president’s salary.

Median

By a slightly more complicated process, we can determine an individual value from the median , the midpoint of an ordered list of values. The attack requires finding selections having one point of intersection that happens to be exactly in the middle, as shown in Figure 7-3 .

An illustration shows a vertical bar, Attribute two Values, and a horizontal bar, Attribute one Values, intersecting at the Median for both attribute one and attribute two.

FIGURE 7-3 Intersecting Medians

For example, in our sample database, there are five males and three persons whose drug use value is 2. Arranged in order of aid, these lists are shown in Table 7-10 . Notice that Majors is the only name common to both lists, and conveniently that name is in the middle of each list. Someone working at the Health Clinic might be able to find out that Majors is a white male whose drug-use score is 2. That information identifies Majors as the intersection of these two lists and pinpoints Majors’s financial aid as $2,000. In this example, the queries

Click here to view code image

q = median(AID where SEX = M)
p = median(AID where DRUGS = 2)

Table 7-10 Drug Use and Aid Results

Name Sex Drugs Aid
Bailey M 0 0
Dewitt M 3 1,000
Majors M 2 2,000
Groff M 3 4,000
Adams M 1 5,000
Liu F 2 0
Majors M 2 2,000
Hill F 2 5,000

reveal the exact financial aid amount for Majors.

Tracker Attacks

As already explained, DBMSs may conceal data when a small number of entries make up a large proportion of the data revealed. A tracker attack can fool the database manager into locating the desired data by using additional queries that produce small results. The tracker adds additional records to be retrieved for two different queries; the two sets of records cancel each other out, leaving only the statistic or data desired. The approach is to use intelligent padding of two queries. In other words, instead of trying to identify a unique value, we request n - 1 other values (where there are n values in the database). Given n and n - 1 , we can easily compute the desired single element.

For instance, suppose we want to know how many females with a 3.1 grade point average (GPA) live in Holmes Hall. A query posed might be

Click here to view code image

count ((SEX=F) ^ (GPA=3.1) ^ (DORM=Holmes))

The database management system might consult the database, find that the answer is 1, and block the answer to that query because one record dominates the result of the query. However, further analysis of the query allows us to track sensitive data through nonsensitive queries.

The query

Click here to view code image

q=count((SEX=F) ^ (GPA=3.1) ^ (DORM=Holmes))

is of the form

q = count(a ^ b ^ c)

By using the rules of logic and algebra, we can transform this query to

Click here to view code image

q = count(a ^ b ^ c) = count(a) − count(a ^ ¬ (b ^ c))

Thus, the original query is equivalent to

count (SEX=F)

minus

Click here to view code image

count ((SEX=F) ^ ((GPA≠3.1) ∨ (DORM≠Holmes)))

Because count a \= 6 and count a ∧ ¬ b ∧ c \= 5 , we can determine the suppressed value easily: 6 - 5 \= 1 . Furthermore, neither 6 nor 5 is a sensitive count.

Linear System Vulnerability

A tracker is a specific case of a more general vulnerability. With a little logic, algebra and luck in the distribution of the database contents, it may be possible to construct an algebraic linear system of equations that returns results relating to several different sets. For example, the following system of five queries does not overtly reveal any single c value from the database. However, the queries’ equations can be solved for each of the unknown c values, revealing them all.

q 1 \= c 1 + c 2 + c 3 + c 4 + c 5 q 2 \= c 1 + c 2 +                   c 4 q 3 \=                                     c 3 + c 4 q 4 \=                                                       c 4 + c 5 q 5 \=               c 2 +                                         c 5

To see how, use basic algebra to note that q 1 - q 2 \= c 3 + c 5 , and q 3 - q 4 \= c 3 + c 5 . Then, subtracting these two equations, we obtain c 5 \= q 1 - q 2 - q 3 - q 4 / 2 . Once we know c 5 , we can derive the others.

In fact, this attack can also be used to obtain results other than numerical ones. Recall that we can apply logical rules to and (∧) and or (∨), typical operators for database queries, to derive values from a series of logical expressions. For example, each expression might represent a query asking for precise data instead of counts, such as the equation

q 1 \= s 1 ∨ s 2 ∨ s 3 ∨ s 4 ∨ s 5

The result of the query is a set of records. Using logic and set algebra in a manner similar to our numerical example, we can carefully determine the actual values for each of the s i .

Inference is difficult to control because it can occur from algebraic calculations beyond the scope of DBMSs.

Aggregation

Related to the inference problem is aggregation , which means building sensitive results from less sensitive data items. We saw earlier that knowing just one of the latitude or longitude of a gold mine does you no good. But if you know both latitude and longitude, you can pinpoint the mine. For a more realistic example, consider how police use aggregation frequently in solving crimes: They determine who had a motive for committing the crime, when the crime was committed, who had alibis covering that time, who had the skills, and so forth. Typically, you think of police investigation as starting with the entire population and narrowing the analysis to a single person. But if the police officers work in parallel, one may have a list of possible suspects, another may have a list with possible motives, and another may have a list of capable persons. When the intersection of these lists is a single person, the police have a prime suspect.

Aggregation is becoming a large, lucrative business, as described in Sidebar 7-3 . Addressing the aggregation problem is difficult because it requires the DBMS to track what results each user had already received and conceal any result that would let the user derive a more sensitive result. Aggregation is especially difficult to counter because it can take place outside the system. For example, suppose the security policy is that anyone can have either the latitude or longitude of the mine, but not both. Nothing prevents you from getting one, your friend from getting the other, and the two of you talking to each other.

Sidebar 7-3 What They Know

Emily Steel and Geoffrey Fowler, two Wall Street Journal reporters, investigated data collection and distribution by online social media applications, particularly Facebook [ STE10 ]. They found that although Facebook has a well-defined and strong privacy policy, it fails to enforce that policy rigorously on the over 500,000 applications made available to Facebook users, including people who set their profiles to Facebook’s strictest privacy settings. According to the study, as of October 2010, applications transmit users’ unique ID numbers (which can be converted easily to names) to dozens of advertising and internet tracking companies. The investigators found that all of the ten most popular applications transmitted these data to outside firms.

Although the tracking is done anonymously—by ID number only—the ability to convert the number to a name permits tracking companies to combine data from Facebook with data from other sources to sell to advertisers and others. A Facebook user’s name is always public, regardless of the privacy settings of the rest of the user’s profile; if the user has set other profile aspects public, such as address or birth date, those data could also be swept into the dossier being assembled.

Facebook advertising is big business: In 2021, Facebook’s revenue exceeded US$117 billion, with well over a million advertisers as clients. Facebook’s advertisements reach almost 64% of Americans over 13, over 60% of Britons over 13, and almost 90% of Mexicans over 13! It is easy to see why other advertisers and data analysts would like access to data on Facebook users.

Recent interest in data mining has heightened concern about aggregation. Data mining is the process of sifting through multiple databases and correlating multiple data elements to find useful information. Marketing companies use data mining extensively to find consumers likely to buy a product. And malicious actors can use data mining techniques to find personal details that enable more successful spear phishing and other personalized attacks, as we describe in Chapter 4 .

Aggregation is nearly impossible for a DBMS to control because combining the data can occur outside the system, even by multiple colluding users.

Some approaches to inference have proved useful and are currently being used. But there have been few proposals for countering aggregation.

Analysis on Data

As we just described, the attacker has time and computing power to analyze data. Correlating seemingly unrelated bits of information can, as we showed, help build a larger picture. Even supposedly anonymized data can be revealing, as described in Sidebar 7-4 .

Sidebar 7-4 Who Is Number 4417749?

In a move to allow researchers a large, actual database of queries to analyze, AOL decided in 2006 to release three months’ worth of web search queries from over 650,000 users. Although the searchers’ identities were not revealed, AOL did assign each searcher a unique numeric ID so that researchers could relate multiple queries from the same person.

As reported in the New York Times [ BAR06 ], in short time, bloggers inferred that number 4417749 was a woman, Thelma Arnold, who lived in a small town in Georgia. From her queries researchers inferred that she was looking for a landscaper, kept a dog, and was interested in traveling to Italy. What gave away her full identity was that she searched for several people with the surname Arnold and businesses in the Shadow Lake subdivision of Gwinett County, Georgia. Official records showed only one person with the surname Arnold in that county.

Researchers also identified several other individuals from the searches before AOL took the database offline. As this example shows, even anonymized data can reveal true identities.

Using a different form of correlation, Sweeney [ SWE04 ] reports on a project to find lists of people’s names. Correlating names across lists generated a profile of names that match: places they live, work, or go to school; organizations to which they belong; and causes they support. Combinations of individual data items can yield complex, multifaceted biographical sketches.

Hidden Data Attributes

A picture is just a picture, and a document is just a document, right? Not quite, in the digital age. Objects such as pictures, music files, and documents are actually complex data structures having properties or attributes that add meaning to the data. These properties, called metadata , are not displayed with the picture or document, but they are not concealed; in fact, numerous applications support selecting, searching, sorting, and editing based on metadata.

File Tags

Tagging pictures is one way to use these attributes. You might organize your photo collection with tags telling who or what are in each photo. Thus, you could search for all photos including Zane Wellman or all photos from your trip to Stockholm. However, this tagging can sometimes reveal more than intended. Suppose your photo with Zane was taken on a rather embarrassing night out and shows him unflatteringly. If the photo were posted without a narrative description, only people who knew Zane would see the image and recognize him. But when Zane applies for a job and the company does a web search to find background information about him, the photo pops up because his name is in the metadata. And the picture can lead to questions; Zane may not even know you posted the photo, so he may be stunned to learn that a potential employer has seen him in that situation.

Part of this problem, as we describe in Chapter 9 , is that the distinction between private and public is becoming less clear-cut. With photos printed on paper, you had a copy, perhaps Zane had a copy, and maybe a few close friends did too. All of you kept your photos in an album, an old shoebox, or a drawer for memorabilia. Zane might even have looked at the photo and laughed, before he hastily threw it away. Unless his potential employer was awfully thorough, paper photos would never have become part of their search. Now, however, with Facebook, Flickr, Dropbox, and hundreds of sharing sites, photos intended for a few close friends can turn up in anybody’s searches. Users don’t restrict access tightly enough, and limited access is not in the interest of the social networking sites (which derive significant revenue from advertising and thus are more interested in supporting their client advertisers than their human users).

A similar situation exists with documents. Each document has properties that include the name of the author, author’s organization, date created, date last saved, and so forth. If you are preparing a document for anonymous distribution (for example, a paper being submitted anonymously for review, intended for presentation at a conference), you do not want the reviewers to be able to learn that you were the author.

Geotagging

On 11 August 2010 the New York Times published a story about geotagging , the ability of many cameras and smartphones to tag each photo they take with the GPS coordinates where the photo was taken. For many cameras, including those on mobile phones, tagging is set as the default. According to the story, Adam Savage, host of the program Myth Busters , took a photo of his car in front of his house and posted it to his Twitter account. However, because the photo contained location coordinates, Savage inadvertently disclosed the location of his house. With relatively little work, anyone can extract this metadata for offline analysis.

Friedland and Sommer [ FRI10 ], who studied the problem of geotagging, note that many people are unaware of the function. Others are aware of geotagging but do not realize when it has occurred. According to the authors, between 1% and 5% of photos at sites such as Flickr, YouTube, and Craigslist contain header data that gives the location where the picture was taken. Friedland and Sommer speculate that these numbers are low only because some photo-editing applications automatically remove or replace the metadata. These researchers point out the potential for misuse of the data by burglars, kidnappers, stalkers, or other miscreants.

Tracking Devices

Somewhat more obvious but still often overlooked are the electronic devices that we keep with us. Mobile phones and other devices that use the cellular network continually search for a nearby tower. RFID tags for transportation or identification can be read by off-the-shelf devices, and GPS navigation devices send and receive position data. Although appealing for their functionality, these devices can be used to build a relatively complete trail of our movements throughout the day. The Electronic Frontier Foundation [ BLU09 ] has studied this problem and recommends, among other countermeasures, some innovative cryptographic protocols that would permit these locational data interchanges only when they can be done anonymously.

Metadata is not obvious to the object’s owner, but it is well structured and readily available to anyone who knows of its existence and wants to use it. It is currently built into many devices, some of which require it for proper operation. Appropriate access controls for sensitive locational data would be good, but too many products and applications have now been built without consideration of security; introducing a security requirement at this time is essentially impossible. As we describe in Chapter 11 , this problem is now being addressed through legislation and the courts, requiring notification when certain kinds of data are about to be collected, as well as offering opt-out options so that users can turn the tracking off. In cases in which tracking is essential for functionality (as when a cyclometer determines where you are and announces the next turn on your route), the device is not permitted to share the tracking data with third parties without your permission.

Data tracking can occur with data the user or owner does not even know exist.

Multilevel Data Security

Compounding the disclosure problems we have just described is an issue called multilevel security. We have alluded to its problems without introducing the concept formally.

With multilevel security , one database contains data of two or more sensitivities; some users are allowed access to some data to which others are not. The origin of multilevel security is classification of military or diplomatic data, in which a formal clearance process determines who can access data of a particular classification level. In that model, data are grouped hierarchically; people with highest clearance levels and need to know have the greatest access; people with lower clearances can see only a subset. The problem is managing a data set in which high and low sensitivity data coexist.

Various approaches have been proposed, including cryptographic separation of very sensitive data, add-ons to the DBMS to filter high sensitivity results from queries posed by low clearance users, and virtual separation of the database into high and low portions. Because of the overhead involved in all these approaches, none of them has ever resulted in a commercial product.

In the next section we consider ways to address the more general data inference problem of correlation in single and multiple databases.

Preventing Disclosure: Data Suppression and Modification

There are no perfect solutions to the inference and aggregation problems. The approaches to controlling it follow the three paths listed below. The first two methods can be used either to limit queries accepted or to limit data provided in response to a query. The last method applies only to data released.

  • Suppress obviously sensitive information . This action is fairly easy to take, but the challenge is identifying everything that should be protected. The tendency is to err on the side of suppression, thereby restricting the usefulness of the database.

  • Track what the user knows . Although possibly leading to the maximum disclosure that satisfies sensitivity constraints, this approach is extremely costly. Information must be maintained on all users, even though most are not trying to obtain sensitive data. Moreover, this approach seldom takes into account what any two people may know together and cannot address what a single user can accomplish by using multiple IDs.

  • Disguise the data . Random perturbation and rounding can inhibit statistical attacks that depend on exact values for logical and algebraic manipulation. The users of the database receive slightly incorrect or possibly inconsistent results.

It is unlikely that research will reveal a simple, easy-to-apply measure that determines exactly which data can be revealed without compromising sensitive data.

Nevertheless, an effective control for the inference problem is just knowing that it exists. As usual, recognizing a problem leads to understanding the need to control it and to be aware of potential difficulties it can cause. However, just knowing of possible database attacks does not necessarily mean people will protect against those attacks. It is also noteworthy that much of the research on database inference was done in the early 1980s, but the privacy aspects of inference remain largely unchecked.

Dorothy Denning and Jan Schlörer [ DEN83 ] surveyed techniques for maintaining security in databases. The controls for all statistical attacks are similar. Essentially, there are two ways to protect against inference attacks: Either apply controls to the queries or apply controls to individual items within the database. As we have seen, it is difficult to determine whether a given query discloses sensitive data. Thus, query controls are effective primarily against direct attacks. Suppression and concealing are two controls applied to data items. With suppression , sensitive data values are not forthcoming; the query is rejected without response. With concealing , the answer is close to but not exactly the actual value.

Data suppression blocks release of sensitive data; data concealing releases part or an approximation of sensitive data.

These two controls reflect the contrast between security and precision. With suppression, any results given are correct, yet many responses must be withheld to maintain security. With concealing, more results can be given, but their precision is lower. The choice between suppression and concealing depends on the context of the database.

Security versus Precision

Our examples have illustrated how difficult it is to determine what data are sensitive and how to protect them. The situation is complicated by a desire to share as much nonsensitive data as possible. For reasons of confidentiality we want to disclose only those data that are not sensitive. Such an outlook encourages a conservative philosophy in determining what data to disclose: less is better than more.

On the other hand, consider the users of the data. The conservative philosophy suggests rejecting any query that mentions a sensitive field. We may thereby reject many reasonable and nondisclosing queries. For example, a researcher may want a list of grades for all students using drugs, or a statistician may request lists of salaries for all employees within a certain age group. These queries probably do not compromise the identity of any individual. We want to disclose as much data as possible so that users of the database have access to the data they need. This goal, called precision , aims to protect all sensitive data while revealing as much nonsensitive data as possible.

We can depict the relationship between security and precision with concentric circles. As Figure 7-4 shows, the sensitive data in the central circle should be carefully concealed. The outside band represents data we willingly disclose in response to queries. But we know that the user may put together pieces of disclosed data and infer other, more deeply hidden, data. The figure shows us that beneath the outer layer may be yet more nonsensitive data that the user cannot infer.

An illustration shows Security versus Precision.

FIGURE 7-4 Security versus Precision

The illustration shows four concentric circles. The inner or the first circle is labeled, Concealed-Not Disclosed, the second circle is labeled, Cannot Be Inferred from Queries, the third circle is labeled, May Be Inferred from Queries, and the fourth circle is labeled, Freely Disclosed in Response to Queries. The first circle to the fourth circle range from Most Sensitive to Least Sensitive. The first circle to the third circle is the Conceal for Maximum Security. The first circle to the fourth circle is the Reveal for Maximum Precision.

The ideal combination of security and precision allows us to maintain perfect confidentiality for maximum precision; in other words, for maximum precision we disclose all the nonsensitive data requested, but for perfect confidentiality we disclose only nonsensitive data. But achieving this goal is not as easy as it might seem, as we show in the next section. Sidebar 7-5 gives an example of using imprecise techniques to improve accuracy. In the next section we consider ways in which sensitive data can be obtained from queries that appear harmless.

Sidebar 7-5 Accuracy and Imprecision

Article I of the U.S. Constitution charges Congress with determining the “respective numbers...of free...and all other persons...within every...term of ten years.” This census count is used for many things, including apportioning the number of representatives to Congress and distributing funds fairly to the states. Difficult enough in 1787, this task has become increasingly challenging. The count cannot simply be based on residences because those with a housing problem would be missed. A fair count cannot be obtained solely by sending a questionnaire for each person to complete and return because some people cannot read, and, more significant, many people do not return such forms. And there is always the possibility that a form would be lost in the mail. For other reasons, as well, the census total is probably low.

For the 2000 census the U.S. Census Bureau proposed using statistical sampling and estimative techniques to approximate the population. With these techniques, the bureau would select certain areas in which to take two counts: first, a regular count, and second, an especially diligent search for every person residing in the area. In this way the bureau could approximate the “undercount,” the number of people missed in the regular count. It could then use this undercount factor to adjust the regular count in other similar areas and thus obtain a more accurate, although less precise, count.

The U.S. Supreme Court ruled in 1999 that statistical sampling techniques were acceptable for determining revenue distribution to the states but not for allocating representatives in Congress. As a result, the census can never get an exact, accurate count of the number of people in the United States or even in a major U.S. city. At the same time, concerns about precision and privacy prevent the Census Bureau from releasing information about any particular individual living in the United States. In the middle of the coronavirus pandemic, the 2020 census encountered even more accuracy challenges.

Does this lack of precision and exactness mean that the census is not useful? Quite the contrary. We may not know exactly how many people live in Washington D.C. or the exact information about a particular resident of Washington D.C., but we can use the census information to characterize most residents of Washington D.C. For example, we can determine the maximum, minimum, mean, and median ages or incomes, and we can investigate the relationships among characteristics, such as between education level and income for the population surveyed. Researchers are well aware that census data are slightly inaccurate. Furthermore, knowing the kinds of people not surveyed, researchers can understand the direction of some errors. For example, if unemployed people are underrepresented in the results, mean income might be too high. So accuracy and precision help to reflect the balance between protection and need to know.

Statistical Suppression

Because the attacks to obtain data used features of statistics, it may not be surprising that statistics also give some clues to countering those attacks.

Limited Response Suppression

Limited response suppression eliminates certain low-frequency elements from being displayed. It is not sufficient to delete them, however, if their values can also be inferred. To see why, consider Table 7-11 , which shows counts of students by dorm and sex.

Table 7-11 Count of Students by Dorm and Sex

Sex Holmes Grey West Total
M 1 3 1 5
F 2 1 3 6
Total 3 4 4 11

The data in this table suggest that the cells with counts of 1 should be suppressed; their counts are too revealing. But it does no good to suppress the Male–Holmes cell when the value 1 can be determined by subtracting Female–Holmes (2) from the total (3) to determine 1, as shown in Table 7-12 .

Table 7-12 Using Subtraction to Derive Suppressed Cells

Sex Holmes Grey West Total
M – 3 – 5
F 2 – 3 6
Total 3 4 4 11

When one cell is suppressed in a table with totals for rows and columns, it is necessary to suppress at least one additional cell on the row and one on the column to confuse a snooper. Using this logic, all cells (except totals) would have to be suppressed in this small sample table. When totals are not presented, single cells in a row or column can be suppressed.

Combined Results

Another control combines rows or columns to protect sensitive values. For example, Table 7-13 shows several sensitive results that identify single individuals. (Even though these counts may not seem sensitive, someone could use them to infer sensitive data such as NAME; therefore, we consider them to be sensitive.)

Table 7-13 Combining Values to Derive Sensitive Results

| | Drug Use | | --- | --- | | Sex | 0 | 1 | 2 | 3 | | M | 1 | 1 | 1 | 2 | | F | 2 | 2 | 2 | 0 |

These counts, combined with other results such as sum, permit us to infer individual drug-use values for the three males, as well as to infer that no female was rated 3 for drug use. To suppress such sensitive information, one can combine the attribute values for 0 and 1, and also for 2 and 3, producing the less sensitive results shown in Table 7-14 . In this instance, it is impossible to identify any single value.

Table 7-14 Combining Values to Suppress Sensitive Data

| | Drug Use | | --- | --- | | Sex | 0 or 1 | 2 or 3 | | M | 2 | 3 | | F | 4 | 2 |

Another way of combining results is to present values in ranges . For example, instead of exact financial aid figures being released, results can be released for the ranges $0–1,999, $2,000–3,999, and $4,000 and above. Even if only one record is represented by a single result, the exact value of that record is not known. Similarly, the highest and lowest financial aid values are concealed.

Yet another method of combining is by rounding . This technique is actually a fairly well-known example of combining by range. If numbers are rounded to the nearest multiple of 10, the effective ranges are 0–5, 6–15, 16–25, and so on. Actual values are rounded up or down to the nearest multiple of some base.

Random Sample

With random sample control, a result is not derived from the whole database; instead the result is computed on a random sample of the database. The sample chosen is large enough to be valid. Because the sample is not the whole database, a query against this sample will not necessarily match the result for the whole database. Thus, a result of 5% for a particular query means that 5% of the records chosen for the sample for this query had the desired property. You would expect that approximately 5% of the entire database would have the property in question, but the actual percentage may be quite different.

So that an attacker cannot perform averaging attacks by repeating the same query, the system should use the same sample set for equivalent queries. In this way, all equivalent queries will produce the same result, although that result will be only an approximation for the entire database.

Concealment

Aggregation need not directly threaten privacy. An aggregate (such as sum, median, or count) often depends on so many data items that the sensitivity of any single contributing item is hidden. Government statistics show this well: Census data, labor statistics, and school results show trends and patterns for groups (such as a neighborhood or school district) but do not violate the privacy of any single person because the data sets for the queries are large.

Blocking Small Sample Sizes

Organizations that publish personal statistical data, such as the U.S. Census Bureau, do not reveal results when a small number of people make up a large proportion of a category. The rule of “ n items, over k percent” means that data should be withheld if n items represent over k percent of the result reported. In the case previously explored in Table 7-11 , the one person selected represents 100% of the data reported, so there would be no ambiguity about which person matches the query.

As we explained, inference and aggregation attacks work better nearer the ends of the distribution. If very few or very many points are in a database subset, a small number of equations may disclose private data. The mean of one data value is that value exactly. With three data values, the means of each pair yield three equations in three unknowns, which you know can easily be solved with linear algebra. A similar approach works for very large subsets, such as ( n - 3 ) values. Midsized subsets preserve privacy quite well. So privacy is maintained with the rule of n items, over k percent.

Random Data Perturbation

It is sometimes useful to perturb the values of the database by a small error. For each x i that is the true value of data item i in the database, we can generate a small random error term ε i and add it to x i for statistical results. The ε values are both positive and negative, so some reported values will be slightly higher than their true values and other reported values will be lower. Statistical measures such as sum and mean will be close but not necessarily exact. Data perturbation is easier to use than random sample selection because it is easier to store all the ε values to produce the same result for equivalent queries.

Data perturbation works for aggregation too. With perturbation you add a small positive or negative error term to each data value. Agrawal and Srikant [ AGR00 ] show that given the distribution of data after perturbation and given the distribution of added errors, a researcher can determine the distribution ( not the values) of the underlying data. The underlying distribution is often what researchers want. This result demonstrates that data perturbation can help protect privacy without sacrificing the accuracy of results.

Swapping

Correlation involves joining databases on common fields. Thus, the ID number in the AOL queries of Sidebar 7-4 let researchers combine queries to derive one user’s name and hometown. That act of joining or linking permits researchers to draw conclusions by inference.

To counter this kind of linking, some database administrators randomly perturb the data. Referring to the original data table, the sex for Bailey and Chin might be interchanged, as might the race of Dewitt and Earhart. The count of individuals with these values would still be correct. Total aid for all males would be off by a bit. In this tiny example, these changes could affect the results significantly. However, if we had a larger database and performed just a few interchanges, most statistics would be close, probably close enough for most analytic purposes. Researchers could be warned that to protect confidentiality some exact data might be compromised. A researcher might conclude that Adams was receiving $5,000 in aid but could not be sure that conclusion was accurate because of the data swapping.

Thus, swapping, like perturbation, might be a reasonable compromise between data accuracy and disclosure. We examine this subject as a privacy consideration in more detail in Chapter 9 .

Query Analysis

A more complex form of security uses query analysis. Here, a query and its implications are analyzed to determine whether a result should be provided. As noted earlier, query analysis can be quite difficult. One approach involves maintaining a query history for each user and judging a query in the context of what inferences are possible, given previous results. If you have paid attention while reading this chapter, you should now immediately raise the objection that the query history of one user does not address the problem of two or more users colluding.

We have presented some of the techniques by which a DBMS balances use and access control. In other areas, such as operating systems, access control is binary: Access is either granted to or denied to an object. However, DBMSs try to take a more nuanced approach; a strict yes/no approach would lead either to extreme limitation of access (if there is one sensitive record out of a million, access to the entire database could be blocked) or extreme laxness of access (access is allowed in spite of the potential for inference or aggregation). Thus, DBMSs and their administrators try to find a reasonable middle ground.

Next we turn to use of databases in what are called data mining and big data.

7.5 Data Mining and Big Data

In this final section we consider two related topics. The first, data mining, involves people and programs that search and sift data sets to derive data. Yes, you counter, that is what databases are for and what we have considered throughout the rest of this chapter. Data mining, however, implies searching for patterns and connections that were previously unknown and perhaps even unpredictable. Data mining might reveal that left-handed people are more likely to prefer fried eggs to poached eggs—a result that might be interesting but not necessarily sensitive. A team of researchers with a database containing hand dominance and egg preferences could deduce that. But they might also find that left-handed people pay higher mortgage interest rates than right-handed people—a result that might have more serious implications. The data-mining community has grown without much consideration of security, so we list some security issues ripe for consideration.

Data mining is closely related to the concept of big data, which involves the collection of massive amounts of data, often not intended to be databases or structured as such. The emphasis is on the word “big”: for example, the set of all index entries for search engines. When a search engine reports it has 17 million pages answering your query, it probably does, although the usefulness of the 17 millionth link may not be high. Most of us find what we want in the first few results, or we conclude that the query is not getting the results we want and pose a different question.

In the next section we explore data mining and big data, pointing out security aspects of both.

Data Mining

Because the cost per megabyte of storage has fallen from dollars a few years ago to fractions of cents today, more data are being collected and saved than ever before. Networks and the internet allow people and systems to access and share databases in ways previously unimagined. But finding needles of information in those vast fields of data haystacks requires intelligent analyzing and querying. Indeed, a whole specialization, called data mining, has emerged. In a largely automated way, data mining applications sort and search thorough data.

Data mining uses statistics, machine learning, mathematical models, pattern recognition, and other techniques to discover patterns and relations on large data sets. (See, for example, [ SEI06 ].) Data-mining tools use association (one event often goes with another), sequences (one event often leads to another), classification (events exhibit patterns, such as coincidence), clustering (some items have similar characteristics) and forecasting (past events foretell future ones).

The distinctions between database and data-mining applications are becoming blurred; you can probably implement these techniques in ordinary database queries. Generally, database queries are specific, trying to answer a one-time question, such as who earns the highest salary at a company or are salary levels fair to different subgroups. Data mining is more automatic, looking for patterns that apply across large groups: What are common characteristics of high-wage earners, for example. Similarly, you might develop a database query to see what other products are bought by people who buy smart TVs, and you might notice a preponderance of wireless headphones in the result. But data-mining tools would seek significant relationships, not just between TVs and headphones but also between other consumer products, such as bagels, airline tickets, and running shoes. Once the relationships are suggested by automation, humans analyze them to determine what is really significant.

Data mining presents probable relationships, but these are not necessarily cause and effect relationships. Suppose you analyzed data and found a correlation between sale of ice cream cones and death by drowning. You would not conclude that selling ice cream cones causes drowning (nor the converse). This distinction shows why humans must be involved in data mining to interpret the output: Only humans can discern that more variables are involved (for example, time of year, places where cones are sold, ages of victims, or number of incidents).

Computer security benefits from data mining. Data mining is widely used to analyze system data (for example, audit logs) to identify patterns related to attacks, as we describe in Chapter 6 . Finding the precursors to an attack can help develop good prevention tools and techniques, and seeing the actions associated with an attack can help pinpoint vulnerabilities to control any damage that may have occurred. (One of the early works in this area is by Wenke Lee and Sal Stolfo [ LEE98 ], and entire conferences have been devoted to this important and maturing topic.)

Data mining can support analysis of security data.

In this section, however, we want to examine security problems involved in data mining. Our now-familiar triad of confidentiality, integrity, and availability gives us clues to what these security issues are. Confidentiality concerns start with privacy but also include proprietary and commercially sensitive data and protecting the value of intellectual property: How do we control what is disclosed or derived? For integrity, the important issue is correctness—incorrect data are both useless and potentially damaging—but we need to investigate how to gauge and ensure correctness. The availability consideration relates to both performance and structure: Combining databases not originally designed to be combined affects whether results can be obtained in a timely manner or even at all.

Privacy and Sensitivity

Because the goal of data mining is summary results, not individual data items, you would not expect a problem with sensitivity of individual data items. Unfortunately, that is not true.

Individual privacy can suffer from the same kinds of inference and aggregation issues we studied for databases. Because privacy, specifically, protecting what a person considers private information, is an important topic that relates to many areas of computer security, we study it in depth in Chapter 9 . For a taste of the privacy implications of mining big data sets, see Sidebar 7-6 .

Sidebar 7-6 Protecting Amazon’s Data

Amazon collects and retains massive amounts of data on its customers: their orders, addresses, phone numbers, credit card details, and even search history, such as items viewed but not purchased. Initially it paid database company Oracle to host and maintain that data, which by the mid-2010s had become the largest database in the world, estimated at the time to be 50,000 terabytes of data. (A terabyte is 1 trillion bytes of data.) Amazon decided to bring the database in-house and host it on Amazon’s own Amazon Web Services.

The problem was that Amazon did not have an effective information security program. Some 3,300 separate teams of employees were tapping into the data to analyze it. These teams were free to copy the data they wanted and then store it elsewhere. Even if Amazon had wanted to apply access controls to the large data set, the company did not know of, and hence could not exercise control over, all these extra databases. According to an article in Wired magazine, “Amazon's vast empire of customer data—its metastasizing record of what you search for, what you buy, what shows you watch, what pills you take, what you say to Alexa, and who's at your front door—had become so sprawling, fragmented, and promiscuously shared within the company that the security division couldn't even map all of it, much less adequately defend its borders” [ EVA21 ]. Customer service representatives could look up records on any Amazon customer, regardless of whether there was a need to know.

In 2021, Amazon was fined US$886 million for violation of the European Union requirement to protect the privacy and use of individuals’ data. (Amazon’s gross profit for calendar year 2021 was US$197 billion, so that fine represented less than 0.5% of Amazon’s profit.)

Not only individual privacy is affected, however: Correlation by aggregation and inference can affect companies, organizations, and governments too. Take, for example, a problem involving Firestone tires and the Ford Explorer vehicle. In May 2000, the U.S. National Highway Traffic Safety Administration (NHTSA) found a high incidence of tire failure on Ford Explorers fitted with Firestone tires. Under certain conditions, the Firestone tire’s tread separated. And in certain conditions, the Ford Explorer tipped over. If a Ford Explorer had Firestone tires on which the tread separated, the Ford was more likely to tip over [ PUB01 ]. Consumers had complained to both Ford and Firestone since shortly after the tire and vehicle combination was placed on the market in 1990, but problems began to rise after a design change in 1995.

Both companies had some evidence of the problem, but the NHTSA review of combined data better showed the correlation. Maintaining data on products’ quality is a standard management practice. But the sensitivity of data in these databases would preclude much sharing. Even if a trustworthy neutral party could be found to mine the data, the owners would be reasonably concerned for what might be revealed. A large number of failures of one product could show a potential market weakness, or a series of small amounts of data could reveal test marketing activities to outsiders.

As we describe in Chapter 9 , data about an entity (a person, company, organization, government body) may not be under that entity’s control. Supermarkets collect product data from their shoppers, either from single visits or, more usefully, across all purchases for a customer who uses a customer loyalty card. In aggregate, the data show marketing results useful to the manufacturers, advertising agencies, health researchers, government food agencies, financial institutions, researchers, and others. But now these results collected by the supermarket can be used for anything, including sales to manufacturers’ competitors, for example.

Little consideration has been given to sensitivity of data obtained from data mining. Chris Clifton [ CLI03 , KAN04 ] has investigated the problem and proposed approaches that would produce close but not exact aggregate results that would preclude revealing sensitive information.

Data Correctness and Integrity

“Connecting the dots” refers to drawing conclusions from relationships between discrete bits of data. But before we can connect dots, we need to do two other important things: collect and correct them. Data storage and computer technology is making it possible to collect more dots than ever before. But if your name or address has ever appeared incorrectly on a mailing list, you know that not all collected dots are accurate.

Correcting Mistakes in Data

Let’s take the mailing list as an example. Your neighbor at 610 Thames Street walks down your street to deliver a kitchen supply catalog to you at 619 Thames Street; it is labeled with your correct name but incorrect address: 610 instead of 619. You contact the kitchen supply company, which is pleased to change your address in their records; it is in the company’s interest to make sure catalogs get to people who are potential customers. But it bought your name and address along with others from a company that sells mailing lists, and it has no incentive to contact the owner of the master record. So additional catalogs continue to be sent to the incorrect address: your neighbor’s. You can see where this story leads—mistaken addresses never die.

Data mining exacerbates this situation. Databases need unique keys to help with structure and searches. But different databases may not have shared keys, so they use some data field as if it were a key. In our example, this shared data field might be the address, so now your neighbor’s address is associated with cooking (even if your neighbor needs a recipe to make tea). Fortunately, this example is of little consequence.

Consider terrorists, however. A government’s intelligence service collects data on suspicious activities. But some names of suspicious persons are foreign, written in a different alphabet. When transformed into the government’s alphabet, the transformation is irregular: One agent writes “Doe,” another “Do,” and another “Doh.” Trying to use these names as common keys is difficult at best. One solution is to focus on phonetics: You cluster terms that sound similar. In this case, however, you might bring in “Jo,” “Cho,” “Toe,” and “Tsiao,” too, thereby implicating innocent people in the terrorist search. (In fact, this happens: See Sidebar 7-7 .) Assuming a human analyst could correctly separate all of these variations and wanted to correct the Doe/Do/Doh databases, there are still two problems. First, the analyst might not have access to the original databases held by other agencies. And second, even if the analyst could get to the originals, the analyst would probably never learn where else the copies are.

One important goal of databases is to have a record in one place so that one correction serves all uses. With data mining, a result is an aggregate from multiple databases. There is no natural way to work backward from the result to the amalgamated databases to find and correct errors.

Databases and aggregations have no backward link, no way to correct mistakes at their source.

Sidebar 7-7 Close, But No Cigar

Database management systems are excellent at finding matches: all people named Bfstplk or everyone whose age is under 125. They have limited capabilities to find “almost” matches: people whose names were misspellings of Bfstplk or have any four of five attributes. DBMSs have trouble finding names derived from d’Estaing or, given a set of symptoms, to determine what disease is present. DBMS vendors add domain-specific comparison engines to define “close,” for pronunciation, orthography, features, or other pattern-matching operations. Dealing in imprecision, these engines can produce some spectacular failures.

Airport security databases are frequently in the news in the United States. It is worrying that the late Senator Edward Kennedy and the late Representative John Lewis were repeatedly subjected to secondary screening at airports, presumably because their names resemble those of terrorists. Fortunately for them, their status in the government gave them clout to suggest the situation be fixed. Many other sound-alikes are not so well placed. And people with names like Michelle Green and David Nelson have no idea why their names frequently trigger more scrutiny.

Using Comparable Data

Data semantics is another important consideration when mining for data. To see why, consider two geographical databases with data on family income. One database has income by U.S. dollar, and the other has the same data but in thousands of euros. Even if the field names are the same, combining the raw data would result in badly distorted statistics. Consider another attribute rated high/medium/low in one database and on a numerical scale of 1–5 in another. Should high/medium/low be treated as 1/3/5? Or how can you meaningfully combine one database that has a particular attribute with another that does not?

Eliminating False Matches

As we describe earlier, coincidence is not correlation or causation; because two things occur together does not mean either causes the other. Data mining tries to highlight nonobvious associations in data, but data-mining applications often find them using fuzzy logic (an actual mathematical field in which truth values are not necessarily 0 for false and 1 for true, but may be any rational number between 0 and 1). We need to be sensitive to the inherent inaccuracy of data-mining approaches and guard against putting too much trust in data mining just because “the computer said so.”

Excluding Fake or Incorrect Data

Data mining scrutinizes a large database, which itself may be either an amalgam of different databases, a collection of data over a long period of time, or both. But the associations highlighted by data-mining algorithms are affected significantly by the quality of the data items themselves. That quality can be affected—and often degraded—by several situations:

  • Incorrect data . If the category or data item definitions are not clearly understood by the person supplying the data, the data items may be incorrect. For example, a database of contest submissions may not state clearly that only people ages 18 and over may participate. Or the NAME field may require both first and last names, but sometimes only last name is supplied. Or a teenager may submit the incorrectly spelled name of a friend.

  • Incomplete data . If the database has insufficient space for the data item, it may retain only a part of the complete piece of information. For example, credit cards may limit the NAME field to 13 characters, so Chatsworth L. Osborne, Jr. is forced to find a way to abbreviate his name on his credit card application. If he uses “C L OsborneJr”, a data mining algorithm may not recognize that other records using “Chatsworth L. Osborne, Jr.” refer to the same person.

  • Fake data . Sometimes, data are submitted that are intentionally fake; they have no connection to a real person. For instance, you may apply for a customer loyalty card at your local pharmacy to receive its discount. But you do not want to receive additional messages and mail from the company, so you use a fake name, address, and phone number. Especially if the phone number is a key used by the data mining software to associate records, your other fake data will be associated with the person who really has that phone number.

Correct results and correct interpretation of those results are major security issues for data mining.

Availability of Data

Interoperability among distinct databases is a third security issue for data mining. As we just described, databases must have compatible structure and semantics to make data mining possible. Missing or incomparable data can make data mining results incorrect, so perhaps a better alternative is not to produce a result. But no result is not the same as a result of no correlation. As with single databases, data-mining applications must deal with multiple sensitivities. Trying to combine databases on an attribute with more sensitive values can lead to no data and hence no matches.

Combining data tables with no natural and accurate common field (key) leads to many faulty results.

Big Data

The term big data means analysis of massive amounts of data, often collected from different sources. Traditionally, a grocery might guess it could sell 100 heads of lettuce in a week; if the guess was too low, some shoppers left the store with no lettuce, but if the guess was too high, the grocer might have had to reduce the price of lettuce at the end of the week to move out stock before it spoiled. Looking near long-range weather forecasts, the grocer might notice a predicted heat wave and order additional lettuce, as people would want light food such as salads in hot weather. Or the grocer might reduce the order during certain times when many customers would leave town on holiday. All this analysis was ad hoc, depending on a grocer’s sense and knowledge of the market. Big companies apply similar logic to decide how many cars or shirts to manufacture or whether to invest in new plants and equipment. But guessing wrong can be quite expensive.

Any type of analysis is limited by the type, nature, and volume of data available. In the grocer’s situation, the source of the data may influence its nature. For instance, opening a second store in a more health-conscious region might lead the grocer to stock more lettuce and fewer doughnuts than at the first store. Wondering what other customer preferences are affected by store location, the grocer might explore whether a particular model of automobile in the parking lot might predict the amount of expensive cheese sold. Similarly, the number of cases of flu reported to local doctors might influence how many boxes of tissues to stock. But the grocer may not easily count cars in the parking lot and is not likely to have access to physicians’ data. And the grocer cannot easily find out what current and potential customers think of the grocery or its products.

Moreover, data on customers is readily available only if someone has the ability to collect, store, and analyze it. Computing power, measured by computations per second, has increased exponentially since the introduction of computers, and the amount of storage a given amount of money will buy has similarly skyrocketed. So enterprises have formed to combine business needs—like the grocer’s—with computing power to answer questions.

Beginning early in this millennium, companies such as Axciom, IBM, Amazon, GE, and AT&T invested heavily in learning more about their customers by creating huge data sets—big data—and then mining them to find associations or make predictions. Sidebar 7-8 gives an example of the use of big data to predict crime.

Sidebar 7-8 Police Use Data Mining to Predict (and Prevent) Crime

Police Chief Rodney Monroe of the Charlotte-Mecklenburg, North Carolina, Police Department uses technology to reduce crime. He argues that measurement and analysis are keys to smarter police work.

As Chief of Police in Richmond, Virginia, in 2005 he introduced data analysis from seemingly unrelated sources, such as weather, traffic volume, day of week, paydays, as well as more usual police data such as crime reports and emergency response calls. He found (not surprisingly) that robberies tended to spike on paydays. The problem was prevalent in areas where fewer residents have bank accounts and thus use storefront check-cashing businesses; recently paid employees walking around with large amounts of cash are appealing targets. By analyzing such data and focusing policing activity on high-potential situations, the Richmond Police Department saw crime fall 21% in 2005–2006 and another 19% in 2006–2007. Since moving to Charlotte, Chief Monroe has implemented similar approaches; he has seen a 20% drop in violent crime and 30% reduction in property crime, according to a report in Computerworld (24 October 2013).

Other police departments are using tools such as PredPol, developed at the University of California, Los Angeles. PredPol is based on the same algorithms used to predict locations of aftershocks from earthquakes. The tool develops predictions for 500 ft (150 m) square boxes, showing officers which areas are at highest risk of particular types of crime; police can then focus patrolling on the most likely crime spots, hoping that additional police presence will deter criminals.

Predictive policing is not without problems, as Jennifer Bachner [ BAC13 ] points out. Overreliance on technology, separating the officers from the community (so officers interact with programs instead of developing leads by conversing with community members), privacy concerns, data correctness, and security in managing data are all limitations of using analysis to suggest hot spots for police attention.

Police departments are using the same strategies and techniques as retailers, manufacturers, and other businesses. Faced with limited resources, police captains want to deploy officers where and when they can do the most good—preventing crime instead of searching for criminals after the incident. Inferring patterns from past data helps managers make informed choices.

Big data differs from more conventional data in several ways. Usually, it comes from sources outside the company; it is not generated solely by the organization’s own internal systems. It can come from a variety of devices (such as sensors), forums (such as social media), and historical records (such as video and audio recordings). The entries can derive from government databases, market analytics, and customer reports. All of these sources and items are amalgamated in some way to make big data searchable. Every search query helps discover trends, giving individuals and organizations insight into what products, services, and preferences people are sharing with their friends.

Data on activities or behavior abound. Are they accurate?

Using data to predict behavior is valuable as companies and governments decide how to allocate resources. Now the grocer no longer needs to look at a ten-day weather forecast to make decisions. Instead, weather, growing patterns, fuel prices, and other characteristics help the grocer determine with greater accuracy how many heads of lettuce will sell. Big data deals not just with heads of lettuce but also with heads of humans, as Sidebar 7-9 describes.

Sidebar 7-9 Did Facebook Friend an Election?

The outcome of the 2016 U.S. presidential election may have been influenced by inappropriate use of Facebook data.

A Cambridge University researcher had a contract with Facebook, allowing him to obtain data from Facebook users—with their permission. The researcher used the data to create psychological profiles for the contributors’ own use. Without permission, the researcher then passed the data to data analysis firm Cambridge Analytica, which in turn used the data to build voter profiles of the Facebook users. Cambridge Analytica then presented 87 million Facebook users with political ads targeted to the users’ political leanings. Donald Trump’s senior staff member, Steven Bannon, sat on the board of Cambridge Analytica. Trump’s 2016 U.S. presidential campaign hired Cambridge Analytica to develop the ads [ ROS18 ]. The advertisements stressed religious, anti-immigrant, racial, or moral themes. Thanks to big data’s ability to tailor a query to very specific characteristics, reportedly as many as a million different advertisements were designed to trigger a reaction from a specific type of potential voter.

Based in London, Cambridge Analytica is barred by U.S. law from participating in political campaigns. In 2018, Facebook paid a fine of UK£500,000 (approximately US$625,000) following an investigation by the U.K. Information Commissioner. Facebook also paid a fine of US$5 billion levied by the Federal Trade Commission because it “used deceptive disclosures and settings” that eroded user privacy. In 2022, the Attorney General of the U.S. District of Columbia (Washington D.C.) sued Mark Zuckerberg, head of Facebook, for the release of this data. The suit alleges that Zuckerberg knew of the potential dangers of sharing users’ personal data and made important company decisions. Mishandling big data can have big consequences.

Meanwhile, the Democratic National Committee (DNC) did its homework. For the 2022 election, the DNC compiled a massive database of over 260 million addresses. Tracking voters is difficult: They move, die, and otherwise disappear, whereas others come of voting age, register to vote, change registration, change their names, and reappear after not voting for a while. Although tracking names is difficult, addresses are more stable. Two factors are also important: More often than not, people in the same household have similar political viewpoints, and the country has many areas in which neighbors have similar viewpoints. Thus, finding new names living in a pocket of other supportive voters might yield additional votes.

The traditional approach to political organizing begins with a list of registered voters, but that leaves out those who are eligible but not registered. In 2020, the U.S. Census Bureau counted over 231 million citizens old enough to vote (18), but only 72% of those were registered to vote. By combining data not just from voter rolls but also Postal Service records, geolocation data, and data from private vendors, the DNC thinks it has a new pool of potential voters, according to a report in the newsletter Protocol [ LAP22 ].

Addresses are surprisingly hard to determine. In rural areas, some homes have an address but no way for a party canvasser to find the door to knock on. On Native American tribal lands, some homes have no street addresses. Amassing this database by mining from other data sources has given an important tool not just to the DNC for its door-to-door canvassers but also to candidates who want to understand people who live in their districts.

Big data is a big deal. And as with many highly popular technologies, functionality outweighs security. In the next section we briefly describe how big data works, point out some of its security limitations, and suggest potential countermeasures.

A Big Data Application Framework

As shown in Figure 7-5 , the conventional model of computing has users interacting with a processor that can access storage. To expand such a system, as shown in Figure 7-6 , storage can be increased by adding more disks to a disk array, for example. However, there is an implicit limit to how far storage can grow without suffering serious performance delays: At some point the biggest device on the market fills up, and a different architecture is needed. A new processor can offer greater speed, but higher performance tends to be disproportionately more expensive. Furthermore, one processor and one storage array become potential points of catastrophic failure. Big data requires a robust architecture that can readily scale to virtually unlimited capacity.

An illustration shows Conventional Computing Architecture.

FIGURE 7-5 Conventional Computing Architecture

The bottom of the illustration shows Storage which is linked to the Processor which is further linked to five users.

An illustration shows Conventional Architecture Scales by Adding More, Bigger, or Faster Components.

FIGURE 7-6 Conventional Architecture Scales by Adding More, Bigger, or Faster Components

The bottom of the illustration shows a larger Storage which is linked to the Processor which is further linked to five users.

Big data raises security issues because of the amount of data being considered: Protecting tens or hundreds of data items generally involves less risk and difficulty than billions or trillions. That is, the sheer size of the data set means that security scanning and checking take time, interrupting the ability of the data analysis system to return timely responses. However, the basics of many protection issues are the same as in other domains: Securing data, protecting privacy, and ensuring integrity are concerns for single-user computers, multiuser computing systems, networks, cloud providers, and distributed applications, as well as big data processors.

Because big data is an emerging field, we list problems and not solutions. From the examples of authorization, access control, and the like shown elsewhere in this book, you can hypothesize tools and techniques applicable to these problems.

Privacy

One can argue that big data is unrelated to privacy: Data processors do not collect data but only sift through existing data. So, for example, big data users are not responsible for the fact that a store tracks customers’ purchases through customer loyalty cards, or that the store then sells the tracking data to people interested in learning trends. On the other hand, big data’s collecting and correlating capabilities have made such use possible and even lucrative. Regardless, privacy issues arise. We study privacy in general in Chapter 9 .

Privacy-Preserving Analytics

As we explain in Chapter 9 , anonymization is an important method to balance privacy concerns with functional objectives. Researchers want to know, for example, if smoking correlates with lung cancer. To learn that, researchers need a population containing smokers and nonsmokers, along with their lung cancer status. Who the subjects are is immaterial. In theory, a large body of case histories makes it infeasible to connect a subject with an actual identity. In that sense, big data should improve privacy by vastly increasing the pool of subjects, thereby increasing the number of subjects and identities.

Alas, big data also contributes to the problem because it provides more data that might identify particular individuals: More data terms reduce the number of persons matching all attributes. Who is the cancer patient living on Maple Street, aged 55, in a household with two dogs, subscribing to Bicycling magazine, who makes frequent telephone calls to Rio de Janeiro?

Inference works on big data just as it does in databases.

As described earlier in this chapter, adding noise and removing identifying data can help preserve privacy. Noise might include false data: one cat and no dogs, for example; removing the age might also make it harder to infer the person’s identity from the data. Still, as we show in Chapter 9 , approaches that restrict data are incomplete solutions.

Granular Access Control

Big data often uses unstructured data sets: flat, two-dimensional tables. Access control, if any, is imposed at the file level: The entire file is or is not accessible to a user. Such an approach fits neatly with big data architectures, in which entire files are replicated and analyzed by a collection of data nodes working in parallel.

As first raised in Chapter 2 and reinforced throughout the rest of this book, fine-grained access control helps promote security (and privacy) by allowing least privilege: A process can access exactly those objects or the specific data consistent with security policy and necessary for the task at hand.

Security

Reconsider the C–I–A triad from Chapter 1 . Confidentiality is closely related to privacy, but there are other confidentiality concerns. Big data often involves big money: Data collectors pay to harvest data that they then sell. A data harvester reaps continuing profits by collecting data once and selling it many times to different buyers. Search engine companies collect data from users’ search terms (such as “hotel San Francisco”) that they might then sell to Hilton, Marriott, Radisson, and Hyatt, as well as to airlines, restaurants, tour companies, and so on. If a search engine firm sells data to Hilton, and Hilton then resells it to other enterprises, the search engine firm loses out on the subsequent revenue stream. Thus, the search engine firm wants to control the confidentiality of its proprietary data. Integrity of data—that it is correct and intact—matters, as does ensuring availability of the data. Thus, all three elements of the triad matter for big data.

Here we list some specific security issues related to big data.

Secure Data Storage

Data items are replicated and stored in a convenient location. If one data store becomes so full that performance suffers, controllers automatically split the data and move some of the parts elsewhere. The application developer generally does not know, much less care, where the data are physically stored.

Data-storage providers seek the lowest cost, and hosting data in the center of New York City, London, or Tokyo is likely to be far more costly than Alcoa, Tennessee, or Pateley Bridge, England. With adequate power and network infrastructure, any place is as good as any other.

Almost. Suppose data are stored in a politically sensitive region, even a war zone: A mortar attack or fallout from a missile strike is not desirable. Or suppose the data are housed in a country whose ruler decides to nationalize all foreign-held assets. Or consider a locale where hungry citizens storm an installation to steal anything they can later resell as scrap to buy food. In other chapters, we describe access control in terms of magnetic cards and fingerprint readers for polite persons, but access control on a global basis must address physical and political issues as well.

Transaction Logs and Auditing

Activity logs are important for monitoring who did what. Review of audit logs can help an administrator regulate access permissions, and logs also help determine the extent of damage if an error or a security breach occurs. Determining what to track is challenging, however. Too little tracking can limit the access logs’ usefulness, but too much data can overwhelm humans and technology, making it difficult to find the proverbial needle in a haystack of accesses. Data granularity affects volume of tracking data too. It may be useless to know that user A accessed database D on Monday, when what would really help is to know that A modified records 2 and 17, or even that A changed the address field in 2 and the salary field of 17. The tracking data available depend on the granularity of access recorded for the data. In big data applications, the unit of access is often the file, so a log would record only that an application accessed file F, not the specific data within F.

Tracking access is expensive, especially if accesses are numerous; detailed access auditing is uncommon for big data.

Real-Time Security Monitoring

As Chapter 6 describes, intrusion detection and protection systems allow administrators to monitor activity, perhaps detect anomalous behavior or attacks, and apply countermeasures while an incident is underway. Big data architectures involve nimble movement of data and computation, but the connecting network may be a large, shared network, often the internet. Real-time security monitoring is not intended for complex, shared, fluid network architectures.

Insiders

Whether well-intended or malicious, insiders pose threats to the security of big data, just as they do for more conventional data collections. The difference with big data is that an insider can affect large amounts of data.

In 2005, 260,000 financial records for Ameriprise Financial customers were lost on a misplaced laptop. In 2017, 145 million consumer records were exposed in the breach of Equifax, a consumer credit reporting agency. Accidentally leaking or voluntarily exfiltrating data can involve massive amounts. With the internet reaching everywhere and working quickly, passing a large volume of data can be done efficiently. Even if a monitoring device detects the data transfer, much data can easily be gone before defensive action occurs.

Access Control

With single data files, system administrators can control access carefully, granting each person access to precisely those resources needed. The control can also be audited.

Big data may involve many data sets, separately amassed and managed. An administrator might be able to decide who should be authorized to access data set A, but how can that authorization be carried through if the data in set A are merged or correlated with data from other data sets? As we describe elsewhere in this chapter, aggregation and inference create additional problems in implementing a rational access policy; those same problems occur with controlling access to big data sets.

Integrity

Finally, integrity deserves its own consideration separate from confidentiality and availability because correctness, accuracy, and reliability are so important for data users. In this section we identify some integrity problems relevant for big data.

Data Accuracy

You may have experienced some piece of personal data being incorrectly entered into a database. We presented the example earlier in this chapter of 610 Thames Street instead of 619. The frustrating part is that, try as you will, you often can never trace the ultimate place where the number is incorrect. So 610s keep popping up for years. We used the earlier example as an aspect of element integrity.

Big data sets have problems with integrity, as we just described. However, another characteristic of big data use complicates the situation. Big data often uses many data streams collected from many sources, for example, photo recognition of auto license plates, human transcription from written public records, voice recognition from recordings, and input from handwritten forms, all of which are prone to error.

Rich, structured databases often have one or more identifying keys, such as telephone number, national insurance number, account number, date of birth, or some other solid data item on which to join two data sets. Big data collections tend not to have such strong keys, so they are joined on weaker attributes, such as name (which can be presented in several forms and misspelled in even more ways). The accuracy of results from such joins is lower.

For many uses, high accuracy of big data is not important: Whether 90, 100, or 110 people of 500 in a neighborhood have pets is less important than that ownership of pets is in the range of 15% to 25%. However, users need to appreciate this limited degree of accuracy.

Need for data accuracy depends on the intended use; users need to consider their accuracy requirements when acting on results from big data operations.

Source Provenance

Big data usually involves collecting and analyzing data from several sources. As we just pointed out, data sets will have differing degrees of quality depending in part on where the data come from. Big data applications must control for such variability, although big data models do not always give applications a way to learn the exact source of data, or even the nature of the source. Thus, application writers cannot readily account for data provenance in results they generate.

End-Point Filtering and Validation

Finally, after an application has processed data from a big data collection, the application might want to filter and validate the results. Current big data frameworks do not support that kind of data revision and manipulation.

Security Additions for Big Data Applications

As described in other chapters, adding security to an existing product or system is seldom a successful strategy. Nevertheless, sometimes that is the only available approach; not only are the specification and design complete, but one or more versions of the product are in use. Such is the case with proprietary big data application frameworks: Product design and implementation were complete before security was considered seriously. Security engineers have now recommended changes and additions to support well-known security tools and techniques. Here are some approaches that have been applied to protect big data:

  • authentication for end-user web devices

  • mutual (user to process to data server and the reverse) authentication

  • access control to files in the file system

  • delegation tokens for continuous authentication between internal clients and services

  • job tokens for distributing access authorization to multiple distributed platforms that collectively implement a data search across disparate data stores

  • SSL encryption for network traffic

As an emerging technology, but one that is growing rapidly, big data has many security issues and fewer security techniques. As the field continues to grow, it needs to integrate security throughout its development and use.

7.6 Conclusion

In this chapter we have explored protection of data. Our interests have touched on issues of privacy, which we explore in greater depth in Chapter 9 . Also, we have previewed some security issues of cloud computing, a new name for widely distributed data storage and processing. We address security for the cloud in Chapter 8 .

Protecting data is especially tricky because users can collect and pool data outside the computing system. Thus, although we might set up a solid access control approach and complete tracking of what data each individual did access, actions outside the system are completely beyond our control.

7.7 Exercises

1. (a) In an environment in which several users share access to a single database, can one user ever block another’s access for an unlimited period of time? (This situation is called indefinite postponement.) (b) Describe a scenario in which two users could cause the indefinite postponement of each other. (c) Describe a scenario in which a single user could cause the indefinite postponement of all users.

2. Using the two-step commit presented in the beginning of this chapter, describe how to avoid assigning one seat to two people, as in the airline example. That is, list precisely which steps the database manager should follow in assigning passengers to seats.

3. Data provenance is a serious database issue. Name three controls that could be used to ensure that items added to a database are accurate.

4. Suppose a database manager were to allow nesting of one transaction inside another. That is, after having updated part of one record, the DBMS would allow you to select another record, update it, and then perform further updates on the first record. What effect would nesting have on the integrity of a database? Suggest a mechanism by which nesting could be allowed.

5. Can a database contain two identical records without a negative effect on the integrity of the database? Why or why not?

6. Who should be responsible for the correctness of big data? If, as in our example, the address 610 Thames Street is incorrectly entered, should responsibility for correctness lie with the owner of the original database (where the data came from) or the big data aggregator (who acquired the data to amalgamate with data from other sources)? In other words, who should be required to correct the mistake? Explain your answer.

7. Some operating systems perform buffered I/O. In this scheme, an output request is accepted from a user, and the user is informed of the normal I/O completion. However, the actual physical write operation occurs later, at a time convenient to the operating system. Discuss the effect of buffered I/O on integrity in a DBMS.

8. A database transaction implements the command “set STATUS to ‘CURRENT’ in all records where BALANCE-OWED = 0 .” (a) Describe how that transaction would be performed with the two-step commit described in this chapter. (b) Suppose the relations from which that command was formed are (CUSTOMER-ID,STATUS) and (CUSTOMER-ID,BALANCE-OWED). How would the transaction be performed? (c) Suppose the relations from which that command was formed are (CUSTOMER-ID,STATUS), (CREDIT-ID,CUSTOMER-ID), (CREDIT-ID, BALANCE-OWED). How would the transaction be performed?

9. Show that if longitudinal parity is used as an error detection code, values in a database can still be modified without detection. (Longitudinal parity is computed for the n th bit of each byte; that is, one parity bit is computed and retained for all bits in the 0th position, another parity bit for all bits in the 1st position, etc.)

10. Suppose query Q 1 obtains the median m l of a set S 1 of values, and query Q 2 obtains the median m 2 of a subset S 2 of S 1 . If m 1 < m 2 , what can you infer about S 1 , S 2 , and the elements of S 1 not in S 2 ?

11. Disclosure of the sum of all financial aid for students in Smith dorm is not sensitive because no individual student is associated with an amount. Similarly, a list of names of students receiving financial aid is not sensitive because no amounts are specified. However, the combination of these two lists reveals the amount for an individual student if only one student in Smith dorm receives aid. What computation would a DBMS have to perform to determine that the list of names might reveal sensitive data? What records would the DBMS have to maintain on what different users know to determine that the list of names might reveal sensitive data?

12. One approach suggested to ensure privacy is the small result rejection, in which the system rejects (returns no result from) any query, the result of which is derived from a small number, for example, five, of records. Show how to obtain sensitive data by using only queries derived from six records.

13. The response “sensitive value; response suppressed” is itself a disclosure. Suggest a manner in which a DBMS could suppress responses that reveal sensitive information without disclosing that the responses to certain queries are sensitive.

14. Big data is, well, big: Data sets may involve millions of records. Assume a database allows unauthorized access to one of those millions of records. Is that disclosure significant? Explain your answer. Assume a database contains one inaccurate record out of its millions. Is that error significant? Explain your answer.

15. Cite a situation in which the sensitivity of an aggregate is greater than that of its constituent values. Cite a situation in which the sensitivity of an aggregate is less than that of its constituent values.