Chapter 14: Protection: Silberschatz, Galvin and Gagne ©2013 Operating System Concepts - 9 Edition
Chapter 14: Protection: Silberschatz, Galvin and Gagne ©2013 Operating System Concepts - 9 Edition
Chapter 14: Protection: Silberschatz, Galvin and Gagne ©2013 Operating System Concepts - 9 Edition
Operating System Concepts – 9th Edition Silberschatz, Galvin and Gagne ©2013
Chapter 14: Protection
Goals of Protection
Principles of Protection
Domain of Protection
Access Matrix
Implementation of Access Matrix
Access Control
Revocation of Access Rights
Capability-Based Systems
Language-Based Protection
Operating System Concepts – 9th Edition 14.2 Silberschatz, Galvin and Gagne ©2013
Objectives
Operating System Concepts – 9th Edition 14.3 Silberschatz, Galvin and Gagne ©2013
Goals of Protection
Operating System Concepts – 9th Edition 14.4 Silberschatz, Galvin and Gagne ©2013
Principles of Protection
Guiding principle – principle of least privilege
Programs, users and systems should be given just
enough privileges to perform their tasks
Limits damage if entity has a bug, gets abused
Can be static (during life of system, during life of
process)
Or dynamic (changed by process as needed) – domain
switching, privilege escalation
“Need to know” a similar concept regarding access to
data
Operating System Concepts – 9th Edition 14.5 Silberschatz, Galvin and Gagne ©2013
Principles of Protection (Cont.)
Must consider “grain” aspect
Rough-grained privilege management easier, simpler,
but least privilege now done in large chunks
For example, traditional Unix processes either have
abilities of the associated user, or of root
Fine-grained management more complex, more
overhead, but more protective
File ACL lists, RBAC
Domain can be user, process, procedure
Operating System Concepts – 9th Edition 14.6 Silberschatz, Galvin and Gagne ©2013
Domain Structure
Operating System Concepts – 9th Edition 14.7 Silberschatz, Galvin and Gagne ©2013
Domain Implementation (UNIX)
Domain = user-id
Domain switch accomplished via file system
Each file has associated with it a domain bit (setuid bit)
When file is executed and setuid = on, then user-id is
set to owner of the file being executed
When execution completes user-id is reset
Domain switch accomplished via passwords
su command temporarily switches to another user’s
domain when other domain’s password provided
Domain switching via commands
sudo command prefix executes specified command in
another domain (if original domain has privilege or
password given)
Operating System Concepts – 9th Edition 14.8 Silberschatz, Galvin and Gagne ©2013
Domain Implementation (MULTICS)
Let Di and Dj be any two domain rings
If j < I Di Dj
Operating System Concepts – 9th Edition 14.9 Silberschatz, Galvin and Gagne ©2013
Multics Benefits and Limits
Operating System Concepts – 9th Edition 14.10 Silberschatz, Galvin and Gagne ©2013
Access Matrix
View protection as a matrix (access matrix)
Rows represent domains
Columns represent objects
Access(i, j) is the set of operations that a process
executing in Domaini can invoke on Objectj
Operating System Concepts – 9th Edition 14.11 Silberschatz, Galvin and Gagne ©2013
Use of Access Matrix
If a process in Domain Di tries to do “op” on object Oj, then
“op” must be in the access matrix
User who creates object can define access column for that
object
Can be expanded to dynamic protection
Operations to add, delete access rights
Special access rights:
owner of Oi
copy op from Oi to Oj (denoted by “*”)
control – Di can modify Dj access rights
transfer – switch from domain Di to Dj
Copy and Owner applicable to an object
Control applicable to domain object
Operating System Concepts – 9th Edition 14.12 Silberschatz, Galvin and Gagne ©2013
Use of Access Matrix (Cont.)
Operating System Concepts – 9th Edition 14.13 Silberschatz, Galvin and Gagne ©2013
Access Matrix of Figure A with Domains as Objects
Operating System Concepts – 9th Edition 14.14 Silberschatz, Galvin and Gagne ©2013
Access Matrix with Copy Rights
Operating System Concepts – 9th Edition 14.15 Silberschatz, Galvin and Gagne ©2013
Access Matrix With Owner Rights
Operating System Concepts – 9th Edition 14.16 Silberschatz, Galvin and Gagne ©2013
Modified Access Matrix of Figure B
Operating System Concepts – 9th Edition 14.17 Silberschatz, Galvin and Gagne ©2013
Implementation of Access Matrix
Operating System Concepts – 9th Edition 14.18 Silberschatz, Galvin and Gagne ©2013
Implementation of Access Matrix (Cont.)
Operating System Concepts – 9th Edition 14.19 Silberschatz, Galvin and Gagne ©2013
Implementation of Access Matrix (Cont.)
Operating System Concepts – 9th Edition 14.20 Silberschatz, Galvin and Gagne ©2013
Protection in Java 2
Operating System Concepts – 9th Edition 14.21 Silberschatz, Galvin and Gagne ©2013
Access Control
Protection can be applied to non-file
resources
Oracle Solaris 10 provides role-
based access control (RBAC) to
implement least privilege
Privilege is right to execute
system call or use an option
within a system call
Can be assigned to processes
Users assigned roles granting
access to privileges and
programs
Enable role via password to
gain its privileges
Similar to access matrix
Operating System Concepts – 9th Edition 14.22 Silberschatz, Galvin and Gagne ©2013
End of Chapter 14
Operating System Concepts – 9th Edition Silberschatz, Galvin and Gagne ©2013