04 AccessControl
04 AccessControl
Access Control
Access Control Definition
• RFC 4949 defines computer security as:
– Access Control implements a security policy that specifies who (or what in
the case of a process) may have access to each specific system resource and
the type of access that is permitted in each instance.
Access Control Principles
• Authentication: Verification that the credentials of a user or other
system entity are valid.
Security administrator
Access
Authentication
control
function
function
User
System resources
Auditing
Figure 4.1 Relationship Among Access Control and Other Security Functions
Access Control
• The central element of computer security.
Bob rx rx r
Alice rx rx r rw rw
Sam rwx rwx r rw rw
Accounting
program rx rx rw rw rw
The model assumes a set of subjects, a set of objects, and a set of rules that
govern the access of subjects to objects.
Access Control Policies
1) Discretionary Access 3) Role-Based Access
Control (DAC) Control (RBAC)
o Controls access based on the o Controls access based on the
identity of the requestor and on roles that users have within the
access rules (authorizations) stating system and on rules stating what
what requestors are (or are not) accesses are allowed to users in
allowed to do (the owner of the given roles
access permission can pass it to
others).
Note: these four policies are not mutually exclusive. An access control mechanism can
employ two or even all of these policies to cover different classes of system resources.
Subjects, Objects, and Access Rights
The basic elements of access control are: subject, object, and access right.
Access
Subject Object
right
An entity
capable of Describes the way
A resource to in which a subject
accessing
which access may access an
objects. Held
is controlled object
accountable for
all actions
OBJECTS
File 1 File 2 File 3 File 4
Own Own
User A Read Read
Write Write
Own
SUBJECTS User B Read Read Write Read
Write
Read Own
User C Read Read
Write Write
(a) Access matrix
E.g.
• User A owns files 1 and 3 and has read and write access rights to those files.
• User B has read access rights to file 1, etc.
Access Control Lists (ACLs)
ACL: store Lampson's access control matrix by column
E.g.: ACL for insurance data is in blue
Bob rx rx r
Alice rx rx r rw rw
Sam rwx rwx r rw rw
Accounting
program rx rx rw rw rw
Capabilities (or C‐Lists)
Store access control matrix by row
E.g.: Capability (C‐List) for Alice is in red
Bob rx rx r
Alice rx rx r rw rw
Sam rwx rwx r rw rw
Accounting
program rx rx rw rw rw
ACLs vs. Capabilities
r r
Alice ‐‐‐ file1 Alice w file1
r rw
w ‐‐‐
Bob r file2 Bob r file2
‐‐‐ r
rw r
Fred r file3 Fred ‐‐‐ file3
r r
File 4 B C
Own (c) Capability lists for files of part (a)
R R
W
•
In practice, an access matrix is usually sparse and is
(b) Access control lists for files of part (a) implemented by decomposition in one of two ways.
Each entry A[S, X] contains strings, called access attributes, that specify the access
rights of subject S to object X.
Extend the universe of objects in the access control matrix to the following:
• Processes: Access rights: ability to delete, stop (block), and wake up a process.
• Devices: Access rights: ability to read/write, to control and to block/unblock its use.
• Memory locations or regions: Access rights: ability to read/write certain regions
• Subjects: Access rights with respect to a subject have to do with the ability to grant or
delete access rights of that subject to other objects,
• subjects can alter the protection state in certain ways
• Every access by a
subject to an object is
mediated by the
controller for that
object,
• A request to modify
the access matrix is
treated as an access to
the matrix
Modifying the Access Control
• Rules are needed to govern the modifications to the access matrix.
• Thus, we introduce to the access rights:
1. ‘owner’ and
2. ‘control’
3. and the concept of a copy flag.
• These rules deal with 1) transferring, 2) granting, and 3) deleting
access rights.
• Eg. Suppose that the entry α* exists in A[S0, X]. This means that S0
has access right α to object X.
• Because of the copy flag, S0 can transfer this right, with or without
copy flag, to another subject.
o Rule R1 in the following slide expresses this capability
Rule Command (by So) Authorization Operation
* *
R1 transfer to S, X '*' in A[So, X] store in A[S, X]
Table 4.3
* *
R2 grant to S, X 'owner' in A[So, X] store in A[S, X] Access
Control
'control' in A[So, S]
System
R3 delete from S, X or delete from A[S, X] Commands
'owner' in A[So, X]
'control' in A[So, S]
R4 w read S, X or copy A[S, X] into w
'owner' in A[So, X]
add column for X to A;
R5 create object X None
store 'owner' in A[So, X]
• Rule R2 states that subject S0 can add any access right to A[S, X] for any
subject S, if S0 has ‘owner’ access to X.
• Rule R3 permits S0 to delete any access right from any matrix entry in a row
for which S0 has the control right of the subject S or for any matrix entry in a
column for which S0 is the owner of the object X.
• Rule R4 states that S0 can permits the subject S to read that portion of the matrix
that it owns or controls.
• Rule R5 states that any subject can create a new object, which it owns, and can
then grant and delete access to the object.
• Rule R6; the owner of an object can destroy the object, resulting in the deletion of
the corresponding column of the access matrix.
• Rule R7 enables any subject to create a new subject; the creator owns
the new subject and the new subject has control access to itself.
• Rule R8 permits the owner of a subject to delete the row and column (if
there are subject columns) of the access matrix designated by that
subject.
UNIX File Access Control
UNIX files are administered by the OS using inodes (index nodes)
ss
ss
as
la
la
cl
rc
File Access Control
rc
p
ne
e
ro
th
w
O
O
rw- r-- ---
Unique user identification
number (user ID) user: :rw-
group::r--
Member of a primary group
other::---
identified by a group ID
Belongs to a specific group (a) Traditional UNIX approach (minimal access control list)
12 protection bits
9 of the protection bits specify
read, write, and execute
permission for the owner of the
file, members of the group and
all other users
The owner ID, group ID, and
protection bits are part of the file’s
inode
Traditional UNIX
File Access Control
“Set user ID”(SetUID)
Any program that is owned by, and SetUID to, the “superuser” potentially granted
unrestricted access to the system to any user executing that program
Sticky bit
When applied to a directory it specifies that only the owner of the file in the
directory can rename, move, or delete that file
Superuser (root)
Is exempt from usual access control restrictions
Has system-wide access
When a process requests access to a file:
• Step 1 selects the ACL entry that most closely matches the requesting process. ACL entries
are looked at the order: owner, named users, groups, & others. Only a single entry
determines access.
• Step 2 checks if the matching entry contains sufficient permissions. A process can be a
member of more than one group; so more than one group entry can match. If any of these
matching group entries contain the requested permissions, one that contains the requested
permissions is picked (the result is the same no matter which entry is picked). If none of the
matching group entries contains the requested permissions, access will be denied no matter
which entry is picked.
Role‐Based Access Control (RBAC)
• Traditional DAC systems define the access rights of individual users and
groups of users. In contrast, RBAC is based on:
o Roles that users assume in a system (instead of their Identity)
o Role is a job function within an organization. A role will have specific access rights
to one or more resources.
o Assign Access Rights to Roles (instead of individual users.)
o Users assigned to different Roles according to their Responsibilities.
o Users-to-Roles are Many-to-Many.
• The set of Users changes frequently (dynamic), and the assignment of a user to
one or more roles may also be dynamic.
• The set of Roles is relatively static, with only occasional additions or deletions.
• The set of Resources and the specific access rights associated with a particular
role are also likely to change infrequently (relatively static).
Users Roles Resources
Role 3
U5
what is required.
• Multiple users may be assigned to OBJECTS
R1 R2 Rn F1 F1 P1 P2 D1 D2
the same Role. owner read
R1 control owner read * wakeup wakeup seek owner
control owner
• One user may have multiple roles, and (UA) User (PA) Permission
Assignment Assignment
multiple users may be assigned to a Users Roles
Permissions
single role (many-to-many).
user_sessions session_roles
• Flexibility and granularity:
the many-to-many relationships between Objects
users and roles and between roles and
permissions (not found in conventional Sessions
DAC schemes).
without the role hierarchy and
constraints, contains the four
• Without this flexibility and (b) RBAC models types of entities in an RBAC0
granularity, there is a risk that a system:
user may be granted more access
to resources than is needed Figure 4.8 A Family of Role-Based Access Control Models.
Table 4.3 Scope RBAC Models
to determine authorization
Summary
• Access control principles • Attribute-based
o Access control context access control
o Access control policies o Attributes
o ABAC logical architecture
• Subjects, objects, and o ABAC policies
access rights • Identity, credential,
• Discretionary access and access
control management
o Identity management
o Access control model
o Credential management
o Protection domains o Access management
• UNIX file access control o Identity federation