Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
22 views24 pages

Module5 Protection

The document discusses protection concepts in computer systems. The goals of protection are to increase reliability, prevent unauthorized access, and distinguish authorized from unauthorized usage. Protection enforces policies governing resource use through mechanisms like access controls and privileges. Key principles include least privilege and domain of protection with objects having unique names and controlled access. Protection is implemented through access matrices, access lists, capability lists, and lock-key schemes. Revocation of access rights and capability-based systems are also covered.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views24 pages

Module5 Protection

The document discusses protection concepts in computer systems. The goals of protection are to increase reliability, prevent unauthorized access, and distinguish authorized from unauthorized usage. Protection enforces policies governing resource use through mechanisms like access controls and privileges. Key principles include least privilege and domain of protection with objects having unique names and controlled access. Protection is implemented through access matrices, access lists, capability lists, and lock-key schemes. Revocation of access rights and capability-based systems are also covered.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Module 5

Protection
Goals of Protection
• Modern protection concepts have evolved to
• Increase the reliability of any complex system that makes use of shared
resources.
• Prevent mischievous, intentional violation of an access restriction by users.
• Distinguish unauthorized usage.
• The role of protection in a computer system is to provide a mechanism for the
enforcement of the policies governing resource use.
• These policies can be established in a variety of ways.
• Fixed in the design of the system,
• Formulated by the management of a system.
• Defined by the individual users to protect their own files and programs.
• A protection system must have the flexibility to enforce a variety of policies.
• Every protection policy(what to be done) is associated with the
mechanism(how it will be done).
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
• Operating system also provides system calls and services that allow
applications to be written with fine-grained access controls.
• It provides mechanisms to enable privileges when they are needed and to
disable them when they are not needed
• Beneficial in the creation of audit trails for all privileged function access.
Domain of Protection
• Domain can be user, process, procedure -> known as collection of objects.
• Objects comprises both hardware and software objects.
• Each object has a unique name that differentiates it from all other objects.
• Each can be accessed only through well-defined and meaningful operations.
• The second requirement, commonly referred to as the need-to-know
principle.
• A process should be allowed to access only those resources for which it has
authorization.
• A process should be able to access only those resources that it currently
requires to complete its task
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

The association between a process and domain Can be static (during life of system,
during life of process) Or dynamic (changed by process as needed) – domain
switching, privilege escalation
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)
Domain Implementation (MULTICS)
• The protection domains are organized hierarchically into a ring structure
• Let Di and Dj be any two domain rings
• If j < i  Di  Dj Domain switching in MULTICS occurs
when a process crosses from one ring to
another by calling a procedure in a
different ring.
Controlled domain switching should be
defined.
• Access bracket. A pair of integers, b1
and b2, such that b1 < b2.
• Limit. An integer b3 such that b3 >
bl.
• List of gates. Identifies the entry
points (or gates) at which the
segments may be called.
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
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
Access Matrix of Figure A with Domains as Objects
Access Matrix with Copy Rights
Access Matrix With Owner Rights
Modified Access Matrix of Figure B
Implementation of Access Matrix

• Generally, a sparse matrix


• Option 1 – Global table
• Store ordered triples <domain, object, rights-set> in
table
• A requested operation M on object Oj within domain Di -> search
table for < Di, Oj, Rk >
• with M ∈ Rk
• But table could be large -> won’t fit in main memory
• Difficult to group objects (consider an object that all domains can
read)
Implementation of Access Matrix (Cont.)

• Option 2 – Access lists for objects


• Each column implemented as an access list for one object
• Resulting per-object list consists of ordered pairs <domain,
rights-set> defining all domains with non-empty set of access
rights for the object
• Easily extended to contain default set -> If M ∈ default set, also
allow access
Implementation of Access Matrix (Cont.)

• Each column = Access-control list for one object


Defines who can perform what operation

Domain 1 = Read, Write


Domain 2 = Read
Domain 3 = Read

• Each Row = Capability List (like a key)


For each domain, what operations allowed on what objects
Object F1 – Read
Object F4 – Read, Write, Execute
Object F5 – Read, Write, Delete, Copy
Implementation of Access Matrix (Cont.)

• Option 3 – Capability list for domains


• Instead of object-based, list is domain based
• Capability list for domain is list of objects together with operations
allows on them
• Object represented by its name or address, called a capability
• Execute operation M on object Oj, process requests operation and
specifies capability as parameter
• Possession of capability means access is allowed
• Capability list associated with domain but never directly accessible by
domain
• Rather, protected object, maintained by OS and accessed indirectly
• Like a “secure pointer”
Implementation of Access Matrix (Cont.)

• Option 4 – Lock-key
• Compromise between access lists and capability lists
• Each object has list of unique bit patterns, called locks
• Each domain as list of unique bit patterns called keys
• Process in a domain can only access object if domain has key that matches one
of the locks
Comparison of Implementations

• Many trade-offs to consider


• Global table is simple, but can be large
• Access lists correspond to needs of users
• Determining set of access rights for each domain is difficult
• Every access to an object must be checked
• Many objects and access rights -> slow
• Capability lists useful for localizing information for a given process
• But revocation capabilities can be inefficient
• Lock-key effective and flexible, keys can be passed freely from domain to
domain, easy revocation
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
Revocation of Access Rights

• Various options to remove the access right of a domain to an object


• Immediate vs. delayed
• Selective vs. general
• Partial vs. total
• Temporary vs. permanent
• Access List – Delete access rights from access list
• Simple – search access list and remove entry
• Immediate, general or selective, total or partial, permanent or temporary
Revocation of Access Rights (Cont.)

• Capability List – Scheme required to locate capability in the system before


capability can be revoked
• Reacquisition – periodic delete.
• Back-pointers – set of pointers from each object to all capabilities of that
object (Multics)
• Indirection – capability points to global table entry which points to object –
delete entry from global table, not selective (CAL)
• Keys – unique bits associated with capability, generated when capability
created
• Master key associated with object, key matches master key for access
• Revocation – create new master key
• Policy decision of who can create and modify keys – object owner or
others?
Capability-Based Systems

• Hydra
• Fixed set of access rights known to and interpreted by the system
• i.e. read, write, or execute each memory segment
• User can declare other auxiliary rights and register those with protection
system
• Accessing process must hold capability and know name of operation
• Rights amplification allowed by trustworthy procedures for a specific
type
• Operations on objects defined procedurally – procedures are objects
accessed indirectly by capabilities
• Solves the problem of mutually suspicious subsystems
Capability-Based Systems (Cont.)

• Cambridge CAP System


• Simpler but powerful
• Data capability - provides standard read, write, execute of individual
storage segments associated with object – implemented in microcode
• Software capability -interpretation left to the subsystem, through its
protected procedures
• Only has access to its own subsystem
• Programmers must learn principles and techniques of protection

You might also like