Lec4 Access Control
Lec4 Access Control
A security model where subjects (owners) determine who can access their objects.
Access is based on the identity of users.
Commonly used for managing access to data objects like files, directories, etc.
DAC Structures
1. Access Matrix
Definition: Associates each object with a list that indicates the access rights for each
subject.
Implementation: Each column of the access matrix is stored with the object
corresponding to that column.
3. Capability List
Definition: Associates each subject with a list of its access rights (capabilities) for various
objects.
Implementation: Each row of the access matrix is stored with the subject corresponding
to that row.
4. Authorization Table
1. Account Level:
Privileges are assigned to user accounts, independent of database relations.
Syntax:
Examples:
GRANT ALL TO User1;
GRANT CREATE TABLE TO User2, User4;
The privilege list:
CREATE TABLE
CREATE SCHEMA
CREATE VIEW
ALTER
DROP
WITH GRANT OPTION: Allows users to propagate their privileges to others.
2. Relation/Table Level:
Privileges are assigned for specific database objects (tables, views, etc.).
Syntax:
Examples:
GRANT SELECT ON employee TO user1;
GRANT UPDATE ON employee(address) TO user2;
The privilege list
SELECT
DELETE
INSERT
UPDATE
REFERENCES
REVOKE Statement
Options:
CASCADE: (Recursive revoke) Removes privileges dependent on the revoked ones.
RESTRICT: Prevents the operation if dependent privileges exist.
Example:
Row-Level Privileges
Key Rules
Top Secret (TS) > Secret (S) > Confidential (C) > Unclassified (U)
Subject clearance and object classification are determined by security administrator.
Users cannot overwrite the security policy
The relationship between users and roles, and roles and resources, is many-to-many
(M:N).
Dynamic Elements:
The set of users and their assignment of a user to one or more roles change
frequently.
Static Elements:
- The set of roles is relatively stable, with rare additions or deletions.
- The set of resources and access rights associated with roles change infrequently.
Role Management:
CREATE ROLE and DROP ROLE to add or remove roles.
Assign Privileges:
Use GRANT and REVOKE to manage:
Privileges for roles.
Users assigned to roles.
Hierarchical role relationships.
Example
RBAC Constraints
Purpose: Adapting RBAC to the specifics of administrative and security policies of an
organization.
Types:
1. Mutually Exclusive Roles:
A user can only be assigned to one role in the set.
- Example: A student cannot be both “Undergraduate” and “Postgraduate.”
2. Cardinality Constraints:
Setting a max number with respect to roles.
- Example: Only one user can be assigned the “Dean” role.
3. Prerequisite Roles:
A user can only be assigned to a particular role if it is already assigned to some other
specified role
- Example: A user must have the “Professor” role before being assigned “Department
Head.”
Advantages
Challenges
Example
Policy Rule:
R1: can_access(S, O, E) ←
(Age(S) ≥ 17 ∧ Rating(O) ∈ {R, PG-13, G}) ∨
(Age(S) ≥ 13 ∧ Age(S) < 17 ∧ Rating(O) ∈ {PG-13, G}) ∨
(Age(S) < 13 ∧ Rating(O) = G)
Membership Example
Policy Rule:
R2: can_access(S, O, E) ←
(MembershipType(S) = Premium) ∨
(MembershipType(S) = Regular ∧ MovieType(O) = OldRelease)
Conclusion
Rule 1 ensures access based on age appropriateness for movie ratings.
Rule 2 provides additional access criteria based on membership level and movie
classification.