SlideShare a Scribd company logo
1 of 47
Download to read offline
Authorization	
  and	
  Authentication	
  in	
  
Microservice Environments
Bernd	
  Schönbach
Overview
2Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
• Introduction
• What’s the problem anyway?
• And how exactly do JSON Web Tokens help here?
• What are JSON Web Tokens?
• Some examples
• Mind the gap
• JWS vs. JWE
Introduction
LeanIX helps companies to manage and
optimize their IT Architecture
4Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
Current IT Architecture Create Transparency Optimize IT Architecture
• Missing information (e.g.
interfaces, technologies)
• Hard to introduce new
products & sales channels
• High costs and risks
• Import existing data into
LeanIX (via Excel or API)
• Invite experts to share
their knowledge
• Use best-practice reports
to identify issues
• Define target architecture
and roadmaps
LeanIX is a web-based platform
to capture and share knowledge about IT
5Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
Fact Sheets & Tagging
Context-based Search
API, Import & Export
Comments & Threads
IT Inventory Collaboration Platform Interactive Reporting
Activity Stream &
Notifications
Subscriptions
Print & Export (PDF)
Best Practice Reports
Interactive Adaption
What’s the problem anyway?
What’s the problem anyway?
7Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
What’s the problem anyway?
8Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
What’s the problem anyway?
9Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
What’s the problem anyway?
10Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
And how do JWT exactly help
here?
Typical Auth Flow
12Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
UI
Auth Service	
  
Microservice 2
Microservice 1
Microservice 3
Login
Return	
  OAuth	
  Token
Check	
  Oauth Validity
Send	
  Requests	
  with	
  Token
AuthService	
  
And now with JWT
13Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
UI
Auth Service	
  
Microservice 2
Microservice 1
Microservice 3
Login
Return	
  JWT
Check	
  Token	
  Validity
Send	
  Requests	
  with	
  Token
What are JSON Web Tokens?
What are JSON Web Tokens (JWT)?
15Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
RFC	
  7519:	
  
“JSON	
  Web	
  Token	
  (JWT)	
  is	
  a	
  compact,	
  URL-­‐safe	
  means	
  
of	
  representing	
  claims	
  to	
  be	
  transferred	
  between	
  two	
  
parties.”
What are JSON Web Tokens (JWT)?
16Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
What are JSON Web TokenS (JWT)?
17Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
Two Types
JSON Web Signature JSON Web Encryption
JSON Web Signature (RFC 7515)
18Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
Three	
  Parts
1. Header
2. Payload	
  (Claims)
3. Signature
JWS - Header
19Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
{
"alg": "HS256",
"typ": "JWT“
}
{
"alg": "HS256",
"typ": "JWT“
}
Recommended Values:
• HS256
• RS256
• ES256
Special Case:
• none
JWS - Payload
20Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
- Main Information Part
- Contains Information like
- Issuer (iss)
- Expiration time (exp)
- Subject (sub)
- Features
- Permissions
- …
{
"iss": "auth-service-1",
"name": "John Doe",
"admin": true,
"exp": 1487325600
}
Use as few information as possible to keep the Token small!
JWS - Signature
21Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
HMACSHA256(
base64UrlEncode(header) + "." + base64UrlEncode(payload),
secret
)
• Verifies origin and content of JWS Token
• Signature contains Header and Payload
JWS Example
22Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.
TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ
Header: { "alg": "HS256", "typ": "JWT"}
Payload:
{
"sub": "1234567890",
"name": "John Doe",
"admin": true
}
Signature:
HMACSHA256(
base64UrlEncode(header) +
"." +
base64UrlEncode(payload),
secret
)
JSON Web Encryption (RFC 7516)
23Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
Five	
  Parts	
  (JWE)
1. Protected	
  Header
2. Encrypted	
  Key
3. Initialization	
  Vector
4. Cipher	
  text
5. Authentication	
  Tag
