wave: a decentralized authorization ... - stanford...

30
WAVE: A Decentralized Authorization Framework with Transitive Delegation Michael P Andersen, Sam Kumar , Hyung-Sin Kim, John Kolb, Kaifei Chen, Moustafa AbdelBaky, Gabe Fierro, David E. Culler, Raluca Ada Popa This material is based on work supported by the National Science Foundation Graduate Research Fellowship Program under Grant No. DGE-1752814. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation.

Upload: others

Post on 10-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

WAVE: A Decentralized Authorization Framework with Transitive Delegation Michael P Andersen, Sam Kumar , Hyung-Sin Kim, John Kolb, Kai fe i Chen, Moustafa AbdelBaky, Gabe Fierro, David E. Cul ler, Raluca Ada Popa

ThismaterialisbasedonworksupportedbytheNationalScienceFoundationGraduateResearchFellowshipProgramunderGrantNo.DGE-1752814.Anyopinions,findings,andconclusionsorrecommendationsexpressedinthismaterialarethoseoftheauthorsanddonotnecessarilyreflecttheviewsoftheNationalScienceFoundation.

Page 2: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

Roadmap 1.  TheProblem

2.  WAVE’sApproach

3.  WAVE’sStorageLayer

4.  WAVE’sPrivacylayer

5.  ImplementationandEvaluation

Page 3: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

Authorization for IoT

“Settemperatureto80F”

Page 4: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

Authorization for IoT

“Settemperatureto80F”

Authorization

1. Howdoesthetenantreceivepermissiontoadjustthetemperature?

2. Howdoesthethermostatknowthattherequestwassentbysomeonewhohaspermission?

Page 5: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

Authorization for IoT: Status Quo

Ownergivesusername:passwordtoairbnb

Owner Tenant

Airbnbperformsactionwhentenantrequests

•  Sharesidentity,notjustpermission•  Notrevocable•  Ad-hoc

Page 6: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

The Problems  Existingauthenticationsystemsarecentralized(oftenmonolithic)

 Transitivedelegationisrare,leadingtoover-sharing Attacksoncentralizedsystemsarecommon,andaffectalltheusers

Page 7: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

Roadmap 1.  TheProblem

2.  WAVE’sApproach

3.  WAVE’sStorageLayer

4.  WAVE’sPrivacylayer

5.  ImplementationandEvaluation

Page 8: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

WAVE’s Approach

 Maketheflowoftrustfine-grained.

Page 9: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

WAVE Captures Trust Relations

Owner Tenant

Attestation 1!

Policy:“AirbnbcansetOwner’sthermostatsetpoint,andcandelegate”(SignedbyOwner)!

Attestation 2!

Policy:“TenantcansetOwner’sthermostatsetpoint,foronlythedurationoftheirstay”(SignedbyAirbnb)

Attestation 2!Attestation 1!

PROOF●  Allows delegation of a subset of permissions

●  Prevents needing to share identity

●  Cryptographically enforced

Page 10: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

Global Permissions Graph

1.Entityreceivespermissionviaachainofattestations

2.Entitypresentsapaththroughthegraphasproofitisauthorized

Authorization

1. Howdoesonereceivepermission?

2. Howdoesthedeviceknowthattherequestwassentbysomeonewhohaspermission?

Page 11: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

Two Technical Challenges in WAVE 1. Howareattestationsstored,disseminated,anddiscovered,without

relyingonasingletrustedparty?

◦  Storagelayer

2. Howtoprotecttheprivacyofattestations?◦  Privacylayer

Page 12: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

Roadmap 1.  TheProblem

2.  WAVE’sApproach

3.  WAVE’sStorageLayer

4.  WAVE’sPrivacylayer

5.  ImplementationandEvaluation

Page 13: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

Storage Layer Goals  Storageproviderisuntrusted,soitmustbeverifiablethatitisnot:

◦  Hidingobjects(suchasrevocationentries)

◦  Forgingexistenceofnon-existentobjects

 Blockchainisanaturalsolutionbutunfortunatelydoesn’tscale

Page 14: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

WAVE’s Storage Layer (First Try)  UselogofoperationsbackedbyMerkleTree[CertificateTransparency,Laurieetal.2013]

 Howtomakesuretheservercan’thideobjects?◦ Servermustbeabletoprovethatanobjectdoesn’texist◦ NotsupportedbyMerkleTreeLog!

MerkleTreeLogofoperations

Containsalltheauthorizationobjects

Canprove:-Append-only-Valueexistsinlog

Page 15: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

WAVE’s Storage Layer (Second Try)  UseanotherMerkletreetoconstructmapofobjects[VerifiableLog-DerivedMap,Eijdenbergetal.2015]

 However,servercouldserverequestsusinganolderversionofthemap◦ Howtofixthis?

