SlideShare una empresa de Scribd logo
Introducción al Protocolo OAuth 2.0
Securizando Servicios Web
Ejemplos prácticos de uso
Álvaro Alonso
2
3
OAuth 2.0
4
Agenda
¡  Introducción al protocolo
¡  Roles
¡  Arquitectura OAuth 2.0
¡  Grant-types
¡  Hello OAuth
¡  Google Accounts
¡  FIWARE Account
¡  Securizando backends
5
Introducción al protocolo
¡  Permitir a las aplicaciones el acceso a recursos protegidos
¡  Sin compartir credenciales
¡  Las aplicaciones utilizan access tokens
¡  Creadas por los proveedores Oauth
¡  Permiten el acceso a los recursos
¡  Especificación diseñada para el uso con HTTP
¡  Especificación
¡  http://oauth.net/2/
¡  http://tools.ietf.org/html/rfc6749
6
Introducción al protocolo
¡  Resource Owner
¡  Entidad capaz de permitir el acceso a los recursos protegidos
¡  e.g. usuario final
¡  Resource Server
¡  Servidor que aloja los recursos protegidos
¡  Client
¡  Aplicación que solicita los recursos protegidos en nombre del
Resource Owner
¡  Authorization Server
¡  El servidor que provee access tokens al cliente
Roles
7
Arquitectura OAuth 2.0 Authorization Code Grant
8
Client
myservice.com
Resource Owner
Auth Server
Resource owner
Arquitectura OAuth 2.0 Implicit Grant
9
Client
myservice.com
Resource Owner
Auth Server
Resource owner
Arquitectura OAuth 2.0
Resource Owner Password
Credentials Grant
10
Client
myservice.com
Resource Owner
Auth Server
Resource owner
Arquitectura OAuth 2.0 Client Credentials Grant
11
Client
myservice.com
Resource Owner
Auth Server
Hello OAuth
¡  Documentación Google Developers
¡  https://developers.google.com/identity/protocols/OAuth2
¡  Librerías OAuth 2.0
¡  http://oauth.net/2/
¡  Ejemplo básico Node.js
¡  https://github.com/aalonsog/oauth2-master
¡  Google OAuth 2.0 Playground
¡  https://developers.google.com/oauthplayground/
Google Accounts
12
Hello OAuth Quién es quién
13
Hello OAuth Web server applications
14
Hello OAuth Web server applications
15
Authorization Code Grant
Hello OAuth Installed applications
16
Hello OAuth Installed applications
17
Authorization Code Grant
Hello OAuth Client-side (JavaScript) applications
18
Hello OAuth Client-side (JavaScript) applications
19
Implicit Grant
Hello OAuth
1.  Tener una cuenta en Google Accounts
o  Si usas Gmail ya tienes una!
2.  Crear un nuevo proyecto en Developers Console
o  https://console.developers.google.com/project
3.  Obtener credenciales de OAuth 2.0
o  Dependiendo del tipo de Grant Type
o  Configurar pantalla de autorización
4.  Configurar nuestra librería de OAuth 2.0
Pasos
20
Hello OAuth Demo
21
Pero…
22
Client
myservice.com
Resource Owner
Auth Server
Resource owner
¡  Open initiative to create a technologic ecosystem
¡  APIs for smart applications
¡  Public and royalty-free
¡  Open source reference
¡  FIWARE Lab
¡  Non-commercial sandbox for experimentation
¡  Open data published by cities
¡  Distributed among several regions
¡  FIWARE Ops
¡  Set of tools for deployment and operation
¡  UPM takes part in four Chapters
¡  ‪Sustainability Support Tools‬
¡  Security
¡  Cloud Hosting
¡  Applications/Services and Data Delivery
23
24
25
Account
FIWARE Account Login
26
Signin with
FIWARE Account Generic Enablers
27
FIWARE Account Otros backends
28
Introducción al Protocolo OAuth 2.0
Securizando Servicios Web
Ejemplos prácticos de uso
Álvaro Alonso

Más contenido relacionado

