JWT + OAuth2 Spring Boot : securiser 6 microservices Keycloak | System Design en 10 min #3

Your client authenticates via the Gateway. But behind it, there are 6 services. How do they trust each other? JWT, OAuth2, Keycloak: we're setting up full authentication. Chapters: 00:07 - 6 services, who trusts whom? 00:32 - Intro 01:04 - The 3 authentication problems 02:29 - JWT: token anatomy (header, payload, signature) 04:36 - Access token vs. Refresh token 06:10 - OAuth2 flows: Authorization Code vs. Client Credentials 07:48 - Keycloak: realm, roles, clients 09:25 - Comparison: Keycloak vs. Auth0 vs. Custom JWT (ADR #3) 11:26 - Context propagation in Kafka 12:56 - Implementation: Spring Security OAuth2 Resource Server 28:00 - JwtAuthConverter: mapping Keycloak roles 33:20 - Demo: obtaining a token, curl with/without a token 45:20 - Interview trap: where to store tokens 46:46 - Outro + teaser Video 4 In this video: The problem: 3 Types of communication to secure (user, service-to-service, Kafka) JWT: token anatomy, header, payload, RS256 signature Access token (5 min, stateless) vs. Refresh token (30 days, revocable) OAuth2 flows: Authorization Code + PKCE (front end) vs. Client Credentials (service) Keycloak: realm, roles (CLIENT, RESTAURANT, DRIVER), confidential clients Comparison: Keycloak vs. Auth0 vs. Custom JWT (ADR #3) Context propagation in Kafka: X-User-Id headers, X-Roles (no JWT) Implementation: Spring Security OAuth2 Resource Server + JwtAuthenticationConverter Maintenance pitfall: where to store tokens in a distributed architecture? Stack: Java 17 + Spring Boot 3.2 + Keycloak 24 + Spring Security OAuth2 + Kafka Source code: https://github.com/Deval123/quickbite “System Design in 10 min” series - Video 3/20 #JWT #OAuth2 #Keycloak #SpringSecurity #Microservices #Java #SpringBoot #Architecture #systemdesign 🔥 Subscribe to the channel: https://www.youtube.com/@devalere7345...

7 Authentication Concepts Every Developer Should Know
▶︎

7 Authentication Concepts Every Developer Should Know

1 BDD par microservice : PostgreSQL + Flyway Spring Boot | System Design en 10 min #4
▶︎

1 BDD par microservice : PostgreSQL + Flyway Spring Boot | System Design en 10 min #4

Complete Terraform Course - From BEGINNER to PRO! (Learn Infrastructure as Code)
▶︎

Complete Terraform Course - From BEGINNER to PRO! (Learn Infrastructure as Code)

API Gateway Spring Boot: 1 Single Entry Point for 6 Microservices | System Design in 10 min #2
▶︎

API Gateway Spring Boot: 1 Single Entry Point for 6 Microservices | System Design in 10 min #2

Ou couper ? Microservices Java Spring Boot + Kafka | System Design en 10 min #1
▶︎

Ou couper ? Microservices Java Spring Boot + Kafka | System Design en 10 min #1

How to Design APIs Like a Senior Engineer (REST, GraphQL, Auth, Security)
▶︎

How to Design APIs Like a Senior Engineer (REST, GraphQL, Auth, Security)

ASP.NET Core Full Course For Beginners (.NET 10)
▶︎

ASP.NET Core Full Course For Beginners (.NET 10)

Creator of C++: Bell Labs, Negative Overhead Abstraction, Mistakes | Bjarne Stroustrup
▶︎

Creator of C++: Bell Labs, Negative Overhead Abstraction, Mistakes | Bjarne Stroustrup

Jfrog | Jfrog Artifactory | Jfrog Artifactory Tutorial | Artifactory Tutorial | Intellipaat
▶︎

Jfrog | Jfrog Artifactory | Jfrog Artifactory Tutorial | Artifactory Tutorial | Intellipaat

Postman Beginner's Course - API Testing
▶︎

Postman Beginner's Course - API Testing

How to Design APIs Like a Senior Engineer (REST, GraphQL, Auth, Security)
▶︎

How to Design APIs Like a Senior Engineer (REST, GraphQL, Auth, Security)

3 Microservices Event-Driven avec Spring Boot + Kafka | Event-Driven en 5 min #20
▶︎

3 Microservices Event-Driven avec Spring Boot + Kafka | Event-Driven en 5 min #20

Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones
▶︎

Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

Google & AWS Veteran: What Top Tier Software Architects Do Differently
▶︎

Google & AWS Veteran: What Top Tier Software Architects Do Differently

Kubernetes Zero to Hero: The Complete Beginner’s Guide (2025 Edition)
▶︎

Kubernetes Zero to Hero: The Complete Beginner’s Guide (2025 Edition)

Build and Deploy a Full AI-Powered Applicant Tracking System
▶︎

Build and Deploy a Full AI-Powered Applicant Tracking System

Kubernetes Tutorial for Beginners [FULL COURSE in 4 Hours]
▶︎

Kubernetes Tutorial for Beginners [FULL COURSE in 4 Hours]

System Design Explained: APIs, Databases, Caching, CDNs, Load Balancing & Production Infra
▶︎

System Design Explained: APIs, Databases, Caching, CDNs, Load Balancing & Production Infra

SQL Course for Beginners [Full Course]
▶︎

SQL Course for Beginners [Full Course]

This Is How OpenAI Goes Broke
▶︎

This Is How OpenAI Goes Broke