Those following this video, pls disable all the required actions in Configure -> Authentication -> Required actions tab. Applicable for keycloak 24.0.5.
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.
Dear alibou, I wanted to take a moment to say thank you for your amazing tutorial video on CZcams 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
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.
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.👏👏👏👏
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
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."
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.
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.
Thank you very much for this guide. The JWT Authentication converter is really tough but well explained! I'm looking for now to replicate / save keycloak users into my database.
@@BoualiAli Because I have some relations between entities like "UUID carOwner" into CarEntity (eg). And I add some business informations to my logged user. Do you think it's a bad practice?
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.
I was going through a Udemy course, and the Keycloak screens there were too old, the new version of UI is very different. Thankfully I landed on this video. It helped me a lot. Thanks.
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
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.
Very nice explanation We need custom temple with keycloak for login and try to use front end as a react and back end is an springboot Note: When we are hitting front end that should be redirect to keycloak login custom template if user validated then we need to redirect to springboot and Response send to front end Thanks in advance
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 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
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).
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 !
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
@@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 !
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?
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
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
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.
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
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!
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
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) ?
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:(
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
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.
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 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 :)
Great content, thanks for the amazing course. I would spend less time with the conversion shenanigans and would invest this time elaborating some Unit tests for mocking Keycloak for coverage purposes.
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"?
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...
@@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?
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
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?
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.
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" ?
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?
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
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
Join the Micro Services course waiting list and get and get an exclusive EARLY-BIRD discount
aliboucoding.ck.page/d0f9317e13
Those following this video, pls disable all the required actions in Configure -> Authentication -> Required actions tab. Applicable for keycloak 24.0.5.
Thank you!! I got an "invalid_grant" error before disabling them 😂😂
@edouardo_afangnon1783 yup was having same error.
Life saver! Thanks a lot bro
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.
Thanks! :D
ma man ♥
thanks
Thanks man :)
Tks you so much :D
Dear alibou,
I wanted to take a moment to say thank you for your amazing tutorial video on CZcams 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
I really appreciate this comment.
Finally a tutorial that explains very well how keycloak works and its integration with springboot, thank you 🙏🏾
Glad you liked it!
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.
Happy you liked it
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.👏👏👏👏
Happy you liked it!
I’m working on it
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
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
Spring is more mature and better documented.
I would still go with spring because my company uses it.
The best spring boot teacher
Happy you liked it
@@BoualiAlii agreed with him
Thank you for the video. Your english is really understandable
You're welcome 😊
Thank you. I'm watching the second video on security in Spring boot on your channel and I'm absolutely delighted! No one has explained better yet.
I’m super happy to know that. Happy to have you here
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."
Glad you enjoyed it!
I will provide such content ASAP
One interesting tutorial would be one for interacting with keycloak using it's API's. For example creating users, updating passwords etc...
I will cover this part in a separate video
@@BoualiAli this sounds great. Can’t wait to see that video 🙂
Works like a charme. :-)
Thanks for such great tutorial. It helps a lot to get basic understanding of keycloak
My pleasure!
The best spring boot teacher (Bouali Ali). I want to new video for Java Concurrency & Multithreading Complete Course
Happy you liked it
I will schedule such a video
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.
Really appreciate your video, amazing tutorial. Thank you!
Glad you enjoyed it!
Amazing video, perfectly explained, very educational.
Thank you so much for this! (a video on debug mode on IntelliJ would be great).
Great suggestion!
Great tutorial👏
Glad you think so!
Awaited one from you, thanks man, keep rocking 🎉❤❤
Happy you liked it
Thanks a lot. your video is fantastic, everything was self-explanatory
Glad you liked it
a lot of libraries were deprecated so it was difficult changing from sb2 to 3 but your tutorial helped a lot,thanks
Happy you liked it!
Thanks a lot for your video, it is easy to understand the concept through your video
Glad to hear that
Nice video. But can you please make a video on how to log out user and change the session time using keycloak & spring security
Happy you liked it
I will create another video more detailed
@@BoualiAli Thanks. Eagerly waiting for it.
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.
Great to hear!
안녕하세요
알기 쉽고 꼼꼼하게 설명해주셔서 너무 감사합니다ㅜㅠ
구독 할게요!
Happy you liked it!
Thank you very much for this guide. The JWT Authentication converter is really tough but well explained! I'm looking for now to replicate / save keycloak users into my database.
Why do you need to do that?
@@BoualiAli Because I have some relations between entities like "UUID carOwner" into CarEntity (eg). And I add some business informations to my logged user. Do you think it's a bad practice?
@@remylavergne6424 just save the user id from keycloak
Thanks a lot Ali. It was a great tutorial as usual.👏
Happy you liked it
thanks a lot Ali! This was very informative !
Glad it was helpful!
thanks for providing github repo.. it works like a charm
Happy you liked it!
Great video, it's really helpful that developers like you are putting hardcore efforts to share their knowledge.
thank you Ali for this amazing tutorial
My pleasure
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.
COUPON Code: *EARLYBIRD20* => Spring Data J PA course: aliboucoding.com/p/the-full-guide-to-master-spring-boot-data-jpa
mr and so and so forth thank you
Thank you so much!! Your video is really helpful!!
Glad it was helpful!
@@BoualiAli Merci beaucoup! ;)
Thanks a lot for the helpful tutorial. Would be great if you can make a tutorial for KeyCloak integration with LDAP/Active Directory.
Great suggestion!
excellent video, thank you for sharing!
Happy to have you
Nice tutorial, can you please go more into detail with keycloak so something like logout, double registration and so an. Amazing video!
Happy you liked it!
I will schedule one soon
Hello, for newer Keycloak fill e-mail, first name and last name and then access token is returned to Postman.
I was going through a Udemy course, and the Keycloak screens there were too old, the new version of UI is very different. Thankfully I landed on this video. It helped me a lot. Thanks.
Glad it was helpful!
Great tutorial :D Thank You :D
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
please make more video about keycloak, tks for your helpful video
Sure thing!
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.
Very nice explanation
We need custom temple with keycloak for login and try to use front end as a react and back end is an springboot
Note: When we are hitting front end that should be redirect to keycloak login custom template if user validated then we need to redirect to springboot and Response send to front end
Thanks in advance
Happy you liked it!
I will cover more topics soon
Thanks @@BoualiAli
Your explanation was amazing thanks
Happy you liked it
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.
Happy you liked it
I will make one soon
@@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
@@souravpaul6086 I’m preparing a video for that
@@BoualiAli I am excited to learn that topic with your awesome explanation ❤️
Thank you for the helpfull vdo. Please continue for user federation and store in db.
Custom User Storage Provider
Thank you, I will
great tutorial very elaborate and informative.
Happy you liked it
Creating client : capability config - authentication flow what is the use of all options can you make a clear video
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).
Sure, I will make that clear in the next video
thank you for this amazing tutorial.can you please make a video for implementation of multi tenancy with Keycloyk?
Great suggestion!
You are perfect bro!
I appreciate that!
Another great spring tutorial!
Is it possible to combine this one together with spring social login?
Thanks!
Happy you liked it
I will provide a video about that too
@@BoualiAli thanks 🙏
How would you forgo if you had to store additional user info that keycloak does not support like for example user preferred language?
Happy you liked it
I will create another video to show this details
@@BoualiAli that would be really helpful, thank you 😁
Thanks my friend for your lessons
My pleasure 😇
@@BoualiAli what about Spring Rest Data or maybe Spring Cloud?
@@DashaZakella1001 what about them?
@@BoualiAli can you make a video of them?
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 !
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
@@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 !
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?
will be explained in the coming video
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
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
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.
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
Is there a way to generate token without knowing that magic url? How did you know the url? Is there any documentation about this?
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!
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
@@BoualiAli Thank you!
I am a fan of Angular and Spring Boot ❤
@@BoualiAli i will wait that
@@BoualiAli yes that is so awesome. Thank you.
@BoualiAli This is very good and well explained. But how to implement opaque token, is it even possible?
thank you!
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) ?
Great. Thx a lot
You are welcome!
28:48 you must add /auth , otherwise 401
in my case)))
Hello, great video tutorial, but could you explain how you can secure endpoints without using method level annotations? Thanks
Check the Spring boot roles and pernmission video and you will have you answer there
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:(
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)
Thanks, it worked for me too
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
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.
Your realm and client are missing configuration.
Please follow carefully
Please disregard this. Apparently, it is required that I provide the user email address and full name.
Thank you !!!
welcome
Thank you so much kindly put video about websocket chatbot spring boot thank you soooo much for you help
Wow, I just finished recording this video.
It will be published really soon
Really thank you soo much sir you are great crystal clear explanation thank you so much sir
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 :)
Can you please remind me which part of the video 😅
@@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 :)
Great tutorial. I would like to ask about Identity Brokering and Provider
Happy you liked it!
What about them?
Thanks for replying . I need to implement custom Identity brokering in keycloack. Custom oidc. I can not find resources for thst
@@rusifbudagov246 will try to schedule it
Great video. How do we connect user signup and login to this so that KeyCloak can track it then
Great content, thanks for the amazing course.
I would spend less time with the conversion shenanigans and would invest this time elaborating some Unit tests for mocking Keycloak for coverage purposes.
Great suggestion!
How to create an user on keycloak with Java code ?
Thank you so much
Happy you likedit
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"?
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...
@@dmitriizheleznikov2949 try using hasRole rather than hasAuthority on the method.
Hi Alibou, may I know if you planning to continue this tutorial, like authorization part and fine grain control on permission and stuff?
Yes, I have it on my list
@@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?
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
coming next week
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
Please follow the steps precisely and assign the roles to the user
Good video. 43:44 when i put the bear token it tells me also unauthorized ! anyone had the same problem ?
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?
You can mock the security context.
Please share more details on our discord server
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.
Glad it helped
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" ?
Image upload using other data like name email and String image with rest api and test on postman
I will create a video for that
Hi, Great explanation
Via spring boot security application need to add the user registration and authentication how to handle that?
coming next week
How can we test this security configuration setup? Maybe you can do a tutorial on unit testing the security chain.
Good idea
thank you bro for this video , but i had problmes regarding some deprecated versions of security , can u help me please ?
thanks in advance
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?
You can enable the signup feature on keycloak
@@BoualiAli Will the user be registered in my database as well?
@@khouloudbouazizi280 no. You don't need to
@@BoualiAli Sorry for asking a lot, but I need to register the user in the database because they are related to other JPA entities.
@@khouloudbouazizi280 you can get the user ID from keycloak token
1:07:09
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
Hey Ali , Can you do a video about authentication flow of client
Can you elaborate please?
Hi..! since we are adding client roles as underlying role to realm roles do we need to add client roles again for the user?
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
Please..... Make video on the new Spring Authorization Server.!!!
Sure, I will