Тёмный

How To Integrate Keycloak With Spring Cloud Gateway - Part 1 

Refactor First
Подписаться 2,8 тыс.
Просмотров 16 тыс.
50% 1

In this video we will be looking at how we integrate Keycloak with Spring Cloud Gateway Application.
We will be using OAuth2 OpenId Connect (OIDC) mechanism to authenticate the user.
In my next video I will be integrating a resource server. So make sure to subscribe to my channel.
You can also read about this along with the GitHub link to the code: refactorfirst.com/spring-clou...
You can support me by buying me a coffee 😄 : www.buymeacoffee.com/amrutprabhu
Gear I use:
Sony Alpha a6000 : Amazon India : amzn.to/3RM7QMJ
Germany : amzn.to/3G1Iw24
US : amzn.to/3cpKZ9E
UK : amzn.to/3J0g5Ry
Razer Microphone : Amazon India : amzn.to/3aQxI9C
Germany : amzn.to/3DRRrAh
US : amzn.to/3ITKu3Q
UK : amzn.to/3v3RHbU
--- Chapters --------
00:00 - Introduction
00:32 - Keycloak Docker Compose
01:34 - Starting Keycloak
02:09 - Creating Realm
03:27 - Creating Client Configuration
05:27 - Creating User
06:50 - Keycloak Config Summary
07:19 - Creating Spring Boot Application
08:55 - Spring Cloud Gateway Code
09:14 - Security Configuration
10:00 - Keycloak Properties
14:20 - Controller Protected Endpoint
16:00 - Starting Application
16:50 - Error
17:25 - Successful Login
17:41 - Understanding Output
18:50 - What's Next
Music Credits:-
Sappheiros - Affection
----------------------------
Social Media
RU-vid / sappheiros
Spotify goo.gl/hE9MDJ
Twitter SappheirosMusic
Instagram sappheirosmusic
Facebook SappheirosMusic
Discord discord.gg/Pk87yN9
/ affection
--------------------------------------------------

Наука

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

 

