Spring Boot Microservices Tutorial - Part 6 - Security using Keyloak

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ธ.ค. 2024

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

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

    Link to the written tutorial: programmingtechie.com/articles/spring-boot-microservices-tutorial-part-4

  • @mehlulinokwara3841
    @mehlulinokwara3841 4 หลายเดือนก่อน +2

    You are a brilliant simplifier. Just made me a pro Spring Boot Java developer in two days. Thanks

  • @manjunathasathyanarayana1508
    @manjunathasathyanarayana1508 7 หลายเดือนก่อน +4

    nice. All six parts integrated and working. thanks
    Lot of new learning
    Wiremock,RestAssured,Flyway,keyloak.

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

    Thank you a lot! I was waiting for this video for so long

  • @e11y1985
    @e11y1985 6 หลายเดือนก่อน +1

    At 16:42 you talk about id_token. But this is not the case for me. Any Idea why id_token not show to me? I see only the access token.

    • @aryanrana-o6n
      @aryanrana-o6n 3 หลายเดือนก่อน

      sir i also faced same problem. did you get any solution

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

    I use vscode to write java code and find it more convenient than using intellj idea community version but when performing the suggested steps, it is not as complete as intellj idea. Have you ever used vscode to write java code? Is there any way to make the suggestions smarter and more accurate? Extensions that should be installed such as pack java and pack spring boot are already installed

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

    Hey Sai,can you make some videos on docker and docker compose

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

    Thank you for your work.
    How to achieve method-level security?
    I don’t think it is possible with this approach

  • @purinikiran-t9e
    @purinikiran-t9e 3 หลายเดือนก่อน

    ✋Thank you very much brother I found many solutions in ur lecture.

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

    I am desperately waiting for your next tutorial when is it coming up?

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

    Please create a video on distributed transaction in microservice using saga design pattern.

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

    Thank you for the tutorial. Is it safe to say that you only protected the API gateway, while the other services are still exposed? I don't see any security configurations on the other services, and I'm still able to make requests to them without being authenticated.

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

      Yes correct, I did this to simplify the setup a bit, you can improve this by adding security between services and the API Gateway

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

    In next tutorial please tell, how can we avoid auth for certain microservices?

  • @SrinathVeeraRaghavan
    @SrinathVeeraRaghavan 4 หลายเดือนก่อน +1

    The keycloak server is not connected with mysql and the data is not getting backed up how should I fix it

    • @ShreeharKE
      @ShreeharKE 15 วันที่ผ่านมา

      I am also facing the same issue, I had to create the realm & the client every time I restart the container. Have you a solution for this?

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

    when are upcoming videos going to be uploaded? Am eagerly waiting for it

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

    Thank you so much!

  • @Nadim-qk4sh
    @Nadim-qk4sh 7 หลายเดือนก่อน

    hi thank you for the tutorials
    im sucessfully using keycloak on the api gateway
    yet i still can access the product services using their original port and endpoints without the need of authentication
    is there any way to force all the microservices to be exclusively accessed only using the api gateway ?
    Thank you

    • @ProgrammingTechie
      @ProgrammingTechie  7 หลายเดือนก่อน +2

      Hi, good question.
      Yes, usually when you deploy this in a production grade setup, the microservies are deployed within a corporate firewall, and will have firewall rules to allow access only from certain hosts, in this case this can be API Gateway.
      Also we can use Mutual TLS to make sure our microservices only respond to trusted clients like API Gateway.
      Another approach is securing also each and every microservice, in this way the API Gateway will send an access token to access the other services, this is more secure, but there will be additional latency and involves more complexity because each microservice should now verify the access token against the Auth Server.

    • @Nadim-qk4sh
      @Nadim-qk4sh 7 หลายเดือนก่อน

      @@ProgrammingTechie thank youuu for the insight 🙏

  • @Hakan-mg2qj
    @Hakan-mg2qj 7 หลายเดือนก่อน

    Hello dear Sai, If we want to install keycloak to custom domain. What can we do? So, what if we want to using live project how can we settle it to public? Could you suggest any documentation? And could we use this for angular requests by some libraries?

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

      there is keycloak-js library which works with all angular, react, vue and many more. you can use that npm library. for custom domain you have to buy your domain and redirect your request to that domain which will be bind to keycloak ip and port.

    • @Hakan-mg2qj
      @Hakan-mg2qj 7 หลายเดือนก่อน

      ​@@souravsuman1993 Thanks for your response. Just a question I wanna ask, in the video, security settled for client like postman etc. When we want to auth to browser(react etc.) ,which issuer-uri, dependency or client will we use? And is there register method in this keycloak? Thanks for your answer again I am so glad

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

      For Angular, you can use this library github.com/manfredsteyer/angular-oauth2-oidc
      You can refer to my Keycloak Tutorial, I explained all the use cases in detail in that tutorial and also demonstrated how to integrate Keycloak along with Angular using the above library.
      If you want to authorize the client through a browser, then you have to use Authorization Code Flow Grant Type instead of Client credentials.
      Keycloak provides you all the functionality like register, login, 2 Factor Authentication, Single Sign On out of the box with minimal code changes.

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

    And are you not implementing the service discovery?

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

      Yes, as we are deploying using Kubernetes this feature will be available for us out of the box, no use in creating the discovery server and then removing it.

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

    can u please add the github link for the tutorials sir ?

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

    waiting for next video

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

    Great thanks

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

    Kindly implement a normal jwt user authentication with users and roles

    • @ProgrammingTechie
      @ProgrammingTechie  7 หลายเดือนก่อน +2

      I will not do it in this series, because this setup is rarely used in the real world. Sure there is the concept of Users, roles, etc. But you don't see companies implementing their Authentication setup because it can be tricky and hard to do it right. That's why Auth Servers like Keycloak, and Okta are famous these days and widely used.
      But I have plans to create a separate video, where I will explain in detail how to work with Spring Security using JWT.

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

      @@ProgrammingTechie thanks brother. Surely i will wait for that video!

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

    part 6 - checked

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

    My 16 GB RAM is dead now)))

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

      I know the pain, this is happening because now may be you have multiple IntelliJ IDE instances running the services.
      I would suggest you to create a Maven Multi Module Project so that you will have all the projects in one maven project and only one IDE instance running all the services, you can see how to do that in this video - th-cam.com/video/lh1oQHXVSc0/w-d-xo.html

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

      @ProgrammingTechie Thank you for the advice, I will try🙏

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

      @@ProgrammingTechie
      I tried it. But when I run the application I'm getting
      SQL State : 42000
      Error Code : 1049
      Message : Unknown database 'order_service' error.
      Docker is not picking the init.sql file.
      docker-compose file:
      version: '4'
      services:
      mysql:
      image: mysql:8.3.0
      container_name: mysql
      ports:
      - "3316:3306"
      environment:
      MYSQL_ROOT_PASSWORD: mysql
      volumes:
      - ./order-service/mysql/data:/var/lib/mysql
      - ./order-service/docker/mysql/init.sql:/docker-entrypoint-initdb.d/init.sql
      Path of Init file: D:\IntelliJ_Projects\Spring_Microservices\shopping-microservices\order-service\docker\mysql\init.sql