MerkleTreeLogofoperations

Containsalltheauthorizationobjects

Canprove:-Append-only-Valueexistsinlog

MerkleTreeMapofobjects

Containsobjectsindexedbytheirhash

Canprove:-Valuedoesnotexist-Valueexists

Page 16: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

WAVE’s Storage Layer (Final)  Useanotherlogtostoreprogressionofmaproothashes

 Auditorsmakesurethateachrequestisservedusingthelatestmapversion

MerkleTreeLogofoperations

Containsalltheauthorizationobjects

Canprove:-Append-only-Valueexistsinlog

MerkleTreeMapofobjects

Containsobjectsindexedbytheirhash

Canprove:-Valuedoesnotexist-Valueexists

MerkleTreeLogofmaproots

Containsalltheroothashesofthemap

Canprove:-Append-only-Valueexistsinlog

Page 17: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

Roadmap 1.  TheProblem

2.  WAVE’sApproach

3.  WAVE’sStorageLayer

4.  WAVE’sPrivacylayer

5.  ImplementationandEvaluation

Page 18: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

Private Attestations  Withthisstoragemodel,globalpermissionsgraphispubliclyaccessible◦ Leaks,e.g.,whoisrentingwhichhouseonAirbnb

 Storageisuntrusted;can’trelyonitforaccesscontrol Insteadwerelyoncryptography◦ Attestationsareencrypted◦ Theycanonlybedecryptedbyanentitywhocanusetheminaproof

Page 19: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

Encrypt Attestations

Provingentity

Page 20: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

Encrypt Attestations

Provingentity

Hiddenattestations

Decryptableattestations

Page 21: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

Encrypt Attestations

Provingentity

Hiddenattestations

Decryptableattestations

Page 22: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

Our Technique: Reverse-Discoverable Encryption (simplified)  Attestationsareencryptedusingrecipient’spublickey Attestationsincludesecretkeyofgranter◦ Allowsdecryptionofupstreamattestations

Ownersignsstatementsaying“Airbnbhaspermissiontosetmythermostatsetpoint,andcandelegate”

Attestation 1!Signed policy!

Airbnbsignsstatementsaying“TenanthaspermissiontoadjustOwner’sthermostatsetpoint”

Attestation 2!Signed policy!

Tenant

We actually use policy-aware

encryption to restrict access further.!

Page 23: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

Our Technique: Reverse-Discoverable Encryption (simplified)  Eachentityhasakeypairforencryptingattestations Attestationsareencryptedusingrecipient’spublickey Attestationsincludesecretkeyofgranter◦ Allowsdecryptionofupstreamattestations Tenant

We actually use policy-aware

encryption to restrict access further.!

Attestation 1!

Policy:“AirbnbcansetOwner’sthermostatsetpoint,andcandelegate”(SignedbyOwner)!

Attestation 2!

Policy:“TenantcansetOwner’sthermostatsetpoint,duringtheirstay”(SignedbyAirbnb)

Page 24: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

Reverse-Discoverable Encryption

Provingentity

Page 25: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

Roadmap 1.  TheProblem

2.  WAVE’sApproach

3.  WAVE’sStorageLayer

4.  WAVE’sPrivacylayer

5.  ImplementationandEvaluation

Page 26: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

First Release of WAVE Version 3 Feature WAVE2 WAVE3Delegation Yes YesDecentralized Yes YesScalable No(blockchain) YesEncryptedAttestations No YesFullyGeneral No(IoTpubsub) YesFullImplementation Yes Yes

WAVEVersion2:github.com/immesys/bw2

WAVEVersion3:github.com/immesys/wave

Page 27: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

Operation Times [ms]

Grantingpermissions

Creatingaccounts

Discoveringnewattestations

Verifyingproofs

Page 28: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

Use Case Comparison (Critical Path) 1. Authenticate◦  LDAPBind

2. CheckAuthPolicy◦  SQLLookup

Total:7.5ms

Appserver

LDAP

SQLDB

6.3ms

1.2ms

User:pass

Page 29: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

Use Case Comparison (Critical Path)

1. Validateproof(yieldspolicy)Total:<7msforcommonpatterns

Appserver

WAVEagent

Proof

ProofTimes:Length1:2.8msLength3:6.2ms

Page 30: WAVE: A Decentralized Authorization ... - Stanford Universityiot.stanford.edu/nsf-final/slides/sitp-nsf-final-wave.pdf · WAVE: A Decentralized Authorization Framework with Transitive

Conclusion  WAVEisanauthentication/verificationenginethatmakestrustrelationshipsfine-grained

 Itcanrunatglobalscalewithoutacentraltrustedparty

 ItisaREALartifactwehaveoperatedfor2years,securingover800IoTdevicesinCalifornia!