SlideShare a Scribd company logo
1 of 38
Download to read offline
‹#›© 2016 Pivotal Software, Inc. All rights reserved. ‹#›© 2016 Pivotal Software, Inc. All rights reserved.
From Zero to Hero with
REST and OAuth2
Toshiaki Maki (@making)
JJUG Night Seminar June 2016
2016-06-27
© 2016 Pivotal Software, Inc. All rights reserved.
Who am I ?
• Toshiaki Maki (@making)
• Sr. Solutions Architect
• Spring Framework enthusiast
Perfect
Java EE
(Coming Soon)
bit.ly/spring-book
© 2016 Pivotal Software, Inc. All rights reserved.
Spring Boot
© 2016 Pivotal Software, Inc. All rights reserved.
Spring Initializr https://start.spring.io/
© 2016 Pivotal Software, Inc. All rights reserved.
Spring Initializr https://start.spring.io/
© 2016 Pivotal Software, Inc. All rights reserved.
Spring Initializr https://start.spring.io/
© 2016 Pivotal Software, Inc. All rights reserved.
Spring Initializr https://start.spring.io/
© 2016 Pivotal Software, Inc. All rights reserved.
Today's topic
Web UI
Resource
Server
Resource
Server
Resource
Server
© 2016 Pivotal Software, Inc. All rights reserved.
Today's topic
Web UI
Resource
Server
Resource
Server
Resource
Server
🔐
🔐
🔐
© 2016 Pivotal Software, Inc. All rights reserved.
Today's topic
Web UI
Resource
Server
Resource
Server
Resource
Server
🔐
🔐
🔐
❓
© 2016 Pivotal Software, Inc. All rights reserved.
Today's topic
Web UI
Resource
Server
Resource
Server
Resource
Server
🔐
🔐
🔐
❓❓
• Basic
• OAuth2
• Spring Session
• SAML
© 2016 Pivotal Software, Inc. All rights reserved.
Today's topic
Web UI
Resource
Server
Resource
Server
Resource
Server
🔐
🔐
🔐
❓❓
• Basic
• OAuth2
• Spring Session
• SAML
👈
© 2016 Pivotal Software, Inc. All rights reserved.
Today's topic
Authorization
Server
Web UI
Resource
Server
OAuth2
REST API +
Access Token +
SSO
© 2016 Pivotal Software, Inc. All rights reserved.
Live Coding!!
• Spring Data REST
• Spring Security OAuth2
• @EnableAuthorizationServer
• @EnableResourceServer
• @EnableOAuth2Sso
• JWT
• Zuul Integration
‹#›© 2016 Pivotal Software, Inc. All rights reserved.
OAuth2
© 2016 Pivotal Software, Inc. All rights reserved.
OAuth2 - Terminologies
•Resource Owner
•Client
•Authorization Server
•Resource Server
© 2016 Pivotal Software, Inc. All rights reserved.
Authorization
Server
CUI
Resource
Server
Resource Owner Password Credentials
(grant_type=password)
© 2016 Pivotal Software, Inc. All rights reserved.
Authorization
Server
CUI
Resource
Server
username & password
Resource Owner Password Credentials
(grant_type=password)
© 2016 Pivotal Software, Inc. All rights reserved.
Authorization
Server
CUI
Resource
Server
username & password
token
Resource Owner Password Credentials
(grant_type=password)
© 2016 Pivotal Software, Inc. All rights reserved.
Authorization
Server
CUI
Resource
Server
username & password
token
token
Resource Owner Password Credentials
(grant_type=password)
© 2016 Pivotal Software, Inc. All rights reserved.
Authorization
Server
CUI
Resource
Server
username & password
token
token
response
Resource Owner Password Credentials
(grant_type=password)
© 2016 Pivotal Software, Inc. All rights reserved.
Authorization Code
(grant_type=authorization_code)
Authorization
Server
Web UI
Resource
Server
© 2016 Pivotal Software, Inc. All rights reserved.
Authorization Code
(grant_type=authorization_code)
Authorization
Server
Web UI
Resource
Server
authorize
© 2016 Pivotal Software, Inc. All rights reserved.
Authorization Code
(grant_type=authorization_code)
Authorization
Server
Web UI
Resource
Server
authorize
redirect
© 2016 Pivotal Software, Inc. All rights reserved.
Authorization Code
(grant_type=authorization_code)
Authorization
Server
Web UI
Resource
Server
authorize
redirect
code
© 2016 Pivotal Software, Inc. All rights reserved.
Authorization Code
(grant_type=authorization_code)
Authorization
Server
Web UI
Resource
Server
authorize
redirect
code
code
© 2016 Pivotal Software, Inc. All rights reserved.
Authorization Code
(grant_type=authorization_code)
Authorization
Server
Web UI
Resource
Server
authorize
redirect
code
code
token
© 2016 Pivotal Software, Inc. All rights reserved.
Authorization Code
(grant_type=authorization_code)
Authorization
Server
Web UI
Resource
Server
authorize
redirect
code
code
token
token
© 2016 Pivotal Software, Inc. All rights reserved.
Authorization Code
(grant_type=authorization_code)
Authorization
Server
Web UI
Resource
Server
authorize
redirect
code
code
token
token
response
© 2016 Pivotal Software, Inc. All rights reserved.
Authorization
Server
Web UI
Resource
Server
OAuth2
REST API +
Access Token
© 2016 Pivotal Software, Inc. All rights reserved.
Authorization
Server
Web UI
Resource
Server
OAuth2
REST API +
Access Token
userinfo
© 2016 Pivotal Software, Inc. All rights reserved.
Authorization
Server
Web UI
Resource
Server
OAuth2
REST API +
Access Token
userinfo
every time
© 2016 Pivotal Software, Inc. All rights reserved.
JWT
Authorization
Server
Web UI
Resource
Server
OAuth2
REST API +
Access Token (JWT)
© 2016 Pivotal Software, Inc. All rights reserved.
JWT
Authorization
Server
Web UI
Resource
Server
OAuth2
REST API +
Access Token (JWT)
token_key
© 2016 Pivotal Software, Inc. All rights reserved.
JWT
Authorization
Server
Web UI
Resource
Server
OAuth2
REST API +
Access Token (JWT)
token_key
at startup
© 2016 Pivotal Software, Inc. All rights reserved.
JWT
Authorization
Server
Web UI
Resource
Server
OAuth2
REST API +
Access Token (JWT)
token_key
at startup
Verify token
© 2016 Pivotal Software, Inc. All rights reserved.
Links
• https://github.com/Pivotal-Japan/from-zero-to-hero-with-rest-
and-oauth2
• http://www.slideshare.net/WillTran1/securing-microservices-
with-spring-cloud-security
© 2016 Pivotal Software, Inc. All rights reserved.
Announce
• Josh Long(@starbuxman) comes to Tokyo on July 6th !!
https://jsug.doorkeeper.jp/events/47900

