SlideShare uma empresa Scribd logo
1 de 8
Microservice with OAuth2
VIQUAR KHAN
SAML vs OpenID vs OAuth
• SAML (Security Assertion Markup Language) is a standard that encompasses profiles, bindings and constructs to achieve
• Single Sign On (SSO),
• Federation and
• Identity Management.
• OpenID is an open standard sponsored by Facebook, Microsoft, Google, PayPal, Ping Identity, Symantec, and Yahoo. OpenID allows user to be
authenticated using a third-party services called identity providers. Users can choose to use their preferred OpenID providers to log in to websites that
accept the OpenID authentication scheme.
- OpenID and SAML2 are both based on the same concept of federated identity
• OAuth (Open Authorization) is a standard for authorization of resources. It does not deal with authentication.
SAML vs OpenID comparison
SAML2 supports single sign-out
OpenID does not supports single sign-out
SAML service providers are using with the SAML2 Identity Providers,
OpenID has a discovery protocol which dynamically discovers the corresponding OpenID Provider, once an OpenID is given. SAML has a discovery protocol based on Identity
Provider Discovery Service Protocol (OpenID relying parties are not coupled with OpenID Providers).
SAML the user is tightly coupled with SAML2 IdP ,SAML2 identifier is only valid for the SAML2 IdP.
OpenID, you own your identifier and you can map it to any OpenID Provider you wish.
SAML 2 is based on XML
OpenID is not based on Json
SAML can be either Service Provider (SP) initiated or Identity Provider (IdP) initiated.
OpenID always SP initiated.
SAML web profile for web Browser only
OpenID Both web browser and mobile
OAuth 2.0:
The OAuth 2.0 authorization framework enables a third-party application to obtain limited access to an HTTP service, either on behalf of a resource owner by
orchestrating an approval interaction between the resource owner and the HTTP service, or by allowing the third-party application to obtain access on its own
behalf. This specification replaces and obsoletes the OAuth 1.0 protocol described in RFC 5849.
Example :
Uber: https://developer.uber.com/docs/riders/guides/authentication/introduction
Facebook: https://developers.facebook.com/docs/facebook-login
OAuth2 continue..
• Oauth2 Roles
• Resource owner: An entity capable of granting access to a protected resource. when the resource owner is a person, it is referred to as an end-user.
• Resource server: The server hosting the protected resources, capable of accepting and responding to protected resource requests using access
tokens.
• Client: An application making protected resource requests on behalf of the resource owner and with its authorization. It could be a mobile app
asking your permission to access your Facebook feeds, a REST client trying to access REST API, a web site [Stack overflow e.g.] providing an
alternative login option using Facebook account.
• Authorization server: The server issuing access tokens to the client after successfully authenticating the resource owner and obtaining
authorization.
• OAuth different types of tokens.
• WS-Security tokens, especially SAML tokens
• JWT tokens
• Legacy tokens
• Custom tokens
Spring Boot with OAuth2 for consumer
• Spring Security OAuth provides support for using Spring Security with OAuth (1a) and OAuth2 using standard Spring Security programming
models and configuration idioms.
Features
• Support for OAuth providers and OAuth consumers
• Oauth 1(a) (including two-legged OAuth, a.k.a. "Signed Fetch")
• OAuth 2.0.
POC:
https://spring.io/guides/tutorials/spring-boot-oauth2/
https://github.com/dsyer/sparklr-boot
Pivotal Cloud Foundry-UAA for Service provider
• What is User Account and Authentication (UAA) Server
• The User Account and Authorization server
• UAA is as an OAuth2 provider
• Core component of Cloud Foundry, battle tested in production
• Apache 2 License, download the WAR and run it for free
• OAuth2 compliant, almost OpenID Connect compliant
• Supports /user info
• Multitenant
• Spring Security OAuth2 is based on UAA
• Spring Cloud Security is a great fit with UAA
• Because UAA produces JWT containing both scopes and identity
https://docs.pivotal.io/pivotalcf/1-10/concepts/architecture/uaa.html
References:
https://stackoverflow.com/questions/tagged/oauth
https://en.wikipedia.org/wiki/OAuth
https://oauth.net/2/
http://saml.xml.org/
http://openid.net/
https://spring.io/guides/tutorials/spring-boot-oauth2/
https://github.com/dsyer/sparklr-boot
https://content.pivotal.io/blog/how-to-integrate-an-application-with-cloud-foundry-using-oauth2

