SlideShare a Scribd company logo
OAUTH2 AND
IDENTITYSERVER3
Integrating into your application
What we will and won’t cover
■ Will –What is Identity Server and why use it.
■ Will – How to start integrating into your app.
■ Will – Extension points, customisation points, token types.
■ Will – Nasty bits, hard stuff, pain points.
■ Won’t – Detail or explain all OAuth2 flows.
■ Won’t – Show every possible integration scenario and customisation point
■ Take away
– Having a good idea on technical cost, difficulty and suitability for a given situation.
– How to begin and where to go from there.
Its not you, It’s me
■ Paul Glavich
■ @glav, glav@theglavs.com
■ ASP.Net MVP 12 years
■ Author 3 books, various articles, http://weblogs.asp.net/pglavich
■ International speaker (does NZ count?)
■ ASPInsider
■ CTO Saasu.com
What is Identity Server
■ Spec compliantOAuth2 Authorisation server (STS)
– (That means it’s big and complex)
■ OAuth2 flows and OpenID connect
■ Can integrate with external providers (google etc)
■ Open source, (Dominick Baier and Brock Allen)
– Identity Server 3 v2.5 (latest)
– Identity Server 4 (support for .Net core/vNext) – In progress
■ Series of Nuget packages,Owin based implementation
Free accessories
■ Identity Manager
– In beta
– Tool to admin users, claims etc.
– Similar to website admin tool
■ Identity Model
– Helper classes
– Client code
■ https://identityserver.github.io/
Why bother?
■ Can develop your own right . . . . .?
Writing your own OAuth/Identity Server
■ It can be done…..
■ But often ends in tears.
Alternatives
■ Other alternatives
– Auth0 ( https://auth0.com/ )
■ Cloud based, good integration hooks, some cost
– Azure/AD (https://azure.microsoft.com/en-us/services/active-directory/ )
■ Cloud, multi-protocol, some cost
– WS02 ( http://wso2.com/ )
■ Java, multi-protocol (WS-*, OpenId, EIB) – open source and paid versions.
Getting started
■ Install nuget package “IdentityServer3”
■ Configure startup
■ Demo: Simplest setup
Logging
■ Supports a variety of pluggable log sources.
■ Get logging working first and worry about all the flows later.
■ Saves hours in debugging time.
■ Supports Serilog, Nlog, Log4Net, Enterprise Library & Loupe.
– Install requisite nuget package
High levelView
IdSrv Endpoints
AssetsExternal
Integration
Application
Services
Repository
Stores
* Can customise
* Can customise
* Can customise
* Can configure
* Not applicable
to all OAuth flows
Customising Assets
■ Stylesheets
■ HtmlViews/Templates
– Login/Logout form
– Consent form
– Permissions view
– Error form
■ Loaded via DefaultViewService (implements IViewService)
■ Customise loading via custom IViewService implementation
<Asset>
<img src=“funny-cat.gif” />
</Asset>
Configuring custom assets
■ Only the welcome page is not configurable (but is replaceable)
– Can disable
■ Setup loading of custom partial views
■ Demo
What about the data store?
■ EntityFramework 6 Nuget package
■ Fully customisable storage engine via custom interface implementation
– TokenHandleStore, ConsentStore, ClientStore, etc…
– TokenHandleService, ConsentService, ClientService
■ Should at least configure IUserStore, IClientStore, IScopeStore (mandatory).
– AuthorizationCodeStore,TokenHandleStore, RefreshTokenStore, ConsentStore
(mandatory for prod)
■ Demo with dapper
Embedded IdentityServer with OpenId
■ IdentityServer to manage the authentication of users and token/cookies.
■ [Authorise] – just works
[Authorize]
public ActionResult Index()
{
ViewBag.Title = "Secured Page";
return View();
}
■ [ResourceAuthorize(“action”,”resource”)] – based on resource and action
– Requires nuget package IdentityModel.Owin.ResourceAuthorization.Mvc
■ Demo
It is not all unicorns and rainbows…
■ Integrating IdentityServer is far from simple.
– In reality, it will take some time
■ Errors are not always obvious
■ Look to the samples.There are many.
■ Get used to reading the issue register and following threads.
■ Testing, particularlyAuthorization Code and hybrid flow can be tricky
– Utilise this test harness/console app or write your own
Takeaways and items to remember
■ Get logging working first. It will save you hours of debugging.
■ Download all the samples, and familiarise yourself with your specific scenarios.
– Looking at alternate samples may only serve to confuse initially.
– Lots of different ways to get going.
■ When looking at documentation, ensure you are looking at the latest.
– Can easily be looking at older versions inadvertently. Much confusion.
■ Create a test harness, callback site, or something to assist testing and verifications
Links and resources
■ Identity Server: https://identityserver.github.io/
■ Demo code, DB scripts: https://github.com/glav/DDDSyd2016
■ OAuth2: http://oauth.net/2/
■ Auth0: https://auth0.com/
■ WS02: http://wso2.com/
■ Me: glav@theglavs.com and @glav
1-5 August
DDD Sydney thanks our sponsors

More Related Content

What's hot

Identity management and single sign on - how much flexibility
Identity management and single sign on - how much flexibilityIdentity management and single sign on - how much flexibility
Identity management and single sign on - how much flexibility
Ryan Dawson
 
OAuth2 - Introduction
OAuth2 - IntroductionOAuth2 - Introduction
OAuth2 - Introduction
Knoldus Inc.
 
API Security - Null meet
API Security - Null meetAPI Security - Null meet
API Security - Null meet
vinoth kumar
 
OAuth - Open API Authentication
OAuth - Open API AuthenticationOAuth - Open API Authentication
OAuth - Open API Authentication
leahculver
 
Stateless authentication for microservices
Stateless authentication for microservicesStateless authentication for microservices
Stateless authentication for microservices
Alvaro Sanchez-Mariscal
 
Mixing OAuth 2.0, Jersey and Guice to Build an Ecosystem of Apps - JavaOne...
Mixing OAuth 2.0, Jersey and Guice to Build an Ecosystem of Apps - JavaOne...Mixing OAuth 2.0, Jersey and Guice to Build an Ecosystem of Apps - JavaOne...
Mixing OAuth 2.0, Jersey and Guice to Build an Ecosystem of Apps - JavaOne...Hermann Burgmeier
 
OAuth Hacks A gentle introduction to OAuth 2 and Apache Oltu
OAuth Hacks A gentle introduction to OAuth 2 and Apache OltuOAuth Hacks A gentle introduction to OAuth 2 and Apache Oltu
OAuth Hacks A gentle introduction to OAuth 2 and Apache Oltu
Antonio Sanso
 
How secure are webinar platforms?
How secure are webinar platforms?How secure are webinar platforms?
How secure are webinar platforms?
SecuRing
 
An Authentication and Authorization Architecture for a Microservices World
An Authentication and Authorization Architecture for a Microservices WorldAn Authentication and Authorization Architecture for a Microservices World
An Authentication and Authorization Architecture for a Microservices World
VMware Tanzu
 
Implementing OAuth
Implementing OAuthImplementing OAuth
Implementing OAuth
leahculver
 
4Developers 2018: Real-time capabilities in ASP.NET Core web applications (To...
4Developers 2018: Real-time capabilities in ASP.NET Core web applications (To...4Developers 2018: Real-time capabilities in ASP.NET Core web applications (To...
4Developers 2018: Real-time capabilities in ASP.NET Core web applications (To...
PROIDEA
 
Rest Security with JAX-RS
Rest Security with JAX-RSRest Security with JAX-RS
Rest Security with JAX-RSFrank Kim
 
Intro to Apache Shiro
Intro to Apache ShiroIntro to Apache Shiro
Intro to Apache Shiro
Claire Hunsaker
 
Draft: building secure applications with keycloak (oidc/jwt)
Draft: building secure applications with keycloak (oidc/jwt)Draft: building secure applications with keycloak (oidc/jwt)
Draft: building secure applications with keycloak (oidc/jwt)
Abhishek Koserwal
 
Windows Azure: Connecting the Dots for a Mobile Workforce
Windows Azure: Connecting the Dots for a Mobile WorkforceWindows Azure: Connecting the Dots for a Mobile Workforce
Windows Azure: Connecting the Dots for a Mobile Workforce
TechWell
 
From 0 to Spring Security 4.0
From 0 to Spring Security 4.0From 0 to Spring Security 4.0
From 0 to Spring Security 4.0
robwinch
 
How LinkedIn changed its security model in order to offer an API
How LinkedIn changed its security model  in order to offer an APIHow LinkedIn changed its security model  in order to offer an API
How LinkedIn changed its security model in order to offer an APILinkedIn
 
Design Summit - Security Roadmap - Keenan Brock, Alberto Bellotti
Design Summit - Security Roadmap - Keenan Brock, Alberto BellottiDesign Summit - Security Roadmap - Keenan Brock, Alberto Bellotti
Design Summit - Security Roadmap - Keenan Brock, Alberto Bellotti
ManageIQ
 
Javacro 2014 Spring Security 3 Speech
Javacro 2014 Spring Security 3 SpeechJavacro 2014 Spring Security 3 Speech
Javacro 2014 Spring Security 3 Speech
Fernando Redondo Ramírez
 
ng-owasp: OWASP Top 10 for AngularJS Applications
ng-owasp: OWASP Top 10 for AngularJS Applicationsng-owasp: OWASP Top 10 for AngularJS Applications
ng-owasp: OWASP Top 10 for AngularJS Applications
Kevin Hakanson
 

What's hot (20)

Identity management and single sign on - how much flexibility
Identity management and single sign on - how much flexibilityIdentity management and single sign on - how much flexibility
Identity management and single sign on - how much flexibility
 
OAuth2 - Introduction
OAuth2 - IntroductionOAuth2 - Introduction
OAuth2 - Introduction
 
API Security - Null meet
API Security - Null meetAPI Security - Null meet
API Security - Null meet
 
OAuth - Open API Authentication
OAuth - Open API AuthenticationOAuth - Open API Authentication
OAuth - Open API Authentication
 
Stateless authentication for microservices
Stateless authentication for microservicesStateless authentication for microservices
Stateless authentication for microservices
 
Mixing OAuth 2.0, Jersey and Guice to Build an Ecosystem of Apps - JavaOne...
Mixing OAuth 2.0, Jersey and Guice to Build an Ecosystem of Apps - JavaOne...Mixing OAuth 2.0, Jersey and Guice to Build an Ecosystem of Apps - JavaOne...
Mixing OAuth 2.0, Jersey and Guice to Build an Ecosystem of Apps - JavaOne...
 
OAuth Hacks A gentle introduction to OAuth 2 and Apache Oltu
OAuth Hacks A gentle introduction to OAuth 2 and Apache OltuOAuth Hacks A gentle introduction to OAuth 2 and Apache Oltu
OAuth Hacks A gentle introduction to OAuth 2 and Apache Oltu
 
How secure are webinar platforms?
How secure are webinar platforms?How secure are webinar platforms?
How secure are webinar platforms?
 
An Authentication and Authorization Architecture for a Microservices World
An Authentication and Authorization Architecture for a Microservices WorldAn Authentication and Authorization Architecture for a Microservices World
An Authentication and Authorization Architecture for a Microservices World
 
Implementing OAuth
Implementing OAuthImplementing OAuth
Implementing OAuth
 
4Developers 2018: Real-time capabilities in ASP.NET Core web applications (To...
4Developers 2018: Real-time capabilities in ASP.NET Core web applications (To...4Developers 2018: Real-time capabilities in ASP.NET Core web applications (To...
4Developers 2018: Real-time capabilities in ASP.NET Core web applications (To...
 
Rest Security with JAX-RS
Rest Security with JAX-RSRest Security with JAX-RS
Rest Security with JAX-RS
 
Intro to Apache Shiro
Intro to Apache ShiroIntro to Apache Shiro
Intro to Apache Shiro
 
Draft: building secure applications with keycloak (oidc/jwt)
Draft: building secure applications with keycloak (oidc/jwt)Draft: building secure applications with keycloak (oidc/jwt)
Draft: building secure applications with keycloak (oidc/jwt)
 
Windows Azure: Connecting the Dots for a Mobile Workforce
Windows Azure: Connecting the Dots for a Mobile WorkforceWindows Azure: Connecting the Dots for a Mobile Workforce
Windows Azure: Connecting the Dots for a Mobile Workforce
 
From 0 to Spring Security 4.0
From 0 to Spring Security 4.0From 0 to Spring Security 4.0
From 0 to Spring Security 4.0
 
How LinkedIn changed its security model in order to offer an API
How LinkedIn changed its security model  in order to offer an APIHow LinkedIn changed its security model  in order to offer an API
How LinkedIn changed its security model in order to offer an API
 
Design Summit - Security Roadmap - Keenan Brock, Alberto Bellotti
Design Summit - Security Roadmap - Keenan Brock, Alberto BellottiDesign Summit - Security Roadmap - Keenan Brock, Alberto Bellotti
Design Summit - Security Roadmap - Keenan Brock, Alberto Bellotti
 
Javacro 2014 Spring Security 3 Speech
Javacro 2014 Spring Security 3 SpeechJavacro 2014 Spring Security 3 Speech
Javacro 2014 Spring Security 3 Speech
 
ng-owasp: OWASP Top 10 for AngularJS Applications
ng-owasp: OWASP Top 10 for AngularJS Applicationsng-owasp: OWASP Top 10 for AngularJS Applications
ng-owasp: OWASP Top 10 for AngularJS Applications
 

Viewers also liked

IdentityServer 4
IdentityServer 4IdentityServer 4
IdentityServer 4
Vinicius Quaiato
 
Devops - Bringing real benefits to the business.
Devops - Bringing real benefits to the business.Devops - Bringing real benefits to the business.
Devops - Bringing real benefits to the business.
Paul Glavich
 
Building APIs with MVC 6 and OAuth
Building APIs with MVC 6 and OAuthBuilding APIs with MVC 6 and OAuth
Building APIs with MVC 6 and OAuth
Filip Ekberg
 
Single Sign On con IdentityServer
Single Sign On con IdentityServerSingle Sign On con IdentityServer
Single Sign On con IdentityServer
Mauro Servienti
 
Auth done right - OpenID Connect with IdentityServer @ DotNetCrowd, Vilnius
Auth done right - OpenID Connect with IdentityServer @ DotNetCrowd, VilniusAuth done right - OpenID Connect with IdentityServer @ DotNetCrowd, Vilnius
Auth done right - OpenID Connect with IdentityServer @ DotNetCrowd, Vilnius
Tomas Urbonaitis
 
OpenID Connect - An Emperor or Just New Cloths?
OpenID Connect - An Emperor or Just New Cloths?OpenID Connect - An Emperor or Just New Cloths?
OpenID Connect - An Emperor or Just New Cloths?
Oliver Pfaff
 
TDC2016SP - Unificando a autenticação e controlando acesso a API com Identity...
TDC2016SP - Unificando a autenticação e controlando acesso a API com Identity...TDC2016SP - Unificando a autenticação e controlando acesso a API com Identity...
TDC2016SP - Unificando a autenticação e controlando acesso a API com Identity...
tdc-globalcode
 
ASP.NET Identity - O Novo componente de Membership do ASP.NET
ASP.NET Identity - O Novo componente de Membership do ASP.NETASP.NET Identity - O Novo componente de Membership do ASP.NET
ASP.NET Identity - O Novo componente de Membership do ASP.NET
Eduardo Pires
 
Oauth2 & OpenID Connect
Oauth2 & OpenID ConnectOauth2 & OpenID Connect
Oauth2 & OpenID Connect
Pascal Flamand
 
OAuth 2.0 and OpenId Connect
OAuth 2.0 and OpenId ConnectOAuth 2.0 and OpenId Connect
OAuth 2.0 and OpenId Connect
Saran Doraiswamy
 
Solution Architecture Patterns for Digital Transformation
Solution Architecture Patterns for Digital TransformationSolution Architecture Patterns for Digital Transformation
Solution Architecture Patterns for Digital Transformation
WSO2
 
Identity Management for Web Application Developers
Identity Management for Web Application DevelopersIdentity Management for Web Application Developers
Identity Management for Web Application Developers
WSO2
 
The 10 Best Copywriting Formulas for Social Media Headlines
The 10 Best Copywriting Formulas for Social Media HeadlinesThe 10 Best Copywriting Formulas for Social Media Headlines
The 10 Best Copywriting Formulas for Social Media Headlines
Buffer
 
Culture
CultureCulture
Culture
Reed Hastings
 

Viewers also liked (14)

IdentityServer 4
IdentityServer 4IdentityServer 4
IdentityServer 4
 
Devops - Bringing real benefits to the business.
Devops - Bringing real benefits to the business.Devops - Bringing real benefits to the business.
Devops - Bringing real benefits to the business.
 
Building APIs with MVC 6 and OAuth
Building APIs with MVC 6 and OAuthBuilding APIs with MVC 6 and OAuth
Building APIs with MVC 6 and OAuth
 
Single Sign On con IdentityServer
Single Sign On con IdentityServerSingle Sign On con IdentityServer
Single Sign On con IdentityServer
 
Auth done right - OpenID Connect with IdentityServer @ DotNetCrowd, Vilnius
Auth done right - OpenID Connect with IdentityServer @ DotNetCrowd, VilniusAuth done right - OpenID Connect with IdentityServer @ DotNetCrowd, Vilnius
Auth done right - OpenID Connect with IdentityServer @ DotNetCrowd, Vilnius
 
OpenID Connect - An Emperor or Just New Cloths?
OpenID Connect - An Emperor or Just New Cloths?OpenID Connect - An Emperor or Just New Cloths?
OpenID Connect - An Emperor or Just New Cloths?
 
TDC2016SP - Unificando a autenticação e controlando acesso a API com Identity...
TDC2016SP - Unificando a autenticação e controlando acesso a API com Identity...TDC2016SP - Unificando a autenticação e controlando acesso a API com Identity...
TDC2016SP - Unificando a autenticação e controlando acesso a API com Identity...
 
ASP.NET Identity - O Novo componente de Membership do ASP.NET
ASP.NET Identity - O Novo componente de Membership do ASP.NETASP.NET Identity - O Novo componente de Membership do ASP.NET
ASP.NET Identity - O Novo componente de Membership do ASP.NET
 
Oauth2 & OpenID Connect
Oauth2 & OpenID ConnectOauth2 & OpenID Connect
Oauth2 & OpenID Connect
 
OAuth 2.0 and OpenId Connect
OAuth 2.0 and OpenId ConnectOAuth 2.0 and OpenId Connect
OAuth 2.0 and OpenId Connect
 
Solution Architecture Patterns for Digital Transformation
Solution Architecture Patterns for Digital TransformationSolution Architecture Patterns for Digital Transformation
Solution Architecture Patterns for Digital Transformation
 
Identity Management for Web Application Developers
Identity Management for Web Application DevelopersIdentity Management for Web Application Developers
Identity Management for Web Application Developers
 
The 10 Best Copywriting Formulas for Social Media Headlines
The 10 Best Copywriting Formulas for Social Media HeadlinesThe 10 Best Copywriting Formulas for Social Media Headlines
The 10 Best Copywriting Formulas for Social Media Headlines
 
Culture
CultureCulture
Culture
 

Similar to OAuth2 and IdentityServer3

Owasp top 10 2013
Owasp top 10 2013Owasp top 10 2013
Owasp top 10 2013
Edouard de Lansalut
 
The State of the Veil Framework
The State of the Veil FrameworkThe State of the Veil Framework
The State of the Veil Framework
VeilFramework
 
I hunt sys admins 2.0
I hunt sys admins 2.0I hunt sys admins 2.0
I hunt sys admins 2.0
Will Schroeder
 
Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6
Ganesh Kondal
 
Don't get stung - an introduction to the OWASP Top 10
Don't get stung - an introduction to the OWASP Top 10Don't get stung - an introduction to the OWASP Top 10
Don't get stung - an introduction to the OWASP Top 10
Barry Dorrans
 
AWS DevOps - Terraform, Docker, HashiCorp Vault
AWS DevOps - Terraform, Docker, HashiCorp VaultAWS DevOps - Terraform, Docker, HashiCorp Vault
AWS DevOps - Terraform, Docker, HashiCorp Vault
Grzegorz Adamowicz
 
Splunk: Forward me the REST of those shells
Splunk: Forward me the REST of those shellsSplunk: Forward me the REST of those shells
Splunk: Forward me the REST of those shells
Anthony D Hendricks
 
The Importance Things of Full Stack Development
The Importance Things of Full Stack DevelopmentThe Importance Things of Full Stack Development
The Importance Things of Full Stack Development
Mike Taylor
 
Rapid app building with loopback framework
Rapid app building with loopback frameworkRapid app building with loopback framework
Rapid app building with loopback framework
Thomas Papaspiros
 
DevOps Tooling - Pop-up Loft TLV 2017
DevOps Tooling - Pop-up Loft TLV 2017DevOps Tooling - Pop-up Loft TLV 2017
DevOps Tooling - Pop-up Loft TLV 2017
Amazon Web Services
 
Cloud adoption fails - 5 ways deployments go wrong and 5 solutions
Cloud adoption fails - 5 ways deployments go wrong and 5 solutionsCloud adoption fails - 5 ways deployments go wrong and 5 solutions
Cloud adoption fails - 5 ways deployments go wrong and 5 solutions
Yevgeniy Brikman
 
Deploy MediaWiki usgin Fiware Lab Facilities
Deploy MediaWiki usgin Fiware Lab FacilitiesDeploy MediaWiki usgin Fiware Lab Facilities
Deploy MediaWiki usgin Fiware Lab Facilities
José Ignacio Carretero Guarde
 
Echidna, sistema de respuesta a incidentes open source [GuadalajaraCON 2013]
Echidna, sistema de respuesta a incidentes open source [GuadalajaraCON 2013]Echidna, sistema de respuesta a incidentes open source [GuadalajaraCON 2013]
Echidna, sistema de respuesta a incidentes open source [GuadalajaraCON 2013]
Websec México, S.C.
 
DEF CON 23 - BRENT - white hacking web apps wp
DEF CON 23 - BRENT - white hacking web apps wpDEF CON 23 - BRENT - white hacking web apps wp
DEF CON 23 - BRENT - white hacking web apps wp
Felipe Prado
 
Knolx session
Knolx sessionKnolx session
Knolx session
Knoldus Inc.
 
AWS Meet-up: Logging At Scale on AWS
AWS Meet-up: Logging At Scale on AWSAWS Meet-up: Logging At Scale on AWS
AWS Meet-up: Logging At Scale on AWS
Chris Riddell
 
Bootstrapping - Session 1 - Your First Week with Amazon EC2
Bootstrapping - Session 1 - Your First Week with Amazon EC2Bootstrapping - Session 1 - Your First Week with Amazon EC2
Bootstrapping - Session 1 - Your First Week with Amazon EC2
Amazon Web Services
 
004 - Logging in the Cloud -- hide01.ir.pptx
004 - Logging in the Cloud  --  hide01.ir.pptx004 - Logging in the Cloud  --  hide01.ir.pptx
004 - Logging in the Cloud -- hide01.ir.pptx
nitinscribd
 
Deploy Mediawiki Using FIWARE Lab Facilities
Deploy Mediawiki Using FIWARE Lab FacilitiesDeploy Mediawiki Using FIWARE Lab Facilities
Deploy Mediawiki Using FIWARE Lab Facilities
FIWARE
 
Coding for production
Coding for productionCoding for production
Coding for production
jehiah
 

Similar to OAuth2 and IdentityServer3 (20)

Owasp top 10 2013
Owasp top 10 2013Owasp top 10 2013
Owasp top 10 2013
 
The State of the Veil Framework
The State of the Veil FrameworkThe State of the Veil Framework
The State of the Veil Framework
 
I hunt sys admins 2.0
I hunt sys admins 2.0I hunt sys admins 2.0
I hunt sys admins 2.0
 
Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6
 
Don't get stung - an introduction to the OWASP Top 10
Don't get stung - an introduction to the OWASP Top 10Don't get stung - an introduction to the OWASP Top 10
Don't get stung - an introduction to the OWASP Top 10
 
AWS DevOps - Terraform, Docker, HashiCorp Vault
AWS DevOps - Terraform, Docker, HashiCorp VaultAWS DevOps - Terraform, Docker, HashiCorp Vault
AWS DevOps - Terraform, Docker, HashiCorp Vault
 
Splunk: Forward me the REST of those shells
Splunk: Forward me the REST of those shellsSplunk: Forward me the REST of those shells
Splunk: Forward me the REST of those shells
 
The Importance Things of Full Stack Development
The Importance Things of Full Stack DevelopmentThe Importance Things of Full Stack Development
The Importance Things of Full Stack Development
 
Rapid app building with loopback framework
Rapid app building with loopback frameworkRapid app building with loopback framework
Rapid app building with loopback framework
 
DevOps Tooling - Pop-up Loft TLV 2017
DevOps Tooling - Pop-up Loft TLV 2017DevOps Tooling - Pop-up Loft TLV 2017
DevOps Tooling - Pop-up Loft TLV 2017
 
Cloud adoption fails - 5 ways deployments go wrong and 5 solutions
Cloud adoption fails - 5 ways deployments go wrong and 5 solutionsCloud adoption fails - 5 ways deployments go wrong and 5 solutions
Cloud adoption fails - 5 ways deployments go wrong and 5 solutions
 
Deploy MediaWiki usgin Fiware Lab Facilities
Deploy MediaWiki usgin Fiware Lab FacilitiesDeploy MediaWiki usgin Fiware Lab Facilities
Deploy MediaWiki usgin Fiware Lab Facilities
 
Echidna, sistema de respuesta a incidentes open source [GuadalajaraCON 2013]
Echidna, sistema de respuesta a incidentes open source [GuadalajaraCON 2013]Echidna, sistema de respuesta a incidentes open source [GuadalajaraCON 2013]
Echidna, sistema de respuesta a incidentes open source [GuadalajaraCON 2013]
 
DEF CON 23 - BRENT - white hacking web apps wp
DEF CON 23 - BRENT - white hacking web apps wpDEF CON 23 - BRENT - white hacking web apps wp
DEF CON 23 - BRENT - white hacking web apps wp
 
Knolx session
Knolx sessionKnolx session
Knolx session
 
AWS Meet-up: Logging At Scale on AWS
AWS Meet-up: Logging At Scale on AWSAWS Meet-up: Logging At Scale on AWS
AWS Meet-up: Logging At Scale on AWS
 
Bootstrapping - Session 1 - Your First Week with Amazon EC2
Bootstrapping - Session 1 - Your First Week with Amazon EC2Bootstrapping - Session 1 - Your First Week with Amazon EC2
Bootstrapping - Session 1 - Your First Week with Amazon EC2
 
004 - Logging in the Cloud -- hide01.ir.pptx
004 - Logging in the Cloud  --  hide01.ir.pptx004 - Logging in the Cloud  --  hide01.ir.pptx
004 - Logging in the Cloud -- hide01.ir.pptx
 
Deploy Mediawiki Using FIWARE Lab Facilities
Deploy Mediawiki Using FIWARE Lab FacilitiesDeploy Mediawiki Using FIWARE Lab Facilities
Deploy Mediawiki Using FIWARE Lab Facilities
 
Coding for production
Coding for productionCoding for production
Coding for production
 

Recently uploaded

APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
Roshan Dwivedi
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 

Recently uploaded (20)

APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 

OAuth2 and IdentityServer3

  • 2. What we will and won’t cover ■ Will –What is Identity Server and why use it. ■ Will – How to start integrating into your app. ■ Will – Extension points, customisation points, token types. ■ Will – Nasty bits, hard stuff, pain points. ■ Won’t – Detail or explain all OAuth2 flows. ■ Won’t – Show every possible integration scenario and customisation point ■ Take away – Having a good idea on technical cost, difficulty and suitability for a given situation. – How to begin and where to go from there.
  • 3. Its not you, It’s me ■ Paul Glavich ■ @glav, glav@theglavs.com ■ ASP.Net MVP 12 years ■ Author 3 books, various articles, http://weblogs.asp.net/pglavich ■ International speaker (does NZ count?) ■ ASPInsider ■ CTO Saasu.com
  • 4. What is Identity Server ■ Spec compliantOAuth2 Authorisation server (STS) – (That means it’s big and complex) ■ OAuth2 flows and OpenID connect ■ Can integrate with external providers (google etc) ■ Open source, (Dominick Baier and Brock Allen) – Identity Server 3 v2.5 (latest) – Identity Server 4 (support for .Net core/vNext) – In progress ■ Series of Nuget packages,Owin based implementation
  • 5. Free accessories ■ Identity Manager – In beta – Tool to admin users, claims etc. – Similar to website admin tool ■ Identity Model – Helper classes – Client code ■ https://identityserver.github.io/
  • 6. Why bother? ■ Can develop your own right . . . . .?
  • 7. Writing your own OAuth/Identity Server ■ It can be done….. ■ But often ends in tears.
  • 8. Alternatives ■ Other alternatives – Auth0 ( https://auth0.com/ ) ■ Cloud based, good integration hooks, some cost – Azure/AD (https://azure.microsoft.com/en-us/services/active-directory/ ) ■ Cloud, multi-protocol, some cost – WS02 ( http://wso2.com/ ) ■ Java, multi-protocol (WS-*, OpenId, EIB) – open source and paid versions.
  • 9. Getting started ■ Install nuget package “IdentityServer3” ■ Configure startup ■ Demo: Simplest setup
  • 10. Logging ■ Supports a variety of pluggable log sources. ■ Get logging working first and worry about all the flows later. ■ Saves hours in debugging time. ■ Supports Serilog, Nlog, Log4Net, Enterprise Library & Loupe. – Install requisite nuget package
  • 11. High levelView IdSrv Endpoints AssetsExternal Integration Application Services Repository Stores * Can customise * Can customise * Can customise * Can configure * Not applicable to all OAuth flows
  • 12. Customising Assets ■ Stylesheets ■ HtmlViews/Templates – Login/Logout form – Consent form – Permissions view – Error form ■ Loaded via DefaultViewService (implements IViewService) ■ Customise loading via custom IViewService implementation <Asset> <img src=“funny-cat.gif” /> </Asset>
  • 13. Configuring custom assets ■ Only the welcome page is not configurable (but is replaceable) – Can disable ■ Setup loading of custom partial views ■ Demo
  • 14. What about the data store? ■ EntityFramework 6 Nuget package ■ Fully customisable storage engine via custom interface implementation – TokenHandleStore, ConsentStore, ClientStore, etc… – TokenHandleService, ConsentService, ClientService ■ Should at least configure IUserStore, IClientStore, IScopeStore (mandatory). – AuthorizationCodeStore,TokenHandleStore, RefreshTokenStore, ConsentStore (mandatory for prod) ■ Demo with dapper
  • 15. Embedded IdentityServer with OpenId ■ IdentityServer to manage the authentication of users and token/cookies. ■ [Authorise] – just works [Authorize] public ActionResult Index() { ViewBag.Title = "Secured Page"; return View(); } ■ [ResourceAuthorize(“action”,”resource”)] – based on resource and action – Requires nuget package IdentityModel.Owin.ResourceAuthorization.Mvc ■ Demo
  • 16. It is not all unicorns and rainbows… ■ Integrating IdentityServer is far from simple. – In reality, it will take some time ■ Errors are not always obvious ■ Look to the samples.There are many. ■ Get used to reading the issue register and following threads. ■ Testing, particularlyAuthorization Code and hybrid flow can be tricky – Utilise this test harness/console app or write your own
  • 17. Takeaways and items to remember ■ Get logging working first. It will save you hours of debugging. ■ Download all the samples, and familiarise yourself with your specific scenarios. – Looking at alternate samples may only serve to confuse initially. – Lots of different ways to get going. ■ When looking at documentation, ensure you are looking at the latest. – Can easily be looking at older versions inadvertently. Much confusion. ■ Create a test harness, callback site, or something to assist testing and verifications
  • 18. Links and resources ■ Identity Server: https://identityserver.github.io/ ■ Demo code, DB scripts: https://github.com/glav/DDDSyd2016 ■ OAuth2: http://oauth.net/2/ ■ Auth0: https://auth0.com/ ■ WS02: http://wso2.com/ ■ Me: glav@theglavs.com and @glav
  • 19. 1-5 August DDD Sydney thanks our sponsors

Editor's Notes

  1. Mention Auth0 is viable alternative – however may not be as customisable as you want or you want all assets to remain inhouse/in prem Talk about saasu dev story – form WcfWebApi write own, to now with IdentityServer
  2. Show resource owner password grant via POSTMAN Also utilise refresh token via POSTMAN Ensure show use of ‘Authorization: Basic …..’ header Get access/refresh token, then just access token, use refresh token, also show Jwt vs ref tokens
  3. Mention can go from simple CSS changes, to custom template loading in static template dir, to asset loading in custom dir, to complete implementation of view loading service to do anything