More Related Content

What's hot

Spring Framework 5.0による Reactive Web Application #JavaDayTokyo
Spring Framework 5.0による Reactive Web Application #JavaDayTokyoSpring Framework 5.0による Reactive Web Application #JavaDayTokyo
Spring Framework 5.0による Reactive Web Application #JavaDayTokyoToshiaki Maki
 
Event Driven Microservices with Spring Cloud Stream #jjug_ccc #ccc_ab3
Event Driven Microservices with Spring Cloud Stream #jjug_ccc #ccc_ab3Event Driven Microservices with Spring Cloud Stream #jjug_ccc #ccc_ab3
Event Driven Microservices with Spring Cloud Stream #jjug_ccc #ccc_ab3Toshiaki Maki
 
マイクロサービスに必要な技術要素はすべてSpring Cloudにある #DO07
マイクロサービスに必要な技術要素はすべてSpring Cloudにある #DO07マイクロサービスに必要な技術要素はすべてSpring Cloudにある #DO07
マイクロサービスに必要な技術要素はすべてSpring Cloudにある #DO07Toshiaki Maki
 
Data Microservices with Spring Cloud Stream, Task, and Data Flow #jsug #spri...
Data Microservices with Spring Cloud Stream, Task,  and Data Flow #jsug #spri...Data Microservices with Spring Cloud Stream, Task,  and Data Flow #jsug #spri...
Data Microservices with Spring Cloud Stream, Task, and Data Flow #jsug #spri...Toshiaki Maki
 
Why PCF is the best platform for Spring Boot
Why PCF is the best platform for Spring BootWhy PCF is the best platform for Spring Boot
Why PCF is the best platform for Spring BootToshiaki Maki
 
Microservices with Spring and Cloud Foundry
Microservices with Spring and Cloud FoundryMicroservices with Spring and Cloud Foundry
Microservices with Spring and Cloud FoundryAlain Sahli
 
From Spring Boot 2.2 to Spring Boot 2.3 #jsug
From Spring Boot 2.2 to Spring Boot 2.3 #jsugFrom Spring Boot 2.2 to Spring Boot 2.3 #jsug
From Spring Boot 2.2 to Spring Boot 2.3 #jsugToshiaki Maki
 
Short Lived Tasks in Cloud Foundry #cfdtokyo
Short Lived Tasks in Cloud Foundry #cfdtokyoShort Lived Tasks in Cloud Foundry #cfdtokyo
Short Lived Tasks in Cloud Foundry #cfdtokyoToshiaki Maki
 