JWE Protected Header
24Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
• Basically the same as JWS with some minor tweaks
• Two additional Keys:
• enc -> encryption algorithm
• zip -> compression algorithm
• “alg” now describes the algorithm for encrypting CEK
• ”none” is no longer allowed
{
"alg": "RSA-OAEP",
"enc": "A256GCM“,
"typ": "JWT“
}
JWE Protected Header
25Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
• Algorithm used should be an AEAD algorithm
• Authenticated Encryption with Associated Data
• “AEAD algorithms accept two inputs, the plaintext and the
Additional Authenticated Data (AAD) value, and produce two
outputs, the cipher text and the Authentication Tag value.”
• AAD can be base64encoded JWE Protected Header
JWE Encrypted Key
26Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
• Encrypted Content Encryption Key (CEK)
• CEK = Symmetric Key used to encrypt plaintext
• CEK is used to produce cipher text and Authentication Tag
JWE Initialization Vector
27Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
• A random numeric value used to “salt” encrypted value
• Ensures for same content, encrypted value differs
• May be left empy if enc Algorithm does not use IV
JWE Ciphertext
28Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
• Basically the same as Payload in JWS
• Is encrypted with enc algorithm
• Is encrypted using initialization vector
• But must not be JSON can be plaintext
JWE Authentication Tag
29Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
• Is also a result of enc algorithm
• Ensures integrity of cipher text
• Ensures integrity Additional Authenticated Data
JWE
30Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
Again all parts are base64 Encoded and concatenated with dots:
BASE64URL(UTF8(JWE Protected Header)) .
BASE64URL(JWE Encrypted Key) .
BASE64URL(JWE Initialization Vector) .
BASE64URL(JWE Ciphertext) .
BASE64URL(JWE Authentication Tag)
Some examples
31
JWS creation in Java
32Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
public String createJwt(User loggedInUser) {
JwtBuilder builder = Jwts.builder()
.setSubject(loggedInUser.getUsername())
.claim(„payload“, loggedInUser.getPayload())
.setId(loggedInUser.getId())
.setExpiration(calculateExpirationTime());
return builder.signWith(
SignatureAlgorithm.RS256, privateKey
)
.compact();
}
JWS checking in Java
33Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
Claims claims = Jwts.parser()
.setSigningKey(publicKey)
.parseClaimsJws(accesTokenString)
.getBody();
Important Side Note:
- Ensure checking always uses the correct algorithm
- “none” alg header must not lead to unchecked token if signed is
expected!
https://auth0.com/blog/critical-vulnerabilities-in-json-web-token-libraries/
JWS Usage in Java with Dropwizard
34Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
@Override
public Optional<User> authenticate(String accessToken) {
if (accessToken == null)
return Optional.absent();
OAuth2Token token = this.parser.parse(accessToken);
return Optional.fromNullable((User) token.getPrincipal());
}
Adapt Authenticator Class:
Use @Auth Annotation:
public Response getX(
@Auth @ApiParam(access="internal") User user
){
[…]
}
JWS example
35Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
Live Presentation
JWS libraries
36Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
Libraries exist for nearly every programming language:
• .NET
• Pyhton
• Node.js
• Java
• JavaScript
• Perl
• Ruby
• Elixir
• Go
• Haskell
• Rust
• Lua
• Scala
• D
• Clojure
• Objective C
• Swift
• C
• Kdb+/Q
• Delphi
• PHP
• Crystal
• …
Mind the gap
Mind the gap
38Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
Don’ts:
• Never ever send passwords in JWT
• And also no hashes..
• You cannot control where the JWT goes
• Don’t verify token validity with Auth-Service
Dos:
• Always verify token (checksum)
• Add as few as possible but at least enough to avoid calls
to other services
Back to JWS vs JWE
vs
JSON Web Encryption (JWE)
40Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
• Everything is unreadable to the user
• You potentially can use classified information
• Only one key needed which can be distributed easily
Pros
Cons
• Need to distribute secret to all services
• Attack vector increases
JSON Web Encryption (JWE)
41Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
Auth Service
Microservice 2
Microservice 1
Microservice 3
Private Key
JSON Web Signature (JWS)
42Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
• Everything is readable to the user
• Only the public key needs to be distributed
• Only the Auth-Service needs high protection
• If private key is compromised exchange here and distribute pub key
Pros
Cons
• Everything is readable to the user
Auth Service
JSON Web Signature (JWS)
43Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
Auth Service
Microservice 2
Microservice 1
Microservice 3
Private Key
Public Key
Conclusion
Conclusion
Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
• Allows to keep loose coupling of Microservices
• Secure transfer of Authorization and Authentication claims
• Further domains can be found in Single Sign On Contexts
• Easy to implement due to library availability
Thanks
(and yes we are hiring)
https://www.leanix.net/en/jobs
Sources
47Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
• https://tools.ietf.org/html/rfc7519 RFC for JWT
• https://tools.ietf.org/html/rfc7518 RFC for JWA (used in JWS and JWE)
• https://jwt.io/
• https://www.leanix.net/
• Devil Smiley CC BY 4.0 https://www.creativetail.com
• Further Articles on JWT:
• https://blog.codecentric.de/2016/11/json-web-token-jwt-im-detail/
• https://medium.facilelogin.com/jwt-jws-and-jwe-for-not-so-dummies-b63310d201a3

More Related Content

What's hot

OPA open policy agent
OPA open policy agentOPA open policy agent
OPA open policy agentKnoldus Inc.
 
Comparison of existing cni plugins for kubernetes
Comparison of existing cni plugins for kubernetesComparison of existing cni plugins for kubernetes
Comparison of existing cni plugins for kubernetesAdam Hamsik
 
最近のKeycloakのご紹介 ~クライアントポリシーとFAPI~
最近のKeycloakのご紹介 ~クライアントポリシーとFAPI~最近のKeycloakのご紹介 ~クライアントポリシーとFAPI~
最近のKeycloakのご紹介 ~クライアントポリシーとFAPI~Hitachi, Ltd. OSS Solution Center.
 
The Role of IAM in Microservices
The Role of IAM in MicroservicesThe Role of IAM in Microservices
The Role of IAM in MicroservicesWSO2
 
淺談RESTful API認證 Token機制使用經驗分享
淺談RESTful API認證 Token機制使用經驗分享淺談RESTful API認證 Token機制使用經驗分享
淺談RESTful API認證 Token機制使用經驗分享Tun-Yu Chang
 
Keycloak拡張入門
Keycloak拡張入門Keycloak拡張入門
Keycloak拡張入門Hiroyuki Wada
 
