OAuth2 Ready or not? Dominick Baier h.p://leastprivilege.com @leastprivilege



Similar documents
Securing ASP.NET Web APIs Dominick Baier

Retrofi8ng OAuth 2.0 Security into Exis?ng REST Service [CON1765]

Federation architectures for mobile applications OAuth 2.0 Drivers OAuth 2.0 Overview Mobile walkthrough

OAuth 2.0: Theory and Practice. Daniel Correia Pedro Félix

OAuth: Where are we going?

OpenID Deutsche telekom. Dr. Torsten Lodderstedt, Deutsche Telekom AG

Proposed Documents for JOSE: JSON Web Signature (JWS) JSON Web Encryp6on (JWE) JSON Web Key (JWK)

Identity Management with Spring Security. Dave Syer, VMware, SpringOne 2011

OAuth2 and UMA for ACE draft-maler-ace-oauth-uma-00.txt. Eve Maler, Erik Wahlström, Samuel Erdtman, Hannes Tschofenig

Enterprise Access Control Patterns For REST and Web APIs

The Essential OAuth Primer: Understanding OAuth for Securing Cloud APIs

A Standards-based Mobile Application IdM Architecture

Globus Auth. Steve Tuecke. The University of Chicago

Axway API Gateway. Version 7.4.1

OAuth 2.0 Developers Guide. Ping Identity, Inc th Street, Suite 100, Denver, CO

CSA SDP Working Group

Automatic Recognition, Processing and Attacking of Single Sign-On Protocols with Burp Suite

OpenID Connect 1.0 for Enterprise

Onegini Token server / Web API Platform

Final Project Report December 9, Cloud-based Authentication with Native Client Server Applications. Nils Dussart

OpenID Single Sign On and OAuth Data Access for Google Apps. Ryan Dave Primmer May 2010

Federated Identity Opportunities & Risks

SIP Authoriza.on Framework Use Cases. Rifaat Shekh- Yusef, Jon Peterson IETF 91, SIPCore WG Honolulu, Hawaii, USA November 13, 2014

Secure Services withapache CXF

Lecture Notes for Advanced Web Security 2015

IBM WebSphere Application Server

SAML and OAUTH comparison

Authen'cator Leakage Through Backup Channels on Android

Securing JAX-RS RESTful services. Miroslav Fuksa (software developer) Michal Gajdoš (software developer)

Comparative analysis - Web-based Identity Management Systems

Web Application Security

The Role of Identity Enabled Web Services in Cloud Computing

Mobile Applica,on and BYOD (Bring Your Own Device) Security Implica,ons to Your Business. Dmitry Dessiatnikov

Okta/Dropbox Active Directory Integration Guide

Oracle Fusion Middleware Oracle API Gateway OAuth User Guide 11g Release 2 ( )

OAuth 2.0. Weina Ma

WHITE PAPER Usher Mobile Identity Platform

My Stuff Everywhere Your Content On Any Screen

Copyright: WhosOnLocation Limited

Cloud Security. Let s Open the Box. Abu Shohel Ahmed ahmed.shohel@ericsson.com NomadicLab, Ericsson Research

RESTful or RESTless Current State of Today's Top Web APIs

Using ArcGIS with OAuth 2.0. Aaron CTO, Esri R&D Center Portland

Mobile Security. Policies, Standards, Frameworks, Guidelines

MIT Tech Talk, May 2013 Justin Richer, The MITRE Corporation

Secure Single Sign-On

OAuth Hacks A Gentle Introduction to OAuth 2.0 and Apache Oltu

Programming Autodesk PLM 360 Using REST. Doug Redmond Software Engineer, Autodesk

Login with Amazon. Developer Guide for Websites

EHR OAuth 2.0 Security

PRIVACY AWARE ACCESS CONTROL FOR CLOUD-BASED DATA PLATFORMS

Single Sign On for UNICORE command line clients

An Oracle White Paper Dec Oracle Access Management OAuth Service

Mashery OAuth 2.0 Implementation Guide

Design and Implementation Issues ECHO: An Active Health Data Management System

How To Perform a SaaS Applica7on Inventory in. 5Simple Steps. A Guide for Informa7on Security Professionals. Share this ebook

OAuth Web Authorization Protocol Barry Leiba

What is the Cloud? Computer Basics Web Apps and the Cloud. Page 1

Cloud Elements! Marketing Hub Provisioning and Usage Guide!

Multi-Factor Authentication

Protecting Data with Short- Lived Encryption Keys and Hardware Root of Trust. Dan Griffin DefCon 2013

OAuth 2.0 Workshop. On how native (mobile) devices can use OAuth protected resources

JVA-122. Secure Java Web Development

NOK NOK LABS AUTHENTICATION & OTT SERVICES

VoIP Security How to prevent eavesdropping on VoIP conversa8ons. Dmitry Dessiatnikov

Dell One Identity Cloud Access Manager How to Develop OpenID Connect Apps

The Password Problem Will Only Get Worse