#jjug_ccc #ccc_gh5 What's new in Spring Framework 4.3 / Boot 1.4 + Pivotal's ...
#jjug_ccc #ccc_gh5 What's new in Spring Framework 4.3 / Boot 1.4 + Pivotal's ...#jjug_ccc #ccc_gh5 What's new in Spring Framework 4.3 / Boot 1.4 + Pivotal's ...
#jjug_ccc #ccc_gh5 What's new in Spring Framework 4.3 / Boot 1.4 + Pivotal's ...Toshiaki Maki
 
Spring Cloud Stream with Kafka
Spring Cloud Stream with KafkaSpring Cloud Stream with Kafka
Spring Cloud Stream with KafkaDavid Kiss
 
Serverless with Spring Cloud Function, Knative and riff #SpringOneTour #s1t
Serverless with Spring Cloud Function, Knative and riff #SpringOneTour #s1tServerless with Spring Cloud Function, Knative and riff #SpringOneTour #s1t
Serverless with Spring Cloud Function, Knative and riff #SpringOneTour #s1tToshiaki Maki
 
Spring Cloud Netflixを使おう #jsug
Spring Cloud Netflixを使おう #jsugSpring Cloud Netflixを使おう #jsug
Spring Cloud Netflixを使おう #jsugToshiaki Maki
 
Introduction to Spring WebFlux #jsug #sf_a1
Introduction to Spring WebFlux #jsug #sf_a1Introduction to Spring WebFlux #jsug #sf_a1
Introduction to Spring WebFlux #jsug #sf_a1Toshiaki Maki
 
Spring5 New Features - Nov, 2017
Spring5 New Features - Nov, 2017Spring5 New Features - Nov, 2017
Spring5 New Features - Nov, 2017VMware Tanzu Korea
 
Implement Service Broker with Spring Boot #cf_tokyo
Implement Service Broker with Spring Boot #cf_tokyoImplement Service Broker with Spring Boot #cf_tokyo
Implement Service Broker with Spring Boot #cf_tokyoToshiaki Maki
 
Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019
Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019
Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019Matt Raible
 
Core Spring + Reactive 김민석
Core Spring + Reactive  김민석Core Spring + Reactive  김민석
Core Spring + Reactive 김민석VMware Tanzu Korea
 
Spring & messaging
Spring & messagingSpring & messaging
Spring & messagingArtem Bilan
 
Spring Boot & Actuators
Spring Boot & ActuatorsSpring Boot & Actuators
Spring Boot & ActuatorsVMware Tanzu
 
4Developers 2015: Do you think you're doing microservice architecture? - Marc...
4Developers 2015: Do you think you're doing microservice architecture? - Marc...4Developers 2015: Do you think you're doing microservice architecture? - Marc...
4Developers 2015: Do you think you're doing microservice architecture? - Marc...PROIDEA
 

What's hot (20)

Spring Framework 5.0による Reactive Web Application #JavaDayTokyo
Spring Framework 5.0による Reactive Web Application #JavaDayTokyoSpring Framework 5.0による Reactive Web Application #JavaDayTokyo
Spring Framework 5.0による Reactive Web Application #JavaDayTokyo
 
Event Driven Microservices with Spring Cloud Stream #jjug_ccc #ccc_ab3
Event Driven Microservices with Spring Cloud Stream #jjug_ccc #ccc_ab3Event Driven Microservices with Spring Cloud Stream #jjug_ccc #ccc_ab3
Event Driven Microservices with Spring Cloud Stream #jjug_ccc #ccc_ab3
 
マイクロサービスに必要な技術要素はすべてSpring Cloudにある #DO07
マイクロサービスに必要な技術要素はすべてSpring Cloudにある #DO07マイクロサービスに必要な技術要素はすべてSpring Cloudにある #DO07
マイクロサービスに必要な技術要素はすべてSpring Cloudにある #DO07
 
Data Microservices with Spring Cloud Stream, Task, and Data Flow #jsug #spri...
Data Microservices with Spring Cloud Stream, Task,  and Data Flow #jsug #spri...Data Microservices with Spring Cloud Stream, Task,  and Data Flow #jsug #spri...
Data Microservices with Spring Cloud Stream, Task, and Data Flow #jsug #spri...
 
Why PCF is the best platform for Spring Boot
Why PCF is the best platform for Spring BootWhy PCF is the best platform for Spring Boot
Why PCF is the best platform for Spring Boot
 
Microservices with Spring and Cloud Foundry
Microservices with Spring and Cloud FoundryMicroservices with Spring and Cloud Foundry
Microservices with Spring and Cloud Foundry
 
From Spring Boot 2.2 to Spring Boot 2.3 #jsug
From Spring Boot 2.2 to Spring Boot 2.3 #jsugFrom Spring Boot 2.2 to Spring Boot 2.3 #jsug
From Spring Boot 2.2 to Spring Boot 2.3 #jsug
 
