database security
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
1,067
On Slideshare
1,067
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
74
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • Users can be given authorization on views, without being given any authorization on the relations used in the view definition. By defining views on the base tables, we can present needed info to a user while binding other information that the user should not be given access to. Ability of views to hide data serves both to simplify usage of the system and to enhance security by allowing users access only to data they need for their job

Transcript

  • 1. CSCI 5707: Database Security Pusheng Zhang University of Minnesota Email: [email_address] March 2, 2004
  • 2. Motivation
    • Personal Privacy
      • Q? Have you watched “ LOR: The Return of The King ”?
      • Q? Do you like the movie?
      • Customer profile DB, health information DB, credit rating DB
    • Corporate Security
      • Trade Secrets – Coke’s Formula
      • Client Privacy – Swiss Banks, Financial Inst.
    • System Resource Security
      • Password DB, Worm, Virus, and Hackers
    • Cyber Security
      • Eavesdropping (unauthorized reading of messages)
      • Masquerading (pretending to be an authorized user or sending messages supposed from authorized users)
  • 3. Database Security This figure is courtesy of Peter J. Braam, CMU
  • 4.  
  • 5. Database Security
    • Goal:
      • Users only see the data they’re supposed to. (S and A)
      • Guard against modifications by malicious users (I)
    • What security mechanisms do software systems provide?
      • User Account Level Access Control
        • Discretionary: grant/revoke
        • Mandatory: security levels
      • Audit Trails: logs
      • Statistical Database Security: Inference Control
      • Data Object Level Access Control: encryption
  • 6. Database Administrator
    • Database Administrator (DBA)
      • Central authority for managing a database system
      • Responsibilities include:
        • Create user account and password
        • Grant privileges
        • Revoke privileges
        • Assign security levels
  • 7.  
  • 8. GRANT Command
    • GRANT Command
      • In SQL: GRANT privileges ON objects TO users [ WITH GRANT OPTION ]
      • Privileges:
        • SELECT : can read all columns
        • INSERT (col-name):
          • Can insert tuples with non-null or non-default values in this column.
          • INSERT means same right with respect to all columns
        • DELECT : can delete tuples
        • UPDATE (col-name): can update this column
        • REFERENCE (col-name): can define foreign keys (in other tables) that refer to this column.
      • WITH GRANT OPTION can pass privilege on to other users
  • 9. Example of GRANT
    • Joe created tables Sailors, Boats, Reserves
    • Q: Joe runs the following
      • Q1: GRANT SELECT ON Reserves TO Mike
        • Mike can execute SELECT queries on Reserves
      • Q2: GRANT SELECT ON Sailors TO Mike WITH GRANT OPTION
        • Mike can execute SELECT queries on Sailors
        • Mike can pass this privilege to others for Sailors NOT for Reserves
      • Q3: GRANT UPDATE (rating) ON Sailors TO Bill
        • Bill can update the rating column in the Sailors.
  • 10. REVOKE Command
    • REVOKE Command
      • In SQL: REVOKE [ GRANT OPTION FOR ] privileges ON objects FROM user { RESTRICT | CASCADE }
      • Privileges are the same with GRANT
      • GRANT OPTION FOR : revoke just the grant option on a privilege
        • For example: Joe is the creator of the Sailors. Joe runs the following
        • GRANT SELECT ON Sailors TO Art WITH GRANT OPTION
        • REVOKE GRANT OPTION FOR SELECT ON Sailors FROM Art CASCADE
        • Art still holds SELECT privilege on Sailors
        • However, Art no longer can’t pass it on to other users
  • 11. REVOKE Command (cont)
    • CASCADE and RESTRICT
      • CASCADE: recursively revokes existing privileges
      • RESTRICT : revoking is rejected if resulting in other privileges becoming abandoned
        • For example: Joe is the creator of the Sailors
        • GRANT SELECT ON Sailors TO Art WITH GRANT OPTION ( by Joe)
        • GRANT SELECT ON Sailors TO Bob WITH GRANT OPTION (by Art)
        • REVOKE SELECT ON Sailors FROM Art CASCADE (by Joe)
        • Art and Bob lost SELECT privilege on Sailors
        • What happens if we use RESTRICT instead of CASCADE in the example above?
  • 12. Examples
    • Example 1:
        • GRANT SELECT ON Sailors TO Art WITH GRANT OPTION ( by Joe)
        • GRANT SELECT ON Sailors TO Bob WITH GRANT OPTION (by Art)
        • GRANT SELECT ON Sailors TO Bob WITH GRANT OPTION (by Joe)
        • REVOKE SELECT ON Sailors FROM Art CASCADE (by Joe)
        • Art lost the SELECT on Sailors
        • What about Bob?
    • Example 2:
        • GRANT SELECT ON Sailors TO Art WITH GRANT OPTION ( by Joe)
        • GRANT SELECT ON Sailors TO Art WITH GRANT OPTION (by Joe)
        • REVOKE SELECT ON Sailors FROM Art CASCADE (by Joe)
        • Does Art lose the SELECT on Sailors or not?
  • 13. Authorization Graph
    • Authorization Graph
      • Nodes: Users
      • Arcs: Indications of how privileges are passes
    Joe Art Bob (Joe, Art, Select on Sailors, Yes) (Art, Bob, Select on Sailors, Yes)
  • 14.  
  • 15. Example of View
    • For example: Joe runs
      • CREAT VIEW ActiveSailors (name, age, day)
      • AS SELECT S.sname, S.sage, R.day
      • FROM Sailor S, Reserves R
      • WHERE S.sid = R.sid AND S.rating > 6
      • Joe can grant SELECT on the view ActiveSailors to Art
        • GRANT SELECT ON ActiveSailors TO Art WITH GRANT OPTION
        • Art only has the access to the ActiveSailors, not the base tables
        • Art can run:
          • SELECT name FROM ActiveSailors WHERE age < 30
  • 16. Role
    • Roles are named groups of related privileges
      • Can be assigned to users and even to other roles
      • Reduced privilege administration
      • Dynamic privilege management
    • Privileges can be granted to or revoked from roles, just like user
    • SQL:1999 standard supports roles
      • CREATE ROLE Role-name
      • DROP ROLE Role-name
      • GRANT privileges ON objects TO Role-name
  • 17. Example of Role
    • Example
    • CREATE ROLE manager
      • GRANT SELECT, INSERT ON Sailors TO manager
      • GRANT UPDATE (sid) ON Sailors TO manager
      • GRANT SELECT, UPDATE, INSERT ON Reserves TO manager
    • GRANT manager TO Joe
  • 18. Mandatory Access Control
    • Main drawback of discretionary access control (DAC):
      • Vulnerable to malicious attacks, e.g., Trojan horses whereby a devious unauthorized user can trick an authorized user into disclosing sensitive data.
      • DAC doesn’t impose any control on how info is propagated.
      • Supported by most commercial DBMSs.
    • Mandatory access control (MAC):
      • Multilevel security:
        • Top secret, secret, confidential, and unclassified
        • Needed for government, military, and intelligence applications
  • 19.  
  • 20.  
  • 21.  
  • 22.  
  • 23.  
  • 24. Polyinstantiation
    • Solution to the dilemma
      • Add one tuple with security class C:
        • 101 Salsa Red S
        • 101 Pasta Blue C
        • 102 Pinto Brown C
    • Polyinstantiation:
      • The presence of data objects that appear to have different values to users with different clearances.
        • E.g., the boat with bid 101
  • 25. Comparison Between DAC and MAC
    • Discretionary access control (DAC):
      • Flexible
      • Supported by most commercial DBMSs
      • Applicable to a large variety of domains
      • Vulnerable to Trojan Horses
    • Mandatory access control (DAC):
      • Very Rigid
      • Not supported in most Commercial DBMSs
      • Only applicable in military, intelligence, and government
      • Prevent flow from higher to lower security level