CICS Web Service Security. Anthony Papageorgiou IBM CICS Development March 13, 2012 Session: 10282

#07 Web Security CLIENT/SERVER COMPUTING AND WEB TECHNOLOGIES

Cloud Computing TODAY S TOPICS WHAT IS CLOUD COMPUTING? ICAC Webinar Cloud Computing September 4, What Cloud Computing is and How it Works

Addressing threats to real-world identity management systems

Proxied Authentication in SSO Setups with Common OSS. Open Identity Summit 2015 Prof. Dr. René Peinl Berlin,

The Pitfalls of Encrypted Networks in Banking Operations Compliance Success in two industry cases

IHE ITI Technical Framework Supplement. Internet User Authorization (IUA) Trial Implementation

Contents. 2 Alfresco API Version 1.0

OpenID Connect for SURFconext

The Seven Habits of State-of-the-Art Mobile App Security

Manual for Android 1.5

Application Migration Best Practices. Gregory Shepard Senior Consultant InCycle Software

From the Intranet to Mobile. By Divya Mehra and Stian Thorgersen

Single-Sign-On between On-Premises and the Cloud: Leveraging Windows Azure Active Directory to authenticate custom solutions and Apps

HTTPS Inspection with Cisco CWS

SafeNet KMIP and Google Cloud Storage Integration Guide

I) Add support for OAuth in CAS server

TH3 Office 365 REST APIs. Peter Carson

Web 2.0 Lecture 9: OAuth and OpenID

Transcription:

OAuth2 Ready or not? Dominick Baier h.p://leastprivilege.com

Dominick Baier Security consultant at thinktecture Focus on security in distributed applica9ons iden9ty management access control Windows/.NET security cloud compu9ng MicrosoE MVP for Developer Security dominick.baier@thinktecture.com h.p://leastprivilege.com think mobile! 2

Agenda Overview & use cases Concerns & controversies 3

What is OAuth2? 4

History OAuth started circa 2007 2008 - IETF normalizauon started in 2008 2010 - RFC 5849 defines OAuth 1.0 2010 - WRAP (Web Resource AuthorizaUon Profiles) proposed by MicrosoE, Yahoo! And Google 2010 - OAuth 2.0 work begins in IETF Working deployments of various draes & versions at Google, MicrosoE, Facebook, Github, Twi.er, Flickr, Dropbox Mid 2012 Lead author and editor resigned & withdraws his name from all specs October 2012 RFC 6749, RFC 6750 5

High level overview Resource Server Client Resource Owner 6

7

8

9

10

High level overview Resource Server Client Resource Owner 11

OAuth2: The Players Confiden9al/Public is registered with Trusted/Untrusted uses Client authorizes accesses AuthorizaUon Server trusts "owns" a resource Resource Owner Resource Server 12

OAuth2 Flows AuthorizaUon Code Flow Web applica9on clients 1. Request authoriza9on 2. Request token 3. Access resource Implicit Flow Na9ve / local clients 1. Request authoriza9on & token 2. Access resource Resource Owner Password CredenUal Flow Trusted clients 1. Request token 2. Access resource "3- legged OAuth" "2- legged OAuth" 13

Authoriza9on Code Flow (Web Applica9on Clients) Web Applica9on (Client) Resource Server Resource Owner 14

Step 1a: Authoriza9on Request Web Applica9on (Client) Authoriza9on Server GET /authorize? client_id=webapp& redirect_uri=https://webapp/cb& scope=resource& response_type=code& state=123 Resource Owner 15

Consent h.p://zachholman.com/2011/01/oauth_will_murder_your_children/ 16

Step 1b: Authoriza9on Response Web Applica9on (Client) Authoriza9on Server GET /cb? code=xyz& state=123 Resource Owner 17

Step 2a: Token Request Web Applica9on (Client) Authoriza9on Server POST /token Authorization: Basic (client_id:secret) grant_type=authorization_code& authorization_code=xyz Resource Owner 18

Step 2b: Token Response Web Applica9on (Client) Authoriza9on Server { "access_token" : "abc", "expires_in" : "360", "token_type" : "Bearer", "refresh_token" : "xyz" } Resource Owner 19

Step 3: Resource Access Web Applica9on (Client) Resource Server GET /resource Authorization: Bearer access_token Resource Owner 20

JSON Web Token (JWT) Header Claims { "typ": "JWT", "alg": "HS256" } { "iss": "http://myissuer", "exp": "1340819380", "aud": "http://myresource", "name": "alice", "role": "foo,bar", } eyjhbgcioijub25lin0.eyjpc3mioijqb2uila0kicjlehaiojezmd.4mtkzodasdqogimh0dha6ly9legft Header Claims Signature 21

(Step 4: Refreshing the Token) Web Applica9on (Client) Authoriza9on Server POST /token Authorization: Basic (client_id:secret) grant_type=refresh_token& refresh_token=xyz Resource Owner 22

Client Management (e.g. Flickr) 23