Short Lived Tasks in Cloud Foundry #cfdtokyo
Short Lived Tasks in Cloud Foundry #cfdtokyoShort Lived Tasks in Cloud Foundry #cfdtokyo
Short Lived Tasks in Cloud Foundry #cfdtokyo
 
#jjug_ccc #ccc_gh5 What's new in Spring Framework 4.3 / Boot 1.4 + Pivotal's ...
#jjug_ccc #ccc_gh5 What's new in Spring Framework 4.3 / Boot 1.4 + Pivotal's ...#jjug_ccc #ccc_gh5 What's new in Spring Framework 4.3 / Boot 1.4 + Pivotal's ...
#jjug_ccc #ccc_gh5 What's new in Spring Framework 4.3 / Boot 1.4 + Pivotal's ...
 
Spring Cloud Stream with Kafka
Spring Cloud Stream with KafkaSpring Cloud Stream with Kafka
Spring Cloud Stream with Kafka
 
Serverless with Spring Cloud Function, Knative and riff #SpringOneTour #s1t
Serverless with Spring Cloud Function, Knative and riff #SpringOneTour #s1tServerless with Spring Cloud Function, Knative and riff #SpringOneTour #s1t
Serverless with Spring Cloud Function, Knative and riff #SpringOneTour #s1t
 
Spring Cloud Netflixを使おう #jsug
Spring Cloud Netflixを使おう #jsugSpring Cloud Netflixを使おう #jsug
Spring Cloud Netflixを使おう #jsug
 
Introduction to Spring WebFlux #jsug #sf_a1
Introduction to Spring WebFlux #jsug #sf_a1Introduction to Spring WebFlux #jsug #sf_a1
Introduction to Spring WebFlux #jsug #sf_a1
 
Spring5 New Features - Nov, 2017
Spring5 New Features - Nov, 2017Spring5 New Features - Nov, 2017
Spring5 New Features - Nov, 2017
 
Implement Service Broker with Spring Boot #cf_tokyo
Implement Service Broker with Spring Boot #cf_tokyoImplement Service Broker with Spring Boot #cf_tokyo
Implement Service Broker with Spring Boot #cf_tokyo
 
Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019
Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019
Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019
 
Core Spring + Reactive 김민석
Core Spring + Reactive  김민석Core Spring + Reactive  김민석
Core Spring + Reactive 김민석
 
Spring & messaging
Spring & messagingSpring & messaging
Spring & messaging
 
Spring Boot & Actuators
Spring Boot & ActuatorsSpring Boot & Actuators
Spring Boot & Actuators
 
4Developers 2015: Do you think you're doing microservice architecture? - Marc...
4Developers 2015: Do you think you're doing microservice architecture? - Marc...4Developers 2015: Do you think you're doing microservice architecture? - Marc...
4Developers 2015: Do you think you're doing microservice architecture? - Marc...
 

Similar to From Zero to Hero with REST and OAuth2 #jjug

A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer ToolsA Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer ToolsAmazon Web Services
 
今すぐ始めるCloud Foundry #hackt #hackt_k
今すぐ始めるCloud Foundry #hackt #hackt_k今すぐ始めるCloud Foundry #hackt #hackt_k
今すぐ始めるCloud Foundry #hackt #hackt_kToshiaki Maki
 
The Business Value for Internal APIs in the Enterprise
The Business Value for Internal APIs in the EnterpriseThe Business Value for Internal APIs in the Enterprise
The Business Value for Internal APIs in the EnterpriseAkana
 
The Business Value for Internal APIs in the Enterprise
The Business Value for Internal APIs in the EnterpriseThe Business Value for Internal APIs in the Enterprise
The Business Value for Internal APIs in the EnterpriseAkana
 
Continuous Delivery for Microservice Architectures with Concourse & Cloud Fou...
Continuous Delivery for Microservice Architectures with Concourse & Cloud Fou...Continuous Delivery for Microservice Architectures with Concourse & Cloud Fou...
Continuous Delivery for Microservice Architectures with Concourse & Cloud Fou...VMware Tanzu
 
SpringOnePlatform2017 recap
SpringOnePlatform2017 recapSpringOnePlatform2017 recap
SpringOnePlatform2017 recapminseok kim
 
Deep-Dive: Developing Mobile Web Applications with AWS
Deep-Dive: Developing Mobile Web Applications with AWSDeep-Dive: Developing Mobile Web Applications with AWS
Deep-Dive: Developing Mobile Web Applications with AWSAmazon Web Services
 
Debugging Modern Applications: Introduction to AWS X-Ray
Debugging Modern Applications: Introduction to AWS X-RayDebugging Modern Applications: Introduction to AWS X-Ray
Debugging Modern Applications: Introduction to AWS X-RayAmazon Web Services
 
