authentication and authorization

34
Budapesti Műszaki és Gazdaságtudományi Egyetem Méréstechnika és Információs Rendszerek Authentication and authorization Tóth Dániel, Micskei Zoltán Operating systems (vimia219)

Upload: race

Post on 11-Feb-2016

86 views

Category:

Documents


3 download

DESCRIPTION

Operating systems (vimia219). Authentication and authorization. Tóth Dániel, Micskei Zoltán. Security of computer systems. Is it important ? Is it importan t for everyone ? When is it important ?. When is security important?. In every phase of software development - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Authentication and authorization

Budapesti Műszaki és Gazdaságtudományi EgyetemMéréstechnika és Információs Rendszerek Tanszék

Authentication and authorization

Tóth Dániel, Micskei Zoltán

Operating systems (vimia219)

Page 2: Authentication and authorization

2

Security of computer systems Is it important?

Is it important for everyone?

When is it important?

Page 3: Authentication and authorization

When is security important?

design

implementation

operation

In every phase of software development

If the system was not designed for security, it is really hard to make it secure.

Security is determined by the weakest link.

Page 4: Authentication and authorization

Integrity

AvailabilityConfidentiality

What is security? „C.I.A.”: three related concepts

Goal: o guarantee that the systems

behaves always as expected

One technology is usually not enough

Page 5: Authentication and authorization

Methods for security Cryptography

o For the integrity and confidentiality of communication

Platform-level intrusion detectiono Integrity if the applications

Network-level intrusion detection

Redundancy, reconfigurationo For availability

Authentication, authorization

Integrity

AvailabilityConfidentiality

Page 6: Authentication and authorization

Who is “authorized”?

Authentication• Who am I?• Am I really that?

Authorization• What do I have access

to?• What can I do with it?

Page 7: Authentication and authorization

7

Content Short security introduction User management, authentication

o UNIX, Linux oWindows

Authorizationo General methods

• Role-based access control• Access control lists

o Authorization on UNIX/Linuxo Authorization on Windows

On the last lecture of the semester

Page 8: Authentication and authorization

8

Authentication How can be the identity of the user decided?

o…knows (e.g. password)o…has (e.g. keycard, security token)o…is (e.g. biometric, fingerprint)

A (non-compromised) machine can decide the identity of the user using these methodso But what if the machine is compromised?oWhat to do with machine-machine communication?

Page 9: Authentication and authorization

9

Authentication

Authentication on 3 levels:o Human–machine interactionoMachine–machine interaction over networko Between processes inside an OS

Authentication protocols are neededoMachine–machine only the “knows” principleo But complex cryptographic primitives can be used

Page 10: Authentication and authorization

10

What is a user account?

User

+ ID+ Name+ Real Name+ Personal data…+ Shared Secret (Password, etc.)+ Private Datastore path

For the system, the user is an object…

Page 11: Authentication and authorization

11

What is a user account? Unique identifier for an account

o Linux, UNIX: UID (integer, root 0, users 1000-…) Further attributes of an account

o Stored in /etc/passwd, /etc/shadow, /etc/groupso Examples

• Login name• Password• Home directory• Default shell• Real name…

Page 12: Authentication and authorization

DEMO

Stored in the following files:o /etc/passwdo /etc/shadowo /etc/group

Create, delete, modifyo useradd, usermod, userdelo groupadd, groupmod, groupdelo passwd

User account on Linux

Page 13: Authentication and authorization

13

User account on Linux

User Group

+ GID+ name(+ password)

Initial group

+ UID+ name+ password+ shell+ home directory+ comment+ expiry date

members

1

* *

*

Page 14: Authentication and authorization

DEMO

Identifying the identity of a processo ps aux, pstree, /proc/$PID/status

Changing effective user és group runtimeo setuid, setgido su, sudo

Process identity

Page 15: Authentication and authorization

15

Authentication on Linux Between machines (e.g. ssh)

o User name / passwordo Private / public keyo Egyediség?

Page 16: Authentication and authorization

16

Content Short security introduction User management, authentication

o UNIX, Linux oWindows

Authorizationo General methods

• Role-based access control• Access control lists

o Authorization on UNIX/Linuxo Authorization on Windows

Page 17: Authentication and authorization

17

Authorization in general

Actor, Subject Data structureof actor

Data

Resources

???

Security policy

Actor is represented by a

data structure