Client Management (e.g. Dropbox) 24

Implicit Flow (Na9ve / Local Clients) Resource Owner Client 25

Step 1a: Authoriza9on Request Resource Server Authoriza9on Server GET /authorize? client_id=nativeapp& redirect_uri=http://localhost/cb& scope=resource& response_type=token& state=123 Resource Owner Client 26

Step 1b: Token Response Resource Server Authoriza9on Server GET /cb# access_token=abc& expires_in=3600& state=123 Resource Owner Client 27

Step 2: Resource Access Resource Server GET /resource Authorization: Bearer access_token Resource Owner Client 28

Resource Owner Password Creden9al Flow (Trusted Applica9on) Resource Server Resource Owner Client 29

Step 1a: Token Request Resource Server Authoriza9on Server POST /token Authorization: Basic (client_id:secret) grant_type=password& scope=resource& user_name=owner& password=password& Resource Owner Client 30

Step 1b: Token Response Resource Server Authoriza9on Server { "access_token" : "abc", "expires_in" : "360", "token_type" : "Bearer", "refresh_token" : "xyz" } Resource Owner Client 31

Step 2: Resource Access Resource Server GET /resource Authorization: Bearer access_token Resource Owner Client 32

Concerns & Controversies artwork by @ChrisMCarrasco 33

Eran Hammer h.p://hueniverse.com/2010/09/oauth- bearer- tokens- are- a- terrible- idea/ h.p://hueniverse.com/2010/09/oauth- 2-0- without- signatures- is- bad- for- the- web/ h.p://hueniverse.com/2012/07/oauth- 2-0- and- the- road- to- hell/ OAuth2: Looking back and moving on hdps://vimeo.com/52882780 34

35

JSON Web Token (JWT) JSON Web Encryp9on (JWE) JSON Web Signatures (JWS) JSON Web Algorithms (JWA) Asser9on Framework for OAuth2 JWT Bearer Token Profiles SAML 2.0 Bearer Token Profiles Token Revoca9on MAC Tokens The OAuth2 AuthorizaUon Framework (RFC 6749) OAuth2 Bearer Token Usage (RFC 6750) Threat Model and Security ConsideraUons (RFC 6819) Core (proposed standards) Informa9onal OAuth2 Resource Set Registra9on Dynamic Client Registra9on User- Managed Access Chaining and Redelega9on Metadata & Introspec9on hdp://datatracker.ief.org/wg/oauth/ hdp://openid.net/specs/openid- connect basic- 1_0-23.html implicit- 1_0-06.html messages- 1_0-15.html standard- 1_0-16.html discovery- 1_0-12.html registra9on- 1_0-14.html session- 1_0-11.html 36

Bearer Token!!A security token with the property that any party!in possession of the token (a "bearer") can use the!token in any way that any other party in possession!of it can. Using a bearer token does not!require a bearer to prove possession of!cryptographic key material (proof-of-possession).! 37

Developers & SSL 38

Infrastructure & SSL hdp://gigaom.com/2013/01/10/nokia- yes- we- decrypt- your- hdps- data- but- dont- worry- about- it/ 39

Security Theater hdps://wellsoffice.wellsfargo.com/ceoportal/signon/loader.jsp 40

OAuth2 for Authen9ca9on OAuth2 is for authorizauon authen9ca9on is a pre- requisite for that What many people really want is: let's use OAuth2 for authen9ca9on "Sign- in with social provider X" à especially mobile apps h.p://www.thread- safe.com/2012/01/problem- with- oauth- for- authenucauon.html 41

OAuth2 for Authen9ca9on: Request UserInfo RS Authoriza9on Server GET /authorize? client_id=nativeapp& redirect_uri=http://localhost/cb& scope=userinfo& response_type=token& state=123 Resource Owner Client 42

OAuth2 for Authen9ca9on: Response UserInfo RS Authoriza9on Server GET /cb? access_token=abc& userid=123& expires_in=3600& state=123 Resource Owner Client 43

OAuth2 for Authen9ca9on: Accessing User Data UserInfo RS GET /userinfo Authorization: Bearer access_token Firstname, Lastname, Email Resource Owner Client 44

The Problem userid, access token Impersonated! access token 1. User logs into malicious app (app steals token) 2. Malicious developer uses stolen access token in legiumate app 45

(Other recent) Facebook Hacks h.p://www.darkreading.com/blog/240148995/ the- road- to- hell- is- authenucated- by- facebook.html h.p://homakov.blogspot.no/2013/02/hacking- facebook- with- oauth2- and- chrome.html www.nirgoldshlager.com/2013/03/ how- i- hacked- any- facebook- accountagain.html 46

Conclusion OAuth2 is already widely used on the internet It will find its way into your scenarios Current implementauons are lacking even by the big guys let alone the myriad of DIY implementa9ons Spec needs some refinement "basic profile" MAC tokens Very good & balanced view hdps://www.tbray.org/ongoing/when/201x/2013/01/23/oauth 47