Scaling Backend Authentication at Facebook Kevin Lewi , Callen Rain , - - PowerPoint PPT Presentation

scaling backend authentication at facebook
SMART_READER_LITE
LIVE PREVIEW

Scaling Backend Authentication at Facebook Kevin Lewi , Callen Rain , - - PowerPoint PPT Presentation

Scaling Backend Authentication at Facebook Kevin Lewi , Callen Rain , Stephen Weis, Yueting Lee, Haozhi Xiong, Benjamin Yang Facebook Infrastructure Security Network Perimeter Trusted Services Building from a Root of Trust ] "


slide-1
SLIDE 1

Scaling Backend Authentication at Facebook

Kevin Lewi, Callen Rain, Stephen Weis, Yueting Lee, Haozhi Xiong, Benjamin Yang
 
 Facebook

slide-2
SLIDE 2
slide-3
SLIDE 3

Infrastructure Security

Network Perimeter Trusted Services

slide-4
SLIDE 4

Building from a Root of Trust

More trust Fewer machines Less trust More machines

]

"Walled Garden"

slide-5
SLIDE 5

How can we scale authentication while minimizing our root of trust?

slide-6
SLIDE 6

Trusted Components

Root CA

(Signs Certificates)

Login Server

(Signs Sessions)

Authorization Server

(Signs ACLs)

Key Server

(Holds Master Keys)

slide-7
SLIDE 7

Authentication and Authorization

Resource:
 "Who can access table X in database Y?"

  • Identity1

  • Identity2


... Identities User: "Callen Rain" Machine: server123.fb.com Service: Image Uploading Access Control Lists (ACLs)

slide-8
SLIDE 8

Service Authentication with TLS

Server Root CA Client

Request Cert Deploy Cert TLS

ACL

Check Permission

Identity Distribution

ACL

Check Permission

Authorization

Auth Server

slide-9
SLIDE 9

Client Server

ACL:
 “Client is ok”

ALLOW

Service Authentication with TLS

Check Permission I am "Client"

slide-10
SLIDE 10

Server

ACL:
 “Client is ok”

ALLOW

Service Authentication with TLS

Check Permission

Client 1 Client 2 Client 3

?

slide-11
SLIDE 11

Intermediate Proxies

REJECT

Client Server Proxy

I am "Client" I am "Proxy" ACL:
 “Client is ok” Check Permission

slide-12
SLIDE 12

Intermediate Proxies

Client Server

I am "Client" I am "Proxy" ACL:
 "Client is ok"
 "Proxy is ok" Check Permission Check Permission

ALLOW ALLOW

ACL:
 "Client is ok"
 "Proxy is ok"

Proxy

slide-13
SLIDE 13

Intermediate Proxies

Server 2 Proxy Proxy Proxy Server 1 Server 3

?

Check Permission

Client 1 Client 2 Client 3

ACL:
 "Client 1 is ok" ACL:
 "Client 2 is ok" ACL:
 "Client 3 is ok"

Check Permission

slide-14
SLIDE 14

Tokens

Client Server Proxy

$

TLS TLS

ACL:
 “Client is ok” Check Permission

ALLOW

slide-15
SLIDE 15

Tokens

  • 1. Certificate-Based Tokens
  • 2. Crypto Auth Tokens (CATs)
slide-16
SLIDE 16

Certificate-Based Tokens

Client Server Proxy

$

verify( ) build( )

Cert Key CA Cert

slide-17
SLIDE 17

Certificate-Based Token Creation

  • client certificate
  • proxies
  • resource
  • actions
  • metadata
  • signature

signature(private key, metadata)

Cert

serialize

1d229271928d3f9e2bb0375bdf572d 396fae9206628714fb2ce00f72e94f2 258f6ce5857596baa7e917bc7fff34f b8730b48d248969ecc2d86151b63c 214b0eba55fb8730b48d248969ecc2 d86151b63c214b0eba55bda19e0b1 5fde576ce41679aa47656b256a11df 5e110124750ba169fdbfb8730b48d2 48969ecc2d86151b63c214b0eba55 db6c6d348d9

Key

slide-18
SLIDE 18

Certificate-Based Token Verification

Certificate Proxy Resource Certificate-Based Token Token Data Signature Actions

slide-19
SLIDE 19

Caching Certificate-Based Tokens

Client Server Proxy

$ $ $

LRU Creation Cache LRU Validation Cache hash(metadata) metadata hash( )

slide-20
SLIDE 20

Tradeoffs with Cert-Based Tokens

Pros

Reliable Simple Generic

Cons

Large Public-Key x509

slide-21
SLIDE 21

A Symmetric-Key Variant

$

Client Server Proxy

(analogous to Kerberos)

All direct communications are encrypted / authenticated with TLS

session key "service name" service key MAC

Key Server

slide-22
SLIDE 22

"Crypto Auth Tokens" (CATs)

Server Proxy

$

= MAC(session key, request) || client + "info"

All direct communications are encrypted / authenticated with TLS Client

session key = PRF(service key, "client" + info) session key "service name"

Login Server

service key = PRF(master key, "service" + info)

Key Server

service key

slide-23
SLIDE 23

Summary

  • 1. We build from a small root of trust

  • 2. TLS by itself isn't enough

  • 3. Tokens
  • Public-Key
  • Symmetric-Key
slide-24
SLIDE 24

Acknowledgments