Secure Spring Cloud Microservices Architecture with Keycloak, Gateway, Consul, and Vault

preview_player
Показать описание
Secure Spring Cloud Microservices Architecture with Keycloak, Gateway, Consul, and Vault

Welcome to our in-depth tutorial on building a secure microservices architecture using Spring Cloud, Keycloak, HashiCorp Consul, and Vault!

In this comprehensive series, we'll walk you through the entire process of setting up a robust and secure microservices ecosystem. Whether you're a developer, DevOps engineer, or architect, you'll find valuable insights and practical steps to implement in your projects.

In this series, you will learn:

Introduction to Microservices Architecture

Overview and benefits of microservices.
Introduction to the technologies used.
Setting Up Keycloak for Authentication

Installing and configuring Keycloak.
Creating realms, clients, and roles.
Configuring Spring Cloud Gateway for Routing

Setting up the gateway for intelligent routing.
Validating JWT tokens.
Service Discovery with HashiCorp Consul

Integrating Consul for dynamic service discovery.
Registering microservices with Consul.
Managing Secrets with HashiCorp Vault

Setting up Vault for secure secret management.
Retrieving secrets in microservices.
Securing Microservices

Validating JWT tokens within microservices.
Implementing role-based access control with @PreAuthorize.
Inter-Service Communication with FeignClient

Setting up FeignClient for microservices communication.
Ensuring secure and reliable inter-service calls.
End-to-End Demonstration

Live coding sessions showing the complete workflow.
Example scenarios illustrating role-based access control.
Resources:

GitHub Repository with the source code.
Keycloak Documentation
Spring Cloud Gateway Documentation
HashiCorp Consul Documentation
HashiCorp Vault Documentation
Don't forget to like, comment, and subscribe for more tutorials on microservices and cloud-native development. Hit the notification bell so you never miss an update!

About Us:
We're dedicated to helping developers build secure and scalable applications. Stay tuned for more in-depth tutorials and guides.

Hashtags:
#Microservices #SpringCloud #Keycloak #Consul #Vault #Java #SpringBoot #CloudComputing #Security #codewithbisky

Gitlab Link:

00:00:00 Introduction
00:01:30 Architectural Design
00:03:56 Run Vault And Consul docker images
00:07:18 Access Consul WEB UI
00:09:15 Spring Cloud API Gateway
00:12:07 Configure Routes
00:13:24 Register Auth Service To Hashicorp Consul Discovery
00:16:15 Configure health check url
00:17:54 Create Social Service microservice
00:22:06 Register Social Service To Hashicorp Consul Discovery
00:25:38 Add Test Endpoint
00:27:31 API gateway routes explained
00:31:05 Add Security to Spring Cloud API gateway
00:33:12 Add Keycloak Resource Server Url
00:34:41 Test security on the Spring Cloud API gateway
00:37:41 Add Security to Social Service
00:42:53 Add Security Config
00:44:26 Configure swagger,actuator and public endpoints to be accessed without security
00:46:56 Add Test Api for messaging service
00:53:40 Microservice Architecture Intercommunication With Feign Client
01:02:28 Test microservice intercommunication - Social Service to Messaging Service
01:05:40 Discuss ways of intercommunication when sending bearer token to another service
01:08:24 Add Security Service a better approach to get Keycloak UserId and Bearer Token
01:15:25 Get Keycloak Token Custom Claim
01:17:54 Test Microservice Intercommunication and Logging response from other service using Feign Client
01:19:37 Configure Hashicorp Vault
01:24:40 Add Spring Boot Vault Dependency
01:25:33 Configure Hashicorp Vault in Spring Boot - Keycloak Auth Service
01:27:22 Add vault configurations to the microservice
01:28:52 Conclusion
Рекомендации по теме
Комментарии
Автор

Great job Sir Bisky.Keep the great videos coming

noleenvimbai
Автор

Great job Bisky. Keep the great videos coming

i have problem i use Eureka (microservices)

one of them services its called order this services speak with another services called-> customer using open feingclient

when make request that is result that show for me

[401 Unauthorized] during [GET]

how can i make every service in Eureka did not need token from keyclock

to complete the process

[401 Unauthorized] during [GET]

mahmoodselawe
Автор

Great Tutorial. How do we register users, if I am to register users and they log in using their passwords using this KeyCloak approach?

MichaelElimu