Chapter 6 Access Control
Chapter 6 Access Control
ChapTEr 6
aCCEss ConTrol
Access Control Definitions
1/2
NISTIR 7298 defines access control as:
Bob rx r
Alice rx r rw rw
Sam rwx r rw rw
Accounting
program 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
• Discretionary access • Role-based access
control (DAC)
o Controls access based on the control (RBAC)
identity of the requestor and on o Controls access based on the
access rules (authorizations)
stating what requestors are (or roles that users have within the
are not) allowed to do system and on rules stating
• Mandatory access what accesses are allowed to
control (MAC) users in given roles
o Controls access based on
comparing security labels with
• Attribute-based access
security clearances (subject
clearance and object labels)
control (ABAC)
o Security labels indicate how o Controls access based on
sensitive or critical system attributes of the user, the
resources are. resource to be accessed, and
o security clearance indicate current environmental
system entities are eligible to conditions
access certain resources
Subjects, Objects, and
Access Rights
The basic elements of access control are: subject, object, and access right
Access
Subject Object
right
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
• For each object, an ACL lists users and their permitted access rights
• With ACLs, it's easy to change rights to a particular resource.
r
file1 --- Alice
r
w
file2 r Bob
---
rw
file3 r Fred
r
Capabilities (or C-Lists)
• Store access control matrix by row
• E.g.: Capability (C-List) for Alice is in red
• With C-Lists, it is easy to add or delete users.
r
Alice w file1
rw
---
Bob r file2
r
r
Fred --- file3
r
ACL C-List
File 1 A B C User A File 1 File 3
Own R Own Own
R R W R R
W W W
• • •
File 4 B C
Own (c) Capability lists for files of part (a)
R R
W
• ACL: store Lampson's access control matrix by column
Capability: Store access control matrix by row
(b) Access control lists for files of part (a)
• A request to modify
the access matrix is
treated as an access to
the matrix
Such accesses are mediated
by an access matrix
controller, which controls
updates 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
ì a* ü ìa *ü
R1 transfer í ý to S, X 'a*' in A[So, X] store í ý in A[S, X]
î a þ îa þ
ìa *ü ì a* ü Access
R2 grant í ý to S, X 'owner' in A[So, X] store í ý in A[S, X] Control
îa þ î a þ
System
'control' in A[So, S]
Commands
R3 delete a from S, X or delete a from A[S, X]
'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 permit 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 using inodes (index
nodes)
• Control structures that contain the key information needed for a
particular file
• An active inode is associated with exactly one file
• File attributes, permissions and control information are sorted in the
inode
• On the disk, there is an inode table, or inode list, that contains the
inodes of all the files in the file system
• When a file is opened its inode is brought into main memory and
stored in a memory resident inode table
ss
ss
ss
la
a
cl
File Access Control
rc
cl
p
er
ne
u
ro
th
w
O
O
rw- r-- ---
user: :rw-
group::r--
Each UNIX user is assigned a other::---
unique user identification
number (user ID). (a) Traditional UNIX approach (minimal access control list)
A user is also a member of a
primary group, and possibly Figure 4.5 UNIX File Access Control
a number of other groups,
ss
s
as
la
as
each identified by a group
cl
rc
cl
up
er
ne
ID
ro
th
w
O
O
When a file is created, it is
9 protection bits
designated as owned by a
particular user and marked Specify read, write, and execute
with that user’s ID. It also permission for the owner of the file,
belongs to a specific group,
which initially is either its members of the group and all other
creator’s primary group or users
the group of its parent The owner ID, group ID, and protection bits are
directory
part of the file’s inode
Access Control on Unix
• To List all the users of the system
ls /etc/passwd
• To read the content of the file
cat /etc/shadow
• How can we see the Matrix or ACL
ls – l /etc/shadow
• Switch to a different user u
su username
• Create a file (check permission by ls – l filename)
echo “Hello” > file1.txt
• Change permission on the file for others
chmod 660 file1.txt
Mandatory Access
Control (MAC)
• Based on multilevel security
top secret > Secret > confidential > restricted > unclassified
• Subject has security clearance of a given level
• Object has security classification of a given level
• Two required properties for confidentiality
o No read up: This property states that a subject with a certain security level
should not be able to read data at a higher security level (i.e., no subject
should read data "up" to a higher classification level).
• It prevents information from flowing from lower security levels to higher
security levels.
o No write down: This property dictates that a subject with a certain security
level should not be able to write data to a lower security level (i.e., no subject
should write data "down" to a lower classification level).
• It prevents information from being written to less secure areas
• Clearance or classification is determined by
administrator; user can not overwrite security policy
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 are 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
roles U5
access rights.
• A user is assigned to a role that Um
Engineer 1 Engineer 2
Engineering Dept
Main obstacle to
its adoption in Web services
real systems has have been
Can define been concern pioneering
There is
authorizations about the technologies
Strength is its considerable
that express performance through the
flexibility and interest in
conditions on impact of introduction of
expressive applying the
properties of evaluating the eXtensible
power model to cloud
both the resource predicates on Access Control
services
and the subject both resource Markup
and user Language
properties for (XAMCL)
each access
ABAC Model: Attributes
Subject Object Environment
attributes attributes attributes
• A subject is an • An object (or • Describe the
active entity that resource) is a operational,
causes information passive information technical, and even
to flow among system-related situational
objects or changes entity containing or environment or
the system state receiving context in which the
information information access
• Attributes define the occurs
identity and • Objects have • These attributes
characteristics of attributes that can have so far been
the subject be leveraged to largely ignored in
make access most access control
control decisions policies
ABAC
Relies upon the
Distinguishable because
evaluation of attributes
it controls access to
of the subject, attributes
objects by evaluating
of the object, and access
rules against the
control rule defining the
attributes of entities,
allowable operations for
operations, and the
subject-object attribute
environment relevant to
combinations in a given
a request
environment
Allows an unlimited
Systems are capable of
number of attributes to
enforcing DAC, RBAC,
be combined to satisfy
and MAC concepts
any access control rule
Subject Object Environmental
Attributes Attributes Attributes
2b 2c 2d
Permit
1 3
Access
control Deny
mechanism
Subject (user)
2a
Access Control
Policies