os8

140

Upload: gopal10scs185

Post on 24-Jan-2015

202 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Os8
Page 2: Os8

Chapter 14: Protection

Page 3: Os8

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

Page 4: Os8

Objectives

• Discuss the goals and principles of protection in a modern computer system

• Explain how protection domains combined with an access matrix are used to specify the resources a process may access

• Examine capability and language-based protection systems

Page 5: Os8

Goals of Protection• Operating system consists of a collection of

objects, hardware or software

• Each object has a unique name and can be accessed through a well-defined set of operations

• Protection problem - ensure that each object is accessed correctly and only by those processes that are allowed to do so

Page 6: Os8

Principles of Protection

• Guiding principle – principle of least privilege– Programs, users and systems should be given

just enough privileges to perform their tasks

Page 7: Os8

Domain Structure

• Access-right = <object-name, rights-set>where rights-set is a subset of all valid operations that can be performed on the object.

• Domain = set of access-rights

Page 8: Os8

Domain Implementation (UNIX)• System consists of 2 domains:

– User– Supervisor

• 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

Page 9: Os8

Domain Implementation (MULTICS)

• Let Di and Dj be any two domain rings• If j < I Di Dj

Page 10: Os8

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

Page 11: Os8

Access Matrix

Page 12: Os8

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

• Can be expanded to dynamic protection– Operations to add, delete access rights– Special access rights:

• owner of Oi

• copy op from Oi to Oj

• control – Di can modify Dj access rights• transfer – switch from domain Di to Dj

Page 13: Os8

Use of Access Matrix (Cont)• Access matrix design separates mechanism

from policy– Mechanism

• Operating system provides access-matrix + rules• If ensures that the matrix is only manipulated by

authorized agents and that rules are strictly enforced

– Policy• User dictates policy• Who can access what object and in what mode

Page 14: Os8

Implementation of Access Matrix• Each column = Access-control list for one object

Defines who can perform what operation.

Domain 1 = Read, WriteDomain 2 = ReadDomain 3 = Read

• Each Row = Capability List (like a key)

Fore each domain, what operations allowed on what objects.Object 1 – ReadObject 4 – Read, Write, ExecuteObject 5 – Read, Write, Delete, Copy

Page 15: Os8

Access Matrix of Figure A With Domains as Objects

Figure B

Page 16: Os8

Access Matrix with Copy Rights

Page 17: Os8

Access Matrix With Owner Rights

Page 18: Os8

Modified Access Matrix of Figure B

Page 19: Os8

Access Control• Protection can be applied to non-file resources• 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

Page 20: Os8

Role-based Access Control in Solaris 10

Page 21: Os8

Revocation of Access Rights• Access List – Delete access rights from access list

– Simple – Immediate

• Capability List – Scheme required to locate capability in the system before capability can be revoked– Reacquisition– Back-pointers– Indirection– Keys

Page 22: Os8

Capability-Based Systems • Hydra

– Fixed set of access rights known to and interpreted by the system

– Interpretation of user-defined rights performed solely by user's program; system provides access protection for use of these rights

• Cambridge CAP System – Data capability - provides standard read, write, execute of

individual storage segments associated with object– Software capability -interpretation left to the subsystem,

through its protected procedures

Page 23: Os8

Language-Based Protection• Specification of protection in a programming language

allows the high-level description of policies for the allocation and use of resources

• Language implementation can provide software for protection enforcement when automatic hardware-supported checking is unavailable

• Interpret protection specifications to generate calls on whatever protection system is provided by the hardware and the operating system

Page 24: Os8

Protection in Java 2• Protection is handled by the Java Virtual Machine (JVM)

• A class is assigned a protection domain when it is loaded by the JVM

• The protection domain indicates what operations the class can (and cannot) perform

• If a library method is invoked that performs a privileged operation, the stack is inspected to ensure the operation can be performed by the library

Page 25: Os8

Stack Inspection

Page 26: Os8

End of Chapter 14

Page 27: Os8
Page 28: Os8
Page 29: Os8
Page 30: Os8
Page 31: Os8
Page 32: Os8
Page 33: Os8
Page 34: Os8
Page 35: Os8
Page 36: Os8
Page 37: Os8
Page 38: Os8
Page 39: Os8
Page 40: Os8
Page 41: Os8
Page 42: Os8
Page 43: Os8
Page 44: Os8
Page 45: Os8
Page 46: Os8
Page 47: Os8
Page 48: Os8
Page 49: Os8
Page 50: Os8
Page 51: Os8
Page 52: Os8
Page 53: Os8
Page 54: Os8
Page 55: Os8
Page 56: Os8
Page 57: Os8
Page 58: Os8
Page 59: Os8
Page 60: Os8
Page 61: Os8
Page 62: Os8
Page 63: Os8
Page 64: Os8
Page 65: Os8
Page 66: Os8
Page 67: Os8
Page 68: Os8
Page 69: Os8
Page 70: Os8
Page 71: Os8
Page 72: Os8
Page 73: Os8
Page 74: Os8
Page 75: Os8
Page 76: Os8
Page 77: Os8
Page 78: Os8
Page 79: Os8
Page 80: Os8
Page 81: Os8
Page 82: Os8
Page 83: Os8
Page 84: Os8
Page 85: Os8
Page 86: Os8
Page 87: Os8
Page 88: Os8
Page 89: Os8
Page 90: Os8
Page 91: Os8
Page 92: Os8
Page 93: Os8
Page 94: Os8
Page 95: Os8
Page 96: Os8
Page 97: Os8
Page 98: Os8
Page 99: Os8
Page 100: Os8
Page 101: Os8
Page 102: Os8
Page 103: Os8
Page 104: Os8
Page 105: Os8
Page 106: Os8
Page 107: Os8
Page 108: Os8
Page 109: Os8
Page 110: Os8
Page 111: Os8
Page 112: Os8
Page 113: Os8
Page 114: Os8
Page 115: Os8
Page 116: Os8
Page 117: Os8
Page 118: Os8
Page 119: Os8
Page 120: Os8
Page 121: Os8
Page 122: Os8
Page 123: Os8
Page 124: Os8
Page 125: Os8
Page 126: Os8
Page 127: Os8
Page 128: Os8
Page 129: Os8
Page 130: Os8
Page 131: Os8
Page 132: Os8
Page 133: Os8
Page 134: Os8
Page 135: Os8
Page 136: Os8
Page 137: Os8
Page 138: Os8
Page 139: Os8
Page 140: Os8