Before you start
The tutorial is divided into two parts. The first part covers the basic row protection and column protection. The second part contains more complex scenarios, and introduces the use of exemptions.
This tutorial provides a guide to using DB2's Label-Based Access Control (LBAC) security feature. LBAC controls access to table objects by attaching security labels to them. Users attempting to access an object must have its security label granted to them. When there's a match, access is permitted; without a match, access is denied. There are three types of security labels:
- Row security labels. A security label associated with a data row or record in a database table.
- Column security labels. A security label associated with a column in a database table.
- User security labels. A security label granted to a database user.
A security label is composed of one or more security label components. There are three types of security label components that you can use to build your security labels:
- Sets. A set is a collection of elements where the order in which those elements appear is not important. All elements are deemed equal.
- Arrays. An array is an ordered set that can be used to represent a simple hierarchy. In an array, the order in which the elements appear is important. For example, the first element ranks higher than the second element and the second higher than the third.
- Trees. A tree represents a more complex hierarchy that can have multiple nodes and branches. For example, trees can be used to represent organizational charts. You use a security policy to define the security label components that make up a particular security label.
DB2 Security Administrator (SECADM) is required to manipulate LBAC objects. SECADM authority can only be granted by SYSADM. A database manager (DBM) does not have SECADM by default.
This tutorial shows how to use security labels to control access to data at the row level, column level, and at a combination of both row and column. You will also learn how to determine which security label component is most appropriate when creating those security labels. And finally you will learn how to use a security policy to associate your security label components with your security labels. Using examples from the financial industry and the police services area, you will:
- Analyze the required data restrictions.
- Design the LBAC security solution.
- Implement the LBAC security solution.
- See your LBAC security solution in action.
This tutorial is written for DB2 database developers and DB2 database administrators. You should understand the basic concepts of LBAC.
DB2 Viper for Linux®, UNIX®, and Windows®