Securing Spring Boot Microservices with Keycloak using OpenID | OAuth2.0 | JavaTechie

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

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

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

    Hey Java Techie,
    I would love to see Keycloak integration with a microservice and also if possible end to end with a frontend as well.

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

    Hi Basant, this is an awesome explanation and detailed video on how to set up and use it with microservices. I really njoyed it and i would try it as well. Please keep making such videos. Basant tame jaha bhi karucha, bahut hi bhala kama. We will always support and encourage you.

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

      Thanks bro 😊

    • @Pain-qu5nr
      @Pain-qu5nr ปีที่แล้ว

      @@Javatechie hi can you do one using filter chain??

  • @RameshGanapathy-uw9vs
    @RameshGanapathy-uw9vs ปีที่แล้ว +1

    Grate , wow, Super, Very simple example covered the entire oauth2 security functionality

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

    Awesome explanation Thanks Bro!

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

    Enjoyed it. Sir, plz integrate it with Microservices ASAP. We need that detailed video urgently 🙏

    • @aryanaryan9759
      @aryanaryan9759 2 ปีที่แล้ว

      Ya sir .every much .waiting for this video

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

    Thanks for a great content on keycloak
    would love to see Keycloak integration with a microservice

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

    great tutorial. create more please. do one with a public flow and calling the token, userinfo, and other endpoints.

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

    Superb video sir. Thank you so much for such amazing content.

  • @ArunSingh-tj9li
    @ArunSingh-tj9li ปีที่แล้ว +2

    Very clear explanation, always I love your the way you explain the concepts, thank you.

  • @SatishNirmal-bl6nv
    @SatishNirmal-bl6nv ปีที่แล้ว +1

    Very Clear and straightforward explanation video for role-based authentication.👍

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

    Thanks. It was clear and helpful! Good job!

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

    Easy to understand compare other channel, help me so much, Thanks

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

    Excellent!!! Thank you Sir

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

    So late uploading to seee such good tutorials

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

    I would love to see Keycloak integration with a microservice

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

    Excellent Explanation bro...awesome...

  • @nurlanmrahov198
    @nurlanmrahov198 2 ปีที่แล้ว

    Nice job. Congrat.

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

    Hi Java Techie, this demo is really good and made me clear in understanding in some parts. Please refer me if you have a demo with Spring MVC (Non-Boot) application

    • @satyaprakashgalipelli3766
      @satyaprakashgalipelli3766 2 ปีที่แล้ว

      never mind. I have done changes on my side.

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

      Can you please share the project if possible. I am also looking for Spring MVC

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

    Thanks for the content! Very helpful!!!

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

    Nice session❣

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

    thank you soo much bro... great work...

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

    Great tutorial as always 🎉.. one request sir , can you please make one tutorial on spring security jwt with spring cloud api gateway .. on that please

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

      Okay buddy I will try

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

      @@Javatechie thank you sir ❤️

    • @francksgenlecroyant
      @francksgenlecroyant 2 ปีที่แล้ว

      @@arghyamitra3281 can we be friends? Maybe we can help each other to build microservices and all those event-driven concepts

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

    Basant sir It is really great video,can you please make video on integration of zoho crm with springboot

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

    Amazing explanation 👏

  • @vipinkoul595
    @vipinkoul595 11 หลายเดือนก่อน +1

    Awesome!

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

    Please create a vedios with keycloak and with all the microservices components

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

    This is really saved me, thank you so much!

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

    Thanks for this video

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

    Awesome bhai

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

    Thank you!

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

    Excellent content

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

    Clear explanation 🙏 Thanks 🙏

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

      Thank you 😊

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

      @@Javatechie Can you please make tutorial on Apigee Authentication if possible

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

      I am not aware about this. I will check and update

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

      @@Javatechie thanks

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

    Thanks a lot. This is exactly what I was looking for.

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

    I would love to see example using SAML as well

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

      Basant please do for SAML integration also

    • @i.vigneshdavid1698
      @i.vigneshdavid1698 3 ปีที่แล้ว +1

      Yes

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

    Excellent

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

    Another Masterpiece ✌

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

    Hi, java techie thank you for your benefit tutorial.
    What is dependency management do?

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

    Thank you so much

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

    Nice content 👍

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

    Thanks Brother.

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

    Hi Java Techie, This video is very informative. I have one spring boot REST API application which has Login and Signup API and other APIs. I need to have Authorization server, Resource server in this same application using JWT. This way I can save the resources instead of separate server deployment. Can you please end to end flow using Spring Boot 3, Spring Security, Spring Boot starter Authorization server and JWT ? It would be very helpful

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

    Hello sir please make video of BPM , jBPM, Camunda ,Flowable

  • @gt-uj6fz
    @gt-uj6fz 2 ปีที่แล้ว +1

    Hi java techie I love your tutorial videos. However do you have a video about applying security Jwt without using websecuritywebconfigurer since it was deprecated in spring boot 2.7.0 . Or planning to make a new video about it?

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

      I will remake a new one

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

    Please make video for spring boot and mysql with keycloak embedded project I need only automatically create database and stored data for keycloak clients in table .

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

    Thanks Basant for this video. Its really excellent. I have a question. At present we are generating the token in the postman and testing the APIs.
    From GUI, whenever a user logs in as an admin/user, then how does a token gets generated dynamically in the spring boot and calls the respective API. ?
    Please answer my question. God bless you :)

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

      Can you checkout my jwt angular video you will understand this flow

  • @vignesh3184
    @vignesh3184 2 ปีที่แล้ว

    Sir,Pls make an video about bouncy castle , private key and public key with spring security

  • @rajeshb5971
    @rajeshb5971 2 ปีที่แล้ว

    Could you explain the redhat sso and what is that wildfly?

  • @edson-moretti
    @edson-moretti 2 ปีที่แล้ว +2

    In postman: "error": "RESTEASY003650: No resource method found for GET, return 405 with Allow header"

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

      Check the http method type

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

      @@Javatechie I used Get, the same as you yet I am getting the same error

  • @lts8683
    @lts8683 3 ปีที่แล้ว

    Please, create a vedio to explain how to change database of keycloack, how to adapt keycloack with an app that have already table users and roles?

  • @KhajaYT-zb2th
    @KhajaYT-zb2th 2 หลายเดือนก่อน

    Keycloak Java Adapters were removed from Keycloak codebase and they are not supported anymore.

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

    Hi, could you explain checking scope instead of checking roles in Controller? Thanks.

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

    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

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

    Hi Basant, I am trying to achieve the same in Spring MVC project, unable to find any documentation for the same. Followed the official one but it is directly opening the controller get mapping page instead of asking for credentials. Please help

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

    Hello Basant sir...is it possible not to select open I'd or saml in keycloak for an internal application

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

    Thank you. How do we pass key cloak certificate?

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

    But what if my application have a sign up section and i want users to be created from my application in that case how keycloak will get those data? And can keycloak use my database instead of its self?

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

      Hi Arpan good question . I didn't explore much on it . I will check and update you

    • @GauravSharma-ry5qf
      @GauravSharma-ry5qf 10 หลายเดือนก่อน

      ​@@Javatechie any update on this

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

      @@GauravSharma-ry5qf sorry i misunderstood your question.
      Why will you use keycloal if you want to maintain user credentials with your own ? What do you understand about 3rd party identity providers?
      Usually you will get the options to register a user in the keycloal user interface itself so the user can sign up from there

    • @GauravSharma-ry5qf
      @GauravSharma-ry5qf 10 หลายเดือนก่อน

      @@Javatechie ok , but after exploration I got know that Oauth2 mainly used for Authorization, so for authentication if we have separate service and for the Authorization only we want to use that , so how we can leverage that ?

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

      Identity providers also support Authentication buddy.

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

    muito bom!

  • @KaushalKumar-mr7ez
    @KaushalKumar-mr7ez ปีที่แล้ว +1

    Can u do the same for microservice and angular UI?

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

      I will do it using microservice it's in my queue

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

    please intergate with microservices and also how to add releam via code please?

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

    can we use multiple roles for one method? If yes then which user password we have to give in postman?

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

      Yes you can define. It’s upto you with which user you want to access your api

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

    After install while run key cloak server getting error sir I was used bin/kc.bat start-dev but getting error could you please rectify problem😢

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

    @Java Techie
    I am getting below error
    Client 'myclient' doesn't have secret available
    failed to turn code into token
    status from server: 400
    {"error":"invalid_client","error_description":"Invalid client credentials"}
    In response I am getting login page [html back]
    Can anyone help pls

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

      Validate your client id and secret key if it's not working regenerate it and try again

    • @sheikhhafeez3766
      @sheikhhafeez3766 2 ปีที่แล้ว

      I tried multiple times...I am able to get token from keyclock but while accessing rest points this error is coming
      I tried with keyclock 15.* & 19.* but same error in both versions
      Tried with Spring boot version 2.5.* &2.7.3
      Java 11 & latest eclipse 2022 release

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

    Please create a video keyclock with microservices

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

    hello sir any tutorial about keycloak security spring boot and angular?

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

      I have not yet tried but don't think it's complex since already we have backend api we can easily integrate to frontend .

    • @emad_arnesto9175
      @emad_arnesto9175 2 ปีที่แล้ว

      @@Javatechie ok thanks

  • @Satenc0
    @Satenc0 2 ปีที่แล้ว

    please do a saml example too

  • @rishabhtyagi178
    @rishabhtyagi178 2 ปีที่แล้ว

    How to get access token without using postman? I mean through spring boot code can we get it?

  • @HimanshuSharma-vp8xi
    @HimanshuSharma-vp8xi 2 ปีที่แล้ว +1

    Hey Java Techie, i have one doubt. how this keycloak and openid works with microservice architecture where one microservices is calling another microservice. so how to authenticate during this call.

  • @venkatasiva9517
    @venkatasiva9517 3 ปีที่แล้ว

    Hi Java Techie,
    i followed the same process the way you did. but am getting 401 always. Possible to help?

  • @Pain-qu5nr
    @Pain-qu5nr ปีที่แล้ว

    Hey this doesn't work. Followed everything but my api's are still accessible without the security. 😭😭😭😭

  • @i.vigneshdavid1698
    @i.vigneshdavid1698 2 ปีที่แล้ว +1

    Is it possible to implement form based and jwt token based authentication in a single app. Currently i implemented spring oauth2 based keycloak sso implementation it works fine in browser.but when i hit the endpoints in postman it return keycloak login page as response

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

      In postman you must need to pass token as part of headers

    • @i.vigneshdavid1698
      @i.vigneshdavid1698 2 ปีที่แล้ว +1

      @@Javatechie yeah i did this but still i get keycloak login page as response.

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

      Update token in postman

  • @deepbajaj9589
    @deepbajaj9589 2 ปีที่แล้ว

    How we can use kid rather then realm key from keyclosk_url/auth/realms/openid-connect/certs

  • @ArvindKumar-y4f2l
    @ArvindKumar-y4f2l ปีที่แล้ว +1

    it is not working with the latest version of the keycloak

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

    Hi, I want to ask how to integrate keycloak into api gateway, thanks

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

    Sir, plz integrate it with Microservices ASAP

  • @dalu_
    @dalu_ 2 ปีที่แล้ว

    Doesn't work. I'm always getting 403, despite the token being sent via Postman.

  • @dildarsk4167
    @dildarsk4167 2 ปีที่แล้ว

    How to configure post calls in keycloak. Getting 403!!

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

    How can we store user data at keycloak?

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

    Hi java techie, can you please do one video for JpaStreamer for update record

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

      Hi Raghav ,
      JpaStream can't be use for post and put

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

      @@Javatechie actually jpastreamer not getting realtime data from db, its maintaining cache

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

      Not getting how did you concluded it's getting data from cache

    • @raghavamuramreddy1323
      @raghavamuramreddy1323 3 ปีที่แล้ว

      Whenever I updated record at db manually then try to get record using jpastreamer not returning updated value its returning old value only

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

      @@Javatechie because after I changed column value at db still returning old value

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

    When I add @RolesAllowed it always return NullPointerException. Anyone have any idea about this?

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

      Just debug your code and find out where exactly it's giving you NPE

    • @gogairemashvili8469
      @gogairemashvili8469 2 ปีที่แล้ว

      how did you solve this error??

    • @trantuananh5150
      @trantuananh5150 2 ปีที่แล้ว

      @@gogairemashvili8469 I'm not really sure with this annotation. I decided not to use it anymore.

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

    If I have million user , then how can keyclock manual adding user can help 😢

  • @cookies4techies992
    @cookies4techies992 2 ปีที่แล้ว

    Now I have downloaded keyclock 18.0.2. There is no standalone.bat inside the bin folder any idea how to start it.

    • @younisabbasi3656
      @younisabbasi3656 2 ปีที่แล้ว

      kc.sh or kc.bat run command like "kc.sh start-dev"

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

      ​@@younisabbasi3656 I have tried this...but no luck. It is due to Any jdk issue??

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

    How can I use the users from User Table of Database?

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

      Please check out my spring security playlist video with Facebook example

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

      @@Javatechie I meant using Keycloak.
      In keycloak console you are manually adding users. But my application already having user in user table how can i integrate keycloak?

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

      Not sure buddy need to check

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

    In real time how can a company implement Keycloak if number of users are > 99999999?

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

      Keycloak is third party authentication provider if you use their service then you must need pay them as per your need

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

      @@Javatechie sharing employees information is very crucial and this is crucial authentication info that is to be considered carefully. Which companies have implemented keycloak?

  • @VM31416
    @VM31416 2 ปีที่แล้ว

    Can you enable subs, please?

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

    Do we always hard code the user and roles in spring boot application? Is there any other way to provide those information at method level (instead of hard coding)

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

    Basant, Again i have gone through your video. One doubt i have. My SecurityConfig class is not getting compiled. I am getting error in "KeycloakWebSecurityConfigurerAdapter".
    After clicking cntrl+shift+o in my eclipse its still showing red color. I am using jdk 17. May be the code is not supporting for java 17. can you guide me where to get the security config class for openid. ?
    You are blessed by God by having good intelligence by gaining good knowledge. Thanks for all God bless you..

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

      Hi Raghu, drop me an email javatechie4u@gmail.com we can connect and check

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

      @@Javatechie thanks Basant

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

    I´m using Spring Tool Suite 4-4 with Keycloak 20.0.2. When I extend the class KeycloakWebSecurityConfigurerAdapter like below:
    @KeycloakConfiguration
    public class KeycloakSecurityConfig extends KeycloakWebSecurityConfigurerAdapter
    I get this error hovering the class KeycloakWebSecurityConfigurerAdapter:
    The type org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter cannot be resolved. It is indirectly referenced from required type org.keycloak.adapters.springsecurity.config.KeycloakWebSecurityConfigurerAdapter
    Have you seen this error?

  • @crowdtweet
    @crowdtweet 2 ปีที่แล้ว

    i am getting Undertow request failed HttpServerExchange{ GET /auth/}: java.io.IOError: java.io.FileNotFoundException: Invalid file path error