22
CODE SNACK @OK Microsercices and JWT Lars Röwekamp CIO New Technologies @mobileLarson @_openknowledge #WISSENTEILEN

Microservices & JWT

Embed Size (px)

Citation preview

Page 1: Microservices & JWT

CODESNACK@OK

Microsercicesand JWT

Lars RöwekampCIO New Technologies

@mobileLarson@_openknowledge

#WISSENTEILEN

Page 2: Microservices & JWT

#WISSENTEILEN

Microservices & JWT

Page 3: Microservices & JWT

Microservices & JWT

#WISSENTEILEN

Authentication vs. Authorization

• Authentication a.k.a. „Hotelrezeption“• Authorization a.k.a. „Zimmerschlüssel“

Page 4: Microservices & JWT

Microservices & JWT

#WISSENTEILEN

Authentication vs. Authorization

• 401 „Unauthorized“meint eigentlich „Unauthenticated“!

• 403 „Forbidden“meint eigentlich „ Unauthorized“!

Page 5: Microservices & JWT

Microservices & JWT

#WISSENTEILEN

Server basedvs.

Token based Security

Page 6: Microservices & JWT

#WISSENTEILEN

Microservices & JWT

Page 7: Microservices & JWT

Microservices & JWT

#WISSENTEILEN

Server based vs. Token based Security

• Sessions• Skaliebarbeit• CORS (cross-origin resource sharing)• CSRF (cross-site request forgery)

Page 8: Microservices & JWT

#WISSENTEILEN

Microservices & JWT

Page 9: Microservices & JWT

Microservices & JWT

#WISSENTEILEN

Server based vs. Token based Security

• Stateless• Token statt Cookie (keine CSRF Attacken)• Individual Expiration (via Claim)• Friend to Friend Permissions (Facebook & Co)

Page 10: Microservices & JWT

Microservices & JWT

#WISSENTEILEN

JSON Web Token

• neue, einfache Spec• sehr kompakt• Token plus public & private „Claims“

• digitale Signatur und/oder Encryption

Page 11: Microservices & JWT

#WISSENTEILEN

Microservices & JWT

Page 12: Microservices & JWT

#WISSENTEILEN

Microservices & JWTWarumJWT?

• ...vs.SWT• ...vs.SAML

• public/privateKeys• extremkompakt• JSON

Page 13: Microservices & JWT

Microservices & JWT

#WISSENTEILEN

JSON Web Token & API Goals

1. Authorize Request2. Verify Sender3. Avoid Man in the Middle4. Expiration5. Request Cloning

Page 14: Microservices & JWT

#WISSENTEILEN

demo$ microservicesdemo$ jwt_securitydemo$ |

Page 15: Microservices & JWT

#WISSENTEILEN

Microservices & JWT

Page 16: Microservices & JWT

#WISSENTEILEN

Microservices & JWT

Page 17: Microservices & JWT

#WISSENTEILEN

Microservices & JWT

Page 18: Microservices & JWT

#WISSENTEILEN

Microservices & JWT

Page 19: Microservices & JWT

#WISSENTEILEN

Page 20: Microservices & JWT

#WISSENTEILEN

? # !

Page 21: Microservices & JWT

Bildernachweis

#WISSENTEILEN

#19: © marekuliaz - shutterstock.com

All other pictures inside this presentation orginatefrom pixabay.com or were created by my own.

Page 22: Microservices & JWT

#WISSENTEILEN

LARS RÖWEKAMPCIO NEW TECHNOLOGIES

[email protected]+49 (0)441 4082 – 0

@mobileLarson@_openknowledge

OFFENKUNDIGGUT