muCon 2016: Authentication in Microservice Systems By David Borsos
muCon 2016: Authentication in Microservice Systems By David BorsosmuCon 2016: Authentication in Microservice Systems By David Borsos
muCon 2016: Authentication in Microservice Systems By David BorsosOpenCredo
 
Introduction to Modern Identity with Auth0's Developer
 Introduction to Modern Identity with Auth0's Developer Introduction to Modern Identity with Auth0's Developer
Introduction to Modern Identity with Auth0's DeveloperProduct School
 
Virtual meetup - Exploring the Runtime Fabric deployment model
Virtual meetup - Exploring the Runtime Fabric deployment modelVirtual meetup - Exploring the Runtime Fabric deployment model
Virtual meetup - Exploring the Runtime Fabric deployment modelJimmy Attia
 
Difference between gitlab vs github vs bitbucket
Difference between gitlab vs github vs bitbucketDifference between gitlab vs github vs bitbucket
Difference between gitlab vs github vs bitbucketAcodez IT Solutions
 
HTTP/2 standard for video streaming
HTTP/2 standard for video streamingHTTP/2 standard for video streaming
HTTP/2 standard for video streamingHung Thai Le
 
What’s Mule 4.3? How Does Anytime RTF Help? Our insights explain.
What’s Mule 4.3? How Does Anytime RTF Help? Our insights explain. What’s Mule 4.3? How Does Anytime RTF Help? Our insights explain.
What’s Mule 4.3? How Does Anytime RTF Help? Our insights explain. Kellton Tech Solutions Ltd
 
Gitlab Training with GIT and SourceTree
Gitlab Training with GIT and SourceTreeGitlab Training with GIT and SourceTree
Gitlab Training with GIT and SourceTreeTeerapat Khunpech
 
Manchester MuleSoft Meetup #6 - Runtime Fabric with Mulesoft
Manchester MuleSoft Meetup #6 - Runtime Fabric with Mulesoft Manchester MuleSoft Meetup #6 - Runtime Fabric with Mulesoft
Manchester MuleSoft Meetup #6 - Runtime Fabric with Mulesoft Akshata Sawant
 
A painless self-hosted Git service: Gitea
A painless self-hosted Git service: GiteaA painless self-hosted Git service: Gitea
A painless self-hosted Git service: GiteaBo-Yi Wu
 
Type of DDoS attacks with hping3 example
Type of DDoS attacks with hping3 exampleType of DDoS attacks with hping3 example
Type of DDoS attacks with hping3 exampleHimani Singh
 
Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub ActionsBo-Yi Wu
 
Jenkins Shared Libraries Workshop
Jenkins Shared Libraries WorkshopJenkins Shared Libraries Workshop
Jenkins Shared Libraries WorkshopJulien Pivotto
 

What's hot (20)

OPA open policy agent
OPA open policy agentOPA open policy agent
OPA open policy agent
 
Comparison of existing cni plugins for kubernetes
Comparison of existing cni plugins for kubernetesComparison of existing cni plugins for kubernetes
Comparison of existing cni plugins for kubernetes
 
最近のKeycloakのご紹介 ~クライアントポリシーとFAPI~
最近のKeycloakのご紹介 ~クライアントポリシーとFAPI~最近のKeycloakのご紹介 ~クライアントポリシーとFAPI~
最近のKeycloakのご紹介 ~クライアントポリシーとFAPI~
 
The Role of IAM in Microservices
The Role of IAM in MicroservicesThe Role of IAM in Microservices
The Role of IAM in Microservices
 
Zuul @ Netflix SpringOne Platform
Zuul @ Netflix SpringOne PlatformZuul @ Netflix SpringOne Platform
Zuul @ Netflix SpringOne Platform
 
淺談RESTful API認證 Token機制使用經驗分享
淺談RESTful API認證 Token機制使用經驗分享淺談RESTful API認證 Token機制使用經驗分享
淺談RESTful API認證 Token機制使用經驗分享
 
Keycloak拡張入門
Keycloak拡張入門Keycloak拡張入門
Keycloak拡張入門
 
muCon 2016: Authentication in Microservice Systems By David Borsos
muCon 2016: Authentication in Microservice Systems By David BorsosmuCon 2016: Authentication in Microservice Systems By David Borsos
muCon 2016: Authentication in Microservice Systems By David Borsos
 
Introduction to Modern Identity with Auth0's Developer
 Introduction to Modern Identity with Auth0's Developer Introduction to Modern Identity with Auth0's Developer
Introduction to Modern Identity with Auth0's Developer
 
Virtual meetup - Exploring the Runtime Fabric deployment model
Virtual meetup - Exploring the Runtime Fabric deployment modelVirtual meetup - Exploring the Runtime Fabric deployment model
Virtual meetup - Exploring the Runtime Fabric deployment model
 
Difference between gitlab vs github vs bitbucket
Difference between gitlab vs github vs bitbucketDifference between gitlab vs github vs bitbucket
Difference between gitlab vs github vs bitbucket
 
HTTP/2 standard for video streaming
HTTP/2 standard for video streamingHTTP/2 standard for video streaming
HTTP/2 standard for video streaming
 