Mais conteúdo relacionado

Mais procurados

Single-Page-Application & REST security
Single-Page-Application & REST securitySingle-Page-Application & REST security
Single-Page-Application & REST security
Igor Bossenko
 
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Aaron Parecki
 

Mais procurados (20)

An Introduction to OAuth2
An Introduction to OAuth2An Introduction to OAuth2
An Introduction to OAuth2
 
Securing RESTful APIs using OAuth 2 and OpenID Connect
Securing RESTful APIs using OAuth 2 and OpenID ConnectSecuring RESTful APIs using OAuth 2 and OpenID Connect
Securing RESTful APIs using OAuth 2 and OpenID Connect
 
Single-Page-Application & REST security
Single-Page-Application & REST securitySingle-Page-Application & REST security
Single-Page-Application & REST security
 
OAuth2 - Introduction
OAuth2 - IntroductionOAuth2 - Introduction
OAuth2 - Introduction
 
OAuth 2.0 and Mobile Devices: Is that a token in your phone in your pocket or...
OAuth 2.0 and Mobile Devices: Is that a token in your phone in your pocket or...OAuth 2.0 and Mobile Devices: Is that a token in your phone in your pocket or...
OAuth 2.0 and Mobile Devices: Is that a token in your phone in your pocket or...
 
JavaOne 2014 - Securing RESTful Resources with OAuth2
JavaOne 2014 - Securing RESTful Resources with OAuth2JavaOne 2014 - Securing RESTful Resources with OAuth2
JavaOne 2014 - Securing RESTful Resources with OAuth2
 
OpenID vs OAuth - Identity on the Web
OpenID vs OAuth - Identity on the WebOpenID vs OAuth - Identity on the Web
OpenID vs OAuth - Identity on the Web
 
OAuth2 primer
OAuth2 primerOAuth2 primer
OAuth2 primer
 
Introduction to OAuth2.0
Introduction to OAuth2.0Introduction to OAuth2.0
Introduction to OAuth2.0
 
ConFoo 2015 - Securing RESTful resources with OAuth2
ConFoo 2015 - Securing RESTful resources with OAuth2ConFoo 2015 - Securing RESTful resources with OAuth2
ConFoo 2015 - Securing RESTful resources with OAuth2
 
OAuth 2.0 and OpenId Connect
OAuth 2.0 and OpenId ConnectOAuth 2.0 and OpenId Connect
OAuth 2.0 and OpenId Connect
 
OAuth2 & OpenID Connect
OAuth2 & OpenID ConnectOAuth2 & OpenID Connect
OAuth2 & OpenID Connect
 
An introduction to OAuth 2
An introduction to OAuth 2An introduction to OAuth 2
An introduction to OAuth 2
 
OAuth2 + API Security
OAuth2 + API SecurityOAuth2 + API Security
OAuth2 + API Security
 
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
 
CIS14: OAuth and OpenID Connect in Action
CIS14: OAuth and OpenID Connect in ActionCIS14: OAuth and OpenID Connect in Action
CIS14: OAuth and OpenID Connect in Action
 
Openid & Oauth: An Introduction
Openid & Oauth: An IntroductionOpenid & Oauth: An Introduction
Openid & Oauth: An Introduction
 
OAuth 2.0
OAuth 2.0OAuth 2.0
OAuth 2.0
 
Intro to API Security with Oauth 2.0
Intro to API Security with Oauth 2.0Intro to API Security with Oauth 2.0
Intro to API Security with Oauth 2.0
 
Demystifying OAuth 2.0
Demystifying OAuth 2.0Demystifying OAuth 2.0
Demystifying OAuth 2.0
 

Semelhante a Microservice with OAuth2

GSoC Mideterm-OAuth2 Module
GSoC Mideterm-OAuth2 ModuleGSoC Mideterm-OAuth2 Module
GSoC Mideterm-OAuth2 Module
Mayank Sharma
 
Oauth2 and OWSM OAuth2 support
Oauth2 and OWSM OAuth2 supportOauth2 and OWSM OAuth2 support
Oauth2 and OWSM OAuth2 support
Gaurav Sharma
 
Saml vs Oauth : Which one should I use?
Saml vs Oauth : Which one should I use?Saml vs Oauth : Which one should I use?
Saml vs Oauth : Which one should I use?
Anil Saldanha
 
