SlideShare una empresa de Scribd logo
Autenticación en
aplicaciones web y nativas
Escenarios y herramientas
Hugo Biarge
Development Advisor at Plain Concepts
hbiarge@plainconcepts.com
@hbiarge
Authentication is hard!
Web MVC
No API
Usuarios locales
Escenario 1
Asp.Net Identity
• Usuarios locales
• Contraseña guardada como hash
• Cookies
• Soporte de proveedores externos de identidad
• Sociales
• Corporativos
• Soporte de 2FA
• TOPT: https://en.wikipedia.org/wiki/Time-based_One-time_Password_Algorithm
https://docs.microsoft.com/en-us/aspnet/core/security/authentication/identity?tabs=visual-studio%2Caspnetcore2x
Proveedores externos de identidad
• Oficiales:
• Facebook
• Twitter
• Google
• Microsoft account
• aspnet-contrib
• Linkedid
• Instagram
• Reddit
• …
https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers/tree/dev/src
Web MVC + API
API protegida por JWT
Usuarios corporativos
Escenario 2
Azure Active Directory
• Single Sign On
• Soporta
• WS-Federation
• OAuth2
• OpenId.Connect (v2.0 endpoints)
https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-protocols-oidc
OpenId.Connect Discovery document
https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration
Configuración
• Mvc
• Api
¿Qué es un token JWT (Json Web Token)?
• Estandar para representar claims de forma segura entre dos aplicaciones
(RFC7519)
JSON Web Token (JWT) is a compact, URL-safe means of representing
claims to be transferred between two parties. The claims in a JWT
are encoded as a JSON object that is used as the payload of a JSON
Web Signature (JWS) structure or as the plaintext of a JSON Web
Encryption (JWE) structure, enabling the claims to be digitally
signed or integrity protected with a Message Authentication Code
(MAC) and/or encrypted.
https://jwt.io/
App nativa + API
API protegida por JWT
Usuarios corporativos
Escenario 3
Active Directory Authentication Library
https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-authentication-libraries
• Múltiples plataformas
• .NET Client, Windows Store, UWP, Xamarin iOS and Android
• .NET Client, Windows Store, Windows Phone 8.1
• JavaScript
• iOS, macOS
• Android
• Node.js
• Java
• Python
Web MVC + API
API protegida por JWT
Federation Gateway (Identity Server)
Escenario 4
Identity Server
• Proveedor de identidad certificado basado en OpenId.Connect
• Soporte de usuarios locales
• Soporte de proveedores de identidad externos
• Google, AAD, etc…
• Single Sign On
• Open source
• Miembro de la DotNet Foundation
https://github.com/IdentityServer/IdentityServer4
https://github.com/IdentityServer/IdentityServer4.Samples
Configuración
• Mvc
• Api
¿Qué es un Federation Gateway?
• Única fuente de verdad respecto a la
autenticación para todas nuestras
aplicaciones
• Apps conocen 1 solo punto de autenticación
(IdentityServer)
• En IdentityServer se configura cómo cada
aplicación (client) identifica al usuario
• BD local, Windows, proveedores externos,
certificados, …
• Una vez identificado el usuario Sigle Sign On
(cookie)
Proveedores
externos de
identidad
Aplicaciones
corporativas
Identity Server
App nativa + API
API protegida por JWT
Federation Gateway (Identity Server)
Escenario 5
IdentityModel
• IdentityModel2 https://github.com/IdentityModel/IdentityModel2
• Librería de ayuda (.NET standard) para identidad basada en claims, OAuth 2.0
y OpenID Connect.
• IdentityModel.OidcClient2 https://github.com/IdentityModel/IdentityModel.OidcClient2
• Librería certificada para autenticación mediante OpenId.Connect para
aplicaciones nativas (móvi y escritorio)
• IBrowser
• Implementaciones para distintas pataformas
https://github.com/IdentityModel/IdentityModel.OidcClient.Samples
¿Preguntas?

Más contenido relacionado

PDF
Web api, más allá del 'hola mundo'
PPTX
Introducción a Azure App Service - MUG Buenos Aires
PPTX
Autenticar y securizar API en .NET Core como un Avenger
PDF
(13/05) MSDN te invita a ser parte de Uxity
PDF
Msdn Te Invita A Ser Parte De UXity
PDF
Introducción al Protocolo OAuth 2.0
PPT
PDF
Power BI para desarrolladores netcoreconf
Web api, más allá del 'hola mundo'
Introducción a Azure App Service - MUG Buenos Aires
Autenticar y securizar API en .NET Core como un Avenger
(13/05) MSDN te invita a ser parte de Uxity
Msdn Te Invita A Ser Parte De UXity
Introducción al Protocolo OAuth 2.0
Power BI para desarrolladores netcoreconf