PDF
Entendiendo o auth
PDF
OAuth 2.0 (Spanish)
PPTX
Qué es eso de OAuth y como se implementa en Symfony2 (y otros)
PPTX
Oauth (Open Authorization)
PDF
REST - deSymfony2012
PDF
"Los Imprescindibles de .NetCore"
PPTX
Meetup TCMS OAuth2
PPTX
GFI - Seguridad en tus APIs
Entendiendo o auth
OAuth 2.0 (Spanish)
Qué es eso de OAuth y como se implementa en Symfony2 (y otros)
Oauth (Open Authorization)
REST - deSymfony2012
"Los Imprescindibles de .NetCore"
Meetup TCMS OAuth2
GFI - Seguridad en tus APIs

Similar a Introducción al Protocolo OAuth 2.0 (20)

PDF
Oauth v2-rev
PPTX
Presentacion-Oauth
PPTX
Autenticación vs. Autorización - ¿Cómo trabajar con el protocolo OAuth?
PDF
WORKSHOP I: Introducción a API REST
PPTX
Apis webapps
PDF
RESTful Para todos by Diego Sapriza
PDF
SSO mobile 3 opciones
PPTX
OAuth and OpenID
PPTX
WSO2 API Manager y ESB la plataforma perfecta para evolucionar los servicios
PDF
Tema 7
PDF
Seguridad para aplicaciones web java con json web tokens (jwt) 2020
PDF
Postman.pdf
PDF
Api rest client en Android
ODP
Servicios web con Python
PPTX
Autorización - Leandro Bertalot
PDF
tutorial guide using the api - 2015 espana seminario tecnico
PDF
Servicio y Consumo de Servicios REST en PHP
PPTX
Spring social springio ppt
PPT
computacion
Oauth v2-rev
Presentacion-Oauth
Autenticación vs. Autorización - ¿Cómo trabajar con el protocolo OAuth?
WORKSHOP I: Introducción a API REST
Apis webapps
RESTful Para todos by Diego Sapriza
SSO mobile 3 opciones
OAuth and OpenID
WSO2 API Manager y ESB la plataforma perfecta para evolucionar los servicios
Tema 7
Seguridad para aplicaciones web java con json web tokens (jwt) 2020
Postman.pdf
Api rest client en Android
Servicios web con Python
Autorización - Leandro Bertalot
tutorial guide using the api - 2015 espana seminario tecnico
Servicio y Consumo de Servicios REST en PHP
Spring social springio ppt
computacion
Publicidad

Más de Álvaro Alonso González (20)

PPTX
Adding identity management and access control to your app
PPTX
KeyRock and Wilma - Openstack-based Identity Management in FIWARE
PPTX
Curso AngularJS - 7. temas avanzados
PPTX
Curso AngularJS - 6. formularios
PPTX
Curso AngularJS - 5. rutas
PPTX
Curso AngularJS - 4. filtros y servicios
PPTX
Curso AngularJS - 3. módulos y controladores
PPTX
Curso AngularJS - 1. introducción
PPTX
Curso AngularJS - 2. conceptos básicos
PPTX
Lesson 6 - How to register your sensors in account portal
PPTX
Lesson 5 - Installing Keyrock in your own infrastructure
PPTX
Keyrock - Lesson 3. Applications. How to create OAuth2 tokens.
PPTX
Keyrock - Lesson 1. Introduction
PPTX
Cloud Portal - Lesson 5. Advanced tasks
PPTX
Cloud Portal - Lesson 4. Managing Storage
PPTX
Cloud Portal - Lesson 2. Cloud Portal Overview
PPTX
Cloud Portal - Lesson 1. Introduction
PPTX
Cloud Portal - Lesson 3. Launching an Instance
PPTX
Primeros pasos con Docker
PPTX
Adding Identity Management and Access Control to your Application
Adding identity management and access control to your app
KeyRock and Wilma - Openstack-based Identity Management in FIWARE
Curso AngularJS - 7. temas avanzados
Curso AngularJS - 6. formularios
Curso AngularJS - 5. rutas
Curso AngularJS - 4. filtros y servicios
Curso AngularJS - 3. módulos y controladores
Curso AngularJS - 1. introducción
Curso AngularJS - 2. conceptos básicos
Lesson 6 - How to register your sensors in account portal
Lesson 5 - Installing Keyrock in your own infrastructure
Keyrock - Lesson 3. Applications. How to create OAuth2 tokens.
Keyrock - Lesson 1. Introduction
Cloud Portal - Lesson 5. Advanced tasks
Cloud Portal - Lesson 4. Managing Storage
Cloud Portal - Lesson 2. Cloud Portal Overview
Cloud Portal - Lesson 1. Introduction
Cloud Portal - Lesson 3. Launching an Instance
Primeros pasos con Docker
Adding Identity Management and Access Control to your Application
Publicidad

