Secure Your Microservices Using Keycloak | Spring Cloud Gateway | JWT | JavaTechie

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ก.ย. 2024
  • In this tutorial, we will understand how you can leverage Keycloak to secure your microservice application using API Gateway
    #JavaTechie #Microservice #SpringBoot #Security
    Spring boot microservice Premium course lunched with 70% off 🚀 🚀
    Hurry-up & Register today itself!
    COURSE LINK : javatechie5246...
    PROMO CODE : JAVATECHIE50
    👉 Spring Boot + Keycloak : • Securing Spring Boot M...
    👉 Microservice Security using JWT : • Microservices Security...
    GitHub:
    github.com/Jav...
    Blogs:
    / javatechie
    Facebook:
    / javatechie
    Join this channel to get access to perks:
    www.youtube.co...
    guys if you like this video please do subscribe now and press the bell icon to not miss any update from Java Techie
    Disclaimer/Policy:
    --------------------------------
    Note : All uploaded content in this channel is mine and its not copied from any community ,
    you are free to use source code from above mentioned GitHub account

ความคิดเห็น • 69

  • @username_0_0
    @username_0_0 7 หลายเดือนก่อน +11

    India tech tutorials are life saver !!!

  • @gadaffigadaffi7496
    @gadaffigadaffi7496 ปีที่แล้ว +5

    You're super talented man, I learn alot from you. Thank you

  • @gopisambasivarao5282
    @gopisambasivarao5282 ปีที่แล้ว +3

    Thanks Basant, appreciate your efforts and nice session …god bless you…❤

  • @sayanbiswas8847
    @sayanbiswas8847 ปีที่แล้ว +3

    amazing content covered here. keep exploring and making such videos on microservices, thanks a lot

  • @valentinogiardino1752
    @valentinogiardino1752 3 หลายเดือนก่อน +3

    Hi, first of all thanks so much for your content!
    I want to ask if you can make some tutorial for dealing with Spring Security with a Organization based aproach. I am struggling with that and didnt find much information so it would be very valuable. The requirements would be something like this:
    - There can be many organizations in the application
    - Each org has its owns users. Users belong to only one organization
    - In each org there is an admin who can create (or invite) users to join the organization and manage their permissions
    Hope you find it interesting, greetings from Argentina!

    • @shashanksingh4708
      @shashanksingh4708 17 วันที่ผ่านมา +1

      i think you are looking for role base authorization , try and look this up , this is something common in security

  • @u-pu-u-pu
    @u-pu-u-pu ปีที่แล้ว +6

    This is what I exactly need.

  • @phanimc11211
    @phanimc11211 ปีที่แล้ว +2

    Thanks Basant, appreciate your efforts

  • @utkarshshukla4505
    @utkarshshukla4505 ปีที่แล้ว +2

    Thank you sir , please make more videos on keyclock 🙏🙏

  • @vino7tech
    @vino7tech ปีที่แล้ว +1

    Your spring boot super star. Number one spring boot tutorial channel in youtube. Thank you very much sir

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      Thank you buddy 😊. Keep learning 👍

  • @uptodatejavacode
    @uptodatejavacode ปีที่แล้ว +2

    Want more videos regarding keycloack hopping it will be considerable thanks in advance

  • @s3649
    @s3649 ปีที่แล้ว +1

    Hey Java techie thanks for great videos so far. I have learnt a lot from your videos. This time I am facing difficulty in configuring Multitenant Spring boot application. Could you make one video series on Multitenancy in Spring boot Thanks.

  • @DINESHKUMARWithSpringBoot
    @DINESHKUMARWithSpringBoot ปีที่แล้ว +3

    Hi Sir,Really you are doing a great job with great knowledge and effort. Sir we are waiting for SAAGA Orchestration design pattern in Micro service, Please make one more video on this topic as well. Great Thanks in Advance. Please Keep continue.

  • @rashmiranjanswain601
    @rashmiranjanswain601 ปีที่แล้ว +1

    It's very helpful.Please implement fusion auth with spring boot

  • @someshvemula9966
    @someshvemula9966 ปีที่แล้ว +1

    I love that swag intro 😃

  • @sajindersohal1914
    @sajindersohal1914 หลายเดือนก่อน

    Basant. I've a question. How will you make sure that restaurant service and swiggy app are safe assuming if someone got information of the ports and host of those services and call endpoints of restaurant service and swiggy app directly instead going through api gateway. Please explain.

  • @nick-sx2zn
    @nick-sx2zn หลายเดือนก่อน

    Any video on how the microservices communicate securely with tokens?

  • @md.giashuddin3083
    @md.giashuddin3083 ปีที่แล้ว +1

    Thanks Basant. Can you kindly create another video in which I can create user in Keycloak from Spring-boot-application and apply role-based authorization in the microservices?

    • @Javatechie
      @Javatechie  ปีที่แล้ว +1

      I have already covered this and link shared in video description

  • @manee427
    @manee427 ปีที่แล้ว +3

    can you make please another video to show how we can combine spring boot keaycloack and react ?

    • @Javatechie
      @Javatechie  ปีที่แล้ว +2

      Okay i will

    • @manee427
      @manee427 ปีที่แล้ว +1

      thanks@@Javatechie

  • @gopishettymahindra2713
    @gopishettymahindra2713 ปีที่แล้ว +1

    Thanks Sir. Could you please create videos for microservice design pattern and annotation part 2

  • @ВернитеСтену
    @ВернитеСтену หลายเดือนก่อน

    It seems like this config doesn't work anymore with 3.3.2 Spring version. Gateway just crushes with some application context error. Has anyone had the same problem? Also, I took the code from the repository, gateway works fine, but services don't start because of incompatibility of Lombok and JDK 22, maybe someone would find it useful

  • @malleswarrao3887
    @malleswarrao3887 ปีที่แล้ว +2

    Can you please make a video on Translational and Isolation and Propagation levels internal working, please help us Sir

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      I completely forgot about it. Noted for upcoming videos

    • @malleswarrao3887
      @malleswarrao3887 ปีที่แล้ว

      @@Javatechie Thank you

  • @DEEPAKSINGH-pj4od
    @DEEPAKSINGH-pj4od ปีที่แล้ว +1

    Super

  • @henergy683
    @henergy683 ปีที่แล้ว +1

    Hai Basant, thank you for this great video. This is what I was looking for. I have one question brother, if we use filter in API Gateway, we can passing some headers that we need (e,g X-USER-ID header) to certain endpoint. how we implemented passing header from API Gateway to certain endpoint if we using keycloack?. example case is: if token is valid than passing X-USER-ID header to /restaurant/order

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      That's interesting question. Please checkout my spring security in microservice video 2 there I passed headers so you will get an idea 💡

  • @codertravel99
    @codertravel99 3 หลายเดือนก่อน

    But how to throw and handle exception if token is invalid and token expired in that cases also we are getting 401

  • @hieppham1379
    @hieppham1379 8 หลายเดือนก่อน +1

    It's great that keycloak can help create jwt easily. But I have a question, after creating jwt with keycloak, how can the user log in with username and password to get the jwt token?

    • @Javatechie
      @Javatechie  8 หลายเดือนก่อน

      Before the user gets the jwt token he must be part of the system

  • @smrutisouravmoharana2658
    @smrutisouravmoharana2658 10 หลายเดือนก่อน +1

    I want add admin and user login system in swigy gateway system

  • @ratnajiguptha5643
    @ratnajiguptha5643 ปีที่แล้ว

    could you please make a video on secure microservices using Okta?

  • @smrutisouravmoharana2658
    @smrutisouravmoharana2658 10 หลายเดือนก่อน +1

    How to add role based authentication in gateway microservice project how to add @Role annotation use in microservice class method

  • @jakeDragonaire
    @jakeDragonaire 9 หลายเดือนก่อน +1

    Hi JavaTechie, in security config class , I am getting error no authentication manager bean. Hence Api gateway is not running for me

    • @Javatechie
      @Javatechie  9 หลายเดือนก่อน

      Please create a bean if authentication manager

  • @jimishukurow2286
    @jimishukurow2286 7 หลายเดือนก่อน +1

    Are the methods which is strikedthrough, depricated?

  • @fsdinterviewguide
    @fsdinterviewguide ปีที่แล้ว +1

    How to restrict the access number of requests per second at the API Gateway level?

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      You need to implement a rate limiter for that

  • @smrutisouravmoharana2658
    @smrutisouravmoharana2658 10 หลายเดือนก่อน +1

    Hii sir, I had seen the video but i have a doubt i.e you are using role based authority in a single microservice class if I use api gateway how to use role based authority

    • @Javatechie
      @Javatechie  10 หลายเดือนก่อน

      You need to create microservices specific to the role and configure the redirect URL in the gateway

    • @smrutisouravmoharana2658
      @smrutisouravmoharana2658 10 หลายเดือนก่อน +1

      @@Javatechie sir please make a short video

    • @smrutisouravmoharana2658
      @smrutisouravmoharana2658 10 หลายเดือนก่อน +1

      In your Swigygateway project

  • @utkarshshukla4505
    @utkarshshukla4505 ปีที่แล้ว +1

    Sir if we want to upgrade keyclock in our project how to do ? Sir ye vale senerio pe bhi video bana do aap

    • @Javatechie
      @Javatechie  ปีที่แล้ว +1

      I don't think there will be any problem i believe they must provide backward compatibility

    • @utkarshshukla4505
      @utkarshshukla4505 ปีที่แล้ว +1

      @@Javatechie actually sir in my organisation there is a task to analyse keyclock update in project and what changes required that's why asking sir

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      No problem i have used both the approach old and new but didn't find much syntactical changes instead UI theme changed

  • @gamingbeast710
    @gamingbeast710 9 หลายเดือนก่อน

    thx

  • @paulcalinovici8808
    @paulcalinovici8808 ปีที่แล้ว

    Hi, I wanted to use keycloak for some projects but I gave up because I didn't know how to add custom attributes to role mappings. I want to add validFrom and validTo attributes to role mappings. I asked also in community but I got no response, I can't believe no one has this use case with role time validity! Ofc, I can have this information in my application db, but I feel that this piece of information should be in the authorization server db.

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      I haven't implemented this scenario before and will check and update you

    • @muralikrishna6044
      @muralikrishna6044 10 หลายเดือนก่อน

      ​@@Javatechiehow to implement j front end cause there are all credentials in keycloak based, so it means how to use will provide all credentials to authenticate ... Either use certainly connect with keycloak server or..?

    • @smrutisouravmoharana2658
      @smrutisouravmoharana2658 7 หลายเดือนก่อน

      Hii sir, In yml file you are using 2 service class and single login then 2 services access, if one service for admin user and another service for employee user so how they can access

  • @vladstarichenko4937
    @vladstarichenko4937 5 หลายเดือนก่อน

    I’m facing with CORS problem, can’t reach gateway, how it works for you?

    • @Javatechie
      @Javatechie  5 หลายเดือนก่อน

      Please check the source code provided in video description and then validate it .

    • @vladstarichenko4937
      @vladstarichenko4937 5 หลายเดือนก่อน

      @@Javatechie I’ve checked the source code, in eureka config (application.yaml) a configuration for CORS is missing, so my point was “How it works for you then”😅 any plugins installed?

    • @Javatechie
      @Javatechie  5 หลายเดือนก่อน

      @@vladstarichenko4937 no it shouldn't be the issue why cors issue if it's not accessing from UI

    • @vladstarichenko4937
      @vladstarichenko4937 5 หลายเดือนก่อน

      @@Javatechie it’s not accessible from postman and from swagger

  • @zawedakhtar379
    @zawedakhtar379 ปีที่แล้ว +1

    But how to disable and enable jwt oauth .

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      I am not sure about direct support but as a workaround You need to introduce a flag to toggle feature

  • @bulbul-dev
    @bulbul-dev ปีที่แล้ว

    Can you make video about OAuth2 with authorization server resource server and client server

  • @Kitty-w6q7p
    @Kitty-w6q7p 4 หลายเดือนก่อน

    Как это можно на слух воспринимать?

    • @bigloo106
      @bigloo106 2 หลายเดือนก่อน

      с трудом)