Permissions are a relationship between actors and protected

objects

Protected objects

Page 18: Authentication and authorization

18

Executing operations

Data1

Read(Data1)

Data2

policyenforcement

point

approvedpolicy

decision point

Resource 3

Page 19: Authentication and authorization

19

General concepts Actors initiate operations The context of the operation includes the

identifier of the actor, the protected object and the type of operation

The policy decision component evaluates:o approves or denies the operation

The policy enforcement component assures that the result is enforced

Page 20: Authentication and authorization

20

Challenges in authorization There are many actors in the system

oMoreover: different systems identify the users differently

There are many protected objects

The whole relationship: o (Actors) X (Objects) X (Types of operation)o This is called access matrixo It is unmanageable, the whole matrix is huge!

Page 21: Authentication and authorization

21

Authorization categories

Compulsoriness

Mandatory

Discretionary

Level

System level

Resource level

Types

Integrity control

Access control lists

Categorizing authorization methods

Page 22: Authentication and authorization

22

Category: Compulsoriness

Classical concepts (US DoD standard)

Mandatoryo security policy is managed centrallyo users cannot change the policy

Discretionaryo the owner of the resource can change the permissions

Page 23: Authentication and authorization

23

Category: type

Integrity controlo Labeling objects

• Integrity level: high – low, public – secreto Typical validation:

• lower level actor cannot read a higher level objecto Bell-LaPadula (confidentiality) and Biba (integrity)

„No write up” „No read down”

„No read up”„No write down

Page 24: Authentication and authorization

24

Category: type

Integrity controlo Labeling objects

• Integrity level: high – low, public – secreto Typical validation:

• lower level actor cannot read a higher level objecto Bell-LaPadula (confidentiality) and Biba (integrity)

Access control listso object → (actor, permissions)

• Permission: read, write, execute…

Page 25: Authentication and authorization

25

Access control lists

+ mask*

Actor Protected objectPermissionAccess mask: contains the operations the

permission is defined for

+ OP1()+ OP2()

Page 26: Authentication and authorization

26

Access control lists

+ mask*

Actor Protected objectPermission

+ OP1()+ OP2()

A permission can be defined for a set of objects

Sometimes the ordering is also

defined

*

Page 27: Authentication and authorization

27

Role-based Access Control (RBAC)

Actor Protected objectRole

+ mask

Permission

*

*

***

Role makes defining actors hierarchically

possible

The number of permissions can be

greatly reduced

Page 28: Authentication and authorization

28

Hierarchy between objects

Actor Protected objectRole

+ mask+inherit

Permission

*

*

***

*1

If there is a hierarchy between

objects…

…a permission can be defined for a subtree of

objects using inheritance

Page 29: Authentication and authorization

29

Groups

User

Group

+ Name(+ Purpose…)(+ Shared Secret)

memberOf

Group membership is a method for

implementing RBAC

Page 30: Authentication and authorization

30

Content Short security introduction User management, authentication

o UNIX, Linux oWindows

Authorizationo General methods

• Role-based access control• Access control lists

o Authorization on UNIX/Linuxo Authorization on Windows

Page 31: Authentication and authorization

31

Basic conceptso Acotr: usero Hierarchy of actors: groupo A user can be member of several groupo A group can contain several usero Group cannot contain an other group

Permissionso 3x3 bit: read, write, execute (entering a directory)

• First 3: for the owner of the object• Second 3: for the group of the object• Third 3: everyone else

o Special bits:• setuid, setgid: when running changes the uid, gid to the owner • sticky: sets the owner of new objects

POSIX file system permissions

Page 32: Authentication and authorization

32

POSIX fájlrendszer jogosultságok

Page 33: Authentication and authorization

DEMO

Changing owner: chowno can be executed only by the root

Changing permissions: chmodo Only allowed to the owner of the objecto Several styles for permissions:

• 4 octal numbers• Changing e.g.: u+x (add execute for user),

g-w (remove write for group) Listing:

o ls –l o ls –l –n

Linux permissions

Page 34: Authentication and authorization

34

Other privileges Root has special privileges:

o Can set real-time class schedulingo Can access I/O devices directly (!)o Can listen on TCP ports below 1024o Can change kernel parameters, load kernel module,

etc.o…

But this also should be modifiableo Principle of least privilegesoMethod: POSIX Capabilities (method for assigning

global system-level privileges)