Último (20)

DOCX
CONCEPTOS BASICOS DE LA PROGRAMACION STEP
PDF
Informe Estudio Final Apagon del 25 de febrero
PDF
1132-2018 espectrofotometro uv visible.pdf
PDF
5 Presentación de PowerPointGENERACIÓN DESECHOS UIS 18-02-2023 (1).pdf
PPTX
Seminario de telecomunicaciones para ingeniería
PPTX
Presentación - Taller interpretación iso 9001-Solutions consulting learning.pptx
PPTX
Gestion de seguridad y salud ocupacional.pptx
PPT
PRIMEROS AUXILIOS EN EL SECTOR EMPRESARIAL
PDF
fulguracion-medicina-legal-418035-downloable-2634665.pdf lesiones por descarg...
PPT
tema DISEÑO ORGANIZACIONAL UNIDAD 1 A.ppt
PPTX
Manual ISO9001_2015_IATF_16949_2016.pptx
PDF
GUÍA PARA LA IMPLEMENTACIÓN DEL PLAN PARA LA REDUCCIÓN DEL RIESGO DE DESASTRES
PDF
Sustitucion_del_maiz_por_harina_integral_de_zapall.pdf
PDF
SUBDIVISIÓN URBANA PUEDE ENFRENTAR SERVIDUMBRE DE PASO.pdf
PDF
SEC formula cargos al Consejo Directivo del Coordinador y a ocho eléctricas p...
PPT
Sustancias Peligrosas de empresas para su correcto manejo
PPTX
MODULO 2. METODOLOGIAS PARA ANALISIS DE RIESGOS 2da Parte.pptx
PPTX
1 CONTAMINACION AMBIENTAL EN EL PLANETA.pptx
PDF
Módulo-de Alcance-proyectos - Definición.pdf
PDF
Informe Comision Investigadora Final distribución electrica años 2024 y 2025
CONCEPTOS BASICOS DE LA PROGRAMACION STEP
Informe Estudio Final Apagon del 25 de febrero
1132-2018 espectrofotometro uv visible.pdf
5 Presentación de PowerPointGENERACIÓN DESECHOS UIS 18-02-2023 (1).pdf
Seminario de telecomunicaciones para ingeniería
Presentación - Taller interpretación iso 9001-Solutions consulting learning.pptx
Gestion de seguridad y salud ocupacional.pptx
PRIMEROS AUXILIOS EN EL SECTOR EMPRESARIAL
fulguracion-medicina-legal-418035-downloable-2634665.pdf lesiones por descarg...
tema DISEÑO ORGANIZACIONAL UNIDAD 1 A.ppt
Manual ISO9001_2015_IATF_16949_2016.pptx
GUÍA PARA LA IMPLEMENTACIÓN DEL PLAN PARA LA REDUCCIÓN DEL RIESGO DE DESASTRES
Sustitucion_del_maiz_por_harina_integral_de_zapall.pdf
SUBDIVISIÓN URBANA PUEDE ENFRENTAR SERVIDUMBRE DE PASO.pdf
SEC formula cargos al Consejo Directivo del Coordinador y a ocho eléctricas p...
Sustancias Peligrosas de empresas para su correcto manejo
MODULO 2. METODOLOGIAS PARA ANALISIS DE RIESGOS 2da Parte.pptx
1 CONTAMINACION AMBIENTAL EN EL PLANETA.pptx
Módulo-de Alcance-proyectos - Definición.pdf
Informe Comision Investigadora Final distribución electrica años 2024 y 2025

