• No results found

Factotum Sep. 23, 2013

N/A
N/A
Protected

Academic year: 2021

Share "Factotum Sep. 23, 2013"

Copied!
22
0
0

Loading.... (view fulltext now)

Full text

(1)

Factotum

Sep. 23, 2013

Dave Eckhardt

Dave Eckhardt

(2)

15-412, F13

2

Left Out (of P9/9P Lecture)

The whole authentication thing

The whole authentication thing

There is an “auth server” much like a Kerberos KDC

There is an “authentication fle system” for each user

“logged in to the system” (system meaning all the nodes)

All authentication code (client, server) is in the auth

server or in the per-user authentication fle system (called factotum)

(3)

Outline

Kerberos in a hurry

Kerberos in a hurry

Factotum in a hurry

Factotum in a hurry

(4)

15-412, F13

4

Kerberos

Philosophy exam question

Philosophy exam question

(5)

Kerberos

System description

System description

N users, M servers, mutual authentication

Symmetric aka private-key crypto for speed

N+M secret keys instead of N*M

(6)

15-412, F13

6

Kerberos

System description

System description

N users, M servers, mutual authentication

Symmetric aka private-key crypto for speed

N+M secret keys instead of N*M

Good luck getting users to remember M keys!

(7)

Kerberos

Implementation

Implementation

User remembers one secret key (often a “password”)

User obtains a “ticket-granting ticket”

From a “KDC”, key-distribution centerWorks for 24 hours (by default)

User obtains server tickets

From “TGS”, ticket-granting server

Using a valid, non-expired TGT each time

Server tickets generally expire when the TGT expires

User presents server ticket to each server

Side effect: user and server get a symmetric-cipher key

(8)

15-412, F13

8

Kerberos

Implementation - really???

Implementation - really???

What do we mean “user”

I thought the user remembered only one password?

What's with the TGT, server tickets, session keys, etc.?

(9)

Kerberos

We didn't really mean “user”

We didn't really mean “user”

Each user session has a “ticket fle” / “credential cache”

(the old, V4, name is more accurate)

Every program doing Kerberos authentication

Checks tkfle/ccache for an existing server ticketRuns TGT-to-ticket protocol if not

Stores server ticket in tkfle/ccache

Luckily this is all encapsulated in a bunch of shared

(10)

15-412, F13

10

Kerberos

We didn't really mean “user”

We didn't really mean “user”

Each user session has a “ticket fle” / “credential cache”

(the old, V4, name is more accurate)

Every program doing Kerberos authentication

Checks tkfle/ccache for an existing server ticketRuns TGT-to-ticket protocol if not

Stores server ticket in tkfle/ccache

Luckily this is all encapsulated in a bunch of shared

libraries

If you consider shared libraries “lucky”

» Krb4 Krb5: rebuild all clients

As long as nobody dumps core containing your TGT in a

public place

(11)

Kerberos

Appl1 k4 Appl2 k5 KDC / TGS ccache tkfile AFS PTS IMAP server
(12)

15-412, F13

12

Factotum

System description

System description

N users, M servers, mutual authentication

Symmetric aka private-key crypto for speed

N+M secret keys instead of N*M

(13)

Factotum

Implementation

Implementation

User remembers one secret key (often a “password”)

User obtains server tickets

From “auth server”

Using user's secret key, each time

Server tickets contain a response to a challenge, so they

generally authenticate one long-lived connection

User presents server ticket to each server

Side effect: user and server get a symmetric-cipher key

(14)

15-412, F13

14

Factotum vs. Kerberos

Protocol architecture differences

Protocol architecture differences

Kerberos libraries forget your password after obtaining

TGT

You hope

Factotum uses your password to get each server ticket

Expiration isn't part of the Plan 9 scheme

Non-protocol architecture differences

Non-protocol architecture differences

Factotum is a file system

(15)

Factotum vs. Kerberos

Protocol architecture differences

