Spring Boot MicroServices Course : Securing MicroServices using Spring Security OAuth2
HTML-код
- Опубликовано: 17 май 2024
- Join this channel to get access to the perks:
/ @sivalabs
#sivalabs #java #spring #springboot #springcloud #microservices #restapi #rabbitmq #testing #junit #junit5 #maven #testcontainers #docker #kubernetes
In this video, you will learn:
► How to implement OAUth 2 Security for microservices using Spring Security OAuth 2
► How to use Keycloak as OAuth2 Authentication Server
► How to test Secured REST APIs using KeycloakContainer
► How to test Secured REST APIs using MockMvc and OAuth2MockUser
► How to configure Swagger Documentation with OAuth Login
❤️ Thanks for watching
References
=============================================
⭐ Source Code: github.com/sivaprasadreddy/sp...
⭐ Spring Boot Tutorials: www.sivalabs.in/spring-boot-t...
Connect with Me
=============================================
Blog: www.sivalabs.in
RUclips: / sivalabs
Twitter: / sivalabs
GitHub: github.com/sivaprasadreddy
LinkedIn: / ksivaprasadreddy
Must Watch Videos
=============================================
🚀 🎬 Spring Boot REST API Anti-Patterns and Best Practices • Spring Boot REST API A...
🚀 🎬 Modern Spring Boot Application Development using Java 17/21 and Testcontainers • Modern Spring Boot App...
🚀 🎬 How do I upskill myself, and what tools & techniques do I use? • How do I upskill mysel...
🚀 🎬 Top 5 Tips to Succeed in Technical Interviews • Top 5 Tips to succeed ...
Popular Series Playlists
=============================================
🚀 🎬 Spring Boot Tips Series Playlist • Spring Boot Tips
🚀 🎬 Spring Boot + Kubernetes Tutorial Series Playlist • Spring Boot + Kubernet...
🚀 🎬 Spring Boot - The Missing Guide Series Playlist • Spring Boot - The Miss...
🚀 🎬 Integration Testing with Testcontainers • Integration Testing wi...
🚀 🎬 Java Testing Made Easy Playlist • Java Testing Made Easy...
⭐ Tags ⭐
best spring tutorials, best spring boot tutorials, how to learn spring boot, mastering spring boot, complete java testing course, java testing best practices, how to build spring boot rest API, spring cloud tutorials, spring boot docker tutorial, spring boot kubernetes tutorial, how to become proficient in java, how to learn spring boot quickly, how to learn spring boot in-depth - Наука
Thanks for the video! Many things to keep in mind when setting up security for microservices. Learned a lot!
Thank you so much❤❤❤❤
Another way is to implement a ClientHttpRequestInterceptor or ClientHttpRequestInitializer and pass it to the RestClient. Inside the new class then can set the bearer header.
For reference: Spring Security OAuth 2 Tutorial Series: www.sivalabs.in/spring-security-oauth2-tutorial-introduction/
Great content!
In the intro you explaining what the roles are of the api gateway and microservice in relation with the auth server.
What if you validate the token via the api gateway, is it still necessary to validate it also via the microservice?
If you validate the token with the api gateway then the microservices are not secure right, like what if I make a direct request to a microservice then there is no token validation.
If token validation is only performed at gateway then the infrastructure setup should not allow direct access to downstream Microservices. Some companies implement that way to improve performance. But, if you have to expose APIs directly to other Microservices as well, I recommend to validate the token at Microservice level too.
@@sivalabs Thanks for the clarification!
Have you also created a video tutorial on using an API Cloud Gateway as an OAuth2 resource server? I'm currently attempting to implement it myself, but I'm facing issues with CORS, likely because OAuth2 resource servers also have CORS security measures. I attempted to adapt the SecurityConfig file from your order-service for the API gateway, but unfortunately, it doesn't seem to work because my API gateway is a reactive application rather than a servlet.