What’s Mule 4.3? How Does Anytime RTF Help? Our insights explain.
What’s Mule 4.3? How Does Anytime RTF Help? Our insights explain. What’s Mule 4.3? How Does Anytime RTF Help? Our insights explain.
What’s Mule 4.3? How Does Anytime RTF Help? Our insights explain.
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Gitlab Training with GIT and SourceTree
Gitlab Training with GIT and SourceTreeGitlab Training with GIT and SourceTree
Gitlab Training with GIT and SourceTree
 
Manchester MuleSoft Meetup #6 - Runtime Fabric with Mulesoft
Manchester MuleSoft Meetup #6 - Runtime Fabric with Mulesoft Manchester MuleSoft Meetup #6 - Runtime Fabric with Mulesoft
Manchester MuleSoft Meetup #6 - Runtime Fabric with Mulesoft
 
A painless self-hosted Git service: Gitea
A painless self-hosted Git service: GiteaA painless self-hosted Git service: Gitea
A painless self-hosted Git service: Gitea
 
Type of DDoS attacks with hping3 example
Type of DDoS attacks with hping3 exampleType of DDoS attacks with hping3 example
Type of DDoS attacks with hping3 example
 
Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub Actions
 
Jenkins Shared Libraries Workshop
Jenkins Shared Libraries WorkshopJenkins Shared Libraries Workshop
Jenkins Shared Libraries Workshop
 

Similar to Authorization and Authentication in Microservice Environments

[OPD 2019] Attacking JWT tokens
[OPD 2019] Attacking JWT tokens[OPD 2019] Attacking JWT tokens
[OPD 2019] Attacking JWT tokensOWASP
 
Technical considerations for Blockchain networks with AWS
Technical considerations for Blockchain networks with AWSTechnical considerations for Blockchain networks with AWS
Technical considerations for Blockchain networks with AWSatSistemas
 
Dejan Podgorsek - Is Hyperledger Fabric secure enough for your Business?
Dejan Podgorsek - Is Hyperledger Fabric secure enough for your Business?Dejan Podgorsek - Is Hyperledger Fabric secure enough for your Business?
Dejan Podgorsek - Is Hyperledger Fabric secure enough for your Business?Hacken_Ecosystem
 
Technical Introduction to Hyperledger Fabric v1.0
Technical Introduction to Hyperledger Fabric v1.0Technical Introduction to Hyperledger Fabric v1.0
Technical Introduction to Hyperledger Fabric v1.0Altoros
 
20160304 blockchain in fsi client ready raymond
20160304 blockchain in fsi client ready raymond20160304 blockchain in fsi client ready raymond
20160304 blockchain in fsi client ready raymondMeng-Ru (Raymond) Tsai
 
Building an Effective Architecture for Identity and Access Management.pdf
Building an Effective Architecture for Identity and Access Management.pdfBuilding an Effective Architecture for Identity and Access Management.pdf
Building an Effective Architecture for Identity and Access Management.pdfJorge Alvarez
 
Securing Web Applications with Token Authentication
Securing Web Applications with Token AuthenticationSecuring Web Applications with Token Authentication
Securing Web Applications with Token AuthenticationStormpath
 
APIs: Intelligent Routing, Security, & Management
APIs: Intelligent Routing, Security, & ManagementAPIs: Intelligent Routing, Security, & Management
APIs: Intelligent Routing, Security, & ManagementNGINX, Inc.
 
JWTs for CSRF and Microservices
JWTs for CSRF and MicroservicesJWTs for CSRF and Microservices
JWTs for CSRF and MicroservicesStormpath
 
Luniverse Partners Day - Jay
Luniverse Partners Day - JayLuniverse Partners Day - Jay
Luniverse Partners Day - JayLuniverse Dunamu
 
The Plone and The Blockchain
The Plone and The BlockchainThe Plone and The Blockchain
The Plone and The BlockchainAndreas Jung
 