Introduction to OAuth
Introduction to OAuthIntroduction to OAuth
Introduction to OAuth
Wei-Tsung Su
 

Semelhante a Microservice with OAuth2 (20)

OAuth 2.0 and OpenID Connect
OAuth 2.0 and OpenID ConnectOAuth 2.0 and OpenID Connect
OAuth 2.0 and OpenID Connect
 
GSoC Mideterm-OAuth2 Module
GSoC Mideterm-OAuth2 ModuleGSoC Mideterm-OAuth2 Module
GSoC Mideterm-OAuth2 Module
 
Demystifying SAML 2.0,Oauth 2.0, OpenID Connect
Demystifying SAML 2.0,Oauth 2.0, OpenID ConnectDemystifying SAML 2.0,Oauth 2.0, OpenID Connect
Demystifying SAML 2.0,Oauth 2.0, OpenID Connect
 
Oauth2 and OWSM OAuth2 support
Oauth2 and OWSM OAuth2 supportOauth2 and OWSM OAuth2 support
Oauth2 and OWSM OAuth2 support
 
OAuth2 Introduction
OAuth2 IntroductionOAuth2 Introduction
OAuth2 Introduction
 
OAuth2.0
OAuth2.0OAuth2.0
OAuth2.0
 
OAuth 2.0 - The fundamentals, the good , the bad, technical primer and commo...
OAuth 2.0  - The fundamentals, the good , the bad, technical primer and commo...OAuth 2.0  - The fundamentals, the good , the bad, technical primer and commo...
OAuth 2.0 - The fundamentals, the good , the bad, technical primer and commo...
 
OAuth with Salesforce - Demystified
OAuth with Salesforce - DemystifiedOAuth with Salesforce - Demystified
OAuth with Salesforce - Demystified
 
OAuth
OAuthOAuth
OAuth
 
Oauth2.0
Oauth2.0Oauth2.0
Oauth2.0
 
Saml vs Oauth : Which one should I use?
Saml vs Oauth : Which one should I use?Saml vs Oauth : Which one should I use?
Saml vs Oauth : Which one should I use?
 
.NET Core, ASP.NET Core Course, Session 19
 .NET Core, ASP.NET Core Course, Session 19 .NET Core, ASP.NET Core Course, Session 19
.NET Core, ASP.NET Core Course, Session 19
 
Intro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID ConnectIntro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID Connect
 
Introduction to OAuth
Introduction to OAuthIntroduction to OAuth
Introduction to OAuth
 
Implementing Microservices Security Patterns & Protocols with Spring
Implementing Microservices Security Patterns & Protocols with SpringImplementing Microservices Security Patterns & Protocols with Spring
Implementing Microservices Security Patterns & Protocols with Spring
 
OpenID Connect Explained
OpenID Connect ExplainedOpenID Connect Explained
OpenID Connect Explained
 
Web API 2 Token Based Authentication
Web API 2 Token Based AuthenticationWeb API 2 Token Based Authentication
Web API 2 Token Based Authentication
 
SAML VS OAuth 2.0 VS OpenID Connect
SAML VS OAuth 2.0 VS OpenID ConnectSAML VS OAuth 2.0 VS OpenID Connect
SAML VS OAuth 2.0 VS OpenID Connect
 
Ladies Be Architects - Study Group III: OAuth 2.0 (Ep 1)
Ladies Be Architects - Study Group III: OAuth 2.0 (Ep 1)Ladies Be Architects - Study Group III: OAuth 2.0 (Ep 1)
Ladies Be Architects - Study Group III: OAuth 2.0 (Ep 1)
 
API Security with OAuth2.0.
API Security with OAuth2.0.API Security with OAuth2.0.
API Security with OAuth2.0.
 

Mais de ◄ vaquar khan ► ★✔ (11)

Cloud native-microservices
Cloud native-microservicesCloud native-microservices
Cloud native-microservices
 
vaquarkhan-jitterbit
vaquarkhan-jitterbitvaquarkhan-jitterbit
vaquarkhan-jitterbit
 
RDBMS concepts
RDBMS conceptsRDBMS concepts
RDBMS concepts
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Uml & rup
Uml & rupUml & rup
Uml & rup
 
Differences between JMS and AMQP
Differences between JMS and AMQPDifferences between JMS and AMQP
Differences between JMS and AMQP
 
Rest overview briefing
Rest  overview briefingRest  overview briefing
Rest overview briefing
 
