Тёмный

Spring boot 3 Keycloak integration for beginners | The complete Guide 

Bouali Ali
Подписаться 57 тыс.
Просмотров 103 тыс.
50% 1

Опубликовано:

 

29 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 368   
@BoualiAli
@BoualiAli Год назад
Join the Micro Services course waiting list and get and get an exclusive EARLY-BIRD discount aliboucoding.ck.page/d0f9317e13
@spalabutyi
@spalabutyi Год назад
Thanks, bro. This is probably the best video on the subject that I've come across recently. You're good at explaining things. I'd like to see another video on how to perform user registration through REST API and Keycloak. PS and, yeah, it would be great to watch a good video about OAuth and Spring Security REST API. I know you had something similar, but without the REST API."
@BoualiAli
@BoualiAli Год назад
Glad you enjoyed it! I will provide such content ASAP
@prabhatkeshari2976
@prabhatkeshari2976 Месяц назад
Thanks sir for the nice explanation video on Keyclaok it was really helpful for me.
@leiwang07
@leiwang07 Месяц назад
It is very nice and in-depth explanation. I really appreciate and learn a lot from it. However, the end of the video the converter implementation really makes Spring Security a difficult, confusing, and even if you understand in depth, super ugly framework to work with.
@ershadahamed8928
@ershadahamed8928 3 месяца назад
Those following this video, pls disable all the required actions in Configure -> Authentication -> Required actions tab. Applicable for keycloak 24.0.5.
@edouardo_afangnon1783
@edouardo_afangnon1783 3 месяца назад
Thank you!! I got an "invalid_grant" error before disabling them 😂😂
@ershadahamed8928
@ershadahamed8928 3 месяца назад
@edouardo_afangnon1783 yup was having same error.
@imlearninghelppls2544
@imlearninghelppls2544 3 месяца назад
Life saver! Thanks a lot bro
@mitishchitnavis
@mitishchitnavis 20 часов назад
Life saver mate
@juanpolo4617
@juanpolo4617 Год назад
Thanks a lot. your video is fantastic, everything was self-explanatory
@BoualiAli
@BoualiAli Год назад
Glad you liked it
@khalilbouali3480
@khalilbouali3480 11 месяцев назад
thanks a lot Ali! This was very informative !
@BoualiAli
@BoualiAli 10 месяцев назад
Glad it was helpful!
@duongphuba7216
@duongphuba7216 Год назад
Thank you so much!! Your video is really helpful!!
@BoualiAli
@BoualiAli Год назад
Glad it was helpful!
@duongphuba7216
@duongphuba7216 Год назад
@@BoualiAli Merci beaucoup! ;)
@SabrineZaddem-t8g
@SabrineZaddem-t8g 6 месяцев назад
thank You Ali for This amazing tutorial ,can u do a vid about keycloak(24.0.1) authentifiaction(login//logout)with spring boot 3 thanks
@BoualiAli
@BoualiAli 5 месяцев назад
coming next week
@dhineshdhinesh6276
@dhineshdhinesh6276 Год назад
Thank you so much kindly put video about websocket chatbot spring boot thank you soooo much for you help
@BoualiAli
@BoualiAli Год назад
Wow, I just finished recording this video. It will be published really soon
@dhineshdhinesh6276
@dhineshdhinesh6276 Год назад
Really thank you soo much sir you are great crystal clear explanation thank you so much sir
@legendnic6339
@legendnic6339 10 месяцев назад
Hi Alibou, may I know if you planning to continue this tutorial, like authorization part and fine grain control on permission and stuff?
@BoualiAli
@BoualiAli 10 месяцев назад
Yes, I have it on my list
@legendnic6339
@legendnic6339 10 месяцев назад
​@@BoualiAlii want to implement authorization for angular, but of course angular cannot set the authorization. it should be public access. but how to granularly define which path in angular, assosiiate with which permission in keycloak, and how to actually implement this?
@enishalilaj9309
@enishalilaj9309 Год назад
Hi there, great content! Just a quick question is it correct to say principle or principal? As I think we are referring to the request initiator which in this case would be a principal, but we refer to it as principle. Is this a typo or that's how it is supposed to be? Keep up the good work :)
@BoualiAli
@BoualiAli Год назад
Can you please remind me which part of the video 😅
@enishalilaj9309
@enishalilaj9309 Год назад
@@BoualiAli For example the field principleAttribute, shouldn’t that be principalAttribute? I don’t get what are you referring to when you say principle? Just needed to clarify this :)
@rusifbudagov246
@rusifbudagov246 Год назад
Great tutorial. I would like to ask about Identity Brokering and Provider
@BoualiAli
@BoualiAli Год назад
Happy you liked it! What about them?
@rusifbudagov246
@rusifbudagov246 Год назад
Thanks for replying . I need to implement custom Identity brokering in keycloack. Custom oidc. I can not find resources for thst
@BoualiAli
@BoualiAli Год назад
@@rusifbudagov246 will try to schedule it
@michaelseptian9167
@michaelseptian9167 Год назад
Dear Alibou, I have question about JWT converter, how i can claim user attributes from user details in keycloak and i want use this claims for my controller or service? sorry for my grammar i still learning english. I hope you understand what i mean. Thank you Mr. Alibou great video
@BoualiAli
@BoualiAli Год назад
Your english is good 👍. I already explained it in the token converter part
@lgiorgos1
@lgiorgos1 10 месяцев назад
Is there any point on assigning client_admin role when we have already assigned the realm admin role with is a composite role associated with the client_admin? Shouldn't it be included in the realm admin role
@manee427
@manee427 Год назад
Thanks a lot for nice video. How can I access username inside the controller?
@BoualiAli
@BoualiAli Год назад
You can inject the Principle object and get the connected user
@manee427
@manee427 Год назад
@@BoualiAli Thanks
@DreamFist
@DreamFist 3 месяца назад
Collection
@salinins1370
@salinins1370 Год назад
I still get 403 Forbidden and also see this in postman :Bearer error="insufficient_scope", error_description="The request requires higher privileges than provided by the access token."
@BoualiAli
@BoualiAli Год назад
Good idea
@salinins1370
@salinins1370 Год назад
It is an error..how is it a good idea 🤔
@BoualiAli
@BoualiAli Год назад
@@salinins1370 sorry wrong comment 😅
@salinins1370
@salinins1370 Год назад
I am getting this error even after applying the changes to append ROLES_ .What could be wrong here?
@BoualiAli
@BoualiAli Год назад
@@salinins1370 which error you’re getting?
@cypherliquid
@cypherliquid Год назад
Please make a video on debugger.
@BoualiAli
@BoualiAli Год назад
I will do that ASAP
@simplemathematics7792
@simplemathematics7792 Год назад
I I put @Controller annotation and I am redirecting JSP pages according to the role based ,when I hit endpoint requests ,the access token generated is not being sent with the request how to do it,with postman it is working properly ,because we are giving request with the newly generated access token .what to do,how to do with browser help me
@BoualiAli
@BoualiAli Год назад
You need to include the token in the header of the request
@mohamednibras53
@mohamednibras53 2 месяца назад
Those who received "invalid_grant, Account is not fully set up" error, please mention the user's firstname, lastname, and email even though they are not marked mandatory.
@especializacionIngenieriaSoftw
@especializacionIngenieriaSoftw 6 месяцев назад
For those who get this in postman (minute 30:34) { "error": "invalid_grant", "error_description": "Account is not fully set up" } What worked for me was: setting the email, firstname and lastname for the user.
@lucascarbone461
@lucascarbone461 6 месяцев назад
Thanks! :D
@THINUX-Official
@THINUX-Official 6 месяцев назад
ma man ♥
@ashangayeshma4166
@ashangayeshma4166 6 месяцев назад
thanks
@kulkarniprabhakar290
@kulkarniprabhakar290 4 месяца назад
Thanks man :)
@thanhnguyenkim8679
@thanhnguyenkim8679 3 месяца назад
Tks you so much :D
@arefsa6
@arefsa6 Год назад
Dear alibou, I wanted to take a moment to say thank you for your amazing tutorial video on RU-vid about Keycloak and its implementation in Spring Boot. Your video was incredibly helpful and easy to understand. I really appreciate how you explained the concepts of Keycloak and showed how it can be integrated with Spring Boot. Your explanations were clear and straightforward, making it easy for me to follow along. If possible, it would be great if you could create a video tutorial specifically focusing on the authentication flow. This would greatly enhance our understanding of the topic. Additionally, I would love to see a video tutorial on debugging in IntelliJ IDEA. As a beginner developer, learning effective debugging techniques is crucial, and I believe your guidance would be highly beneficial. Thank you once again for creating such valuable educational content. Your videos have significantly improved my understanding of Keycloak and Spring Boot, and I eagerly look forward to watching more of your tutorials in the future. Best regards, ArefSa
@BoualiAli
@BoualiAli Год назад
I really appreciate this comment.
@manusoftar
@manusoftar 5 месяцев назад
Now, the question is, how the heck you integrate it with the actual frontend??, I mean, I usually use SpringSecurity with JWT so what I do is I implement a service for the user to actually login which will return a minimal dataset about the user (like the name, the avatar, etc) and also the generated authentication Bearer token, so from ther on, the front end will have to attach that Bearer token to the header any time it wants to consume a service from my backend. Here I'm missing that last part, how does the frontend tell the backend it is authenticated?
@BoualiAli
@BoualiAli 5 месяцев назад
will be explained in the coming video
@nochicken4U
@nochicken4U 6 месяцев назад
I am receiving this error:{ "error": "invalid_grant", "error_description": "Account is not fully set up" } I have the same setup with you. I googled it and didnot solve this problem:(
@theameow
@theameow 6 месяцев назад
u need to setup email, firstname and lastname to ur user at keycloak, this is the only way for works to me (sry for my eng)
@especializacionIngenieriaSoftw
@especializacionIngenieriaSoftw 6 месяцев назад
Thanks, it worked for me too
@federico7014
@federico7014 10 часов назад
I'm watching this video because I'm starting a new job as a senior software engineer and I don't know what keycloack is.
@PhillcoAmaru
@PhillcoAmaru 2 дня назад
Thanks for your great tutorial, Alibou! Although I am getting a 502 Bad Gateway and Access Denied response at 43:12. Has anyone went through this?
@esrefcagataydogan8308
@esrefcagataydogan8308 10 дней назад
Hi Ali, I am developing an application using Keycloak and Spring Boot. I have implemented OTP login and Google Sign-In, but there is an issue. If a user has previously logged in with OTP and then tries to log in with Google using the same email, I get a "user already exists" error (federated identity account exists). In this case, I want the accounts to be merged. In other words, the user should be able to log in using both OTP and Google Sign-In with the same email. Could you help me with this?
@reinaldojesus4002
@reinaldojesus4002 Год назад
With quarkus you don't need to write this bunch of classes and settings, just use a single @ROLES notation. Spring still has a lot to evolve compared to other frameworks. Actually what saved Spring was the Graal VM
@BoualiAli
@BoualiAli Год назад
Spring is always 3 years (at least) ahead of the rest of the frameworks. For quarkus, I need to try it and the we can discuss
@amitkriit
@amitkriit 6 месяцев назад
Spring is more mature and better documented.
@sadiulhakim7814
@sadiulhakim7814 3 месяца назад
I would still go with spring because my company uses it.
@TheoMnc
@TheoMnc 6 месяцев назад
Good video. 43:44 when i put the bear token it tells me also unauthorized ! anyone had the same problem ?
@elpanthouro6002
@elpanthouro6002 Год назад
Finally a tutorial that explains very well how keycloak works and its integration with springboot, thank you 🙏🏾
@BoualiAli
@BoualiAli Год назад
Glad you liked it!
@DesasterUA
@DesasterUA Год назад
How would you forgo if you had to store additional user info that keycloak does not support like for example user preferred language?
@BoualiAli
@BoualiAli Год назад
Happy you liked it I will create another video to show this details
@DesasterUA
@DesasterUA Год назад
@@BoualiAli that would be really helpful, thank you 😁
@codertravel99
@codertravel99 3 месяца назад
Hey hi @boualiAli i have implemented the keyCloak integration with spring boot 3 but in case of invalid or expired token it is not throwing any exception can you please help me
@gurudattahh3345
@gurudattahh3345 Год назад
Hey thanks for the tutorial, I am new to this so have a few questions.. 1. Instead of appending Role in code can't we just do it in keycloak itself. 2. Can we use some kind of pattern matching like antmatcher and assign roles for endpoints instead of using preauthorize on each endpoint?.. it might become repetitive as endpoints increase to double digits.
@BoualiAli
@BoualiAli Год назад
Happy you liked it! 1- yes it is possible but you need to configure your spring app to remove the prefix (ROLE_) 2- yes you can do that, check the roles and permissions video and you will have a clearer picture how to implement it
@vuongo9949
@vuongo9949 Год назад
I'm a Java fresher, and this time I want to work on a personal project involving Spring Security combined with JWT and OAuth2. I have watched many of your tutorial videos, and I must say they have been extremely helpful to me. Thank you for all the knowledge you have provided.
@BoualiAli
@BoualiAli Год назад
Happy you liked it
@khalifatwaha4212
@khalifatwaha4212 3 месяца назад
@BoualiAli This is very good and well explained. But how to implement opaque token, is it even possible?
@Gsuresh_3
@Gsuresh_3 Месяц назад
Creating client : capability config - authentication flow what is the use of all options can you make a clear video
@yokenji7179
@yokenji7179 2 месяца назад
The check if the resouceId is null does not work the user can still access onsecured endpoint even when he is not authorized for this backend application
@ОлексійМоренець
@ОлексійМоренець 3 месяца назад
Is there a way to generate token without knowing that magic url? How did you know the url? Is there any documentation about this?
@ElmshornBoy
@ElmshornBoy 2 месяца назад
Hello, for newer Keycloak fill e-mail, first name and last name and then access token is returned to Postman.
@traian118
@traian118 Год назад
One interesting tutorial would be one for interacting with keycloak using it's API's. For example creating users, updating passwords etc...
@BoualiAli
@BoualiAli Год назад
I will cover this part in a separate video
@traian118
@traian118 Год назад
@@BoualiAli this sounds great. Can’t wait to see that video 🙂
@osamamahmoud7539
@osamamahmoud7539 6 часов назад
we need video about dubbing in intellij
@doncorleon734
@doncorleon734 Месяц назад
Thanks you so Much for this content, but I found that’s so confusing when you talk so much and you read everything on the screen, you don’t give us some quite time to think and understand.
@BoualiAli
@BoualiAli Месяц назад
Thank you for the feedback. Here is the solution: 1- Pause the video 2- think and understand 3- Resume the video Happy learning
@subhajitmisra2605
@subhajitmisra2605 6 месяцев назад
{ "error": "invalid_grant", "error_description": "Account is not fully set up" } this comes how to resolve
@theameow
@theameow 6 месяцев назад
u need to setup email, firstname and lastname to ur user at keycloak, this is the only way for works to me (sry for my eng)
@AdamKnebel
@AdamKnebel Год назад
I finally watched a video that really helped me! Thank you for that! I would like to know how to make it possible to use Keycloak in both the back-end (Java + Spring) and the front-end with React.👏👏👏👏
@BoualiAli
@BoualiAli Год назад
Happy you liked it! I’m working on it
@BoualiAli
@BoualiAli Год назад
COUPON Code: *EARLYBIRD20* => Spring Data J PA course: aliboucoding.com/p/the-full-guide-to-master-spring-boot-data-jpa
@dmitriizheleznikov2949
@dmitriizheleznikov2949 10 месяцев назад
Hi, thanks for the video! I have a question (maybe someone already found an answer): I tried to just create a new role ROLE_test_admin, and got 403, I guess it was because of principal, but why... What I'm trying to understand why we need to read "preferred_username" instead of "sub"?
@dmitriizheleznikov2949
@dmitriizheleznikov2949 10 месяцев назад
That's very strange, but the problem is not in principal "preferred_name" or "sub". "JwtAuthenticationConverter" simply doesn't get "resource_access....roles". It only checks Arrays.asList("scope", "scp"); That's the reason... why...
@casimk5643
@casimk5643 9 месяцев назад
@@dmitriizheleznikov2949 try using hasRole rather than hasAuthority on the method.
@Cherupakstmt
@Cherupakstmt Год назад
Nice video. But can you please make a video on how to log out user and change the session time using keycloak & spring security
@BoualiAli
@BoualiAli Год назад
Happy you liked it I will create another video more detailed
@Cherupakstmt
@Cherupakstmt Год назад
@@BoualiAli Thanks. Eagerly waiting for it.
@AbrahamPeter-nr3cq
@AbrahamPeter-nr3cq 5 месяцев назад
Hello @BoualiAli thank you for taking your time to provide such detail tutorial on keycloak. I'm having issue logging in my user on postman. I've followed your steps but I keep getting this response: `{ "error": "invalid_grant", "error_description": "Account is not fully set up" }` I'd like your advice on this. Thank you.
@BoualiAli
@BoualiAli 5 месяцев назад
Your realm and client are missing configuration. Please follow carefully
@AbrahamPeter-nr3cq
@AbrahamPeter-nr3cq 5 месяцев назад
Please disregard this. Apparently, it is required that I provide the user email address and full name.
@Carloshdv
@Carloshdv 3 месяца назад
How to create an user on keycloak with Java code ?
@GianfrancoTerrazzano
@GianfrancoTerrazzano 10 месяцев назад
Hi Bouali, frist of all thank you for the video! I have to implement a similar project trough keycloak. I' using java 21 and spring boot 3.2.0, and I have to use a JWT bearer instead of a Bearer Token. Is it possibile? It's good idea using this application such base for trying to update my project?
@saikumarmylavarapu8209
@saikumarmylavarapu8209 4 месяца назад
If I create a role with "ROLE_user" as the role for the user then I don't have to worry about the 403 forbidden error and also I don't have to write the extra configuration for it ? to modify the roles from "user" to "ROLE_user" ?
@enricomontesi6281
@enricomontesi6281 6 месяцев назад
Thank you for the video. Your english is really understandable
@BoualiAli
@BoualiAli 5 месяцев назад
You're welcome 😊
@KlevjanPrifti
@KlevjanPrifti Год назад
I love your videos, this was really helpful to understand keycloak, but i would love to see if its possible to make a controller that gets the user credentials and with those credentials to make the request to the keycloak for the authentication if you have any tip on this it would be helful. Thanks again for the hard work !
@BoualiAli
@BoualiAli Год назад
Happy you liked it. if you need such functionality, you just need to invoke the same endpoint I used in postman and pass the required body with the correct values and you will get the token
@KlevjanPrifti
@KlevjanPrifti Год назад
@@BoualiAli I tried that way and managed to make it work now i skipped the "/authentication" url so it can be accessed without Authorization header. And when i make a new request i pass the new token that i got from authentication to the request so Keycloak can make the check if the user is authenticated and has the right role to access the resources. Thanks again for help !
@divyanshsaini1077
@divyanshsaini1077 9 месяцев назад
at 30:45 if any one facing the following error ``` { "error": "unauthorized_client", "error_description": "Invalid client or Invalid client credentials" } ``` also include client_secret as a parameter, the value can be find in your realm -> clients -> credentials -> Client Secret.
@alandercarraro218
@alandercarraro218 6 месяцев назад
Amazing video Bouali. One question: How could I register new users in frontend with keycloak using Angular with springboot? in my frontend in a login form, first I check if the credencials is ok, if it is ok, I return the token for user be able to make request, is it right? Thanks
@farhadahmad2292
@farhadahmad2292 27 дней назад
This is great video. U have explained everything very well.
@BoualiAli
@BoualiAli 16 дней назад
Glad you liked it
@avishjain93
@avishjain93 3 месяца назад
Great Video. It really helped me while migrating things over. There are some upgrades missing in your github. Let me know if I can contribute anything and make it complient as per latest spring boot version.
@devozs
@devozs Год назад
Another great spring tutorial! Is it possible to combine this one together with spring social login? Thanks!
@BoualiAli
@BoualiAli Год назад
Happy you liked it I will provide a video about that too
@devozs
@devozs Год назад
@@BoualiAli thanks 🙏
@ahmedmk534
@ahmedmk534 7 месяцев назад
thank you for the content. can you demonstrate how to automatically refresh the token once expired without having the user to login again (when microservice1 calls microservice2 for example) ?
@ElmshornBoy
@ElmshornBoy Месяц назад
Works like a charme. :-)
@maalejmedamine
@maalejmedamine 7 месяцев назад
thank you bro for this video , but i had problmes regarding some deprecated versions of security , can u help me please ? thanks in advance
@martingallauner
@martingallauner 11 месяцев назад
Where is this url for the openid configuration coming from?
@BoualiAli
@BoualiAli 10 месяцев назад
from keycloack
@iuliusciorica282
@iuliusciorica282 Год назад
Hello, Your tutorial is very good. Can you make a tutorial in which, in addition to Keycloak 21 and Spring Boot 3, Angular 16 is also integrated? There are few tutorials that integrate Keycloak, Spring Boot and Angular, and if there are, they are old because Keycloak has changed a lot in the meantime and many things are no longer the same. Thank you!
@BoualiAli
@BoualiAli Год назад
Happy you liked it I'm working on a full angular video and it will be released soon. After that I will create another one for keycloak integration with Angular too
@iuliusciorica282
@iuliusciorica282 Год назад
@@BoualiAli Thank you! I am a fan of Angular and Spring Boot ❤
@DashaZakella1001
@DashaZakella1001 Год назад
@@BoualiAli i will wait that
@siriusmarz512
@siriusmarz512 Год назад
@@BoualiAli yes that is so awesome. Thank you.
@souravpaul6086
@souravpaul6086 Год назад
well explained video ❤ Could you please make a video where we are implementing social login and own jwt authentication in a single spring boot application.
@BoualiAli
@BoualiAli Год назад
Happy you liked it I will make one soon
@souravpaul6086
@souravpaul6086 Год назад
@@BoualiAli Thank you and I also requested you to make a video where linkedin and twitter is act as a social media platform for oauth2 login instead of google and github with spring boot
@BoualiAli
@BoualiAli Год назад
@@souravpaul6086 I’m preparing a video for that
@souravpaul6086
@souravpaul6086 Год назад
@@BoualiAli I am excited to learn that topic with your awesome explanation ❤️
@morigene
@morigene Месяц назад
a video to debug is better in intel ja is better for us.
@BoualiAli
@BoualiAli Месяц назад
Already done. Check the videos
@giovannientrago
@giovannientrago Год назад
Hi, thanks for the video! I am wondering, can i use this guide for microservice architecture? If so, each microservice should have this spring security impl, or can i build my project in a different way, for example using security only for gateway and adding some general security to another microservices?
@BoualiAli
@BoualiAli Год назад
It is enough to add security to API Gateway
@dunayqudretli3382
@dunayqudretli3382 6 месяцев назад
Great tutorial👏
@BoualiAli
@BoualiAli 5 месяцев назад
Glad you think so!
@simplehumancomplexambition9884
@simplehumancomplexambition9884 6 месяцев назад
Thanks for this awesome tutorial. However, I am following your steps but when trying to retrieve a token I keep getting "error": "invalid_grant", "error_description": "Account is not fully set up". I've been trying for 2 hours to figure it out but can't wrap my head around this. Any help is appreciated.
@BoualiAli
@BoualiAli 4 месяца назад
you need to complete the user profile by providing all the required info: username, firstname, lastname, email
@mouradeljayi584
@mouradeljayi584 Год назад
The best spring boot teacher
@BoualiAli
@BoualiAli Год назад
Happy you liked it
@SirCryALot2609
@SirCryALot2609 Год назад
@@BoualiAlii agreed with him
@prasadrandika7158
@prasadrandika7158 7 месяцев назад
Hi..! since we are adding client roles as underlying role to realm roles do we need to add client roles again for the user?
@leonschm
@leonschm 6 месяцев назад
Congratulations, I wanted to use Keycloak to help me implement the project, I followed your steps and it's working, very good, now the question I have left is how I can validate the expiration of the jwt token, any ideas.
@BoualiAli
@BoualiAli 5 месяцев назад
Glad it helped
@pacalexandrecosta
@pacalexandrecosta 29 дней назад
Dear Alibou, I want to express my gratitude for you taking time to create a so detailed and rich explanation on how to integrate KeyCloak in Java Spring Boot. Many thanks!
@BoualiAli
@BoualiAli 16 дней назад
Glad it was helpful!
@GiuseppeScrugli
@GiuseppeScrugli Год назад
Using Spring boot 3.0.7 your server is not running. Suggested action: "Consider defining a bean of type 'org.springframework.security.oauth2.jwt.JwtDecoder' in your configuration."
@BoualiAli
@BoualiAli Год назад
Is this an exception you get?
@rockenrohlfan
@rockenrohlfan Год назад
Hi, thank you for the great video. I learned a lot and now I know how to build my web service safely. Thanks a lot for that! However, I still have one question: how do I get good tests written for it now? I follow the "test first" approach and of course my tests pop and don't work anymore. It doesn't work at all, because a token is missing to call the API. Can you say something about this, share a link or make a video?
@BoualiAli
@BoualiAli Год назад
You can mock the security context. Please share more details on our discord server
@QuocNguyen-cf2dw
@QuocNguyen-cf2dw Год назад
I have a question. On your step cal to postman get token, I can see you don't have client_sercret, but the token still return. I follow you on my website, it return error: { "error": "unauthorized_client", "error_description": "Client secret not provided in request" } That mean I missing client_sercret, please elaborate it. Thanks so much
@BoualiAli
@BoualiAli Год назад
for the tutorial, I created a public API so I didn't need a client secret
@codingstyle9480
@codingstyle9480 Год назад
Hi, Thanks for the video. I would like to point out something about the role settings. Perhaps you need to make it a bit clearer that point. It seems we are defining users for the REALM. We can define Roles for a Realm as well. So any user that is defined under a particular realm can be associated with any role that is created within the same realm. For global permissions roles such as ADMIN, USER, MANAGER etc, may be handled by this realm role definition. Probably for fine-grain authorization within a client, we may need extra role definitions under a particular client such as USER(read but not write), ADMIN(data posting, updating etc).
@BoualiAli
@BoualiAli 10 месяцев назад
Sure, I will make that clear in the next video
@MortlMcCrisis
@MortlMcCrisis 9 месяцев назад
Thank you very much for this video. I was searching for a good tutorial for a long time, but most tutorials just throw some random code and config in your face, without any explanation. Mostly this does not really work and you have got no change to understand what you are doing and what is going wrong. This one is very different and I got a better understanding what is happening and I have got the feeling to start over by myself.
@BoualiAli
@BoualiAli 9 месяцев назад
Great to hear!
@chrispure7461
@chrispure7461 Год назад
So, you don't need any keycloak dependencies in POM? Spring security is abstracting it? Also how to make rest api accept any of two tokens , one from keycloak and another one from diff auth server?
@BoualiAli
@BoualiAli Год назад
Check the oauth2 video. This will help you understand the flow
@raphaellutz2693
@raphaellutz2693 Год назад
Hi, thanks for your video! I have a question about the flow of a real application. Does my frontend connect directly to Keycloak for authentication, or does it go through my backend, which then connects to Keycloak for authentication?
@BoualiAli
@BoualiAli Год назад
yes
@jilpatel3297
@jilpatel3297 Год назад
How do I connect this spring boot app to my Angular app?
@BoualiAli
@BoualiAli Год назад
Check the Angular video
@codingstyle9480
@codingstyle9480 Год назад
@@BoualiAli Hi, does your angular video show the securing of the angular app by keycloak and that the angular app is supported by a spring boot 3 resource server backend?
@maaryeem7085
@maaryeem7085 Год назад
Hi Ali, first of all I want to thank you for this very detailed and well-explained guide, it really helped me have a clearer idea on how keycloak integration works in spring boot, but I really want to ask for help on this minor problem, i'm still getting 403 forbidden when even after adding the role
@BoualiAli
@BoualiAli Год назад
Please follow the steps precisely and assign the roles to the user
@abu-dukhan
@abu-dukhan Год назад
Thank you for this awesome content. Pls can you make a video for multiple implementation of UserDetaisService, so that the system can use multiple table for authenticating user depending on the Login endpoint. Thank you
@BoualiAli
@BoualiAli Год назад
Happy you liked it The question that you really need to ask: why you have such system design? I guess you need to review you database design and group all the users in one table. Please provide more details and I will try to answer and assist you
@KamalNaim-y2h
@KamalNaim-y2h Год назад
i would like to say thanks a lot. it was a great and wonderful tutorial , just I want to ask you if exist any coupon code for {Devenir FullStack Spring boot / Angular par la pratique}
@BoualiAli
@BoualiAli Год назад
Hi, Yes I can provide you one. Get in touch with me on discord
@marcinmiaso4921
@marcinmiaso4921 8 месяцев назад
Why cannot we just add a role name ROLE_client_admin in keycloak? it should works without own Converter than?
@BoualiAli
@BoualiAli 5 месяцев назад
Roles are not mapped in the same way
@khouloudbouazizi280
@khouloudbouazizi280 10 месяцев назад
Thank you for this video, but I would like to know how to create users linked to the application. For example, if the application includes a sign-up option, how do I link this registered user to Keycloak?
@BoualiAli
@BoualiAli 10 месяцев назад
You can enable the signup feature on keycloak
@khouloudbouazizi280
@khouloudbouazizi280 10 месяцев назад
@@BoualiAli Will the user be registered in my database as well?
@BoualiAli
@BoualiAli 10 месяцев назад
@@khouloudbouazizi280 no. You don't need to
@khouloudbouazizi280
@khouloudbouazizi280 10 месяцев назад
@@BoualiAli Sorry for asking a lot, but I need to register the user in the database because they are related to other JPA entities.
@BoualiAli
@BoualiAli 10 месяцев назад
@@khouloudbouazizi280 you can get the user ID from keycloak token
@YGaming18
@YGaming18 9 месяцев назад
mr and so and so forth thank you
@kevincorasaniti7873
@kevincorasaniti7873 3 месяца назад
ti voglio bene
@KhurramShahzad_PK
@KhurramShahzad_PK Год назад
Thanks a lot for the helpful tutorial. Would be great if you can make a tutorial for KeyCloak integration with LDAP/Active Directory.
@BoualiAli
@BoualiAli Год назад
Great suggestion!
@alaminrony6881
@alaminrony6881 Год назад
The best spring boot teacher (Bouali Ali). I want to new video for Java Concurrency & Multithreading Complete Course
@BoualiAli
@BoualiAli Год назад
Happy you liked it I will schedule such a video
@CyBerg-io7pg
@CyBerg-io7pg Год назад
Hi cann you deploy in real example in cloud insfrastructur wiht ip etc. in production mode, it is so much video to start-dev mode thank you.!
@BoualiAli
@BoualiAli Год назад
Yes, soon
@justedlev
@justedlev Год назад
Hello, great video tutorial, but could you explain how you can secure endpoints without using method level annotations? Thanks
@BoualiAli
@BoualiAli Год назад
Check the Spring boot roles and pernmission video and you will have you answer there
@raphaellutz2693
@raphaellutz2693 Год назад
Nice tutorial, can you please go more into detail with keycloak so something like logout, double registration and so an. Amazing video!
@BoualiAli
@BoualiAli Год назад
Happy you liked it! I will schedule one soon
@thavathrath
@thavathrath Год назад
Thank you for the helpfull vdo. Please continue for user federation and store in db. Custom User Storage Provider
@BoualiAli
@BoualiAli Год назад
Thank you, I will
@KrishnaPatel-qu6nh
@KrishnaPatel-qu6nh Год назад
thank you for this amazing tutorial.can you please make a video for implementation of multi tenancy with Keycloyk?
@BoualiAli
@BoualiAli Год назад
Great suggestion!
@noelauras_nmr
@noelauras_nmr Год назад
Amazing video, perfectly explained, very educational. Thank you so much for this! (a video on debug mode on IntelliJ would be great).
@BoualiAli
@BoualiAli Год назад
Great suggestion!
@yanrithy7035
@yanrithy7035 2 месяца назад
1:07:09
@ravinaganaboyina8811
@ravinaganaboyina8811 8 месяцев назад
Hi, Great explanation Via spring boot security application need to add the user registration and authentication how to handle that?
@BoualiAli
@BoualiAli 5 месяцев назад
coming next week
@ayoubalkhalaf3778
@ayoubalkhalaf3778 Год назад
How to create new users from frontend?. You only explained delegation if a user has a specific role.
@BoualiAli
@BoualiAli Год назад
I will cover this soon
@denny3441
@denny3441 10 месяцев назад
How can we test this security configuration setup? Maybe you can do a tutorial on unit testing the security chain.
@BoualiAli
@BoualiAli 10 месяцев назад
Good idea
Далее
Spring boot 3 - OpenApi Documentation | Swagger UI
35:09
ТАРАКАН
00:38
Просмотров 855 тыс.
"Когти льва" Анатолий МАЛЕЦ
53:01
Keycloak Is AWESOME! Single Sign On Made Easy!
25:05
Просмотров 93 тыс.
OAuth2  & Spring boot 3 & Social login | never been easier
1:05:27
KEYCLOAK with Spring Boot & Angular | Step by Step Guide
2:28:55
Spring Security Architecture Explained
14:41
Просмотров 107 тыс.
ТАРАКАН
00:38
Просмотров 855 тыс.