Similar a Autenticación en aplicaciones .Net web y nativas (20)

PPTX
Azure 360º para Desarrolaldores
PDF
azure-logic elementos de seleccion cuando utilizarlos
PPTX
Sitios blindados de SharePoint
PDF
Web cryptography
PDF
Introducción a la gestión de contenidos web con Liferay Portal 6.1.x
PPTX
Visual Studio App Center: Nuestro centro de operaciones
PDF
Desarrollo de una aplicación Web para organizar Eventos Deportivos
PDF
Usando Azure para habilitar APIs
PDF
REST - deSymfony2012
PDF
Consideraciones al escoger apps híbridas vs nativas
PDF
Despliegue de aplicaciones OS en entornos Cloud Computing con Bitnami- OpenEx...
PPTX
Curso SharePoint 2013 overview
PDF
HTML5 en Acción
PPTX
ASP.NET MVC
PPTX
Symfony-Community: Introducción a Symfony Framework
PPTX
IT Camps Apps Office 365 Valencia 2014
PPTX
Windows azuremobileservices
PPTX
Futuro de Desarrollo en SharePoint
PPTX
Colombia Bootcamp Azure Key Vault.pptx
PDF
Seguridad en Aplicaciones Web y Comercio Electrónico
Azure 360º para Desarrolaldores
azure-logic elementos de seleccion cuando utilizarlos
Sitios blindados de SharePoint
Web cryptography
Introducción a la gestión de contenidos web con Liferay Portal 6.1.x
Visual Studio App Center: Nuestro centro de operaciones
Desarrollo de una aplicación Web para organizar Eventos Deportivos
Usando Azure para habilitar APIs
REST - deSymfony2012
Consideraciones al escoger apps híbridas vs nativas
Despliegue de aplicaciones OS en entornos Cloud Computing con Bitnami- OpenEx...
Curso SharePoint 2013 overview
HTML5 en Acción
ASP.NET MVC
Symfony-Community: Introducción a Symfony Framework
IT Camps Apps Office 365 Valencia 2014
Windows azuremobileservices
Futuro de Desarrollo en SharePoint
Colombia Bootcamp Azure Key Vault.pptx
Seguridad en Aplicaciones Web y Comercio Electrónico
Publicidad

Último (20)

PPTX
RAP01 - TECNICO SISTEMAS TELEINFORMATICOS.pptx
PPTX
IA de Cine - Como MuleSoft y los Agentes estan redefiniendo la realidad
PPTX
RAP02 - TECNICO SISTEMAS TELEINFORMATICOS.pptx
PDF
Maste clas de estructura metálica y arquitectura
PPTX
Presentacion de Alba Curso Auditores Internos ISO 19011
DOCX
Zarate Quispe Alex aldayir aplicaciones de internet .docx
PPTX
COMO AYUDAN LAS TIC EN LA EDUCACION SUPERIOR.pptx
PDF
MANUAL TECNOLOGÍA SER MINISTERIO EDUCACIÓN
PPTX
Presentación PASANTIAS AuditorioOO..pptx
PPTX
Acronis Cyber Protect Cloud para Ciber Proteccion y Ciber Seguridad LATAM - A...
PDF
programa-de-estudios-2011-guc3ada-para-el-maestro-secundarias-tecnicas-tecnol...
PDF
ADMINISTRACIÓN DE ARCHIVOS - TICS (SENA).pdf
PDF
Influencia-del-uso-de-redes-sociales.pdf
PPTX
ANCASH-CRITERIOS DE EVALUACIÓN-FORMA-10-10 (2).pptx
PDF
capacitación de aire acondicionado Bgh r 410
PPTX
Power Point Nicolás Carrasco (disertación Roblox).pptx
PPTX
modulo seguimiento 1 para iniciantes del
PPTX
historia_web de la creacion de un navegador_presentacion.pptx
PDF
CyberOps Associate - Cisco Networking Academy
PDF
SAP Transportation Management para LSP, TM140 Col18
RAP01 - TECNICO SISTEMAS TELEINFORMATICOS.pptx
IA de Cine - Como MuleSoft y los Agentes estan redefiniendo la realidad
RAP02 - TECNICO SISTEMAS TELEINFORMATICOS.pptx
Maste clas de estructura metálica y arquitectura
Presentacion de Alba Curso Auditores Internos ISO 19011
Zarate Quispe Alex aldayir aplicaciones de internet .docx
COMO AYUDAN LAS TIC EN LA EDUCACION SUPERIOR.pptx
MANUAL TECNOLOGÍA SER MINISTERIO EDUCACIÓN
Presentación PASANTIAS AuditorioOO..pptx
Acronis Cyber Protect Cloud para Ciber Proteccion y Ciber Seguridad LATAM - A...
programa-de-estudios-2011-guc3ada-para-el-maestro-secundarias-tecnicas-tecnol...
ADMINISTRACIÓN DE ARCHIVOS - TICS (SENA).pdf
Influencia-del-uso-de-redes-sociales.pdf
ANCASH-CRITERIOS DE EVALUACIÓN-FORMA-10-10 (2).pptx
capacitación de aire acondicionado Bgh r 410
Power Point Nicolás Carrasco (disertación Roblox).pptx
modulo seguimiento 1 para iniciantes del
historia_web de la creacion de un navegador_presentacion.pptx
CyberOps Associate - Cisco Networking Academy
SAP Transportation Management para LSP, TM140 Col18
Publicidad