Invoke-CradleCrafter: Moar PowerShell obFUsk8tion & Detection (@('Tech','niqu...
Invoke-CradleCrafter: Moar PowerShell obFUsk8tion & Detection (@('Tech','niqu...Invoke-CradleCrafter: Moar PowerShell obFUsk8tion & Detection (@('Tech','niqu...
Invoke-CradleCrafter: Moar PowerShell obFUsk8tion & Detection (@('Tech','niqu...Daniel Bohannon
 
A Breathless Tour of Blockchain
A Breathless Tour of BlockchainA Breathless Tour of Blockchain
A Breathless Tour of BlockchainEoin Woods
 
How your JavaScript skills apply in the blockchain space
How your JavaScript skills apply in the blockchain spaceHow your JavaScript skills apply in the blockchain space
How your JavaScript skills apply in the blockchain spaceMichał Załęcki
 
Standard Provenance Reporting and Scientific Software Management in Virtual L...
Standard Provenance Reporting and Scientific Software Management in Virtual L...Standard Provenance Reporting and Scientific Software Management in Virtual L...
Standard Provenance Reporting and Scientific Software Management in Virtual L...njcar
 
Pay Forum Conference
Pay Forum ConferencePay Forum Conference
Pay Forum Conferencehagero
 
OpenAM as Flexible Integration Component
OpenAM as Flexible Integration ComponentOpenAM as Flexible Integration Component
OpenAM as Flexible Integration ComponentForgeRock
 

Similar to Authorization and Authentication in Microservice Environments (20)

[OPD 2019] Attacking JWT tokens
[OPD 2019] Attacking JWT tokens[OPD 2019] Attacking JWT tokens
[OPD 2019] Attacking JWT tokens
 
"Creating a Competitive Edge Using Blockchain Technology"
"Creating a Competitive Edge Using Blockchain Technology""Creating a Competitive Edge Using Blockchain Technology"
"Creating a Competitive Edge Using Blockchain Technology"
 
Technical considerations for Blockchain networks with AWS
Technical considerations for Blockchain networks with AWSTechnical considerations for Blockchain networks with AWS
Technical considerations for Blockchain networks with AWS
 
Dejan Podgorsek - Is Hyperledger Fabric secure enough for your Business?
Dejan Podgorsek - Is Hyperledger Fabric secure enough for your Business?Dejan Podgorsek - Is Hyperledger Fabric secure enough for your Business?
Dejan Podgorsek - Is Hyperledger Fabric secure enough for your Business?
 
Technical Introduction to Hyperledger Fabric v1.0
Technical Introduction to Hyperledger Fabric v1.0Technical Introduction to Hyperledger Fabric v1.0
Technical Introduction to Hyperledger Fabric v1.0
 
20160304 blockchain in fsi client ready raymond
20160304 blockchain in fsi client ready raymond20160304 blockchain in fsi client ready raymond
20160304 blockchain in fsi client ready raymond
 
Building an Effective Architecture for Identity and Access Management.pdf
Building an Effective Architecture for Identity and Access Management.pdfBuilding an Effective Architecture for Identity and Access Management.pdf
Building an Effective Architecture for Identity and Access Management.pdf
 
Jwt Security
Jwt SecurityJwt Security
Jwt Security
 
Securing Web Applications with Token Authentication
Securing Web Applications with Token AuthenticationSecuring Web Applications with Token Authentication
Securing Web Applications with Token Authentication
 
APIs: Intelligent Routing, Security, & Management
APIs: Intelligent Routing, Security, & ManagementAPIs: Intelligent Routing, Security, & Management
APIs: Intelligent Routing, Security, & Management
 
JWTs for CSRF and Microservices
JWTs for CSRF and MicroservicesJWTs for CSRF and Microservices
JWTs for CSRF and Microservices
 
Luniverse Partners Day - Jay
Luniverse Partners Day - JayLuniverse Partners Day - Jay
Luniverse Partners Day - Jay
 
The Plone and The Blockchain
The Plone and The BlockchainThe Plone and The Blockchain
The Plone and The Blockchain
 
Invoke-CradleCrafter: Moar PowerShell obFUsk8tion & Detection (@('Tech','niqu...
Invoke-CradleCrafter: Moar PowerShell obFUsk8tion & Detection (@('Tech','niqu...Invoke-CradleCrafter: Moar PowerShell obFUsk8tion & Detection (@('Tech','niqu...
Invoke-CradleCrafter: Moar PowerShell obFUsk8tion & Detection (@('Tech','niqu...
 
A Breathless Tour of Blockchain
A Breathless Tour of BlockchainA Breathless Tour of Blockchain
A Breathless Tour of Blockchain
 
How your JavaScript skills apply in the blockchain space
How your JavaScript skills apply in the blockchain spaceHow your JavaScript skills apply in the blockchain space
How your JavaScript skills apply in the blockchain space
 
Standard Provenance Reporting and Scientific Software Management in Virtual L...
Standard Provenance Reporting and Scientific Software Management in Virtual L...Standard Provenance Reporting and Scientific Software Management in Virtual L...
Standard Provenance Reporting and Scientific Software Management in Virtual L...
 
Secure all things with CBSecurity 3
Secure all things with CBSecurity 3Secure all things with CBSecurity 3
Secure all things with CBSecurity 3
 
Pay Forum Conference
Pay Forum ConferencePay Forum Conference
Pay Forum Conference
 
OpenAM as Flexible Integration Component
OpenAM as Flexible Integration ComponentOpenAM as Flexible Integration Component
OpenAM as Flexible Integration Component
 

More from LeanIX GmbH

LeanIX Virtual Workspaces
LeanIX Virtual WorkspacesLeanIX Virtual Workspaces
LeanIX Virtual WorkspacesLeanIX GmbH
 
How to reduce complexity by segregating your data with Virtual Workspaces
How to reduce complexity by segregating your data with Virtual WorkspacesHow to reduce complexity by segregating your data with Virtual Workspaces
How to reduce complexity by segregating your data with Virtual WorkspacesLeanIX GmbH
 
Gartner EA: The Rise of Data-driven Architectures
Gartner EA: The Rise of Data-driven ArchitecturesGartner EA: The Rise of Data-driven Architectures
Gartner EA: The Rise of Data-driven ArchitecturesLeanIX GmbH
 
Application Harmonisation using Design Principles in LeanIX
Application Harmonisation using Design Principles in LeanIXApplication Harmonisation using Design Principles in LeanIX
Application Harmonisation using Design Principles in LeanIXLeanIX GmbH
 
Effective EAM: whet your appetite & deliver solutions
Effective EAM: whet your appetite & deliver solutionsEffective EAM: whet your appetite & deliver solutions
Effective EAM: whet your appetite & deliver solutionsLeanIX GmbH
 
Lean EAM with the Microservices Add-on and the Signavio Integration
Lean EAM with the Microservices Add-on and the Signavio IntegrationLean EAM with the Microservices Add-on and the Signavio Integration
Lean EAM with the Microservices Add-on and the Signavio IntegrationLeanIX GmbH
 
Next Level Enterprise Architecture
Next Level Enterprise ArchitectureNext Level Enterprise Architecture
Next Level Enterprise ArchitectureLeanIX GmbH
 
Integration Architecture with the Data Flow
Integration Architecture with the Data FlowIntegration Architecture with the Data Flow
Integration Architecture with the Data FlowLeanIX GmbH
 
LeanIX-ServiceNow Integration
LeanIX-ServiceNow IntegrationLeanIX-ServiceNow Integration
LeanIX-ServiceNow IntegrationLeanIX GmbH
 
Application Rationalization with LeanIX
Application Rationalization with LeanIXApplication Rationalization with LeanIX
Application Rationalization with LeanIXLeanIX GmbH
 
Custom Reports & Integrations with GraphQL
Custom Reports & Integrations with GraphQLCustom Reports & Integrations with GraphQL
Custom Reports & Integrations with GraphQLLeanIX GmbH
 
LeanIX Inventory: Import & Export
LeanIX Inventory: Import & ExportLeanIX Inventory: Import & Export
LeanIX Inventory: Import & ExportLeanIX GmbH
 
Survey Add-on Showcase: Cloud Transformation
Survey Add-on Showcase: Cloud TransformationSurvey Add-on Showcase: Cloud Transformation
Survey Add-on Showcase: Cloud TransformationLeanIX GmbH
 
The LeanIX Microservices Integration
The LeanIX Microservices IntegrationThe LeanIX Microservices Integration
The LeanIX Microservices IntegrationLeanIX GmbH
 
Ensure GDPR Compliance with LeanIX
Ensure GDPR Compliance with LeanIXEnsure GDPR Compliance with LeanIX
Ensure GDPR Compliance with LeanIXLeanIX GmbH
 
LeanIX-Signavio Integration
LeanIX-Signavio IntegrationLeanIX-Signavio Integration
LeanIX-Signavio IntegrationLeanIX GmbH
 
How to set up a Lean Standards Governance
How to set up a Lean Standards GovernanceHow to set up a Lean Standards Governance
How to set up a Lean Standards GovernanceLeanIX GmbH
 
Innovative API-Based LeanIX Enhancements
Innovative API-Based LeanIX EnhancementsInnovative API-Based LeanIX Enhancements
Innovative API-Based LeanIX EnhancementsLeanIX GmbH
 
Moving EA - from where we are to where we should be
Moving EA - from where we are to where we should beMoving EA - from where we are to where we should be
Moving EA - from where we are to where we should beLeanIX GmbH
 
Is next generation EAM more than just agile IT planning?
Is next generation EAM more than just agile IT planning?Is next generation EAM more than just agile IT planning?
Is next generation EAM more than just agile IT planning?LeanIX GmbH
 

More from LeanIX GmbH (20)

LeanIX Virtual Workspaces
LeanIX Virtual WorkspacesLeanIX Virtual Workspaces
LeanIX Virtual Workspaces
 
How to reduce complexity by segregating your data with Virtual Workspaces
How to reduce complexity by segregating your data with Virtual WorkspacesHow to reduce complexity by segregating your data with Virtual Workspaces
How to reduce complexity by segregating your data with Virtual Workspaces
 
Gartner EA: The Rise of Data-driven Architectures
Gartner EA: The Rise of Data-driven ArchitecturesGartner EA: The Rise of Data-driven Architectures
Gartner EA: The Rise of Data-driven Architectures
 
Application Harmonisation using Design Principles in LeanIX
Application Harmonisation using Design Principles in LeanIXApplication Harmonisation using Design Principles in LeanIX
Application Harmonisation using Design Principles in LeanIX
 
Effective EAM: whet your appetite & deliver solutions
Effective EAM: whet your appetite & deliver solutionsEffective EAM: whet your appetite & deliver solutions
Effective EAM: whet your appetite & deliver solutions
 
Lean EAM with the Microservices Add-on and the Signavio Integration
Lean EAM with the Microservices Add-on and the Signavio IntegrationLean EAM with the Microservices Add-on and the Signavio Integration
Lean EAM with the Microservices Add-on and the Signavio Integration
 
Next Level Enterprise Architecture
Next Level Enterprise ArchitectureNext Level Enterprise Architecture
Next Level Enterprise Architecture
 
Integration Architecture with the Data Flow
Integration Architecture with the Data FlowIntegration Architecture with the Data Flow
Integration Architecture with the Data Flow
 
LeanIX-ServiceNow Integration
LeanIX-ServiceNow IntegrationLeanIX-ServiceNow Integration
LeanIX-ServiceNow Integration
 
Application Rationalization with LeanIX
Application Rationalization with LeanIXApplication Rationalization with LeanIX
Application Rationalization with LeanIX
 
Custom Reports & Integrations with GraphQL
Custom Reports & Integrations with GraphQLCustom Reports & Integrations with GraphQL
Custom Reports & Integrations with GraphQL
 
LeanIX Inventory: Import & Export
LeanIX Inventory: Import & ExportLeanIX Inventory: Import & Export
LeanIX Inventory: Import & Export
 
Survey Add-on Showcase: Cloud Transformation
Survey Add-on Showcase: Cloud TransformationSurvey Add-on Showcase: Cloud Transformation
Survey Add-on Showcase: Cloud Transformation
 
The LeanIX Microservices Integration
The LeanIX Microservices IntegrationThe LeanIX Microservices Integration
The LeanIX Microservices Integration
 
Ensure GDPR Compliance with LeanIX
Ensure GDPR Compliance with LeanIXEnsure GDPR Compliance with LeanIX
Ensure GDPR Compliance with LeanIX
 
LeanIX-Signavio Integration
LeanIX-Signavio IntegrationLeanIX-Signavio Integration
LeanIX-Signavio Integration
 
How to set up a Lean Standards Governance
How to set up a Lean Standards GovernanceHow to set up a Lean Standards Governance
How to set up a Lean Standards Governance
 
Innovative API-Based LeanIX Enhancements
Innovative API-Based LeanIX EnhancementsInnovative API-Based LeanIX Enhancements
Innovative API-Based LeanIX Enhancements
 
Moving EA - from where we are to where we should be
Moving EA - from where we are to where we should beMoving EA - from where we are to where we should be
Moving EA - from where we are to where we should be
 
Is next generation EAM more than just agile IT planning?
Is next generation EAM more than just agile IT planning?Is next generation EAM more than just agile IT planning?
Is next generation EAM more than just agile IT planning?
 

Recently uploaded

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 

Recently uploaded (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 

Authorization and Authentication in Microservice Environments

  • 1. Authorization  and  Authentication  in   Microservice Environments Bernd  Schönbach
  • 2. Overview 2Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX • Introduction • What’s the problem anyway? • And how exactly do JSON Web Tokens help here? • What are JSON Web Tokens? • Some examples • Mind the gap • JWS vs. JWE
  • 4. LeanIX helps companies to manage and optimize their IT Architecture 4Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX Current IT Architecture Create Transparency Optimize IT Architecture • Missing information (e.g. interfaces, technologies) • Hard to introduce new products & sales channels • High costs and risks • Import existing data into LeanIX (via Excel or API) • Invite experts to share their knowledge • Use best-practice reports to identify issues • Define target architecture and roadmaps
  • 5. LeanIX is a web-based platform to capture and share knowledge about IT 5Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX Fact Sheets & Tagging Context-based Search API, Import & Export Comments & Threads IT Inventory Collaboration Platform Interactive Reporting Activity Stream & Notifications Subscriptions Print & Export (PDF) Best Practice Reports Interactive Adaption
  • 7. What’s the problem anyway? 7Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
  • 8. What’s the problem anyway? 8Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
  • 9. What’s the problem anyway? 9Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
  • 10. What’s the problem anyway? 10Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
  • 11. And how do JWT exactly help here?
  • 12. Typical Auth Flow 12Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX UI Auth Service   Microservice 2 Microservice 1 Microservice 3 Login Return  OAuth  Token Check  Oauth Validity Send  Requests  with  Token AuthService  
  • 13. And now with JWT 13Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX UI Auth Service   Microservice 2 Microservice 1 Microservice 3 Login Return  JWT Check  Token  Validity Send  Requests  with  Token
  • 14. What are JSON Web Tokens?
  • 15. What are JSON Web Tokens (JWT)? 15Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX RFC  7519:   “JSON  Web  Token  (JWT)  is  a  compact,  URL-­‐safe  means   of  representing  claims  to  be  transferred  between  two   parties.”
  • 16. What are JSON Web Tokens (JWT)? 16Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX
  • 17. What are JSON Web TokenS (JWT)? 17Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX Two Types JSON Web Signature JSON Web Encryption
  • 18. JSON Web Signature (RFC 7515) 18Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX Three  Parts 1. Header 2. Payload  (Claims) 3. Signature
  • 19. JWS - Header 19Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX { "alg": "HS256", "typ": "JWT“ } { "alg": "HS256", "typ": "JWT“ } Recommended Values: • HS256 • RS256 • ES256 Special Case: • none
  • 20. JWS - Payload 20Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX - Main Information Part - Contains Information like - Issuer (iss) - Expiration time (exp) - Subject (sub) - Features - Permissions - … { "iss": "auth-service-1", "name": "John Doe", "admin": true, "exp": 1487325600 } Use as few information as possible to keep the Token small!
  • 21. JWS - Signature 21Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX HMACSHA256( base64UrlEncode(header) + "." + base64UrlEncode(payload), secret ) • Verifies origin and content of JWS Token • Signature contains Header and Payload
  • 22. JWS Example 22Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9. eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9. TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ Header: { "alg": "HS256", "typ": "JWT"} Payload: { "sub": "1234567890", "name": "John Doe", "admin": true } Signature: HMACSHA256( base64UrlEncode(header) + "." + base64UrlEncode(payload), secret )
  • 23. JSON Web Encryption (RFC 7516) 23Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX Five  Parts  (JWE) 1. Protected  Header 2. Encrypted  Key 3. Initialization  Vector 4. Cipher  text 5. Authentication  Tag
  • 24. JWE Protected Header 24Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX • Basically the same as JWS with some minor tweaks • Two additional Keys: • enc -> encryption algorithm • zip -> compression algorithm • “alg” now describes the algorithm for encrypting CEK • ”none” is no longer allowed { "alg": "RSA-OAEP", "enc": "A256GCM“, "typ": "JWT“ }
  • 25. JWE Protected Header 25Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX • Algorithm used should be an AEAD algorithm • Authenticated Encryption with Associated Data • “AEAD algorithms accept two inputs, the plaintext and the Additional Authenticated Data (AAD) value, and produce two outputs, the cipher text and the Authentication Tag value.” • AAD can be base64encoded JWE Protected Header
  • 26. JWE Encrypted Key 26Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX • Encrypted Content Encryption Key (CEK) • CEK = Symmetric Key used to encrypt plaintext • CEK is used to produce cipher text and Authentication Tag
  • 27. JWE Initialization Vector 27Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX • A random numeric value used to “salt” encrypted value • Ensures for same content, encrypted value differs • May be left empy if enc Algorithm does not use IV
  • 28. JWE Ciphertext 28Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX • Basically the same as Payload in JWS • Is encrypted with enc algorithm • Is encrypted using initialization vector • But must not be JSON can be plaintext
  • 29. JWE Authentication Tag 29Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX • Is also a result of enc algorithm • Ensures integrity of cipher text • Ensures integrity Additional Authenticated Data
  • 30. JWE 30Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX Again all parts are base64 Encoded and concatenated with dots: BASE64URL(UTF8(JWE Protected Header)) . BASE64URL(JWE Encrypted Key) . BASE64URL(JWE Initialization Vector) . BASE64URL(JWE Ciphertext) . BASE64URL(JWE Authentication Tag)
  • 32. JWS creation in Java 32Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX public String createJwt(User loggedInUser) { JwtBuilder builder = Jwts.builder() .setSubject(loggedInUser.getUsername()) .claim(„payload“, loggedInUser.getPayload()) .setId(loggedInUser.getId()) .setExpiration(calculateExpirationTime()); return builder.signWith( SignatureAlgorithm.RS256, privateKey ) .compact(); }
  • 33. JWS checking in Java 33Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX Claims claims = Jwts.parser() .setSigningKey(publicKey) .parseClaimsJws(accesTokenString) .getBody(); Important Side Note: - Ensure checking always uses the correct algorithm - “none” alg header must not lead to unchecked token if signed is expected! https://auth0.com/blog/critical-vulnerabilities-in-json-web-token-libraries/
  • 34. JWS Usage in Java with Dropwizard 34Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX @Override public Optional<User> authenticate(String accessToken) { if (accessToken == null) return Optional.absent(); OAuth2Token token = this.parser.parse(accessToken); return Optional.fromNullable((User) token.getPrincipal()); } Adapt Authenticator Class: Use @Auth Annotation: public Response getX( @Auth @ApiParam(access="internal") User user ){ […] }
  • 35. JWS example 35Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX Live Presentation
  • 36. JWS libraries 36Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX Libraries exist for nearly every programming language: • .NET • Pyhton • Node.js • Java • JavaScript • Perl • Ruby • Elixir • Go • Haskell • Rust • Lua • Scala • D • Clojure • Objective C • Swift • C • Kdb+/Q • Delphi • PHP • Crystal • …
  • 38. Mind the gap 38Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX Don’ts: • Never ever send passwords in JWT • And also no hashes.. • You cannot control where the JWT goes • Don’t verify token validity with Auth-Service Dos: • Always verify token (checksum) • Add as few as possible but at least enough to avoid calls to other services
  • 39. Back to JWS vs JWE vs
  • 40. JSON Web Encryption (JWE) 40Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX • Everything is unreadable to the user • You potentially can use classified information • Only one key needed which can be distributed easily Pros Cons • Need to distribute secret to all services • Attack vector increases
  • 41. JSON Web Encryption (JWE) 41Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX Auth Service Microservice 2 Microservice 1 Microservice 3 Private Key
  • 42. JSON Web Signature (JWS) 42Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX • Everything is readable to the user • Only the public key needs to be distributed • Only the Auth-Service needs high protection • If private key is compromised exchange here and distribute pub key Pros Cons • Everything is readable to the user
  • 43. Auth Service JSON Web Signature (JWS) 43Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX Auth Service Microservice 2 Microservice 1 Microservice 3 Private Key Public Key
  • 45. Conclusion Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX • Allows to keep loose coupling of Microservices • Secure transfer of Authorization and Authentication claims • Further domains can be found in Single Sign On Contexts • Easy to implement due to library availability
  • 46. Thanks (and yes we are hiring) https://www.leanix.net/en/jobs
  • 47. Sources 47Authorization and Authentication in Microservice Environments – Bernd Schönbach – LeanIX • https://tools.ietf.org/html/rfc7519 RFC for JWT • https://tools.ietf.org/html/rfc7518 RFC for JWA (used in JWS and JWE) • https://jwt.io/ • https://www.leanix.net/ • Devil Smiley CC BY 4.0 https://www.creativetail.com • Further Articles on JWT: • https://blog.codecentric.de/2016/11/json-web-token-jwt-im-detail/ • https://medium.facilelogin.com/jwt-jws-and-jwe-for-not-so-dummies-b63310d201a3