SlideShare a Scribd company logo
1 of 83
Download to read offline
@CesarHgt @tomitribeJavaDay Ecuador 2018
Seguridad en Microservicios
via Microprofile JWT
César Hernández
Tomitribe
@CesarHgt @tomitribeJavaDay Ecuador 2018
● Senior Software Engineer at Tomitribe
● Java Champion
● Ducke’s Choice Award 2016, 2017
● Oracle Certified Professional
● +10 experience with Java EE
● Eclipse Commiter: Jakarta EE TCK, JAX-WS
and Microprofile.
● Open Source advocate, teacher and public
speaker
César Hernández
@CesarHgt @tomitribeJavaDay Ecuador 2018
Java es Comunidad
@CesarHgt @tomitribeJavaDay Ecuador 2018
https://tribestream.io/javadayec/
Diapositivas y referencias
CONTACTANOS @TOMITRIBE
@CesarHgt @tomitribeJavaDay Ecuador 2018
“Lo mejor de los estándares es que terminas
teniendo muchas opciones por escoger.”
- Andrew S. Tanenbaum
@CesarHgt @tomitribeJavaDay Ecuador 2018
Opciones de seguridad para
Microservicios
● Más allá de Basic Auth
● Teoría de OAuth 2.0
● Introducción a JWT
● Eclipse Microprofile
● Demo
@CesarHgt @tomitribeJavaDay Ecuador 2018
Línea Base
1000 usuarios
x 3 TPS
4 saltos
3000 TPS
frontend
12000
TPS
backend
@CesarHgt @tomitribeJavaDay Ecuador 2018
Basic Auth
(y sus problemas)
@CesarHgt @tomitribeJavaDay Ecuador 2018
Mensaje en Basic Auth
POST /painter/color/object HTTP/1.1
Host: localhost:8443
Authorization: Basic c25vb3B5OnBhc3M=
User-Agent: curl/7.43.0
Accept: */*
Content-Type: application/json
Content-Length: 45
{"color":{"b":255,"g":0,"name":"blue","r":0}}
@CesarHgt @tomitribeJavaDay Ecuador 2018
Basic Auth
Password Sent
3000 TPS
(HTTP+SSL)
username+password
Base64 (no auth)
(LDAP)
12000
TPS
(HTTP)
3000 TPS
@CesarHgt @tomitribeJavaDay Ecuador 2018
Basic Auth
Password Sent
3000 TPS
(HTTP+SSL)
username+password
Base64
Lista Blanca
de IP
3000 TPS
(LDAP)
12000
TPS
(HTTP)
@CesarHgt @tomitribeJavaDay Ecuador 2018
“Dame toda la
información del
salario de José.” “No se quien
eres,
…
pero por
supuesto!”
@CesarHgt @tomitribeJavaDay Ecuador 2018
Ataque de fuerza bruta: Basic Auth
Password
válidos
3000
TPS
(HTTP+SSL)
Lista
Blanca IP
9000 TPS
(LDAP)
12000
TPS
(HTTP)
Passwords
inválidos
6000
TPS
(HTTP+SSL)
@CesarHgt @tomitribeJavaDay Ecuador 2018
OAuth 2.0
(y sus problemas)
@CesarHgt @tomitribeJavaDay Ecuador 2018
@CesarHgt @tomitribeJavaDay Ecuador 2018
@CesarHgt @tomitribeJavaDay Ecuador 2018
@CesarHgt @tomitribeJavaDay Ecuador 2018
@CesarHgt @tomitribeJavaDay Ecuador 2018
OAuth 2 - Password Grant
(LDAP)
(Repositorio
de Token)
Verificación de
Password
Generación de
Token
Post /oauth2/token
Host: api.superbliz.io
User-Agent: curl/7.43.0
Accept: */*
Content-Type: application/x-www-form-urlencoded
Content-Length: 54
grand_type=password&username=snoopy&password=woodstock
@CesarHgt @tomitribeJavaDay Ecuador 2018
OAuth 2 - Password Grant
(LDAP)
Verificación de
Password
Generación de
Token
(Repositorio
de Token)
Post /oauth2/token
Host: api.superbliz.io
User-Agent: curl/7.43.0
Accept: */*
Content-Type: application/x-www-form-urlencoded
Content-Length: 54
grand_type=password&username=snoopy&password=woodstock
@CesarHgt @tomitribeJavaDay Ecuador 2018
Mensaje OAuth 2.0
POST /painter/color/object HTTP/1.1
Host: api.superbiz.io
Authorization: Bearer 2YotnFZFEjr1zCsicMWpAA
User-Agent: curl/7.43.0
Accept: */*
Content-Type: application/json
Content-Length: 45
{"color":{"r":0,"g":0,"b":255,"name":"blue"}}
@CesarHgt @tomitribeJavaDay Ecuador 2018
Mensaje OAuth 2.0
POST /painter/color/palette HTTP/1.1
Host: api.superbiz.io
Authorization: Bearer 2YotnFZFEjr1zCsicMWpAA
User-Agent: curl/7.43.0
Accept: */*
Content-Type: application/json
Content-Length: 45
{"color":{"r":0,"g":255,"b":0,"name":"green"}}
@CesarHgt @tomitribeJavaDay Ecuador 2018
Mensaje OAuth 2.0
POST /painter/color/select HTTP/1.1
Host: api.superbiz.io
Authorization: Bearer 2YotnFZFEjr1zCsicMWpAA
User-Agent: curl/7.43.0
Accept: */*
Content-Type: application/json
Content-Length: 44
{"color":{"r":255,"g":0,"b":0,"name":"red"}}
@CesarHgt @tomitribeJavaDay Ecuador 2018
Mensaje OAuth 2.0
POST /painter/color/fill HTTP/1.1
Host: api.superbiz.io
Authorization: Bearer 2YotnFZFEjr1zCsicMWpAA
User-Agent: curl/7.43.0
Accept: */*
Content-Type: application/json
Content-Length: 49
{"color":{"r":0,"g":255,"b":255,"name":"yellow"}}
@CesarHgt @tomitribeJavaDay Ecuador 2018
Mensaje OAuth 2.0
POST /painter/color/stroke HTTP/1.1
Host: api.superbiz.io
Authorization: Bearer 2YotnFZFEjr1zCsicMWpAA
User-Agent: curl/7.43.0
Accept: */*
Content-Type: application/json
Content-Length: 49
{"color":{"r":255,"g":200,"b":255,"name":"orange"}}
@CesarHgt @tomitribeJavaDay Ecuador 2018
@CesarHgt @tomitribeJavaDay Ecuador 2018
OAuth 2 - Refresh Grant
(LDAP)
Verificación
Password
Generación
Token
(Repositorio
de Token)
Post /oauth2/token
Host: api.superbliz.io
User-Agent: curl/7.43.0
Accept: */*
Content-Type: application/x-www-form-urlencoded
Content-Length: 54
grand_type=password&username=snoopy&password=woodstock
@CesarHgt @tomitribeJavaDay Ecuador 2018
OAuth 2 - Refresh Grant
(LDAP)
Verificación
Password
Generación
Token
(Repositorio
de Token)
Post /oauth2/token
Host: api.superbliz.io
User-Agent: curl/7.43.0
Accept: */*
Content-Type: application/x-www-form-urlencoded
Content-Length: 54
grand_type=password&username=snoopy&password=woodstock
@CesarHgt @tomitribeJavaDay Ecuador 2018
Par anterior
∙ Access Token 2YotnFZFEjr1zCsicMWpAA
∙ Refresh Token tGzv3JOkF0XG5Qx2TlKWIA
Nuevo Par
∙ Access Token
6Fe4jd7TmdE5yW2q0y6W2w
∙ Refresh Token hyT5rw1QNh5Ttg2hdtR54e
@CesarHgt @tomitribeJavaDay Ecuador 2018
Mensaje OAuth 2.0
POST /painter/color/palette HTTP/1.1
Host: api.superbiz.io
Authorization: Bearer 6Fe4jd7TmdE5yW2q0y6W2w
User-Agent: curl/7.43.0
Accept: */*
Content-Type: application/json
Content-Length: 46
{"color":{"r":0,"g":255,"b":0,"name":"green"}}
@CesarHgt @tomitribeJavaDay Ecuador 2018
Mensaje OAuth 2.0
POST /painter/color/select HTTP/1.1
Host: api.superbiz.io
Authorization: Bearer 6Fe4jd7TmdE5yW2q0y6W2w
User-Agent: curl/7.43.0
Accept: */*
Content-Type: application/json
Content-Length: 44
{"color":{"r":255,"g":0,"b":0,"name":"red"}}
@CesarHgt @tomitribeJavaDay Ecuador 2018
Mensaje OAuth 2.0
POST /painter/color/fill HTTP/1.1
Host: api.superbiz.io
Authorization: Bearer 6Fe4jd7TmdE5yW2q0y6W2w
User-Agent: curl/7.43.0
Accept: */*
Content-Type: application/json
Content-Length: 49
{"color":{"r":0,"g":255,"b":255,"name":"yellow"}}
@CesarHgt @tomitribeJavaDay Ecuador 2018
¿Qué hemos logrado?
@CesarHgt @tomitribeJavaDay Ecuador 2018
Ahora tenemos más passwords
(al menos tus dispositivos los tienen)
@CesarHgt @tomitribeJavaDay Ecuador 2018
Terminología de nuevo…
∙ Password Grant???
∙ Logging in
∙ Token?
∙ Un password ligeramente ofuscado
∙ Equivalente a un HTTP session ID mejorado levemente
@CesarHgt @tomitribeJavaDay Ecuador 2018
OAuth 2
Request enviados
(Authorization: Bearer …)
3000 TPS
(HTTP+SSL)
3000 TPS
(Verificaciones
de tokens)
Password enviados
(post oauth2/token …)
1000/daily
(HTTP+SSL)
OAuth 2
(LDAP)
4 saldos
12000
TPS
backend
@CesarHgt @tomitribeJavaDay Ecuador 2018
@CesarHgt @tomitribeJavaDay Ecuador 2018
“Quién es
6Fe4jd7TmdE5y
W2q0y6W2w
???????”
“No tengo idea.
Pregúntale al
servidor de
tokens.”
@CesarHgt @tomitribeJavaDay Ecuador 2018
OAuth 2
Tokens enviados
3000 TPS
(HTTP+SSL)
3000 TPS
(verificación
token)
Password
Envidados
1000/daily
(HTTP+SSL)
OAuth 2
(LDAP)
12000
TPS
(Verificación
token)
8
Saldos
24000 TPS
backend
@CesarHgt @tomitribeJavaDay Ecuador 2018
OAuth 2
3000 TPS
(Verificación
token)
(LDAP)
12000
TPS
(Verificación
token)
55%
del tráfico total
Tokens enviados
3000 TPS
(HTTP+SSL)
Password
Envidados
1000/daily
(HTTP+SSL)
OAuth 2
8
Saldos
24000 TPS
backend
@CesarHgt @tomitribeJavaDay Ecuador 2018
OAuth 2
Puntero Puntero
Estado
@CesarHgt @tomitribeJavaDay Ecuador 2018
Access Token
Puntero de Acceso?
Llave primaria de Acceso?
@CesarHgt @tomitribeJavaDay Ecuador 2018
OAuth 2.0
Algoritmo de intercambio de
passwords de alta frecuencia?
@CesarHgt @tomitribeJavaDay Ecuador 2018
OAuth 2.0
+
JSon Web Tokens (JWT)
@CesarHgt @tomitribeJavaDay Ecuador 2018
JSon Web Token
∙ Pronunciado “YOT”
∙ JSON map con data de usuario
∙ Códificado Base64
∙ Firmado digitalmente (RSA-SHA256, HMAC-SHA512, etc)
∙ Mecanismo de expiración
@CesarHgt @tomitribeJavaDay Ecuador 2018
Previamente un Access Token
∙ 6Fe4jd7TmdE5yW2q0y6W2w
@CesarHgt @tomitribeJavaDay Ecuador 2018
Access Token ahora (JWT)
∙ eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbi10eXBlIj
oiYWNjZXNzLXRva2VuIiwidXNlcm5hbWUiOiJzbm9vcHkiLCJ
hbmltYWwiOiJiZWFnbGUiLCJpc3MiOiJodHRwczovL2RlbW8
uc3VwZXJiaXouY29tL29hdXRoMi90b2tlbiIsInNjb3BlcyI6WyJ0
d2l0dGVyIiwibWFucy1iZXN0LWZyaWVuZCJdLCJleHAiOjE0
NzQyODA5NjMsImlhdCI6MTQ3NDI3OTE2MywianRpIjoiNjY4
ODFiMDY4YjI0OWFkOSJ9.DTfSdMzIIsC0j8z3icRdYO1GaM
Gl6j1I_2DBjiiHW9vmDz8OAw8Jh8DpO32fv0vICc0hb4F0QCD
3KQnv8GVM73kSYaOEUwlW0k1TaElxc43_Ocxm1F5IUNZvz
lLJ_ksFXGDL_cuadhVDaiqmhct098ocefuv08TdzRxqYoEqYN
o
@CesarHgt @tomitribeJavaDay Ecuador 2018
Nuevo Access Token
∙ header (JSON > Base64 URL Encoded)
∙ Describe como la firma (signature) del token puede ser
verificada
∙ payload (JSON > Base64 URL Encoded)
∙ Json map de información que desees incluir
∙ Campo estándar como el de Expiración
∙ signature (Binary > Base64 URL Encoded)
∙ La firma digital
∙ Hecha exclusivamente por el endpoint: /oauth2/token
∙ Si es RSA puede ser verificado por cualquier persona
@CesarHgt @tomitribeJavaDay Ecuador 2018
∙ { "alg": “RS256", "typ": “JWT" }
∙ {
"token-type": "access-token",
"username": "snoopy",
"animal": "beagle",
"iss": "https://demo.superbiz.com/oauth2/token",
"scopes": [
“twitter”, "mans-best-friend"
],
"exp": 1474280963,
"iat": 1474279163,
"jti": "66881b068b249ad9"
}
∙ DTfSdMzIIsC0j8z3icRdYO1GaMGl6j1I_2DBjiiHW9vmDz8OAw8Jh8DpO32fv0vI
Cc0hb4F0QCD3KQnv8GVM73kSYaOEUwlW0k1TaElxc43_Ocxm1F5IUNZvzlLJ
_ksFXGDL_cuadhVDaiqmhct098ocefuv08TdzRxqYoEqYNo
@CesarHgt @tomitribeJavaDay Ecuador 2018
@CesarHgt @tomitribeJavaDay Ecuador 2018
@CesarHgt @tomitribeJavaDay Ecuador 2018
Ligero pero con alto impacto en
la arquitectura
@CesarHgt @tomitribeJavaDay Ecuador 2018
¿Qué tenemos hasta el
momento?
(repaso)
@CesarHgt @tomitribeJavaDay Ecuador 2018
Resultado final
cliente permanece
con el Pointer
Server almacena
State
@CesarHgt @tomitribeJavaDay Ecuador 2018
¿Qué podemos hacer ahora?
(hola JWT!)
@CesarHgt @tomitribeJavaDay Ecuador 2018
LDAP Data completa
del usuario
desde
ldap
@CesarHgt @tomitribeJavaDay Ecuador 2018
LDAP
La data se
representa
en JSON
@CesarHgt @tomitribeJavaDay Ecuador 2018
LDAP
JSON es
firmado
RSA-SHA 256
@CesarHgt @tomitribeJavaDay Ecuador 2018
LDAP
Se inserta
solamente
el
pointer en
DB(para
revocaciones)
@CesarHgt @tomitribeJavaDay Ecuador 2018
LDAP
Envío del Access Token
(estado)
hacia el cliente
@CesarHgt @tomitribeJavaDay Ecuador 2018
Servidor almacena el
Puntero
Cliente permanece con el
Estado
Resultado obtenido
@CesarHgt @tomitribeJavaDay Ecuador 2018
OAuth 2 - Password Grant
(LDAP)
(Repositorio
Token ID)
Verifica
Password
Genera
Token
Firmado
(Signed)
Post /oauth2/token
Host: api.superbliz.io
User-Agent: curl/7.43.0
Accept: */*
Content-Type: application/x-www-form-urlencoded
Content-Length: 54
grand_type=password&username=snoopy&password=woodstock
@CesarHgt @tomitribeJavaDay Ecuador 2018
OAuth 2 - Password Grant
(LDAP)
Verifica
Password
(Repositorio
Token ID)
Genera
Token
Firmado
(Signed)
@CesarHgt @tomitribeJavaDay Ecuador 2018
Mensaje OAuth 2.0 con JWT
POST /painter/color/palette HTTP/1.1
Host: api.superbiz.io
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbi10eXBlIjoiYWNjZXNzLXR
va2VuIiwidXNlcm5hbWUiOiJzbm9vcHkiLCJhbmltYWwiOiJiZWFnbGUiLCJpc3MiOiJodHRwczovL2RlbW8
uc3VwZXJ
iaXouY29tL29hdXRoMi90b2tlbiIsInNjb3BlcyI6WyJ0d2l0dGVyIiwibWFucy1iZXN0LWZyaWVuZCJdLCJleH
AiOjE0NzQy
ODA5NjMsImlhdCI6MTQ3NDI3OTE2MywianRpIjoiNjY4ODFiMDY4YjI0OWFkOSJ9.DTfSdMzIIsC0j8z3icRd
YO1GaMGl
6j1I_2DBjiiHW9vmDz8OAw8Jh8DpO32fv0vICc0hb4F0QCD3KQnv8GVM73kSYaOEUwlW0k1TaElxc43_Oc
xm1F5IUNZ
vzlLJ_ksFXGDL_cuadhVDaiqmhct098ocefuv08TdzRxqYoEqYNo
User-Agent: curl/7.43.0
Accept: */*
Content-Type: application/json
Content-Length: 46
{"color":{"b":0,"g":255,"r":0,"name":"green"}}
@CesarHgt @tomitribeJavaDay Ecuador 2018
OAuth 2 + JWT
Tokens enviados
3000 TPS
(HTTP+SSL)
0.55 TPS
(Verificaciones
refresh token)
OAuth
2
(LDAP)
4 saltos
12000 TPS
backend
3000 TPS
(verifica firma)
12000 TPS
(verifica firma)
Password enviados
(post oauth2/token …)
1000/daily
(HTTP+SSL)
@CesarHgt @tomitribeJavaDay Ecuador 2018
“No!”
“Dame toda la
información del
salario de José.”
@CesarHgt @tomitribeJavaDay Ecuador 2018
“Claro!”
“Dame toda la
información del
salario de José.”
@CesarHgt @tomitribeJavaDay Ecuador 2018
OAuth 2 + JWT
Envío de
Tokens válidos
3000 TPS
(HTTP+SSL)
IP
whitelisting
0.55 TPS
(verifica refresh token)
Password enviados
1000/daily
(HTTP+SSL)
(LDAP)
4 saltos
12000 TPS
backend
9000 TPS
(verifica firma)
12000 TPS
(verifica firma)
Token inválidos
6000 TPS
(HTTP+SSL)
@CesarHgt @tomitribeJavaDay Ecuador 2018
https://connect2id.com/products/nimbus-jose-jwt
Librería JWT
https://github.com/jwtk/jjwt
https://github.com/auth0/java-jwt
@CesarHgt @tomitribeJavaDay Ecuador 2018
Eclipse MicroProfile
@CesarHgt @tomitribeJavaDay Ecuador 2018
MicroProfile
∙ Comunidad Open-Source de la fundación Eclipse
∙ Enfocada en Microservicios bajo JavaEE
∙ Generadora de: Specificaciones, API y TCK.
∙ Implementado por diferentes entidades
http://microprofile.io/
@CesarHgt @tomitribeJavaDay Ecuador 2018
MicroProfile JWT
MicroProfile 2.0
JAX-RS 2.1JSON-P 1.1CDI 2.0
Config 1.3
Fault
Tolerance
1.1
JWT
RBAC 1.1
Health
Check 1.0
Metrics 1.1
Open
Tracing 1.1
Open API
1.0
Rest Client
1.1
JSON-B 1.0
JWT
RBAC 1.1
https://microprofile.io/project/eclipse/microprofile-jwt-auth/
Estándares de Seguridad
● OAuth 2.0
● OpenID Connect
● JSON Web Tokens
(JWT)
Tecnologías Java
● JAX-RS
● CDI
● JSON-P.
@CesarHgt @tomitribeJavaDay Ecuador 2018
Moviefun Diagrama de Despliegue
Gateway
@CesarHgt @tomitribeJavaDay Ecuador 2018
Incluyendo Microprofile JWT en
una aplicación JAX-RS
@CesarHgt @tomitribeJavaDay Ecuador 2018
● @LoginConfig
● web.xml login-config
element equivalent
package org.superbiz.moviefun.rest;
import org.eclipse.microprofile.auth.LoginConfig;
import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;
@ApplicationPath("/rest")
@LoginConfig(authMethod = "MP-JWT")
public class ApplicationConfig extends Application {
// let the server discover the endpoints
}
ApplicationConfig.java
@CesarHgt @tomitribeJavaDay Ecuador 2018
Mapeando MP-JWT Tokens con
Java EE Container APIs
@CesarHgt @tomitribeJavaDay Ecuador 2018
● Injection of the currently
authenticated caller
● Injection of claims
@Path("movies")
@Produces({"application/json"})
@ApplicationScoped
public class MoviesResource {
@Inject
private JsonWebToken jwtPrincipal;
@Inject
@Claim("email")
private ClaimValue<String> email;
MoviesResource.java
@CesarHgt @tomitribeJavaDay Ecuador 2018
Integración con
JAX-RS Container API
@CesarHgt @tomitribeJavaDay Ecuador 2018
● securityContext.isUserInRole
● MP-JWT "groups" claim
● getUserPrincipal()
import javax.ws.rs.core.SecurityContext;
@Path("movies")
@Produces({"application/json"})
@ApplicationScoped
public class MoviesResource {
@Context
private SecurityContext securityContext;
@POST
@Consumes("application/json")
public Movie addMovie(Movie movie) {
if (!securityContext.isUserInRole("create")) {
throw new WebApplicationException("Bad permission.",
Response.Status.FORBIDDEN);
}
service.addMovie(movie);
return movie;
}
MoviesResource.java
@CesarHgt @tomitribeJavaDay Ecuador 2018
● @RolesAllowed
● @PermitAll
● @DenyAll
● 2.9 - 2.12 JSR-250
@PUT
@Path("{id}")
@Consumes("application/json")
@RolesAllowed("update")
public Movie editMovie( @PathParam("id") final long id,
Movie movie) {
....
return movie;
}
@DELETE
@Path("{id}")
@RolesAllowed("delete")
public void deleteMovie(@PathParam("id") long id) {
....
service.deleteMovie(id);
}
MoviesResource.java
@CesarHgt @tomitribeJavaDay Ecuador 2018
Public Key Configuration
@CesarHgt @tomitribeJavaDay Ecuador 2018
@Produces
Optional<JWTAuthContextInfo> getOptionalContextInfo() throws Exception {
JWTAuthContextInfo contextInfo = new JWTAuthContextInfo();
contextInfo.setIssuedBy("/oauth2/token");
byte[] encodedBytes = TokenUtil.readPublicKey("/publicKey.pem").getEncoded();
final X509EncodedKeySpec spec = new X509EncodedKeySpec(encodedBytes);
final KeyFactory kf = KeyFactory.getInstance("RSA");
final RSAPublicKey pk = (RSAPublicKey) kf.generatePublic(spec);
contextInfo.setSignerKey(pk);
contextInfo.setExpGracePeriodSecs(10);
return Optional.of(contextInfo);
}
@Produces
JWTAuthContextInfo getContextInfo() throws Exception { return getOptionalContextInfo().get(); }
}
MoviesMPJWTConfigurationProvider.java
@CesarHgt @tomitribeJavaDay Ecuador 2018
https://tribestream.io/javadayec/
Gracias
CONTACTANOS @TOMITRIBE

More Related Content

What's hot

POWA50 - Power Apps と Power Automate の大規模な管理とサポート
POWA50 - Power Apps と Power Automate の大規模な管理とサポートPOWA50 - Power Apps と Power Automate の大規模な管理とサポート
POWA50 - Power Apps と Power Automate の大規模な管理とサポートTaiki Yoshida
 
SharePoint Online 外部共有を考える
SharePoint Online 外部共有を考えるSharePoint Online 外部共有を考える
SharePoint Online 外部共有を考えるTeruchika Yamada
 
SIngle Sign On with Keycloak
SIngle Sign On with KeycloakSIngle Sign On with Keycloak
SIngle Sign On with KeycloakJulien Pivotto
 
エンタープライズITでのOpenID Connect利用ガイドライン
エンタープライズITでのOpenID Connect利用ガイドラインエンタープライズITでのOpenID Connect利用ガイドライン
エンタープライズITでのOpenID Connect利用ガイドラインTatsuo Kudo
 
OpenId Connect Protocol
OpenId Connect ProtocolOpenId Connect Protocol
OpenId Connect ProtocolMichael Furman
 
Getting Started & Driving Success With Power Platform At Scale
Getting Started & Driving Success With Power Platform At ScaleGetting Started & Driving Success With Power Platform At Scale
Getting Started & Driving Success With Power Platform At ScaleRichard Harbridge
 
Power Platform (Power Automate)
Power Platform (Power Automate)Power Platform (Power Automate)
Power Platform (Power Automate)OluwatobiYusuf2
 
OAuth2 and Spring Security
OAuth2 and Spring SecurityOAuth2 and Spring Security
OAuth2 and Spring SecurityOrest Ivasiv
 
はじめよう!PowerAppsキホンのキ kintone × Microsoft Flow / Logic Appsの話
はじめよう!PowerAppsキホンのキ kintone × Microsoft Flow / Logic Appsの話はじめよう!PowerAppsキホンのキ kintone × Microsoft Flow / Logic Appsの話
はじめよう!PowerAppsキホンのキ kintone × Microsoft Flow / Logic Appsの話典子 松本
 
高品質な Teams アプリを開発するためのポイント
高品質な Teams アプリを開発するためのポイント高品質な Teams アプリを開発するためのポイント
高品質な Teams アプリを開発するためのポイントOsamu Monoe
 
Sentiment Analaysis on Twitter
Sentiment Analaysis on TwitterSentiment Analaysis on Twitter
Sentiment Analaysis on TwitterNitish J Prabhu
 
Top 10 Mobile Application Testing Tools | Edureka
Top 10 Mobile Application Testing Tools | EdurekaTop 10 Mobile Application Testing Tools | Edureka
Top 10 Mobile Application Testing Tools | EdurekaEdureka!
 
OWASP WTE - Now in the Cloud!
OWASP WTE - Now in the Cloud!OWASP WTE - Now in the Cloud!
OWASP WTE - Now in the Cloud!Matt Tesauro
 
フリーでできるセキュリティ インフラ(Nessus)編
フリーでできるセキュリティ インフラ(Nessus)編フリーでできるセキュリティ インフラ(Nessus)編
フリーでできるセキュリティ インフラ(Nessus)編abend_cve_9999_0001
 
Power Apps? なにそれ? おいしいの?
Power Apps? なにそれ? おいしいの?Power Apps? なにそれ? おいしいの?
Power Apps? なにそれ? おいしいの?Junichi Kodama
 
Microsoft Viva Essential in 45 minutes - Collabdays Bletchley 2022
Microsoft Viva Essential in 45 minutes - Collabdays Bletchley 2022Microsoft Viva Essential in 45 minutes - Collabdays Bletchley 2022
Microsoft Viva Essential in 45 minutes - Collabdays Bletchley 2022Chirag Patel
 
Power Platform Presentation.pptx
Power Platform Presentation.pptxPower Platform Presentation.pptx
Power Platform Presentation.pptxShadrackLangat1
 
SharePoint 開発でできること 2019年9月版
SharePoint 開発でできること 2019年9月版SharePoint 開発でできること 2019年9月版
SharePoint 開発でできること 2019年9月版Hiroaki Oikawa
 

What's hot (20)

POWA50 - Power Apps と Power Automate の大規模な管理とサポート
POWA50 - Power Apps と Power Automate の大規模な管理とサポートPOWA50 - Power Apps と Power Automate の大規模な管理とサポート
POWA50 - Power Apps と Power Automate の大規模な管理とサポート
 
SharePoint Online 外部共有を考える
SharePoint Online 外部共有を考えるSharePoint Online 外部共有を考える
SharePoint Online 外部共有を考える
 
JSON Web Tokens
JSON Web TokensJSON Web Tokens
JSON Web Tokens
 
SIngle Sign On with Keycloak
SIngle Sign On with KeycloakSIngle Sign On with Keycloak
SIngle Sign On with Keycloak
 
エンタープライズITでのOpenID Connect利用ガイドライン
エンタープライズITでのOpenID Connect利用ガイドラインエンタープライズITでのOpenID Connect利用ガイドライン
エンタープライズITでのOpenID Connect利用ガイドライン
 
OpenId Connect Protocol
OpenId Connect ProtocolOpenId Connect Protocol
OpenId Connect Protocol
 
Getting Started & Driving Success With Power Platform At Scale
Getting Started & Driving Success With Power Platform At ScaleGetting Started & Driving Success With Power Platform At Scale
Getting Started & Driving Success With Power Platform At Scale
 
Power Platform (Power Automate)
Power Platform (Power Automate)Power Platform (Power Automate)
Power Platform (Power Automate)
 
OAuth2 and Spring Security
OAuth2 and Spring SecurityOAuth2 and Spring Security
OAuth2 and Spring Security
 
はじめよう!PowerAppsキホンのキ kintone × Microsoft Flow / Logic Appsの話
はじめよう!PowerAppsキホンのキ kintone × Microsoft Flow / Logic Appsの話はじめよう!PowerAppsキホンのキ kintone × Microsoft Flow / Logic Appsの話
はじめよう!PowerAppsキホンのキ kintone × Microsoft Flow / Logic Appsの話
 
高品質な Teams アプリを開発するためのポイント
高品質な Teams アプリを開発するためのポイント高品質な Teams アプリを開発するためのポイント
高品質な Teams アプリを開発するためのポイント
 
Sentiment Analaysis on Twitter
Sentiment Analaysis on TwitterSentiment Analaysis on Twitter
Sentiment Analaysis on Twitter
 
Top 10 Mobile Application Testing Tools | Edureka
Top 10 Mobile Application Testing Tools | EdurekaTop 10 Mobile Application Testing Tools | Edureka
Top 10 Mobile Application Testing Tools | Edureka
 
OWASP WTE - Now in the Cloud!
OWASP WTE - Now in the Cloud!OWASP WTE - Now in the Cloud!
OWASP WTE - Now in the Cloud!
 
フリーでできるセキュリティ インフラ(Nessus)編
フリーでできるセキュリティ インフラ(Nessus)編フリーでできるセキュリティ インフラ(Nessus)編
フリーでできるセキュリティ インフラ(Nessus)編
 
Power Apps? なにそれ? おいしいの?
Power Apps? なにそれ? おいしいの?Power Apps? なにそれ? おいしいの?
Power Apps? なにそれ? おいしいの?
 
Microsoft Viva Essential in 45 minutes - Collabdays Bletchley 2022
Microsoft Viva Essential in 45 minutes - Collabdays Bletchley 2022Microsoft Viva Essential in 45 minutes - Collabdays Bletchley 2022
Microsoft Viva Essential in 45 minutes - Collabdays Bletchley 2022
 
Power Platform Presentation.pptx
Power Platform Presentation.pptxPower Platform Presentation.pptx
Power Platform Presentation.pptx
 
Getting your enterprise ready for Microsoft 365 Copilot
Getting your enterprise ready for Microsoft 365 CopilotGetting your enterprise ready for Microsoft 365 Copilot
Getting your enterprise ready for Microsoft 365 Copilot
 
SharePoint 開発でできること 2019年9月版
SharePoint 開発でできること 2019年9月版SharePoint 開発でできること 2019年9月版
SharePoint 開発でできること 2019年9月版
 

Similar to Seguridad en microservicios via micro profile jwt

Stateless Microservice Security via JWT and MicroProfile - Mexico
Stateless Microservice Security via JWT and MicroProfile - MexicoStateless Microservice Security via JWT and MicroProfile - Mexico
Stateless Microservice Security via JWT and MicroProfile - MexicoOtávio Santana
 
Stateless Microservice Security via JWT and MicroProfile - ES
Stateless Microservice Security via JWT and MicroProfile - ES Stateless Microservice Security via JWT and MicroProfile - ES
Stateless Microservice Security via JWT and MicroProfile - ES Otavio Santana
 
Stateless Microservice Security via JWT and MicroProfile - Guatemala
Stateless Microservice Security via JWT and MicroProfile - GuatemalaStateless Microservice Security via JWT and MicroProfile - Guatemala
Stateless Microservice Security via JWT and MicroProfile - GuatemalaOtávio Santana
 
2018 colombia deconstruyendo y evolucionando la seguridad en servicios rest
2018 colombia deconstruyendo y evolucionando la seguridad en servicios rest2018 colombia deconstruyendo y evolucionando la seguridad en servicios rest
2018 colombia deconstruyendo y evolucionando la seguridad en servicios restCésar Hernández
 
2018 ecuador deconstruyendo y evolucionando la seguridad en servicios rest
2018 ecuador deconstruyendo y evolucionando la seguridad en servicios rest2018 ecuador deconstruyendo y evolucionando la seguridad en servicios rest
2018 ecuador deconstruyendo y evolucionando la seguridad en servicios restCésar Hernández
 
2018 Madrid JUG Deconstructing REST Security
2018 Madrid JUG Deconstructing REST Security2018 Madrid JUG Deconstructing REST Security
2018 Madrid JUG Deconstructing REST SecurityBruno Baptista
 
Deconstructing and Evolving REST security
Deconstructing and Evolving REST securityDeconstructing and Evolving REST security
Deconstructing and Evolving REST securityJonathan Gallimore
 
2018 Denver JUG Deconstructing and Evolving REST Security
2018 Denver JUG Deconstructing and Evolving REST Security2018 Denver JUG Deconstructing and Evolving REST Security
2018 Denver JUG Deconstructing and Evolving REST SecurityDavid Blevins
 
2018 jPrime Deconstructing and Evolving REST Security
2018 jPrime Deconstructing and Evolving REST Security2018 jPrime Deconstructing and Evolving REST Security
2018 jPrime Deconstructing and Evolving REST SecurityDavid Blevins
 
2017 Devoxx MA Deconstructing and Evolving REST Security
2017 Devoxx MA Deconstructing and Evolving REST Security2017 Devoxx MA Deconstructing and Evolving REST Security
2017 Devoxx MA Deconstructing and Evolving REST SecurityDavid Blevins
 
2017 JavaOne Deconstructing and Evolving REST Security
2017 JavaOne Deconstructing and Evolving REST Security2017 JavaOne Deconstructing and Evolving REST Security
2017 JavaOne Deconstructing and Evolving REST SecurityDavid Blevins
 
2018 SDJUG Deconstructing and Evolving REST Security
2018 SDJUG Deconstructing and Evolving REST Security2018 SDJUG Deconstructing and Evolving REST Security
2018 SDJUG Deconstructing and Evolving REST SecurityDavid Blevins
 
2019 ITkonekt Stateless REST Security with MicroProfile JWT
2019 ITkonekt Stateless REST Security with MicroProfile JWT2019 ITkonekt Stateless REST Security with MicroProfile JWT
2019 ITkonekt Stateless REST Security with MicroProfile JWTJean-Louis MONTEIRO
 
2018 Boulder JUG Deconstructing and Evolving REST Security
2018 Boulder JUG Deconstructing and Evolving REST Security2018 Boulder JUG Deconstructing and Evolving REST Security
2018 Boulder JUG Deconstructing and Evolving REST SecurityDavid Blevins
 
2018 IterateConf Deconstructing and Evolving REST Security
2018 IterateConf Deconstructing and Evolving REST Security2018 IterateConf Deconstructing and Evolving REST Security
2018 IterateConf Deconstructing and Evolving REST SecurityDavid Blevins
 
Dublin JUG Stateless Microservice Security via JWT, TomEE and MicroProfile
Dublin JUG Stateless Microservice Security via JWT, TomEE and MicroProfileDublin JUG Stateless Microservice Security via JWT, TomEE and MicroProfile
Dublin JUG Stateless Microservice Security via JWT, TomEE and MicroProfileJean-Louis MONTEIRO
 
2018 JavaLand Deconstructing and Evolving REST Security
2018 JavaLand Deconstructing and Evolving REST Security2018 JavaLand Deconstructing and Evolving REST Security
2018 JavaLand Deconstructing and Evolving REST SecurityDavid Blevins
 
2016 JavaOne Deconstructing REST Security
2016 JavaOne Deconstructing REST Security2016 JavaOne Deconstructing REST Security
2016 JavaOne Deconstructing REST SecurityDavid Blevins
 
How OAuth and portable data can revolutionize your web app - Chris Messina
How OAuth and portable data can revolutionize your web app - Chris MessinaHow OAuth and portable data can revolutionize your web app - Chris Messina
How OAuth and portable data can revolutionize your web app - Chris MessinaCarsonified Team
 

Similar to Seguridad en microservicios via micro profile jwt (20)

Stateless Microservice Security via JWT and MicroProfile - Mexico
Stateless Microservice Security via JWT and MicroProfile - MexicoStateless Microservice Security via JWT and MicroProfile - Mexico
Stateless Microservice Security via JWT and MicroProfile - Mexico
 
Stateless Microservice Security via JWT and MicroProfile - ES
Stateless Microservice Security via JWT and MicroProfile - ES Stateless Microservice Security via JWT and MicroProfile - ES
Stateless Microservice Security via JWT and MicroProfile - ES
 
Stateless Microservice Security via JWT and MicroProfile - Guatemala
Stateless Microservice Security via JWT and MicroProfile - GuatemalaStateless Microservice Security via JWT and MicroProfile - Guatemala
Stateless Microservice Security via JWT and MicroProfile - Guatemala
 
2018 colombia deconstruyendo y evolucionando la seguridad en servicios rest
2018 colombia deconstruyendo y evolucionando la seguridad en servicios rest2018 colombia deconstruyendo y evolucionando la seguridad en servicios rest
2018 colombia deconstruyendo y evolucionando la seguridad en servicios rest
 
2018 ecuador deconstruyendo y evolucionando la seguridad en servicios rest
2018 ecuador deconstruyendo y evolucionando la seguridad en servicios rest2018 ecuador deconstruyendo y evolucionando la seguridad en servicios rest
2018 ecuador deconstruyendo y evolucionando la seguridad en servicios rest
 
2018 Madrid JUG Deconstructing REST Security
2018 Madrid JUG Deconstructing REST Security2018 Madrid JUG Deconstructing REST Security
2018 Madrid JUG Deconstructing REST Security
 
Deconstructing and Evolving REST security
Deconstructing and Evolving REST securityDeconstructing and Evolving REST security
Deconstructing and Evolving REST security
 
2018 Denver JUG Deconstructing and Evolving REST Security
2018 Denver JUG Deconstructing and Evolving REST Security2018 Denver JUG Deconstructing and Evolving REST Security
2018 Denver JUG Deconstructing and Evolving REST Security
 
2018 jPrime Deconstructing and Evolving REST Security
2018 jPrime Deconstructing and Evolving REST Security2018 jPrime Deconstructing and Evolving REST Security
2018 jPrime Deconstructing and Evolving REST Security
 
2017 Devoxx MA Deconstructing and Evolving REST Security
2017 Devoxx MA Deconstructing and Evolving REST Security2017 Devoxx MA Deconstructing and Evolving REST Security
2017 Devoxx MA Deconstructing and Evolving REST Security
 
2017 JavaOne Deconstructing and Evolving REST Security
2017 JavaOne Deconstructing and Evolving REST Security2017 JavaOne Deconstructing and Evolving REST Security
2017 JavaOne Deconstructing and Evolving REST Security
 
2018 SDJUG Deconstructing and Evolving REST Security
2018 SDJUG Deconstructing and Evolving REST Security2018 SDJUG Deconstructing and Evolving REST Security
2018 SDJUG Deconstructing and Evolving REST Security
 
2019 ITkonekt Stateless REST Security with MicroProfile JWT
2019 ITkonekt Stateless REST Security with MicroProfile JWT2019 ITkonekt Stateless REST Security with MicroProfile JWT
2019 ITkonekt Stateless REST Security with MicroProfile JWT
 
2018 Boulder JUG Deconstructing and Evolving REST Security
2018 Boulder JUG Deconstructing and Evolving REST Security2018 Boulder JUG Deconstructing and Evolving REST Security
2018 Boulder JUG Deconstructing and Evolving REST Security
 
2018 IterateConf Deconstructing and Evolving REST Security
2018 IterateConf Deconstructing and Evolving REST Security2018 IterateConf Deconstructing and Evolving REST Security
2018 IterateConf Deconstructing and Evolving REST Security
 
Dublin JUG Stateless Microservice Security via JWT, TomEE and MicroProfile
Dublin JUG Stateless Microservice Security via JWT, TomEE and MicroProfileDublin JUG Stateless Microservice Security via JWT, TomEE and MicroProfile
Dublin JUG Stateless Microservice Security via JWT, TomEE and MicroProfile
 
2018 JavaLand Deconstructing and Evolving REST Security
2018 JavaLand Deconstructing and Evolving REST Security2018 JavaLand Deconstructing and Evolving REST Security
2018 JavaLand Deconstructing and Evolving REST Security
 
2016 JavaOne Deconstructing REST Security
2016 JavaOne Deconstructing REST Security2016 JavaOne Deconstructing REST Security
2016 JavaOne Deconstructing REST Security
 
OAuth FTW
OAuth FTWOAuth FTW
OAuth FTW
 
How OAuth and portable data can revolutionize your web app - Chris Messina
How OAuth and portable data can revolutionize your web app - Chris MessinaHow OAuth and portable data can revolutionize your web app - Chris Messina
How OAuth and portable data can revolutionize your web app - Chris Messina
 

More from César Hernández

7 Recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...
7 Recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...7 Recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...
7 Recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...César Hernández
 
Paving the road with Jakarta EE and Apache TomEE - JCON 2021
Paving the road with Jakarta EE  and Apache TomEE - JCON 2021Paving the road with Jakarta EE  and Apache TomEE - JCON 2021
Paving the road with Jakarta EE and Apache TomEE - JCON 2021César Hernández
 
7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...
7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...
7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...César Hernández
 
Keeping brazil's medical industry safe with Micro Profile [TDC 2021]
Keeping brazil's medical industry safe with Micro Profile [TDC 2021]Keeping brazil's medical industry safe with Micro Profile [TDC 2021]
Keeping brazil's medical industry safe with Micro Profile [TDC 2021]César Hernández
 
Aprende, contribuye, y surfea Cloud Native Java - GuateJUG 2021
Aprende, contribuye, y surfea Cloud Native Java - GuateJUG 2021Aprende, contribuye, y surfea Cloud Native Java - GuateJUG 2021
Aprende, contribuye, y surfea Cloud Native Java - GuateJUG 2021César Hernández
 
Paving the way with Jakarta EE and Apache TomEE - JCConf
Paving the way with Jakarta EE  and Apache TomEE - JCConfPaving the way with Jakarta EE  and Apache TomEE - JCConf
Paving the way with Jakarta EE and Apache TomEE - JCConfCésar Hernández
 
Keeping brazil's medical industry safe with Micro Profile and JakartaEE - Jak...
Keeping brazil's medical industry safe with Micro Profile and JakartaEE - Jak...Keeping brazil's medical industry safe with Micro Profile and JakartaEE - Jak...
Keeping brazil's medical industry safe with Micro Profile and JakartaEE - Jak...César Hernández
 
Pavimentando el camino con Jakarta EE 9 y Apache TomEE
Pavimentando el camino con Jakarta EE 9 y Apache TomEE Pavimentando el camino con Jakarta EE 9 y Apache TomEE
Pavimentando el camino con Jakarta EE 9 y Apache TomEE César Hernández
 
It is easy contributing to open source - JCON 2020
It is easy contributing to open source - JCON 2020It is easy contributing to open source - JCON 2020
It is easy contributing to open source - JCON 2020César Hernández
 
It is easy contributing to Open Source - ECLIPSE CON 2020
It is easy contributing to Open Source - ECLIPSE CON 2020It is easy contributing to Open Source - ECLIPSE CON 2020
It is easy contributing to Open Source - ECLIPSE CON 2020César Hernández
 
Paving the way with Jakarta EE and apache TomEE at cloudconferenceday
Paving the way with Jakarta EE and apache TomEE at cloudconferencedayPaving the way with Jakarta EE and apache TomEE at cloudconferenceday
Paving the way with Jakarta EE and apache TomEE at cloudconferencedayCésar Hernández
 
Pavimentando el Camino con Jakarta EE 9 y Apache TomEE 9.0.0
Pavimentando el Camino con Jakarta EE 9 y Apache TomEE 9.0.0Pavimentando el Camino con Jakarta EE 9 y Apache TomEE 9.0.0
Pavimentando el Camino con Jakarta EE 9 y Apache TomEE 9.0.0César Hernández
 
Creando microservicios con java micro profile y tomee - CUNORI 2020
Creando microservicios con java micro profile y tomee - CUNORI 2020Creando microservicios con java micro profile y tomee - CUNORI 2020
Creando microservicios con java micro profile y tomee - CUNORI 2020César Hernández
 
Paving the way with Jakarta EE and Apache TomEE - itkonekt 2020
Paving the way with Jakarta EE and Apache TomEE - itkonekt 2020Paving the way with Jakarta EE and Apache TomEE - itkonekt 2020
Paving the way with Jakarta EE and Apache TomEE - itkonekt 2020César Hernández
 
Creando microservicios con Java MicroProfile y TomEE - OGBT
Creando microservicios con Java MicroProfile y TomEE  - OGBTCreando microservicios con Java MicroProfile y TomEE  - OGBT
Creando microservicios con Java MicroProfile y TomEE - OGBTCésar Hernández
 
Creando microservicios con Java, Microprofile y TomEE - Baranquilla JUG
Creando microservicios con Java, Microprofile y TomEE - Baranquilla JUGCreando microservicios con Java, Microprofile y TomEE - Baranquilla JUG
Creando microservicios con Java, Microprofile y TomEE - Baranquilla JUGCésar Hernández
 
Creando microservicios con Java y Microprofile - Nicaragua JUG
Creando microservicios con Java y Microprofile - Nicaragua JUGCreando microservicios con Java y Microprofile - Nicaragua JUG
Creando microservicios con Java y Microprofile - Nicaragua JUGCésar Hernández
 
Keeping brazil's medical industry safe with Micro Profile and JakartaEE - Jak...
Keeping brazil's medical industry safe with Micro Profile and JakartaEE - Jak...Keeping brazil's medical industry safe with Micro Profile and JakartaEE - Jak...
Keeping brazil's medical industry safe with Micro Profile and JakartaEE - Jak...César Hernández
 
Es fácil contribuir al open source - Bolivia JUG 2020
Es fácil contribuir al open source - Bolivia JUG 2020Es fácil contribuir al open source - Bolivia JUG 2020
Es fácil contribuir al open source - Bolivia JUG 2020César Hernández
 
Its easy! contributing to open source - Devnexus 2020
Its easy! contributing to open source - Devnexus 2020Its easy! contributing to open source - Devnexus 2020
Its easy! contributing to open source - Devnexus 2020César Hernández
 

More from César Hernández (20)

7 Recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...
7 Recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...7 Recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...
7 Recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...
 
Paving the road with Jakarta EE and Apache TomEE - JCON 2021
Paving the road with Jakarta EE  and Apache TomEE - JCON 2021Paving the road with Jakarta EE  and Apache TomEE - JCON 2021
Paving the road with Jakarta EE and Apache TomEE - JCON 2021
 
7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...
7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...
7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...
 
Keeping brazil's medical industry safe with Micro Profile [TDC 2021]
Keeping brazil's medical industry safe with Micro Profile [TDC 2021]Keeping brazil's medical industry safe with Micro Profile [TDC 2021]
Keeping brazil's medical industry safe with Micro Profile [TDC 2021]
 
Aprende, contribuye, y surfea Cloud Native Java - GuateJUG 2021
Aprende, contribuye, y surfea Cloud Native Java - GuateJUG 2021Aprende, contribuye, y surfea Cloud Native Java - GuateJUG 2021
Aprende, contribuye, y surfea Cloud Native Java - GuateJUG 2021
 
Paving the way with Jakarta EE and Apache TomEE - JCConf
Paving the way with Jakarta EE  and Apache TomEE - JCConfPaving the way with Jakarta EE  and Apache TomEE - JCConf
Paving the way with Jakarta EE and Apache TomEE - JCConf
 
Keeping brazil's medical industry safe with Micro Profile and JakartaEE - Jak...
Keeping brazil's medical industry safe with Micro Profile and JakartaEE - Jak...Keeping brazil's medical industry safe with Micro Profile and JakartaEE - Jak...
Keeping brazil's medical industry safe with Micro Profile and JakartaEE - Jak...
 
Pavimentando el camino con Jakarta EE 9 y Apache TomEE
Pavimentando el camino con Jakarta EE 9 y Apache TomEE Pavimentando el camino con Jakarta EE 9 y Apache TomEE
Pavimentando el camino con Jakarta EE 9 y Apache TomEE
 
It is easy contributing to open source - JCON 2020
It is easy contributing to open source - JCON 2020It is easy contributing to open source - JCON 2020
It is easy contributing to open source - JCON 2020
 
It is easy contributing to Open Source - ECLIPSE CON 2020
It is easy contributing to Open Source - ECLIPSE CON 2020It is easy contributing to Open Source - ECLIPSE CON 2020
It is easy contributing to Open Source - ECLIPSE CON 2020
 
Paving the way with Jakarta EE and apache TomEE at cloudconferenceday
Paving the way with Jakarta EE and apache TomEE at cloudconferencedayPaving the way with Jakarta EE and apache TomEE at cloudconferenceday
Paving the way with Jakarta EE and apache TomEE at cloudconferenceday
 
Pavimentando el Camino con Jakarta EE 9 y Apache TomEE 9.0.0
Pavimentando el Camino con Jakarta EE 9 y Apache TomEE 9.0.0Pavimentando el Camino con Jakarta EE 9 y Apache TomEE 9.0.0
Pavimentando el Camino con Jakarta EE 9 y Apache TomEE 9.0.0
 
Creando microservicios con java micro profile y tomee - CUNORI 2020
Creando microservicios con java micro profile y tomee - CUNORI 2020Creando microservicios con java micro profile y tomee - CUNORI 2020
Creando microservicios con java micro profile y tomee - CUNORI 2020
 
Paving the way with Jakarta EE and Apache TomEE - itkonekt 2020
Paving the way with Jakarta EE and Apache TomEE - itkonekt 2020Paving the way with Jakarta EE and Apache TomEE - itkonekt 2020
Paving the way with Jakarta EE and Apache TomEE - itkonekt 2020
 
Creando microservicios con Java MicroProfile y TomEE - OGBT
Creando microservicios con Java MicroProfile y TomEE  - OGBTCreando microservicios con Java MicroProfile y TomEE  - OGBT
Creando microservicios con Java MicroProfile y TomEE - OGBT
 
Creando microservicios con Java, Microprofile y TomEE - Baranquilla JUG
Creando microservicios con Java, Microprofile y TomEE - Baranquilla JUGCreando microservicios con Java, Microprofile y TomEE - Baranquilla JUG
Creando microservicios con Java, Microprofile y TomEE - Baranquilla JUG
 
Creando microservicios con Java y Microprofile - Nicaragua JUG
Creando microservicios con Java y Microprofile - Nicaragua JUGCreando microservicios con Java y Microprofile - Nicaragua JUG
Creando microservicios con Java y Microprofile - Nicaragua JUG
 
Keeping brazil's medical industry safe with Micro Profile and JakartaEE - Jak...
Keeping brazil's medical industry safe with Micro Profile and JakartaEE - Jak...Keeping brazil's medical industry safe with Micro Profile and JakartaEE - Jak...
Keeping brazil's medical industry safe with Micro Profile and JakartaEE - Jak...
 
Es fácil contribuir al open source - Bolivia JUG 2020
Es fácil contribuir al open source - Bolivia JUG 2020Es fácil contribuir al open source - Bolivia JUG 2020
Es fácil contribuir al open source - Bolivia JUG 2020
 
Its easy! contributing to open source - Devnexus 2020
Its easy! contributing to open source - Devnexus 2020Its easy! contributing to open source - Devnexus 2020
Its easy! contributing to open source - Devnexus 2020
 

Recently uploaded

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 

Recently uploaded (20)

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 

Seguridad en microservicios via micro profile jwt

  • 1. @CesarHgt @tomitribeJavaDay Ecuador 2018 Seguridad en Microservicios via Microprofile JWT César Hernández Tomitribe
  • 2. @CesarHgt @tomitribeJavaDay Ecuador 2018 ● Senior Software Engineer at Tomitribe ● Java Champion ● Ducke’s Choice Award 2016, 2017 ● Oracle Certified Professional ● +10 experience with Java EE ● Eclipse Commiter: Jakarta EE TCK, JAX-WS and Microprofile. ● Open Source advocate, teacher and public speaker César Hernández
  • 3. @CesarHgt @tomitribeJavaDay Ecuador 2018 Java es Comunidad
  • 4. @CesarHgt @tomitribeJavaDay Ecuador 2018 https://tribestream.io/javadayec/ Diapositivas y referencias CONTACTANOS @TOMITRIBE
  • 5. @CesarHgt @tomitribeJavaDay Ecuador 2018 “Lo mejor de los estándares es que terminas teniendo muchas opciones por escoger.” - Andrew S. Tanenbaum
  • 6. @CesarHgt @tomitribeJavaDay Ecuador 2018 Opciones de seguridad para Microservicios ● Más allá de Basic Auth ● Teoría de OAuth 2.0 ● Introducción a JWT ● Eclipse Microprofile ● Demo
  • 7. @CesarHgt @tomitribeJavaDay Ecuador 2018 Línea Base 1000 usuarios x 3 TPS 4 saltos 3000 TPS frontend 12000 TPS backend
  • 8. @CesarHgt @tomitribeJavaDay Ecuador 2018 Basic Auth (y sus problemas)
  • 9. @CesarHgt @tomitribeJavaDay Ecuador 2018 Mensaje en Basic Auth POST /painter/color/object HTTP/1.1 Host: localhost:8443 Authorization: Basic c25vb3B5OnBhc3M= User-Agent: curl/7.43.0 Accept: */* Content-Type: application/json Content-Length: 45 {"color":{"b":255,"g":0,"name":"blue","r":0}}
  • 10. @CesarHgt @tomitribeJavaDay Ecuador 2018 Basic Auth Password Sent 3000 TPS (HTTP+SSL) username+password Base64 (no auth) (LDAP) 12000 TPS (HTTP) 3000 TPS
  • 11. @CesarHgt @tomitribeJavaDay Ecuador 2018 Basic Auth Password Sent 3000 TPS (HTTP+SSL) username+password Base64 Lista Blanca de IP 3000 TPS (LDAP) 12000 TPS (HTTP)
  • 12. @CesarHgt @tomitribeJavaDay Ecuador 2018 “Dame toda la información del salario de José.” “No se quien eres, … pero por supuesto!”
  • 13. @CesarHgt @tomitribeJavaDay Ecuador 2018 Ataque de fuerza bruta: Basic Auth Password válidos 3000 TPS (HTTP+SSL) Lista Blanca IP 9000 TPS (LDAP) 12000 TPS (HTTP) Passwords inválidos 6000 TPS (HTTP+SSL)
  • 14. @CesarHgt @tomitribeJavaDay Ecuador 2018 OAuth 2.0 (y sus problemas)
  • 19. @CesarHgt @tomitribeJavaDay Ecuador 2018 OAuth 2 - Password Grant (LDAP) (Repositorio de Token) Verificación de Password Generación de Token Post /oauth2/token Host: api.superbliz.io User-Agent: curl/7.43.0 Accept: */* Content-Type: application/x-www-form-urlencoded Content-Length: 54 grand_type=password&username=snoopy&password=woodstock
  • 20. @CesarHgt @tomitribeJavaDay Ecuador 2018 OAuth 2 - Password Grant (LDAP) Verificación de Password Generación de Token (Repositorio de Token) Post /oauth2/token Host: api.superbliz.io User-Agent: curl/7.43.0 Accept: */* Content-Type: application/x-www-form-urlencoded Content-Length: 54 grand_type=password&username=snoopy&password=woodstock
  • 21. @CesarHgt @tomitribeJavaDay Ecuador 2018 Mensaje OAuth 2.0 POST /painter/color/object HTTP/1.1 Host: api.superbiz.io Authorization: Bearer 2YotnFZFEjr1zCsicMWpAA User-Agent: curl/7.43.0 Accept: */* Content-Type: application/json Content-Length: 45 {"color":{"r":0,"g":0,"b":255,"name":"blue"}}
  • 22. @CesarHgt @tomitribeJavaDay Ecuador 2018 Mensaje OAuth 2.0 POST /painter/color/palette HTTP/1.1 Host: api.superbiz.io Authorization: Bearer 2YotnFZFEjr1zCsicMWpAA User-Agent: curl/7.43.0 Accept: */* Content-Type: application/json Content-Length: 45 {"color":{"r":0,"g":255,"b":0,"name":"green"}}
  • 23. @CesarHgt @tomitribeJavaDay Ecuador 2018 Mensaje OAuth 2.0 POST /painter/color/select HTTP/1.1 Host: api.superbiz.io Authorization: Bearer 2YotnFZFEjr1zCsicMWpAA User-Agent: curl/7.43.0 Accept: */* Content-Type: application/json Content-Length: 44 {"color":{"r":255,"g":0,"b":0,"name":"red"}}
  • 24. @CesarHgt @tomitribeJavaDay Ecuador 2018 Mensaje OAuth 2.0 POST /painter/color/fill HTTP/1.1 Host: api.superbiz.io Authorization: Bearer 2YotnFZFEjr1zCsicMWpAA User-Agent: curl/7.43.0 Accept: */* Content-Type: application/json Content-Length: 49 {"color":{"r":0,"g":255,"b":255,"name":"yellow"}}
  • 25. @CesarHgt @tomitribeJavaDay Ecuador 2018 Mensaje OAuth 2.0 POST /painter/color/stroke HTTP/1.1 Host: api.superbiz.io Authorization: Bearer 2YotnFZFEjr1zCsicMWpAA User-Agent: curl/7.43.0 Accept: */* Content-Type: application/json Content-Length: 49 {"color":{"r":255,"g":200,"b":255,"name":"orange"}}
  • 27. @CesarHgt @tomitribeJavaDay Ecuador 2018 OAuth 2 - Refresh Grant (LDAP) Verificación Password Generación Token (Repositorio de Token) Post /oauth2/token Host: api.superbliz.io User-Agent: curl/7.43.0 Accept: */* Content-Type: application/x-www-form-urlencoded Content-Length: 54 grand_type=password&username=snoopy&password=woodstock
  • 28. @CesarHgt @tomitribeJavaDay Ecuador 2018 OAuth 2 - Refresh Grant (LDAP) Verificación Password Generación Token (Repositorio de Token) Post /oauth2/token Host: api.superbliz.io User-Agent: curl/7.43.0 Accept: */* Content-Type: application/x-www-form-urlencoded Content-Length: 54 grand_type=password&username=snoopy&password=woodstock
  • 29. @CesarHgt @tomitribeJavaDay Ecuador 2018 Par anterior ∙ Access Token 2YotnFZFEjr1zCsicMWpAA ∙ Refresh Token tGzv3JOkF0XG5Qx2TlKWIA Nuevo Par ∙ Access Token 6Fe4jd7TmdE5yW2q0y6W2w ∙ Refresh Token hyT5rw1QNh5Ttg2hdtR54e
  • 30. @CesarHgt @tomitribeJavaDay Ecuador 2018 Mensaje OAuth 2.0 POST /painter/color/palette HTTP/1.1 Host: api.superbiz.io Authorization: Bearer 6Fe4jd7TmdE5yW2q0y6W2w User-Agent: curl/7.43.0 Accept: */* Content-Type: application/json Content-Length: 46 {"color":{"r":0,"g":255,"b":0,"name":"green"}}
  • 31. @CesarHgt @tomitribeJavaDay Ecuador 2018 Mensaje OAuth 2.0 POST /painter/color/select HTTP/1.1 Host: api.superbiz.io Authorization: Bearer 6Fe4jd7TmdE5yW2q0y6W2w User-Agent: curl/7.43.0 Accept: */* Content-Type: application/json Content-Length: 44 {"color":{"r":255,"g":0,"b":0,"name":"red"}}
  • 32. @CesarHgt @tomitribeJavaDay Ecuador 2018 Mensaje OAuth 2.0 POST /painter/color/fill HTTP/1.1 Host: api.superbiz.io Authorization: Bearer 6Fe4jd7TmdE5yW2q0y6W2w User-Agent: curl/7.43.0 Accept: */* Content-Type: application/json Content-Length: 49 {"color":{"r":0,"g":255,"b":255,"name":"yellow"}}
  • 33. @CesarHgt @tomitribeJavaDay Ecuador 2018 ¿Qué hemos logrado?
  • 34. @CesarHgt @tomitribeJavaDay Ecuador 2018 Ahora tenemos más passwords (al menos tus dispositivos los tienen)
  • 35. @CesarHgt @tomitribeJavaDay Ecuador 2018 Terminología de nuevo… ∙ Password Grant??? ∙ Logging in ∙ Token? ∙ Un password ligeramente ofuscado ∙ Equivalente a un HTTP session ID mejorado levemente
  • 36. @CesarHgt @tomitribeJavaDay Ecuador 2018 OAuth 2 Request enviados (Authorization: Bearer …) 3000 TPS (HTTP+SSL) 3000 TPS (Verificaciones de tokens) Password enviados (post oauth2/token …) 1000/daily (HTTP+SSL) OAuth 2 (LDAP) 4 saldos 12000 TPS backend
  • 38. @CesarHgt @tomitribeJavaDay Ecuador 2018 “Quién es 6Fe4jd7TmdE5y W2q0y6W2w ???????” “No tengo idea. Pregúntale al servidor de tokens.”
  • 39. @CesarHgt @tomitribeJavaDay Ecuador 2018 OAuth 2 Tokens enviados 3000 TPS (HTTP+SSL) 3000 TPS (verificación token) Password Envidados 1000/daily (HTTP+SSL) OAuth 2 (LDAP) 12000 TPS (Verificación token) 8 Saldos 24000 TPS backend
  • 40. @CesarHgt @tomitribeJavaDay Ecuador 2018 OAuth 2 3000 TPS (Verificación token) (LDAP) 12000 TPS (Verificación token) 55% del tráfico total Tokens enviados 3000 TPS (HTTP+SSL) Password Envidados 1000/daily (HTTP+SSL) OAuth 2 8 Saldos 24000 TPS backend
  • 41. @CesarHgt @tomitribeJavaDay Ecuador 2018 OAuth 2 Puntero Puntero Estado
  • 42. @CesarHgt @tomitribeJavaDay Ecuador 2018 Access Token Puntero de Acceso? Llave primaria de Acceso?
  • 43. @CesarHgt @tomitribeJavaDay Ecuador 2018 OAuth 2.0 Algoritmo de intercambio de passwords de alta frecuencia?
  • 44. @CesarHgt @tomitribeJavaDay Ecuador 2018 OAuth 2.0 + JSon Web Tokens (JWT)
  • 45. @CesarHgt @tomitribeJavaDay Ecuador 2018 JSon Web Token ∙ Pronunciado “YOT” ∙ JSON map con data de usuario ∙ Códificado Base64 ∙ Firmado digitalmente (RSA-SHA256, HMAC-SHA512, etc) ∙ Mecanismo de expiración
  • 46. @CesarHgt @tomitribeJavaDay Ecuador 2018 Previamente un Access Token ∙ 6Fe4jd7TmdE5yW2q0y6W2w
  • 47. @CesarHgt @tomitribeJavaDay Ecuador 2018 Access Token ahora (JWT) ∙ eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbi10eXBlIj oiYWNjZXNzLXRva2VuIiwidXNlcm5hbWUiOiJzbm9vcHkiLCJ hbmltYWwiOiJiZWFnbGUiLCJpc3MiOiJodHRwczovL2RlbW8 uc3VwZXJiaXouY29tL29hdXRoMi90b2tlbiIsInNjb3BlcyI6WyJ0 d2l0dGVyIiwibWFucy1iZXN0LWZyaWVuZCJdLCJleHAiOjE0 NzQyODA5NjMsImlhdCI6MTQ3NDI3OTE2MywianRpIjoiNjY4 ODFiMDY4YjI0OWFkOSJ9.DTfSdMzIIsC0j8z3icRdYO1GaM Gl6j1I_2DBjiiHW9vmDz8OAw8Jh8DpO32fv0vICc0hb4F0QCD 3KQnv8GVM73kSYaOEUwlW0k1TaElxc43_Ocxm1F5IUNZvz lLJ_ksFXGDL_cuadhVDaiqmhct098ocefuv08TdzRxqYoEqYN o
  • 48. @CesarHgt @tomitribeJavaDay Ecuador 2018 Nuevo Access Token ∙ header (JSON > Base64 URL Encoded) ∙ Describe como la firma (signature) del token puede ser verificada ∙ payload (JSON > Base64 URL Encoded) ∙ Json map de información que desees incluir ∙ Campo estándar como el de Expiración ∙ signature (Binary > Base64 URL Encoded) ∙ La firma digital ∙ Hecha exclusivamente por el endpoint: /oauth2/token ∙ Si es RSA puede ser verificado por cualquier persona
  • 49. @CesarHgt @tomitribeJavaDay Ecuador 2018 ∙ { "alg": “RS256", "typ": “JWT" } ∙ { "token-type": "access-token", "username": "snoopy", "animal": "beagle", "iss": "https://demo.superbiz.com/oauth2/token", "scopes": [ “twitter”, "mans-best-friend" ], "exp": 1474280963, "iat": 1474279163, "jti": "66881b068b249ad9" } ∙ DTfSdMzIIsC0j8z3icRdYO1GaMGl6j1I_2DBjiiHW9vmDz8OAw8Jh8DpO32fv0vI Cc0hb4F0QCD3KQnv8GVM73kSYaOEUwlW0k1TaElxc43_Ocxm1F5IUNZvzlLJ _ksFXGDL_cuadhVDaiqmhct098ocefuv08TdzRxqYoEqYNo
  • 52. @CesarHgt @tomitribeJavaDay Ecuador 2018 Ligero pero con alto impacto en la arquitectura
  • 53. @CesarHgt @tomitribeJavaDay Ecuador 2018 ¿Qué tenemos hasta el momento? (repaso)
  • 54. @CesarHgt @tomitribeJavaDay Ecuador 2018 Resultado final cliente permanece con el Pointer Server almacena State
  • 55. @CesarHgt @tomitribeJavaDay Ecuador 2018 ¿Qué podemos hacer ahora? (hola JWT!)
  • 56. @CesarHgt @tomitribeJavaDay Ecuador 2018 LDAP Data completa del usuario desde ldap
  • 57. @CesarHgt @tomitribeJavaDay Ecuador 2018 LDAP La data se representa en JSON
  • 58. @CesarHgt @tomitribeJavaDay Ecuador 2018 LDAP JSON es firmado RSA-SHA 256
  • 59. @CesarHgt @tomitribeJavaDay Ecuador 2018 LDAP Se inserta solamente el pointer en DB(para revocaciones)
  • 60. @CesarHgt @tomitribeJavaDay Ecuador 2018 LDAP Envío del Access Token (estado) hacia el cliente
  • 61. @CesarHgt @tomitribeJavaDay Ecuador 2018 Servidor almacena el Puntero Cliente permanece con el Estado Resultado obtenido
  • 62. @CesarHgt @tomitribeJavaDay Ecuador 2018 OAuth 2 - Password Grant (LDAP) (Repositorio Token ID) Verifica Password Genera Token Firmado (Signed) Post /oauth2/token Host: api.superbliz.io User-Agent: curl/7.43.0 Accept: */* Content-Type: application/x-www-form-urlencoded Content-Length: 54 grand_type=password&username=snoopy&password=woodstock
  • 63. @CesarHgt @tomitribeJavaDay Ecuador 2018 OAuth 2 - Password Grant (LDAP) Verifica Password (Repositorio Token ID) Genera Token Firmado (Signed)
  • 64. @CesarHgt @tomitribeJavaDay Ecuador 2018 Mensaje OAuth 2.0 con JWT POST /painter/color/palette HTTP/1.1 Host: api.superbiz.io Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbi10eXBlIjoiYWNjZXNzLXR va2VuIiwidXNlcm5hbWUiOiJzbm9vcHkiLCJhbmltYWwiOiJiZWFnbGUiLCJpc3MiOiJodHRwczovL2RlbW8 uc3VwZXJ iaXouY29tL29hdXRoMi90b2tlbiIsInNjb3BlcyI6WyJ0d2l0dGVyIiwibWFucy1iZXN0LWZyaWVuZCJdLCJleH AiOjE0NzQy ODA5NjMsImlhdCI6MTQ3NDI3OTE2MywianRpIjoiNjY4ODFiMDY4YjI0OWFkOSJ9.DTfSdMzIIsC0j8z3icRd YO1GaMGl 6j1I_2DBjiiHW9vmDz8OAw8Jh8DpO32fv0vICc0hb4F0QCD3KQnv8GVM73kSYaOEUwlW0k1TaElxc43_Oc xm1F5IUNZ vzlLJ_ksFXGDL_cuadhVDaiqmhct098ocefuv08TdzRxqYoEqYNo User-Agent: curl/7.43.0 Accept: */* Content-Type: application/json Content-Length: 46 {"color":{"b":0,"g":255,"r":0,"name":"green"}}
  • 65. @CesarHgt @tomitribeJavaDay Ecuador 2018 OAuth 2 + JWT Tokens enviados 3000 TPS (HTTP+SSL) 0.55 TPS (Verificaciones refresh token) OAuth 2 (LDAP) 4 saltos 12000 TPS backend 3000 TPS (verifica firma) 12000 TPS (verifica firma) Password enviados (post oauth2/token …) 1000/daily (HTTP+SSL)
  • 66. @CesarHgt @tomitribeJavaDay Ecuador 2018 “No!” “Dame toda la información del salario de José.”
  • 67. @CesarHgt @tomitribeJavaDay Ecuador 2018 “Claro!” “Dame toda la información del salario de José.”
  • 68. @CesarHgt @tomitribeJavaDay Ecuador 2018 OAuth 2 + JWT Envío de Tokens válidos 3000 TPS (HTTP+SSL) IP whitelisting 0.55 TPS (verifica refresh token) Password enviados 1000/daily (HTTP+SSL) (LDAP) 4 saltos 12000 TPS backend 9000 TPS (verifica firma) 12000 TPS (verifica firma) Token inválidos 6000 TPS (HTTP+SSL)
  • 69. @CesarHgt @tomitribeJavaDay Ecuador 2018 https://connect2id.com/products/nimbus-jose-jwt Librería JWT https://github.com/jwtk/jjwt https://github.com/auth0/java-jwt
  • 70. @CesarHgt @tomitribeJavaDay Ecuador 2018 Eclipse MicroProfile
  • 71. @CesarHgt @tomitribeJavaDay Ecuador 2018 MicroProfile ∙ Comunidad Open-Source de la fundación Eclipse ∙ Enfocada en Microservicios bajo JavaEE ∙ Generadora de: Specificaciones, API y TCK. ∙ Implementado por diferentes entidades http://microprofile.io/
  • 72. @CesarHgt @tomitribeJavaDay Ecuador 2018 MicroProfile JWT MicroProfile 2.0 JAX-RS 2.1JSON-P 1.1CDI 2.0 Config 1.3 Fault Tolerance 1.1 JWT RBAC 1.1 Health Check 1.0 Metrics 1.1 Open Tracing 1.1 Open API 1.0 Rest Client 1.1 JSON-B 1.0 JWT RBAC 1.1 https://microprofile.io/project/eclipse/microprofile-jwt-auth/ Estándares de Seguridad ● OAuth 2.0 ● OpenID Connect ● JSON Web Tokens (JWT) Tecnologías Java ● JAX-RS ● CDI ● JSON-P.
  • 73. @CesarHgt @tomitribeJavaDay Ecuador 2018 Moviefun Diagrama de Despliegue Gateway
  • 74. @CesarHgt @tomitribeJavaDay Ecuador 2018 Incluyendo Microprofile JWT en una aplicación JAX-RS
  • 75. @CesarHgt @tomitribeJavaDay Ecuador 2018 ● @LoginConfig ● web.xml login-config element equivalent package org.superbiz.moviefun.rest; import org.eclipse.microprofile.auth.LoginConfig; import javax.ws.rs.ApplicationPath; import javax.ws.rs.core.Application; @ApplicationPath("/rest") @LoginConfig(authMethod = "MP-JWT") public class ApplicationConfig extends Application { // let the server discover the endpoints } ApplicationConfig.java
  • 76. @CesarHgt @tomitribeJavaDay Ecuador 2018 Mapeando MP-JWT Tokens con Java EE Container APIs
  • 77. @CesarHgt @tomitribeJavaDay Ecuador 2018 ● Injection of the currently authenticated caller ● Injection of claims @Path("movies") @Produces({"application/json"}) @ApplicationScoped public class MoviesResource { @Inject private JsonWebToken jwtPrincipal; @Inject @Claim("email") private ClaimValue<String> email; MoviesResource.java
  • 78. @CesarHgt @tomitribeJavaDay Ecuador 2018 Integración con JAX-RS Container API
  • 79. @CesarHgt @tomitribeJavaDay Ecuador 2018 ● securityContext.isUserInRole ● MP-JWT "groups" claim ● getUserPrincipal() import javax.ws.rs.core.SecurityContext; @Path("movies") @Produces({"application/json"}) @ApplicationScoped public class MoviesResource { @Context private SecurityContext securityContext; @POST @Consumes("application/json") public Movie addMovie(Movie movie) { if (!securityContext.isUserInRole("create")) { throw new WebApplicationException("Bad permission.", Response.Status.FORBIDDEN); } service.addMovie(movie); return movie; } MoviesResource.java
  • 80. @CesarHgt @tomitribeJavaDay Ecuador 2018 ● @RolesAllowed ● @PermitAll ● @DenyAll ● 2.9 - 2.12 JSR-250 @PUT @Path("{id}") @Consumes("application/json") @RolesAllowed("update") public Movie editMovie( @PathParam("id") final long id, Movie movie) { .... return movie; } @DELETE @Path("{id}") @RolesAllowed("delete") public void deleteMovie(@PathParam("id") long id) { .... service.deleteMovie(id); } MoviesResource.java
  • 81. @CesarHgt @tomitribeJavaDay Ecuador 2018 Public Key Configuration
  • 82. @CesarHgt @tomitribeJavaDay Ecuador 2018 @Produces Optional<JWTAuthContextInfo> getOptionalContextInfo() throws Exception { JWTAuthContextInfo contextInfo = new JWTAuthContextInfo(); contextInfo.setIssuedBy("/oauth2/token"); byte[] encodedBytes = TokenUtil.readPublicKey("/publicKey.pem").getEncoded(); final X509EncodedKeySpec spec = new X509EncodedKeySpec(encodedBytes); final KeyFactory kf = KeyFactory.getInstance("RSA"); final RSAPublicKey pk = (RSAPublicKey) kf.generatePublic(spec); contextInfo.setSignerKey(pk); contextInfo.setExpGracePeriodSecs(10); return Optional.of(contextInfo); } @Produces JWTAuthContextInfo getContextInfo() throws Exception { return getOptionalContextInfo().get(); } } MoviesMPJWTConfigurationProvider.java
  • 83. @CesarHgt @tomitribeJavaDay Ecuador 2018 https://tribestream.io/javadayec/ Gracias CONTACTANOS @TOMITRIBE