Autenticación en aplicaciones .Net web y nativas

  • 1. Autenticación en aplicaciones web y nativas Escenarios y herramientas
  • 2. Hugo Biarge Development Advisor at Plain Concepts hbiarge@plainconcepts.com @hbiarge
  • 4. Web MVC No API Usuarios locales Escenario 1
  • 5. Asp.Net Identity • Usuarios locales • Contraseña guardada como hash • Cookies • Soporte de proveedores externos de identidad • Sociales • Corporativos • Soporte de 2FA • TOPT: https://en.wikipedia.org/wiki/Time-based_One-time_Password_Algorithm https://docs.microsoft.com/en-us/aspnet/core/security/authentication/identity?tabs=visual-studio%2Caspnetcore2x
  • 6. Proveedores externos de identidad • Oficiales: • Facebook • Twitter • Google • Microsoft account • aspnet-contrib • Linkedid • Instagram • Reddit • … https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers/tree/dev/src
  • 7. Web MVC + API API protegida por JWT Usuarios corporativos Escenario 2
  • 8. Azure Active Directory • Single Sign On • Soporta • WS-Federation • OAuth2 • OpenId.Connect (v2.0 endpoints) https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-protocols-oidc OpenId.Connect Discovery document https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration
  • 10. ¿Qué es un token JWT (Json Web Token)? • Estandar para representar claims de forma segura entre dos aplicaciones (RFC7519) JSON Web Token (JWT) is a compact, URL-safe means of representing claims to be transferred between two parties. The claims in a JWT are encoded as a JSON object that is used as the payload of a JSON Web Signature (JWS) structure or as the plaintext of a JSON Web Encryption (JWE) structure, enabling the claims to be digitally signed or integrity protected with a Message Authentication Code (MAC) and/or encrypted. https://jwt.io/
  • 11. App nativa + API API protegida por JWT Usuarios corporativos Escenario 3
  • 12. Active Directory Authentication Library https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-authentication-libraries • Múltiples plataformas • .NET Client, Windows Store, UWP, Xamarin iOS and Android • .NET Client, Windows Store, Windows Phone 8.1 • JavaScript • iOS, macOS • Android • Node.js • Java • Python
  • 13. Web MVC + API API protegida por JWT Federation Gateway (Identity Server) Escenario 4
  • 14. Identity Server • Proveedor de identidad certificado basado en OpenId.Connect • Soporte de usuarios locales • Soporte de proveedores de identidad externos • Google, AAD, etc… • Single Sign On • Open source • Miembro de la DotNet Foundation https://github.com/IdentityServer/IdentityServer4 https://github.com/IdentityServer/IdentityServer4.Samples
  • 16. ¿Qué es un Federation Gateway? • Única fuente de verdad respecto a la autenticación para todas nuestras aplicaciones • Apps conocen 1 solo punto de autenticación (IdentityServer) • En IdentityServer se configura cómo cada aplicación (client) identifica al usuario • BD local, Windows, proveedores externos, certificados, … • Una vez identificado el usuario Sigle Sign On (cookie) Proveedores externos de identidad Aplicaciones corporativas Identity Server
  • 17. App nativa + API API protegida por JWT Federation Gateway (Identity Server) Escenario 5
  • 18. IdentityModel • IdentityModel2 https://github.com/IdentityModel/IdentityModel2 • Librería de ayuda (.NET standard) para identidad basada en claims, OAuth 2.0 y OpenID Connect. • IdentityModel.OidcClient2 https://github.com/IdentityModel/IdentityModel.OidcClient2 • Librería certificada para autenticación mediante OpenId.Connect para aplicaciones nativas (móvi y escritorio) • IBrowser • Implementaciones para distintas pataformas https://github.com/IdentityModel/IdentityModel.OidcClient.Samples