Identity Management: Using OIDC to Empower the Next-Generation Apps
Identity Management: Using OIDC to Empower the Next-Generation AppsIdentity Management: Using OIDC to Empower the Next-Generation Apps
Identity Management: Using OIDC to Empower the Next-Generation AppsTom Freestone
 
Powering Internal API Communities
Powering Internal API CommunitiesPowering Internal API Communities
Powering Internal API CommunitiesAkana
 
Powering Internal API Communities
Powering Internal API CommunitiesPowering Internal API Communities
Powering Internal API CommunitiesAkana
 
Shifting left: Continuous testing for better app quality and security
Shifting left: Continuous testing for better app quality and securityShifting left: Continuous testing for better app quality and security
Shifting left: Continuous testing for better app quality and securityNowSecure
 
Introduction and Overview of Mobile App and Web App Development with AWS
Introduction and Overview of Mobile App and Web App Development with AWSIntroduction and Overview of Mobile App and Web App Development with AWS
Introduction and Overview of Mobile App and Web App Development with AWSAmazon Web Services
 
Vizag Virtual Meetup #7: Trending API Topics for 2022
Vizag Virtual Meetup #7: Trending API Topics for 2022Vizag Virtual Meetup #7: Trending API Topics for 2022
Vizag Virtual Meetup #7: Trending API Topics for 2022Ravi Tamada
 
Introduction to GCP (Google Cloud Platform)
Introduction to GCP (Google Cloud Platform)Introduction to GCP (Google Cloud Platform)
Introduction to GCP (Google Cloud Platform)Pulkit Gupta
 
In the workshop with GCP, Home Depot & Cloud Foundry
In the workshop with GCP, Home Depot & Cloud FoundryIn the workshop with GCP, Home Depot & Cloud Foundry
In the workshop with GCP, Home Depot & Cloud FoundryChristopher Grant
 
Enterprise API Adoption Patterns
Enterprise API Adoption PatternsEnterprise API Adoption Patterns
Enterprise API Adoption PatternsAkana
 
Enterprise API Adoption Patterns
Enterprise API Adoption PatternsEnterprise API Adoption Patterns
Enterprise API Adoption PatternsAkana
 
OAuth 2.0 and the Internet of Things (IoT) (Jacob Ideskog)
OAuth 2.0 and the Internet of Things (IoT) (Jacob Ideskog)OAuth 2.0 and the Internet of Things (IoT) (Jacob Ideskog)
OAuth 2.0 and the Internet of Things (IoT) (Jacob Ideskog)Nordic APIs
 

Similar to From Zero to Hero with REST and OAuth2 #jjug (20)

A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer ToolsA Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
 
今すぐ始めるCloud Foundry #hackt #hackt_k
今すぐ始めるCloud Foundry #hackt #hackt_k今すぐ始めるCloud Foundry #hackt #hackt_k
今すぐ始めるCloud Foundry #hackt #hackt_k
 
Building Web Apps & APIs With Node JS
Building Web Apps & APIs With Node JSBuilding Web Apps & APIs With Node JS
Building Web Apps & APIs With Node JS
 
The Business Value for Internal APIs in the Enterprise
The Business Value for Internal APIs in the EnterpriseThe Business Value for Internal APIs in the Enterprise
The Business Value for Internal APIs in the Enterprise
 
The Business Value for Internal APIs in the Enterprise
The Business Value for Internal APIs in the EnterpriseThe Business Value for Internal APIs in the Enterprise
The Business Value for Internal APIs in the Enterprise
 
Continuous Delivery for Microservice Architectures with Concourse & Cloud Fou...
Continuous Delivery for Microservice Architectures with Concourse & Cloud Fou...Continuous Delivery for Microservice Architectures with Concourse & Cloud Fou...
Continuous Delivery for Microservice Architectures with Concourse & Cloud Fou...
 
SpringOnePlatform2017 recap
SpringOnePlatform2017 recapSpringOnePlatform2017 recap
SpringOnePlatform2017 recap
 
Deep-Dive: Developing Mobile Web Applications with AWS
Deep-Dive: Developing Mobile Web Applications with AWSDeep-Dive: Developing Mobile Web Applications with AWS
Deep-Dive: Developing Mobile Web Applications with AWS
 
Debugging Modern Applications: Introduction to AWS X-Ray
Debugging Modern Applications: Introduction to AWS X-RayDebugging Modern Applications: Introduction to AWS X-Ray
Debugging Modern Applications: Introduction to AWS X-Ray
 
Identity Management: Using OIDC to Empower the Next-Generation Apps
Identity Management: Using OIDC to Empower the Next-Generation AppsIdentity Management: Using OIDC to Empower the Next-Generation Apps
Identity Management: Using OIDC to Empower the Next-Generation Apps
 
Powering Internal API Communities
Powering Internal API CommunitiesPowering Internal API Communities
Powering Internal API Communities
 