WhatsNewInJMS21
WhatsNewInJMS21WhatsNewInJMS21
WhatsNewInJMS21
 
1210cope
1210cope1210cope
1210cope
 
sr477
sr477sr477
sr477
 
Dye and Yielding Plants M.P. Dr. Azra khan PH.D. Research Paper
Dye and Yielding Plants M.P. Dr. Azra khan PH.D. Research  Paper Dye and Yielding Plants M.P. Dr. Azra khan PH.D. Research  Paper
Dye and Yielding Plants M.P. Dr. Azra khan PH.D. Research Paper
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Microservice with OAuth2

  • 2. SAML vs OpenID vs OAuth • SAML (Security Assertion Markup Language) is a standard that encompasses profiles, bindings and constructs to achieve • Single Sign On (SSO), • Federation and • Identity Management. • OpenID is an open standard sponsored by Facebook, Microsoft, Google, PayPal, Ping Identity, Symantec, and Yahoo. OpenID allows user to be authenticated using a third-party services called identity providers. Users can choose to use their preferred OpenID providers to log in to websites that accept the OpenID authentication scheme. - OpenID and SAML2 are both based on the same concept of federated identity • OAuth (Open Authorization) is a standard for authorization of resources. It does not deal with authentication.
  • 3. SAML vs OpenID comparison SAML2 supports single sign-out OpenID does not supports single sign-out SAML service providers are using with the SAML2 Identity Providers, OpenID has a discovery protocol which dynamically discovers the corresponding OpenID Provider, once an OpenID is given. SAML has a discovery protocol based on Identity Provider Discovery Service Protocol (OpenID relying parties are not coupled with OpenID Providers). SAML the user is tightly coupled with SAML2 IdP ,SAML2 identifier is only valid for the SAML2 IdP. OpenID, you own your identifier and you can map it to any OpenID Provider you wish. SAML 2 is based on XML OpenID is not based on Json SAML can be either Service Provider (SP) initiated or Identity Provider (IdP) initiated. OpenID always SP initiated. SAML web profile for web Browser only OpenID Both web browser and mobile
  • 4. OAuth 2.0: The OAuth 2.0 authorization framework enables a third-party application to obtain limited access to an HTTP service, either on behalf of a resource owner by orchestrating an approval interaction between the resource owner and the HTTP service, or by allowing the third-party application to obtain access on its own behalf. This specification replaces and obsoletes the OAuth 1.0 protocol described in RFC 5849. Example : Uber: https://developer.uber.com/docs/riders/guides/authentication/introduction Facebook: https://developers.facebook.com/docs/facebook-login
  • 5. OAuth2 continue.. • Oauth2 Roles • Resource owner: An entity capable of granting access to a protected resource. when the resource owner is a person, it is referred to as an end-user. • Resource server: The server hosting the protected resources, capable of accepting and responding to protected resource requests using access tokens. • Client: An application making protected resource requests on behalf of the resource owner and with its authorization. It could be a mobile app asking your permission to access your Facebook feeds, a REST client trying to access REST API, a web site [Stack overflow e.g.] providing an alternative login option using Facebook account. • Authorization server: The server issuing access tokens to the client after successfully authenticating the resource owner and obtaining authorization. • OAuth different types of tokens. • WS-Security tokens, especially SAML tokens • JWT tokens • Legacy tokens • Custom tokens
  • 6. Spring Boot with OAuth2 for consumer • Spring Security OAuth provides support for using Spring Security with OAuth (1a) and OAuth2 using standard Spring Security programming models and configuration idioms. Features • Support for OAuth providers and OAuth consumers • Oauth 1(a) (including two-legged OAuth, a.k.a. "Signed Fetch") • OAuth 2.0. POC: https://spring.io/guides/tutorials/spring-boot-oauth2/ https://github.com/dsyer/sparklr-boot
  • 7. Pivotal Cloud Foundry-UAA for Service provider • What is User Account and Authentication (UAA) Server • The User Account and Authorization server • UAA is as an OAuth2 provider • Core component of Cloud Foundry, battle tested in production • Apache 2 License, download the WAR and run it for free • OAuth2 compliant, almost OpenID Connect compliant • Supports /user info • Multitenant • Spring Security OAuth2 is based on UAA • Spring Cloud Security is a great fit with UAA • Because UAA produces JWT containing both scopes and identity https://docs.pivotal.io/pivotalcf/1-10/concepts/architecture/uaa.html