Spring Cloud Gateway with KeyCloak and OAuth2 | Authorization Server with Spring Security 3

preview_player
Показать описание
In this video I will show how to configure a KeyCloak server. And I will use it in a Spring Cloud and Spring Boot architecture as an authorization server where a Spring Cloud Gateway will try to authenticate.

Content:
* Create a Keycloak instance;
* Create some necessary components for an OAuth2 workflow as a Realm, a client, an end-user and some scopes;
* Configure a Spring Boot resource server to communicate with Keycloak;
* Configure a Spring Cloud Gateway client server to communicate with Keycloak.

Рекомендации по теме
Комментарии
Автор

The content you have been publishing is very helpful and valuable. It deserves tens of thousands of subscribers and I am sure you gonna reach that number very soon.

Encodeum
Автор

Advanced content edited with quality. This channel should have more subscribers. Thanks and keep it up!

calamaroweb
Автор

It´s like your looking into my soul. Great Overview, getting started video. ^^

ChinyONE
Автор

Love your content and useful, i can even apply it in my workspace portal login.. many thanks keep going bro

wayneyu
Автор

This is absolutely helpful ♥ Please do more videos about automation CICD pipeline. Maybe sharing about devops culture that your are experiencing or deployment strategies, cost management, risk management, etc. BTW, after attending to a microservice application, I found it painful to setup CICD for the whole system without patterns and guideness 🤣

lannisnguyen
Автор

Thanks looking for this contain from long time

narendraingle
Автор

Hi!

I followed your tutorial and got up to the login with keycloak. Once I logged in, the backend-gateway returned a 404 error. The routing for request to through the gateway is not registered because the backend-resource on its own works. Do I need any kind of service discovery such as Eureka in order for the routing to work?

poomc
Автор

What is "etc/hosts". You just showed random picture with some strings, but where is it and how to add it there?

zttnxyy
Автор

what is the real case of using KeyCloak on production, may be there is some API for creating users instead of doing its manually in console?

seatconnect
Автор

Hi, I've seen a few of your videos and they are pure quality. At the moment I have the following doubt, in my current architecture I have a database where users register and can access it using your email and password provided at the time of registration. I would like to know if it is possible that keycloak uses those registered credentials to allow access to the user.

kennycuevas
Автор

How the setup would look like if several resource servers a behind the gateway, each with their own scopes? Every time a developer creates a new resource server behind the gateway, there will be a need to update application.yml of the gateway with all new scopes? I don't get it

snowy
Автор

Good tutorial thanks, but I do have a question, I tried to follow the tutorial but use a MySQL db in the docker-compose of backend-keycloak-auth and ran into a number of errors arround Access Denied to the db etc. Does this iamge have to use Postgres, or do you have an example of it using a MySQL db?

tonybroadbent
Автор

Great video i have learned a lot. Could you help me with choosing an authorization flow for my first party mobile app ? I want to use my app's login/registration screen for it without opening my browser, i have read that i should use authorization code flow + PKCE but without client id/secret on the mobile app but i cant find any information on how to implement it in android - spring / keycloak, what should i request from the app ? the api gateway or the keycloak server directly ? what endpoints should i use ? Only guides i could find were for third party mobile app's using the browser for authorization.

dawidd
Автор

Why would you use the legacy image of keycloak?

light.yagami
Автор

Thanks.
Can you please talk about the advanced configuration, such as what are the resource that you want to protect and the others that are public...?

lts
Автор

hello, what if we wanted to have multiple microservices and secure them with tokenRelay?
how would I create users? Or how would I submit a post request at all? I'm always getting a csrf error, even though I disabled csrf on all my spring security filters.

treefrog
Автор

here again for your short and on point texcellent tutorials, am implemnting this n am looking how do i create users in keycloack n login from a web app built in either react js or any other framework?

marypaul
Автор

hello! good one! how can we have one single project that uses at one side backend-resources with controller/config and on the other the gateway at port 8083 for the Kc login? thanks

DamLee
Автор

The material is very very helpful and powerful like every content from your side bro, I have a question about how I can mock a valid bearer token from Keycloak? In my IT i need to call the keycloak's API for token, and use it for bunch of tests but maybe you know the better way?

bartomiejdziadosz
Автор

Hello Sergio, thank you very much for your tutorials on Spring OAuth2. I'm learning so many things.
I have some concerns about using the Gateway as a client, if for example i have a spring boot client application trying to access my services via the Gateway, how will i configured it since Gateway is already implemented as a client ? Isn't it better to rather have spring cloud gateway implement as a resource server ?

Hope you will have time to answer.

TheZiomartin