Protocol architecture differences

Kerberos libraries forget your password after obtaining

TGT

You hope

Factotum uses your password to get each server ticket

Expiration isn't part of the Plan 9 scheme

Non-protocol architecture differences

Non-protocol architecture differences

Factotum is a file system

“But of course!”

(16)

15-412, F13

16

Factotum

Appl1 f Appl2 f Auth File server Factotum Keys
(17)

Factotum vs. Kerberos

Non-protocol architecture differences

Non-protocol architecture differences

Factotum is a file system

Your keys never leave that fle system

Held in RAM, marked as non-swappable

Applications don't understand authentication protocols

No library code to talk to auth server

No library code that knows how to talk to tkfle/ccache

No library code that speaks {CRAM-MD5,GSSAPI,SASL,...}

Applications never have access to TGT

All they can ever leak is the ephemeral session key

» Which they need to know in order to swap bits with server

(18)

15-412, F13

18

Applications vs. Factotum

So how does it

So how does it

really

really

work?

work?

Application server: “Hi there”

Server application: “I speak CRAM-MD5. xQz456!”

Application factotum: “I need to authenticate to Joe

using CRAM-MD5 and he said 'xQz456'”

Factotum application: “Tell him 'XL234LSDF'.”

Application server: “XL234LSDF”.

Server application: “3278FLDSKJF”.

Application factotum: “He said '3278FLDSKJF'.”

Factotum application: “Great, you're done!”

(19)

Factotum vs. Kerberos

Observations

Observations

Application factotum protocol is static

Library is small and essentially never changes

Adding a new authentication protocol is easy

Rebuild factotum

» Don't rebuild 50 applications or 20 servers

Restart each client's factotum

» “For free” if you wait for next “login session”

Restart each server's factotum

» One per server machine

» Easy (not implemented) to do this without restarting server processes on that machine

(20)

15-412, F13

20

“Monkey in the Middle”

Man in the middle” attack

Man in the middle” attack

Evil person listening to authentication conversation might

be able to do bad things

For example, replay the conversation and authenticate

Good systems distribute no privilege to “man in the

middle”

Observation

Observation

In Plan 9, applications are “in the middle” too

They overhear authentication conversations

But they don't learn how to do authentication conversations

Versus Kerberos

(21)

Summary

Kerberos reminder

Kerberos reminder

Plan 9 authentication architecture

Plan 9 authentication architecture

Differences vs. Kerberos

“Ticket fle” authentication fle system

“Strong modularity” (much more modular than libssl,

libkrb4, libheimdal)

» Application “API” independent of security protocols

» No need to rebuild applications, servers

» Maybe one set of system calls mapped onto one RPC protocol really is a “universal API”.

(22)

15-412, F13

22

Related Work

TLS

TLS

SASL

SASL

ssh-keyagent

ssh-keyagent

References

Related documents

Project uses incidents in the Global Terrorism Database (GTD) and American Terrorism Study (ATS) datasets from which to identify border crossings. The codebook contains 224

We developed ‘Positive About Borderline’ for mental health nursing staff. It is a 1- day BPD-related training programme comprising two key elements: i) ‘The science of

Likewise, an offset value is used to ensure that the corresponding leg always crosses the pelvis point (origin) in the sagittal dimension that pursues the Hip flexion and

When vehicles are passing on this road, because of its load water is getting emerged from the road which also brings the clay particles on the surface .This causes the formation

We all need to make phone calls, but the environment is different now, and the desk phone is just one of many options at our fingertips.. Our analysis addresses two aspects

This paper will compare the efficiency between rotary table and top drive with respect to the rate of penetration, ability to manage stuck pipe and general safety during the

In general, as long as the number of firms that possess a particular valuable re- source (or a bundle of valuable resources) is less than the number of firms needed to generate

The discourse behaviour of middle arguments is shown to support the claim that middle constructions form part of the Estonian voice system and differ from ordinary intransitive