By the end of this chapter, you will be able to:
Mastering these skills will help you protect valuable data and keep your organization's database safe and trustworthy in the real world.
Database security is a critical facet of cyber security, especially in Kenya where organizations across sectors increasingly rely on digital data to support operations, decision-making, and service delivery. Protecting databases from unauthorized access, manipulation, or breaches safeguards sensitive information and maintains organizational integrity. This chapter explores fundamental authorization measures and techniques that cyber security professionals use to secure databases, ensuring only legitimate users gain appropriate access while minimizing risks of insider threats and external attacks.
Database authorization defines who can access the database, what actions they can perform, and under what conditions access is granted. In Kenya, institutions such as county government offices and banking SACCOs must enforce stringent authorization controls to comply with data protection laws and protect customer data. Various models and principles like Role-Based Access Control (RBAC), Attribute-Based Access Control (ABAC), the principle of least privilege, and multi-factor authentication form the backbone of robust database security.
Role-Based Access Control is a widely adopted authorization model that simplifies permission management by assigning access rights based on user roles within an organization. This approach aligns well with hierarchical and departmental structures common in Kenyan public and private sectors, such as universities or insurance companies.
RBAC operates by defining roles that correspond to job functions, then associating permissions with these roles rather than individual users. Users are assigned roles according to their responsibilities, enabling scalable and consistent access control. For example, in a hospital setting, roles could include "Doctor," "Nurse," and "Administrator," each with different database access privileges.
Attribute-Based Access Control enhances flexibility by making access decisions based on a combination of user, resource, and environment attributes. This model suits complex scenarios in Kenyan institutions such as banks or universities where access may depend on multiple contextual factors.
ABAC evaluates attributes such as user department, clearance level, time of access, and device location to dynamically determine access rights. For instance, a SACCO might allow loan officers to access customer data only during working hours and from secured office networks.
The least privilege principle mandates that users and applications receive only the minimum level of access necessary to perform their functions. This principle is fundamental in Kenyan cyber security practice, particularly in sensitive environments like national tax offices or healthcare facilities.
Least privilege restricts permissions so that users cannot access data or functions beyond their legitimate needs, reducing the attack surface and potential damage from insider threats or compromised accounts.
Multi-factor authentication (MFA) strengthens database security by requiring users to verify their identity through two or more independent credentials. Kenyan organizations, including financial institutions and government agencies, increasingly adopt MFA to mitigate risks of password compromise.
MFA typically combines factors from at least two categories: something the user knows (password), something the user has (token or mobile device), and something the user is (biometric). For example, a university database system might require a password plus a one-time code sent to a staff member's phone.
Create a free account to open more of this chapter.
Free: practical guides, quick cards, workplace scenarios and more.
Create a free accountThis chapter explored essential database security measures focusing on authorization techniques that safeguard data access. It detailed Role-Based Access Control, which assigns permissions based on user roles, and Attribute-Based Access Control, which grants access according to user or resource attributes. The principle of Least Privilege was emphasized as a method to minimize access rights to only what is necessary for users to perform their tasks. Additionally, multi-factor authentication was presented as a critical layer to verify user identities before granting database access. The chapter also covered concurrency control techniques that ensure data integrity when multiple users access the database simultaneously. Locking mechanisms such as exclusive and shared locks were explained alongside two-phase locking to prevent conflicts. Timestamp ordering and optimistic concurrency control were introduced as alternative methods to manage concurrent transactions effectively while maintaining consistency.
Type: Individual
| Tools & Equipment | Materials |
|---|---|
| Computer with Microsoft SQL Server Management Studio installed | CustomerOrders database backup file |
| Access to SQL Server with administrative privileges | User accounts list with role specifications |
| S/N | Item | Quantity |
|---|---|---|
| 1 | Computer with Microsoft SQL Server Management Studio installed | 1 Pc per Candidate |
| 2 | CustomerOrders database backup file | 1 Pc per Candidate |
| 3 | User accounts list with role specifications | 1 Pc per Candidate |
| 4 | Access to SQL Server with administrative privileges | 1 Pc per Candidate |
| Items to be Evaluated | Marks Available | Marks Obtained | Comments |
|---|---|---|---|
| TASK 1: Restore and open the CustomerOrders database | |||
| Opened SQL Server Management Studio and connected to the server (Award 1 mark for successful connection) | 1 | ||
| Restored the CustomerOrders database from the provided backup file (Award 2 marks for correct restoration and database availability) | 2 | ||
| Sub-Total | 3 | ||
| TASK 2: Create database roles according to RBAC | |||
| Created 'Admin' role with full database permissions (Award 3 marks for correct role creation and permission assignment) | 3 | ||
| Created 'Sales' role with SELECT, INSERT, UPDATE permissions on Orders table (Award 3 marks for correct role creation and permission assignment) | 3 | ||
| Created 'Audit' role with SELECT permission on all tables (Award 3 marks for correct role creation and permission assignment) | 3 | ||
| Sub-Total | 9 | ||
| TASK 3: Assign users to roles | |||
| Created user accounts as per the provided user list (Award 3 marks for creating all required user accounts) | 3 | ||
| Assigned users to the correct roles based on the user list (Award 4 marks for accurate role assignments to all users) | 4 | ||
| Sub-Total | 7 | ||
| TASK 4: Verify role-based access control implementation | |||
| Tested that Admin role has full access to all database objects (Award 2 marks for successful verification) | 2 | ||
| Tested that Sales role can read and modify orders but cannot alter schema (Award 2 marks for successful verification) | 2 | ||
| Tested that Audit role can only read data and cannot modify (Award 2 marks for successful verification) | 2 | ||
| Sub-Total | 6 | ||
| PRODUCT CHECKLIST | |||
| Roles created with correct permissions matching RBAC principles (Award 5 marks if all roles and permissions match specifications) | 5 | ||
| Users assigned correctly to roles with appropriate access levels (Award 5 marks for accurate user-role assignment) | 5 | ||
| Access control functions as intended during verification tests (Award 5 marks for successful functional verification) | 5 | ||
| Sub-Total | 15 | ||
| GRAND TOTAL | 40 | ||
Type: Individual
| Tools & Equipment | Materials |
|---|---|
| Computer with SQL Server Management Studio installed | Pre-configured Employee database |
| Access to policy management tool | User account credentials with varied attributes |
| S/N | Item | Quantity |
|---|---|---|
| 1 | Computer with SQL Server Management Studio installed | 1 Pc per Candidate |
| 2 | Pre-configured Employee database | 1 Pc per Candidate |
| 3 | User account credentials with varied attributes | 5 sets per Candidate |
| 4 | Access to policy management tool (e.g. Azure SQL Database or equivalent) | 1 Pc per Candidate |
| Items to be Evaluated | Marks Available | Marks Obtained | Comments |
|---|---|---|---|
| TASK 1: Setup and Configure ABAC Policies | |||
| Opened the Employee database using SQL Server Management Studio (Award 1 mark for opening the correct database) | 1 | ||
| Created attribute-based access control policies based on user department attribute (Award 1 mark for each correctly defined policy for departments Finance, HR, IT, Marketing, and Operations) | 5 | ||
| Configured access restrictions based on user clearance level attribute (e.g. Confidential, Secret, Top Secret) (Award 1 mark for each clearance level policy correctly implemented) | 5 | ||
| Tested ABAC policies using provided user accounts with different attributes (Award 1 mark for each successful test showing correct access restriction or grant) | 4 | ||
| Saved and documented the ABAC policy configurations (Award 2 marks for complete and clear documentation of policies) | 2 | ||
| Sub-Total | 17 | ||
| PRODUCT CHECKLIST | |||
| ABAC policies correctly restrict access as per department and clearance level attributes (Award up to 10 marks based on accuracy and effectiveness of implemented policies) | 10 | ||
| Sub-Total | 10 | ||
| GRAND TOTAL | 27 | ||
At the start of this chapter we promised you would be able to:
Tick each one you can genuinely do.
Sample simulation — try how the simulator works. A version built for this chapter's practical is coming.
Prepare Kenyan PilauLocked ▸Free: practical guides, quick cards, workplace scenarios and more.
Now — are you there yet?
You're competent when you can confidently do 50% or more of what this chapter promised.
Sign in to record how you're doing.