Powering Internal API Communities
Powering Internal API CommunitiesPowering Internal API Communities
Powering Internal API Communities
 
Shifting left: Continuous testing for better app quality and security
Shifting left: Continuous testing for better app quality and securityShifting left: Continuous testing for better app quality and security
Shifting left: Continuous testing for better app quality and security
 
Introduction and Overview of Mobile App and Web App Development with AWS
Introduction and Overview of Mobile App and Web App Development with AWSIntroduction and Overview of Mobile App and Web App Development with AWS
Introduction and Overview of Mobile App and Web App Development with AWS
 
Vizag Virtual Meetup #7: Trending API Topics for 2022
Vizag Virtual Meetup #7: Trending API Topics for 2022Vizag Virtual Meetup #7: Trending API Topics for 2022
Vizag Virtual Meetup #7: Trending API Topics for 2022
 
Introduction to GCP (Google Cloud Platform)
Introduction to GCP (Google Cloud Platform)Introduction to GCP (Google Cloud Platform)
Introduction to GCP (Google Cloud Platform)
 
In the workshop with GCP, Home Depot & Cloud Foundry
In the workshop with GCP, Home Depot & Cloud FoundryIn the workshop with GCP, Home Depot & Cloud Foundry
In the workshop with GCP, Home Depot & Cloud Foundry
 
Enterprise API Adoption Patterns
Enterprise API Adoption PatternsEnterprise API Adoption Patterns
Enterprise API Adoption Patterns
 
Enterprise API Adoption Patterns
Enterprise API Adoption PatternsEnterprise API Adoption Patterns
Enterprise API Adoption Patterns
 
OAuth 2.0 and the Internet of Things (IoT) (Jacob Ideskog)
OAuth 2.0 and the Internet of Things (IoT) (Jacob Ideskog)OAuth 2.0 and the Internet of Things (IoT) (Jacob Ideskog)
OAuth 2.0 and the Internet of Things (IoT) (Jacob Ideskog)
 

More from Toshiaki Maki

決済システムの内製化への旅 - SpringとPCFで作るクラウドネイティブなシステム開発 #jsug #sf_h1
決済システムの内製化への旅 - SpringとPCFで作るクラウドネイティブなシステム開発 #jsug #sf_h1決済システムの内製化への旅 - SpringとPCFで作るクラウドネイティブなシステム開発 #jsug #sf_h1
決済システムの内製化への旅 - SpringとPCFで作るクラウドネイティブなシステム開発 #jsug #sf_h1Toshiaki Maki
 
Spring Boot Actuator 2.0 & Micrometer #jjug_ccc #ccc_a1
Spring Boot Actuator 2.0 & Micrometer #jjug_ccc #ccc_a1Spring Boot Actuator 2.0 & Micrometer #jjug_ccc #ccc_a1
Spring Boot Actuator 2.0 & Micrometer #jjug_ccc #ccc_a1Toshiaki Maki
 
Spring Boot Actuator 2.0 & Micrometer
Spring Boot Actuator 2.0 & MicrometerSpring Boot Actuator 2.0 & Micrometer
Spring Boot Actuator 2.0 & MicrometerToshiaki Maki
 
Open Service Broker APIとKubernetes Service Catalog #k8sjp
Open Service Broker APIとKubernetes Service Catalog #k8sjpOpen Service Broker APIとKubernetes Service Catalog #k8sjp
Open Service Broker APIとKubernetes Service Catalog #k8sjpToshiaki Maki
 
BOSH / CF Deployment in modern ways #cf_tokyo
BOSH / CF Deployment in modern ways #cf_tokyoBOSH / CF Deployment in modern ways #cf_tokyo
BOSH / CF Deployment in modern ways #cf_tokyoToshiaki Maki
 
Zipkin Components #zipkin_jp
Zipkin Components #zipkin_jpZipkin Components #zipkin_jp
Zipkin Components #zipkin_jpToshiaki Maki
 
Consumer Driven Contractsで REST API/マイクロサービスをテスト #m3tech
Consumer Driven Contractsで REST API/マイクロサービスをテスト #m3techConsumer Driven Contractsで REST API/マイクロサービスをテスト #m3tech
Consumer Driven Contractsで REST API/マイクロサービスをテスト #m3techToshiaki Maki
 
Concourse CI Meetup Demo
Concourse CI Meetup DemoConcourse CI Meetup Demo
Concourse CI Meetup DemoToshiaki Maki
 
Install Concourse CI with BOSH
Install Concourse CI with BOSHInstall Concourse CI with BOSH
Install Concourse CI with BOSHToshiaki Maki
 
Introduction to Concourse CI #渋谷Java
Introduction to Concourse CI #渋谷JavaIntroduction to Concourse CI #渋谷Java
Introduction to Concourse CI #渋谷JavaToshiaki Maki
 

