Ch05 Security Authorization
Ch05 Security Authorization
Chapter 5
Chapter outline
Introduction to DB Security
Security Levels
Access Controls
GRANT and REVOKE of Privileges
GRANT/REVOKE on Views
Role-Based Authorization
Introduction to DB Security
LOGIN ID UserName
Pubs
John
Authentication - provides Permissions - provides
Access to SQL Server access to a database
SQL Server
Instance Expense
Databases
Access Controls
8
REVOKE Options
9
GRANT and REVOKE of Privileges
Examples
GRANT INSERT, SELECT ON Sailors TO Horatio
Horatio can query Sailors or insert tuples into it.
A owns the
object on CP
which P is A: GRANT P
a privilege TO C
12
Example: Grant Diagram
Not only does B lose
P*, but C loses P*.
A executes
Delete BP* and CP*.
REVOKE P FROM B CASCADE;
13
GRANT/REVOKE on Views
16
Role-Based Authorization
In SQL-92, privileges are actually assigned to
authorization ids, which can denote a single
user or a group of users.
In SQL:1999 (and in many current systems),
privileges are assigned to roles.
Allow you to collect users into a single unit
against which you can apply permissions
Permissions are applied automatically when the
users become members of the role
Roles can then be granted to users and to other
roles.
Reflects how real organizations work.
Illustrates how standards often catch up with “de
facto” standards embodied in popular systems.
Summary