Ch21_Security-95 - Database Management Systems, 3ed, R....

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Database Management Systems, 3ed, R. Ramakrishnan and J. Gehrke 1 Security and Authorization Chapter 21 Database Management Systems, 3ed, R. Ramakrishnan and J. Gehrke 2 Introduction to DB Security ¡ Secrecy: Users should not be able to see things they are not supposed to. ¢ E.g., A student can’t see other students’ grades. ¡ Integrity: Users should not be able to modify things they are not supposed to. ¢ E.g., Only instructors can assign grades. ¡ Availability: Users should be able to see and modify things they are allowed to. Database Management Systems, 3ed, R. Ramakrishnan and J. Gehrke 3 Access Controls ¡ A security policy specifies who is authorized to do what. ¡ A security mechanism allows us to enforce a chosen security policy. ¡ Two main mechanisms at the DBMS level: ¢ Discretionary access control ¢ Mandatory access control Database Management Systems, 3ed, R. Ramakrishnan and J. Gehrke 4 Discretionary Access Control ¡ Based on the concept of access rights or privileges for objects (tables and views), and mechanisms for giving users privileges (and revoking privileges). ¡ Creator of a table or a view automatically gets all privileges on it. ¢ DMBS keeps track of who subsequently gains and loses privileges, and ensures that only requests from users who have the necessary privileges (at the time the request is issued) are allowed. Database Management Systems, 3ed, R. Ramakrishnan and J. Gehrke 5 GRANT Command ¡ The following privileges can be specified: ¡ SELECT: Can read all columns (including those added later via ALTER TABLE command). ¡ 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. ¡ DELETE: Can delete tuples. ¡ REFERENCES (col-name): Can define foreign keys (in other tables) that refer to this column. ¡ If a user has a privilege with the GRANT OPTION , can pass privilege on to other users (with or without passing on the GRANT OPTION ). ¡ Only owner can execute CREATE, ALTER, and DROP. GRANT privileges ON object TO users [WITH GRANT OPTION] Database Management Systems, 3ed, R. Ramakrishnan and J. Gehrke 6 GRANT and REVOKE of Privileges ¡ GRANT INSERT, SELECT ON Sailors TO Horatio ¢ Horatio can query Sailors or insert tuples into it. ¡ GRANT DELETE ON Sailors TO Yuppy WITH GRANT OPTION ¢ Yuppy can delete tuples, and also authorize others to do so. ¡ GRANT UPDATE ( rating ) ON Sailors TO Dustin ¢ Dustin can update (only) the rating field of Sailors tuples. ¡ GRANT SELECT ON ActiveSailors TO Guppy, Yuppy ¢ This does NOT allow the ‘uppies to query Sailors directly! ¡ REVOKE: When a privilege is revoked from X, it is also revoked from all users who got it solely from X. Database Management Systems, 3ed, R. Ramakrishnan and J. Gehrke 7 GRANT/REVOKE on Views ¡ If the creator of a view loses the SELECT privilege on an underlying table, the view is dropped!...
View Full Document

Page1 / 8

Ch21_Security-95 - Database Management Systems, 3ed, R....

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online