Database Systems - Chapter 9: Emerging DB Technologies & Applications - Trương Quỳnh Chi

Introduction to Database Security Issues
• Types of Security
• Threats to databases
• Database Security and DBA
• Access Protection, User Accounts, and Database Audits
 Discretionary Access Control
• Types of Discretionary Privileges
• Specifying Privileges Using Views
• Revoking Privileges
• Propagation of Privileges Using the GRANT OPTION
• An example
• Weakness
 Mandatory Access Control
• Bell-LaPudula Model
• Comparing DAC and MAC
 RBAC (Role-Based Access Control)
 Encryption & PKI (Public Key Infrastructure) 
pdf 78 trang xuanthi 02/01/2023 1860
Bạn đang xem 20 trang mẫu của tài liệu "Database Systems - Chapter 9: Emerging DB Technologies & Applications - Trương Quỳnh Chi", để tải tài liệu gốc về máy hãy click vào nút Download ở trên.

File đính kèm:

  • pdfdatabase_systems_chapter_9_emerging_db_technologies_applicat.pdf

Nội dung text: Database Systems - Chapter 9: Emerging DB Technologies & Applications - Trương Quỳnh Chi

  1. Outline Introduction to Database Security Issues • Types of Security • Threats to databases • Database Security and DBA • Access Protection, User Accounts, and Database Audits Discretionary Access Control • Types of Discretionary Privileges • Specifying Privileges Using Views • Revoking Privileges • Propagation of Privileges Using the GRANT OPTION • An example • Weakness Mandatory Access Control • Bell-LaPudula Model • Comparing DAC and MAC RBAC (Role-Based Access Control) Encryption & PKI (Public Key Infrastructure) 2
  2. Three Basic Concepts Authentication: a mechanism that determines whether a user is who he or she claims to be Authorization: the granting of a right or privilege, which enables a subject to legitimately have access to a system or a system’s objects Access Control: a security mechanism (of a DBMS) for restricting access to a system’s objects (the database) as a whole 4 4
  3. Threats to Computer Systems 6
  4. Introduction to Database Security Issues (3) Threats to databases • Loss of integrity • Loss of availability • Loss of confidentiality To protect databases against these types of threats four kinds of countermeasures can be implemented: • Access control • Inference control • Flow control • Encryption 8
  5. Introduction to Database Security Issues 5) The security mechanism of a DBMS must include provisions for restricting access to the database as a whole • This function is called access control and is handled by creating user accounts and passwords to control login process by the DBMS. 10
  6. Introduction to Database Security Issues (7) Another security is that of flow control, which prevents information from flowing in such a way that it reaches unauthorized users. Channels that are pathways for information to flow implicitly in ways that violate the security policy of an organization are called covert channels. 12
  7. Database Security and the DBA The database administrator (DBA) is the central authority for managing a database system. • The DBA’s responsibilities include • granting privileges to users who need to use the system • classifying users and data in accordance with the policy of the organization The DBA is responsible for the overall security of the database system. 14
  8. Access Protection, User Accounts, and Database Audits Whenever a person or group of person s need to access a database system, the individual or group must first apply for a user account. • The DBA will then create a new account id and password for the user if he/she deems there is a legitimate need to access the database The user must log in to the DBMS by entering account id and password whenever database access is needed. 16
  9. Access Protection, User Accounts, and Database Audits(3) If any tampering with the database is suspected, a database audit is performed • A database audit consists of reviewing the log to examine all accesses and operations applied to the database during a certain time period. A database log that is used mainly for security purposes is sometimes called an audit trail. 18
  10. Discretionary Access Control User can protect what they own. Owner may grant access to other. Owner can define the type of access (read/write/execute/ ) given to others. The typical method of enforcing discretionary access control in a database system is based on the granting and revoking privileges. 20
  11. Types of Discretionary Privileges(2) The privileges at the account level apply to the capabilities provided to the account itself and can include • the CREATE SCHEMA or CREATE TABLE privilege, to create a schema or base relation; • the CREATE VIEW privilege; • the ALTER privilege, to apply schema changes such adding or removing attributes from relations; • the DROP privilege, to delete relations or views; • the MODIFY privilege, to insert, delete, or update tuples; • and the SELECT privilege, to retrieve information from the database by using a SELECT query. 22
  12. Types of Discretionary Privileges(4) To control the granting and revoking of relation privileges, for each relation R in a database: • The owner of a relation is given all privileges on that relation. • The owner account holder can pass privileges on any of the owned relation to other users by granting privileges to their accounts. • The owner account holder can also take back the privileges by revoking privileges from their accounts. 24
  13. Types of Discretionary Privileges(6) In SQL the following types of privileges can be granted on each individual relation R (contd.): • REFERENCES privilege on R: • This gives the account the capability to reference relation R when specifying integrity constraints. • The privilege can also be restricted to specific attributes of R. Notice that to create a view, the account must have SELECT privilege on all relations involved in the view definition. 26
  14. Revoking Privileges In some cases it is desirable to grant a privilege to a user temporarily. For example, • The owner of a relation may want to grant the SELECT privilege to a user for a specific task and then revoke that privilege once the task is completed. • Hence, a mechanism for revoking privileges is needed. In SQL, a REVOKE command is included for the purpose of canceling privileges. 28
  15. Limiting the horizontal propagation 30
  16. An Example Suppose that the DBA creates four accounts • A1, A2, A3, A4 and wants only A1 to be able to create base relations. Then the DBA must issue the following GRANT command in SQL GRANT CREATETAB TO A1; In SQL2 the same effect can be accomplished by having the DBA issue a CREATE SCHEMA command as follows: CREATE SCHEMA EXAMPLE AUTHORIZATION A1; 32
  17. An Example(3) 34
  18. An Example(5) Suppose that A1 decides to revoke the SELECT privilege on the EMPLOYEE relation from A3; A1 can issue: REVOKE SELECT ON EMPLOYEE FROM A3; The DBMS must now automatically revoke the SELECT privilege on EMPLOYEE from A4, too, because A3 granted that privilege to A4 and A3 does not have the privilege any more. 36
  19. An Example(7) Finally, suppose that A1 wants to allow A4 to update only the SALARY attribute of EMPLOYEE; A1 can issue: GRANT UPDATE ON EMPLOYEE (SALARY) TO A4; • The UPDATE or INSERT privilege can specify particular attributes that may be updated or inserted in a relation. • Other privileges (SELECT, DELETE) are not attribute specific. 38
  20. Trojan horse Example 40 40
  21. Trojan horse Example 42 42
  22. Mandatory Access Control Granting access to the data on the basis of users’ clearance level and the sensitivity level of the data Bell-LaPadula’s two principles: no read-up & no write-down secrecy 44
  23. Why star property? 46
  24. Why star property? 48
  25. Multilevel relation  A multilevel relation will appear to contain different data to subjects (users) with different security levels 50
  26. Multilevel relation SELECT * FROM EMPLOYEE A user with security level C 52
  27. Multilevel relation SELECT * FROM EMPLOYEE A user with security level U 54
  28. Properties of Multilevel relation Read and write operations: satisfy the No Read- Up and No Write-Down principles. 56
  29. Properties of Multilevel relation Polyinstantiation: where several tuples can have the same apparent key value but have different attribute values for users at different classification levels. 58
  30. Polyinstantiation example 60
  31. Comparing DAC and MAC (2) By contrast, mandatory policies ensure a high degree of protection in a way, they prevent any illegal flow of information. Mandatory policies have the drawback of being too rigid and they are only applicable in limited environments. In many practical situations, discretionary policies are preferred because they offer a better trade-off between security and applicability. 62
  32. Role-Based Access Control Role-based access control (RBAC) emerged rapidly in the 1990s as a proven technology for managing and enforcing security in large-scale enterprisewide systems. Its basic notion is that permissions are associated with roles, and users are assigned to appropriate roles. Roles can be created using the CREATE ROLE and DESTROY ROLE commands. • The GRANT and REVOKE commands discussed under DAC can then be used to assign and revoke privileges from roles. 64
  33. Encryption The encoding of the data by a special algorithm that renders the data unreadable by any program without the decryption key Symmetric cryptography: sender and receiver use the same key Asymmetric cryptography: encryption & decryption keys 66
  34. Encryption Symmetric (shared-/secret-key) cryptosystem: the same key for (en/de)cryption algorithms Asymmetric (public-key) cryptosystem: public & private keys
  35. Encryption DES: Data Encryption Standard • A message is divided into 64-bit blocks • Key: 56 bits • Brute-force or exhaustive key search attacks (now: some hours): see 7.6.3 Triple DES: run the DES algorithm a multiple number of times using different keys • Encryption: c  εk1 (Dk2 (εk1 (m))) • Decryption: m  Dk1 (εk2 (Dk1 (c))) • The triple DES can also use three different keys
  36. Cryptography-related concepts RSA: named after 3 inventors Rivest, Shamir và Adleman • Two keys: public key and private key • Public key is used for encrytion. • Private key is used for decrytion
  37. Cryptography-related concepts PKI (Public Key Infrastructure) and digital certificates CA (certificate authority) Alice Bob
  38. Summary Introduction to Database Security Issues • Types of Security • Threats to databases • Database Security and DBA • Access Protection, User Accounts, and Database Audits Discretionary Access Control • Types of Discretionary Privileges • Specifying Privileges Using Views • Revoking Privileges • Propagation of Privileges Using the GRANT OPTION • An example • Weakness Mandatory Access Control • Bell-LaPadula Model • Comparing DAC and MAC RBAC (Role-Based Access Control) Encryption & PKI (Public Key Infrastructure) 76
  39. UserAdmin (được gán role DBA) đã tạo bảng EMPLOYEE. UserAdmin thực hiện các câu lệnh sau: create user userB identified by passB; create user userC identified by passC; grant create session to userB, userC; grant select on Employee to userB with grant option; grant create table to userB with admin option; Sau đó, UserB kết nối vào CSDL và thực hiện các câu lệnh sau: grant select on UserAdmin.Employee to userC ; grant create table to userC ; Sau đó, UserAdmin thực hiện thu hồi lại quyền của UserB như sau: revoke select on employee from userB; revoke create table from userB; Xác định các quyền của UserB và UserC sau khi UserAdmin thực hiện việc thu hồi quyền: 78