More from Toshiaki Maki (10)

決済システムの内製化への旅 - SpringとPCFで作るクラウドネイティブなシステム開発 #jsug #sf_h1
決済システムの内製化への旅 - SpringとPCFで作るクラウドネイティブなシステム開発 #jsug #sf_h1決済システムの内製化への旅 - SpringとPCFで作るクラウドネイティブなシステム開発 #jsug #sf_h1
決済システムの内製化への旅 - SpringとPCFで作るクラウドネイティブなシステム開発 #jsug #sf_h1
 
Spring Boot Actuator 2.0 & Micrometer #jjug_ccc #ccc_a1
Spring Boot Actuator 2.0 & Micrometer #jjug_ccc #ccc_a1Spring Boot Actuator 2.0 & Micrometer #jjug_ccc #ccc_a1
Spring Boot Actuator 2.0 & Micrometer #jjug_ccc #ccc_a1
 
Spring Boot Actuator 2.0 & Micrometer
Spring Boot Actuator 2.0 & MicrometerSpring Boot Actuator 2.0 & Micrometer
Spring Boot Actuator 2.0 & Micrometer
 
Open Service Broker APIとKubernetes Service Catalog #k8sjp
Open Service Broker APIとKubernetes Service Catalog #k8sjpOpen Service Broker APIとKubernetes Service Catalog #k8sjp
Open Service Broker APIとKubernetes Service Catalog #k8sjp
 
BOSH / CF Deployment in modern ways #cf_tokyo
BOSH / CF Deployment in modern ways #cf_tokyoBOSH / CF Deployment in modern ways #cf_tokyo
BOSH / CF Deployment in modern ways #cf_tokyo
 
Zipkin Components #zipkin_jp
Zipkin Components #zipkin_jpZipkin Components #zipkin_jp
Zipkin Components #zipkin_jp
 
Consumer Driven Contractsで REST API/マイクロサービスをテスト #m3tech
Consumer Driven Contractsで REST API/マイクロサービスをテスト #m3techConsumer Driven Contractsで REST API/マイクロサービスをテスト #m3tech
Consumer Driven Contractsで REST API/マイクロサービスをテスト #m3tech
 
Concourse CI Meetup Demo
Concourse CI Meetup DemoConcourse CI Meetup Demo
Concourse CI Meetup Demo
 
Install Concourse CI with BOSH
Install Concourse CI with BOSHInstall Concourse CI with BOSH
Install Concourse CI with BOSH
 
Introduction to Concourse CI #渋谷Java
Introduction to Concourse CI #渋谷JavaIntroduction to Concourse CI #渋谷Java
Introduction to Concourse CI #渋谷Java
 

Recently uploaded

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
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?Igalia
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
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 WorkerThousandEyes
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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.pdfsudhanshuwaghmare1
 
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 CVKhem
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Recently uploaded (20)

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
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?
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

