OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control Maarten

Slides:



Advertisements
Similar presentations
Attie Naude 14 May 2013 Windows Azure Mobile Services.
Advertisements

A Public Web Services Security Framework Based on Current and Future Usage Scenarios J.Thelin, Chief Architect PJ.Murray, Product Manager Cape Clear Software.
Patterns & practices Symposium 2013 Windows Azure Active Directory Vittorio
Environmental Council of States Network Authentication and Authorization Services The Shared Security Component February 28, 2005.
& Silverlight, Windows Phone 7, Windows Azure, jQuery, OData and RIA Services. Shaken, not stirred. Kevin
06 | Implementing Web APIs Jon Galloway | Tech Evangelist Christopher Harrison | Head Geek.
GRDevDay March 21, 2015 Cloud-based Identity for Applications.
Clients using wide variety of devices/languages/platforms Server applications using wide variety of platforms/languages Browser Native app Server.
Prashanth Kumar Muthoju
Cloud app Cloud app Cloud app Separate username/password sign-in Manual or semi-automated provisioning Active Directory App Separate username/password.
TAM STE Series 2008 © 2008 IBM Corporation WebSEAL SSO, Session 108/2008 TAM STE Series WebSEAL SSO, Session 1 Presented by: Andrew Quap.
ASP. Net is a rich web framework that leverages well known patterns and JavaScript frameworks to build great web experiences quickly.
ASP.NET Web API Udaiappa Ramachandran NHDN-Nashua.NET/Cloud Computing UG Lead Blog:
REST.  REST is an acronym standing for Representational State Transfer  A software architecture style for building scalable web services  Typically,
Getting Started with the ASP.NET Web API Dhananjay Kumar Infragistics Consultant Microsoft MVP
Key Management with the Voltage Data Protection Server Luther Martin IEEE P May 7, 2007.
WS-Security: SOAP Message Security Web-enhanced Information Management (WHIM) Justin R. Wang Professor Kaiser.
ASP.NET Web API. ASP.NET Members MS Open Source ASP.NET MVC 4, ASP.NET Web API and ASP.NET Web Pages v2 (Razor) now all open source ASP.NET MVC 4, ASP.NET.
Web Services Security Standards Overview for the Non-Specialist Hal Lockhart Office of the CTO BEA Systems.
Open Data Protocol * Han Wang 11/30/2012 *
Computer Security: Principles and Practice First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown Chapter 22 – Internet Authentication.
(Azure+O365) Identity Presenter Name Position or role Microsoft Azure.
SAML: An XML Framework for Exchanging Authentication and Authorization Information + SPML, XCBF Prateek Mishra August 2002.
HTML5 AND THE FUTURE JAVASCRIPT PLATFORM Marcelo Lopez Ruiz Senior Software Design Engineer Microsoft Corporation.
NHIN DIRECT REST IMPLEMENTATION Prepared by: The NHIN Direct REST Team June 8, 2010.
API Crash Course CWU Startup Club. OUTLINE What is an API? Why are API’s useful? What is HTTP? JSON? XML? What is a RESTful API? How do we consume an.
Access Management 2.0: UMA for the #UMAam20 for questions 20 March 2014 tinyurl.com/umawg for slides, recording, and more 1.
Deconstructing API Security
06 | HTTP Services with Web API Bruno Terkaly | Technical Evangelist Bret Stateham | Technical Evangelist.
RESTful Web Services What is RESTful?
Securing Angular Apps Brian Noyes
Agenda Pattern Authenticate a user against UCWA Operations happen using the user’s identity Interact with the UCWA service endpoint Make HTTP requests.
Secure Mobile Development with NetIQ Access Manager
Today’s Applications Web API Browser Native app Web API Web API
WebApi: What is it? How can I use it? Guy In Front of the Whittaker.
Modern Development Technologies in SharePoint SHAREPOINT SATURDAY OMAHA APRIL, 2016.
Vladan Strigo CTO NETmedia ASP.NET Web Api Tips & Tricks.
Client Side Web Applications Melania Danciu | Haufe-Lexware RO by using the the best the web has to offer.
#SummitNow Consuming OAuth Services in Alfresco Share Alfresco Summit 2013 Will Abson
Azure Active Directory is becoming one of, if not the, primary user identity management services for cloud applications. One of Azure Active Directory's.
National College of Science & Information Technology.
Building production ready APIs with ASP.NET Core 2.0
Consuming OAuth Services in Alfresco Share
Azure Identity Premier Fast Start
API (Application Program Interface)
Introduction to Windows Azure AppFabric
Federation made simple
Better RESTFul API – Best Practices
API Security Auditing Be Aware,Be Safe
Migrating SharePoint Add-ins from Azure ACS to Azure AD
Node.js Express Web Services
WEB-API & MVC5 - Identity & Security
What is REST API ? A REST (Representational State Transfer) Server simply provides access to resources and the REST client accesses and presents the.
Introduction Web Environments
Windows Azure AppFabric
How to Check if a site's connection is secure ?
Ashish Pandit IT Architect, Middleware & Integration Services
Azure AD Line Of Business Application Integration
WEB API.
BY: SHIVI AGRAWAL ( ) CSE-(6)C
DotnetConf 11/17/ :06 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE.
Agenda OAuth Concepts Programming OAuth.
Office 365 Development.
TechEd /22/2019 9:22 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Token-based Authentication
Building production-ready APIs with ASP.NET Core 2.2
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
07 | Introduction to Authentication
WCF Data Services and Silverlight
Computer Network Information Center, Chinese Academy of Sciences
Presentation transcript:

OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control Maarten

Abstract API’s are the new apps. They can be consumed by everyone using a web browser or a mobile application on their smartphone or tablet. How would you build your API if you want these apps to be a full-fledged front-end to your service without compromising security? In this session, Maarten will explain how to build an API using the ASP.NET Web API framework and how the Windows Azure Access Control service can be used to almost completely outsource all security and OAuth-related tasks.

Who am I? Maarten Balliauw Technical Evangelist, JetBrains AZUG Focus on web ASP.NET MVC, Windows Azure, SignalR,... MVP Windows Azure & ASPInsider Shameless self promotion: Pro NuGet -

Agenda Why would I need an API? API characteristics ASP.NET MVC Web API Windows Azure ACS

Why would I need an API?

Consuming the web : Desktop browser : Mobile browser : iPhone and Android apps : Tablets, tablets, tablets : Your fridge (Internet of Things)

Twitter & Facebook By show of hands

Make everyone API (as the French say)

Expose services to 3rd parties Valuable Flexible Managed Supported Have a plan

API Characteristics

What is an API? Software-to-Software interface Contract between software and developers Functionalities, constraints (technical / legal) Programming instructions and standards Open services to other software developers (public or private)

Flavours Transport HTTP Sockets Message contract SOAP XML Binary JSON HTML …

Technical Most API’s use HTTP and REST extensively Addressing HTTP Verbs Media types HTTP status codes Hypermedia (*)

The Web is an API Demo

HTTP Verbs GET – return data HEAD – check if the data exists POST – create or update data PUT – put data MERGE – merge values with existing data DELETE – delete data

Status codes 200 OK – Everything is OK, your expected data is in the response. 401 Unauthorized – You either have to log in or you are not allowed to access the resource. 404 Not Found – The resource could not be found. 500 Internal Server Error – The server failed processing your request. …

Hypermedia in action!

demo Be detailed! Remember the RFC! Think RFC2324!

ASP.NET Web API

Part of ASP.NET MVC 4 Framework to build HTTP Services (REST) Solid features Modern HTTP programming model Content negotiation (e.g. xml, json,...) Query composition (OData query support) Model binding and validation (conversion to.NET objects) Routes Filters (e.g. Validation, exception handling,...) And more!

ASP.NET Web API is easy! HTTP Verb = action “Content-type” header = data format in “Accept” header = data format out Return meaningful status code

demo Creating an API using ASP.NET Web API Demo

Securing your API No authentication Basic/Windows authentication [Authorize] attribute

demo Securing your API

The world of API clients is complex CLIENTS HTML5+JS SPA Native apps Server-to-server AUTHN + AUTHZ Username/password? Basic auth? NTLM / Kerberos? Client certificate? Shared secret?

A lot of public API’s… “your API consumer isn’t really your user, but an application acting on behalf of a user” (or: API consumer != user)

OAuth2

Guest badges Building owner / colleague full-access badge Guest badge Your name on it Limited scope (only 7th floor) Limited validity (only today)

Guest badges | |--(A)-- Can access tomorrow?-->| Resource | | | | Owner | | | | | | Client | | Reception | | | | Resource | | | | Server | | |<-(F) Sure you can get coffee! | | And tomorrow, you’ll have to refresh your badge!

OAuth | |--(A)- Authorization Request ->| Resource | | | | Owner | | | | Authorization | | Client | | Server | | | | Resource | | | | Server | | |<-(F)--- Protected Resource ---| | Figure 1: Abstract Protocol Flow

Quick side note… There are 3 major authentication flows Based on type of client Variants possible

On the web…

Access tokens / Refresh tokens In theory: whatever format you want Widely used: JWT (“JSON Web Token”) Less widely used: SWT (“Simple Web Token”) Signed / Encrypted

JWT Header: {"alg":"none"} Token: {"iss":"joe", "exp": , "

What you have to implement OAuth authorization server Keep track of supported consumers Keep track of user consent OAuth token expiration & refresh Oh, and your API

Windows Azure Access Control Service

ACS - Identity in Windows Azure Active Directory federation Graph API Web SSO Link apps to identity providers using rules Support WS-Security, WS-Federation, SAML Little known feature: OAuth2 delegation

OAuth flow using ACS

demo ASP.NET Web API, OAuth2, Windows Azure ACS

OAuth2 delegation? You: OAuth authorization server ACS: Keep track of supported consumers ACS: Keep track of user consent ACS: OAuth token expiration & refresh You: Your API

Conclusion

Key takeaways API’s are the new apps Valuable HTTP ASP.NET Web API OAuth2 Windows Azure Access Control Service

Thank you!