IT420: Database Management and Organization - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

IT420: Database Management and Organization

Description:

Log in MySQL from command line as root ... Limit DBA account privileges. Planning ... Example: users are asked to enter their names into a Web form textbox ... – PowerPoint PPT presentation

Number of Views:19
Avg rating:3.0/5.0
Slides: 15
Provided by: david317
Category:

less

Transcript and Presenter's Notes

Title: IT420: Database Management and Organization


1
IT420 Database Management and Organization
  • Database Security
  • 5 April 2006
  • Adina Crainiceanu
  • www.cs.usna.edu/adina

2
Database Security
Rights Enforced
  • Database security - only authorized users can
    perform authorized activities
  • Developing database security
  • Determine users rights and responsibilities
  • Enforce security requirements using security
    features from both DBMS and application programs

Responsibilities Not Enforced
3
DBMS Security
  • DBMS products provide security facilities
  • They limit certain actions on certain objects to
    certain users or groups (also called roles)
  • Almost all DBMS products use some form of user
    name and password security
  • Examples?

4
GRANT and REVOKE
  • GRANT create users and grant them privileges
  • REVOKE remove privileges
  • Privileges
  • ALL
  • SELECT
  • INSERT, DELETE, UPDATE
  • CREATE, ALTER, DROP
  • USAGE //no privileges

5
GRANT Syntax
  • GRANT privilege_type
  • ON object
  • TO user
  • IDENTIFIED BY 'password'
  • WITH GRANT OPTION
  • Example
  • GRANT ALL ON dbmusic. TO adina

6
REVOKE Syntax
  • REVOKE priv_type
  • ON object
  • FROM user , user
  • Example
  • REVOKE INSERT ON dbmusic. FROM adina

7
Class exercise
  • Create database vp5fund and tables
  • Log in MySQL from command line as root
  • Grant select privileges on table Items to user
    mxxx with password mxxx
  • Logout
  • Log in MySQL as mxxx with password mxxx
  • SELECT FROM Items
  • INSERT into Items VALUES(aa,5) What happens?

8
DBMS Security Model With Roles
9
DBMS Security Guidelines
  • Run DBMS behind a firewall, but plan as though
    the firewall has been breached
  • Apply the latest operating system and DBMS
    service packs and fixes
  • Use the least functionality possible
  • Protect the computer that runs the DBMS

10
DBMS Security Guidelines
  • Manage accounts and passwords
  • Use a low privilege user account for the DBMS
    service
  • Protect database accounts with strong passwords
  • Monitor failed login attempts
  • Frequently check group and role memberships
  • Audit accounts with null passwords
  • Assign accounts the lowest privileges possible
  • Limit DBA account privileges
  • Planning
  • Develop a security plan for preventing and
    detecting security problems
  • Create procedures for security emergencies and
    practice them

11
Application Security
  • If DBMS security features are inadequate,
    additional security code could be written in
    application program
  • Example In Project 2?
  • Use the DBMS security features first
  • Less chance for infiltration
  • Faster
  • Cheaper
  • Higher quality results than developing your own

12
SQL Injection Attack
  • SQL injection attack occurs when data from the
    user is used to modify a SQL statement
  • User input that can modify a SQL statement must
    be carefully edited to ensure that only valid
    input has been received and that no additional
    SQL syntax has been entered
  • Example users are asked to enter their names
    into a Web form textbox
  • User input Benjamin Franklin ' OR TRUE '
  • SELECT FROM EMPLOYEE
  • WHERE EMPLOYEE.Name 'Benjamin Franklin' OR
    TRUE
  • Result every row of the EMPLOYEE table will be
    returned

13
Class exercise
  • Write PHP code to check user input, so SQL
    injection attack not possible

14
12 Week Exam
  • SQL
  • SQL Views
  • SQL Triggers
  • SQL Stored Procedures
  • PHP/MySQL
  • Database Administrator tasks
  • Manage database structure
  • Concurrency control
Write a Comment
User Comments (0)
About PowerShow.com