From Zero to Hero with REST and OAuth2 #jjug

  • 1. ‹#›© 2016 Pivotal Software, Inc. All rights reserved. ‹#›© 2016 Pivotal Software, Inc. All rights reserved. From Zero to Hero with REST and OAuth2 Toshiaki Maki (@making) JJUG Night Seminar June 2016 2016-06-27
  • 2. © 2016 Pivotal Software, Inc. All rights reserved. Who am I ? • Toshiaki Maki (@making) • Sr. Solutions Architect • Spring Framework enthusiast Perfect Java EE (Coming Soon) bit.ly/spring-book
  • 3. © 2016 Pivotal Software, Inc. All rights reserved. Spring Boot
  • 4. © 2016 Pivotal Software, Inc. All rights reserved. Spring Initializr https://start.spring.io/
  • 5. © 2016 Pivotal Software, Inc. All rights reserved. Spring Initializr https://start.spring.io/
  • 6. © 2016 Pivotal Software, Inc. All rights reserved. Spring Initializr https://start.spring.io/
  • 7. © 2016 Pivotal Software, Inc. All rights reserved. Spring Initializr https://start.spring.io/
  • 8. © 2016 Pivotal Software, Inc. All rights reserved. Today's topic Web UI Resource Server Resource Server Resource Server
  • 9. © 2016 Pivotal Software, Inc. All rights reserved. Today's topic Web UI Resource Server Resource Server Resource Server 🔐 🔐 🔐
  • 10. © 2016 Pivotal Software, Inc. All rights reserved. Today's topic Web UI Resource Server Resource Server Resource Server 🔐 🔐 🔐 ❓
  • 11. © 2016 Pivotal Software, Inc. All rights reserved. Today's topic Web UI Resource Server Resource Server Resource Server 🔐 🔐 🔐 ❓❓ • Basic • OAuth2 • Spring Session • SAML
  • 12. © 2016 Pivotal Software, Inc. All rights reserved. Today's topic Web UI Resource Server Resource Server Resource Server 🔐 🔐 🔐 ❓❓ • Basic • OAuth2 • Spring Session • SAML 👈
  • 13. © 2016 Pivotal Software, Inc. All rights reserved. Today's topic Authorization Server Web UI Resource Server OAuth2 REST API + Access Token + SSO
  • 14. © 2016 Pivotal Software, Inc. All rights reserved. Live Coding!! • Spring Data REST • Spring Security OAuth2 • @EnableAuthorizationServer • @EnableResourceServer • @EnableOAuth2Sso • JWT • Zuul Integration
  • 15. ‹#›© 2016 Pivotal Software, Inc. All rights reserved. OAuth2
  • 16. © 2016 Pivotal Software, Inc. All rights reserved. OAuth2 - Terminologies •Resource Owner •Client •Authorization Server •Resource Server
  • 17. © 2016 Pivotal Software, Inc. All rights reserved. Authorization Server CUI Resource Server Resource Owner Password Credentials (grant_type=password)
  • 18. © 2016 Pivotal Software, Inc. All rights reserved. Authorization Server CUI Resource Server username & password Resource Owner Password Credentials (grant_type=password)
  • 19. © 2016 Pivotal Software, Inc. All rights reserved. Authorization Server CUI Resource Server username & password token Resource Owner Password Credentials (grant_type=password)
  • 20. © 2016 Pivotal Software, Inc. All rights reserved. Authorization Server CUI Resource Server username & password token token Resource Owner Password Credentials (grant_type=password)
  • 21. © 2016 Pivotal Software, Inc. All rights reserved. Authorization Server CUI Resource Server username & password token token response Resource Owner Password Credentials (grant_type=password)
  • 22. © 2016 Pivotal Software, Inc. All rights reserved. Authorization Code (grant_type=authorization_code) Authorization Server Web UI Resource Server
  • 23. © 2016 Pivotal Software, Inc. All rights reserved. Authorization Code (grant_type=authorization_code) Authorization Server Web UI Resource Server authorize
  • 24. © 2016 Pivotal Software, Inc. All rights reserved. Authorization Code (grant_type=authorization_code) Authorization Server Web UI Resource Server authorize redirect
  • 25. © 2016 Pivotal Software, Inc. All rights reserved. Authorization Code (grant_type=authorization_code) Authorization Server Web UI Resource Server authorize redirect code
  • 26. © 2016 Pivotal Software, Inc. All rights reserved. Authorization Code (grant_type=authorization_code) Authorization Server Web UI Resource Server authorize redirect code code
  • 27. © 2016 Pivotal Software, Inc. All rights reserved. Authorization Code (grant_type=authorization_code) Authorization Server Web UI Resource Server authorize redirect code code token
  • 28. © 2016 Pivotal Software, Inc. All rights reserved. Authorization Code (grant_type=authorization_code) Authorization Server Web UI Resource Server authorize redirect code code token token
  • 29. © 2016 Pivotal Software, Inc. All rights reserved. Authorization Code (grant_type=authorization_code) Authorization Server Web UI Resource Server authorize redirect code code token token response
  • 30. © 2016 Pivotal Software, Inc. All rights reserved. Authorization Server Web UI Resource Server OAuth2 REST API + Access Token
  • 31. © 2016 Pivotal Software, Inc. All rights reserved. Authorization Server Web UI Resource Server OAuth2 REST API + Access Token userinfo
  • 32. © 2016 Pivotal Software, Inc. All rights reserved. Authorization Server Web UI Resource Server OAuth2 REST API + Access Token userinfo every time
  • 33. © 2016 Pivotal Software, Inc. All rights reserved. JWT Authorization Server Web UI Resource Server OAuth2 REST API + Access Token (JWT)
  • 34. © 2016 Pivotal Software, Inc. All rights reserved. JWT Authorization Server Web UI Resource Server OAuth2 REST API + Access Token (JWT) token_key
  • 35. © 2016 Pivotal Software, Inc. All rights reserved. JWT Authorization Server Web UI Resource Server OAuth2 REST API + Access Token (JWT) token_key at startup
  • 36. © 2016 Pivotal Software, Inc. All rights reserved. JWT Authorization Server Web UI Resource Server OAuth2 REST API + Access Token (JWT) token_key at startup Verify token
  • 37. © 2016 Pivotal Software, Inc. All rights reserved. Links • https://github.com/Pivotal-Japan/from-zero-to-hero-with-rest- and-oauth2 • http://www.slideshare.net/WillTran1/securing-microservices- with-spring-cloud-security
  • 38. © 2016 Pivotal Software, Inc. All rights reserved. Announce • Josh Long(@starbuxman) comes to Tokyo on July 6th !! https://jsug.doorkeeper.jp/events/47900