Database Systems - Lec 12: Database Security: An Introduction - Nguyen Thanh Tung

§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)

ppt 53 trang xuanthi 02/01/2023 1340
Bạn đang xem 20 trang mẫu của tài liệu "Database Systems - Lec 12: Database Security: An Introduction - Nguyen Thanh Tung", để 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:

  • pptdatabase_systems_lec12_database_security_an_introduction_ngu.ppt

Nội dung text: Database Systems - Lec 12: Database Security: An Introduction - Nguyen Thanh Tung

  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 ▪ 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, each relation R in a database is assigned and owner account, which is typically the account that was used when the relation was created in the first place. • The owner of a relation is given all privileges on that relation. • In SQL2, the DBA can assign and owner to a whole schema by creating the schema and associating the appropriate authorization identifier with that schema, using the CREATE SCHEMA command. • The owner account holder can pass privileges on any of the owned relation to other users by granting privileges to 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. 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 SCHAMA EXAMPLE AUTHORIZATION A1; 30
  16. An Example(3) 32
  17. 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. 34
  18. 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. 36
  19. 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) 38
  20. Bell-LaPudula Model • Typical security classes are top secret (TS), secret (S), confidential (C), and unclassified (U), where TS is the highest level and U is the lowest one: TS ≥ S ≥ C ≥ U • Two restrictions are enforced on data access based on the subject/object classifications: • A subject S is not allowed read access to an object O unless class(S) ≥ class(O). This is known as the simple security property • A subject S is not allowed to write an object O unless class(S) ≤ class(O). This known as the star property (or * property) 40
  21. Mandatory Access Control(3) ▪ The value of the TC attribute in each tuple t – which is the highest of all attribute classification values within t – provides a general classification for the tuple itself, whereas each Ci provides a finer security classification for each attribute value within the tuple. • The apparent key of a multilevel relation is the set of attributes that would have formed the primary key in a regular(single-level) relation. 42
  22. Comparing DAC and MAC ▪ Discretionary Access Control (DAC) policies are characterized by a high degree of flexibility, which makes them suitable for a large variety of application domains. • The main drawback of DAC models is their vulnerability to malicious attacks, such as Trojan horses embedded in application programs. 44
  23. 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) 46
  24. 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) 48
  25. Encryption ▪ Encryption key: public key ▪ Decryption key: private key ▪ Asymmetric techniques: more secure but expensive in terms of computational costs Use public key of receiver to encrypt the message Sender encryption key Receiver Encrypted message using a symmetric key 50
  26. 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-LaPudula Model • Comparing DAC and MAC ▪ RBAC (Role-Based Access Control) ▪ Encryption & PKI (Public Key Infrastructure) 52