11 июл 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 29   
@theNikki1
@theNikki1 Год назад
This and part 2 are golden! Best representations about covered topics I've seen!
@zafarparvez6723
@zafarparvez6723 2 года назад
Well done brother haven't seen such a clear explanation in any other tutorial. Keep posting good stuff.....
@jayanthjarpula1921
@jayanthjarpula1921 11 месяцев назад
excellent ! the way of explanation is superb and ownsome , I never see a RU-vid channel like this 💯
@ShailendraSingh-hx8pe
@ShailendraSingh-hx8pe 2 года назад
great tutorial mahn...simple and easy to follow..
@GregBouwens
@GregBouwens 2 года назад
Really nice walkthrough, very helpful. Thanks!
@RefactorFirst
@RefactorFirst 2 года назад
Thanks a lot for your kind words.. will be making more videos like this..
@lindomanana4856
@lindomanana4856 2 года назад
Awesome video. Thanks.
@Azmirsabir
@Azmirsabir 8 месяцев назад
nice tutorial, keep posting such nice stuff.
@user-jd8sn2zf8g
@user-jd8sn2zf8g 11 месяцев назад
Thank you
@user-jy3hn5oq1g
@user-jy3hn5oq1g Год назад
Man, great Thanks. From Russia with code🤝.
@ArunkuttiMine
@ArunkuttiMine 2 года назад
Cool tutorial, but is there any way to enable policy enforcer for fine grained authorization?
@ashaolutoluwashe7676
@ashaolutoluwashe7676 Год назад
Nice tutorials. However, How do we do without the redirect login page as I’m building an api that doesn’t require any login page
@decahthuk4285
@decahthuk4285 Год назад
Hello! I am encountering the problem: "clientRegistrationRepository cannot be null". I'm pretty sure that the application.properties is allright. Don't you know, what could possibly cause this problem?
@rachmawanatmajiperdana8866
@rachmawanatmajiperdana8866 2 года назад
how to make custom Login endpoint for Keycloak? So that I can login to the system using Postman
@codingstyle9480
@codingstyle9480 9 месяцев назад
When people record videos on something, if they do now start telling about what problem that something solves, it is annoying. What problem does this mode of usage of the components solve?
@BharathBattula
@BharathBattula 2 года назад
How do you call one resource rest service via spring gateway from the front end angular client without getting cors preflight error on the browser? Eg - I have an angular front end client on 4200 port with keycloak login. Also have an spring cloud gateway on 8081 with keycloak setup (different keycloak client) and sample demo rest endpoint service on 9092. When I am trying to access my rest end point from front end client I am getting an cors preflight error. Do you have any suggestions on how to overcome that?
@RefactorFirst
@RefactorFirst 2 года назад
If you are running it locally, you can just disable cors.. or else you will have to configure the cors to allow localhost as one of the allowed domains.. you could search for how to configre cors with allowed domains..
@alikalema1154
@alikalema1154 Год назад
Nice Video brother...but i have a Question. In a multi tenant environment how do you set the provider url knowing that the provider url consist of a realm name and each tenant has its own realm
@RefactorFirst
@RefactorFirst Год назад
You can create a new provider under the same property for the first provider. Just have to give a new provider name.. In the my github repo for the gateway, just duplicate the provider and give a new provider name and provide a new url.
@alikalema1154
@alikalema1154 Год назад
that's a way to go but in my case i may need to add a tenant on runtime i.e create a new keycloak realm
@alikalema1154
@alikalema1154 Год назад
i found a way using ClientRegistrationRepository availble at docs.spring.io/spring-security/site/docs/5.2.12.RELEASE/reference/html/oauth2.html#oauth2login-register-clientregistrationrepository-bean
@uttarakhand_today
@uttarakhand_today Год назад
How about handling multiple tenants in spring cloud gateway...Is there a way to add oauth2 clients at runtime
@RefactorFirst
@RefactorFirst Год назад
You can add multiple tenants in the gateway by specifying them in the properties file.. But at runtime I am not sure about it.. and highly doubt it that it can done at runtime..
@ajisegirisunday2885
@ajisegirisunday2885 2 года назад
Please i am getting error creating bean with name spring security filter chain throws no class def found error .. Can you please help out.. Thanks
@RefactorFirst
@RefactorFirst 2 года назад
It would be a bit difficult to know which dependency it is.. try downloading my code from github and checking it ..
@ajisegirisunday2885
@ajisegirisunday2885 2 года назад
Thanks.. Can you please make a video using like angular as the frontend not necessary the keycloak theme
@RefactorFirst
@RefactorFirst 2 года назад
Will try to if I can.. :)
@aakashkhatavkar7877
@aakashkhatavkar7877 Год назад
@Refactor First I followed your tutorial, it's seems good but the problem is whenever I try to get token first using keycloak token API and then I put it in Request Header as Bearer then he is asking for username & password in Keycloak login page. How to skip this logically if I'm having access token then I should get direct access to API. I'm accessing the token API and gateway API through POSTMAN
@RefactorFirst
@RefactorFirst Год назад
If you are accessing the api through the gateway with the access token using the authorization header as Bearer accesstoken, then it should work.. you should not get redirected to the login page, if the token is valid and not expired.
Далее
Keycloak и Spring Security
37:37
Просмотров 11 тыс.
24 часа в самом маленьком отеле
21:19
Нашли Краша Младшей Сестры !
23:46
ТОП 10 Худших игроков Евро-2024
30:22
How To Learn Anything, Anywhere - Elon Musk
7:35
Просмотров 4,3 млн
Protect Your Microservices with Spring Cloud Gateway
28:10
#engineering #diy #amazing #electronic #fyp
0:59
Просмотров 294 тыс.
Choose a phone for your mom
0:20
Просмотров 6 млн