Introducción al Protocolo OAuth 2.0

  • 1. Introducción al Protocolo OAuth 2.0 Securizando Servicios Web Ejemplos prácticos de uso Álvaro Alonso
  • 2. 2
  • 3. 3
  • 5. Agenda ¡  Introducción al protocolo ¡  Roles ¡  Arquitectura OAuth 2.0 ¡  Grant-types ¡  Hello OAuth ¡  Google Accounts ¡  FIWARE Account ¡  Securizando backends 5
  • 6. Introducción al protocolo ¡  Permitir a las aplicaciones el acceso a recursos protegidos ¡  Sin compartir credenciales ¡  Las aplicaciones utilizan access tokens ¡  Creadas por los proveedores Oauth ¡  Permiten el acceso a los recursos ¡  Especificación diseñada para el uso con HTTP ¡  Especificación ¡  http://oauth.net/2/ ¡  http://tools.ietf.org/html/rfc6749 6
  • 7. Introducción al protocolo ¡  Resource Owner ¡  Entidad capaz de permitir el acceso a los recursos protegidos ¡  e.g. usuario final ¡  Resource Server ¡  Servidor que aloja los recursos protegidos ¡  Client ¡  Aplicación que solicita los recursos protegidos en nombre del Resource Owner ¡  Authorization Server ¡  El servidor que provee access tokens al cliente Roles 7
  • 8. Arquitectura OAuth 2.0 Authorization Code Grant 8 Client myservice.com Resource Owner Auth Server Resource owner
  • 9. Arquitectura OAuth 2.0 Implicit Grant 9 Client myservice.com Resource Owner Auth Server Resource owner
  • 10. Arquitectura OAuth 2.0 Resource Owner Password Credentials Grant 10 Client myservice.com Resource Owner Auth Server Resource owner
  • 11. Arquitectura OAuth 2.0 Client Credentials Grant 11 Client myservice.com Resource Owner Auth Server
  • 12. Hello OAuth ¡  Documentación Google Developers ¡  https://developers.google.com/identity/protocols/OAuth2 ¡  Librerías OAuth 2.0 ¡  http://oauth.net/2/ ¡  Ejemplo básico Node.js ¡  https://github.com/aalonsog/oauth2-master ¡  Google OAuth 2.0 Playground ¡  https://developers.google.com/oauthplayground/ Google Accounts 12
  • 13. Hello OAuth Quién es quién 13
  • 14. Hello OAuth Web server applications 14
  • 15. Hello OAuth Web server applications 15 Authorization Code Grant
  • 16. Hello OAuth Installed applications 16
  • 17. Hello OAuth Installed applications 17 Authorization Code Grant
  • 18. Hello OAuth Client-side (JavaScript) applications 18
  • 19. Hello OAuth Client-side (JavaScript) applications 19 Implicit Grant
  • 20. Hello OAuth 1.  Tener una cuenta en Google Accounts o  Si usas Gmail ya tienes una! 2.  Crear un nuevo proyecto en Developers Console o  https://console.developers.google.com/project 3.  Obtener credenciales de OAuth 2.0 o  Dependiendo del tipo de Grant Type o  Configurar pantalla de autorización 4.  Configurar nuestra librería de OAuth 2.0 Pasos 20
  • 23. ¡  Open initiative to create a technologic ecosystem ¡  APIs for smart applications ¡  Public and royalty-free ¡  Open source reference ¡  FIWARE Lab ¡  Non-commercial sandbox for experimentation ¡  Open data published by cities ¡  Distributed among several regions ¡  FIWARE Ops ¡  Set of tools for deployment and operation ¡  UPM takes part in four Chapters ¡  ‪Sustainability Support Tools‬ ¡  Security ¡  Cloud Hosting ¡  Applications/Services and Data Delivery 23
  • 24. 24
  • 27. FIWARE Account Generic Enablers 27
  • 28. FIWARE Account Otros backends 28
  • 29. Introducción al Protocolo OAuth 2.0 Securizando Servicios Web Ejemplos prácticos de uso Álvaro Alonso