Microservices Security Using JWT | Spring Cloud Gateway | JavaTechie

  Рет қаралды 185,488

Java Techie

Java Techie

Күн бұрын

Пікірлер: 532
@treefrog9392
@treefrog9392 Жыл бұрын
I feel like your explanations are even better than people who have english as their first language lol. You really do have a gift for this!
@impertator644
@impertator644 Жыл бұрын
I love you. Finally the architecture I'm looking for. A lot of tutorial are covering authentication for only one microservice and you are probably the only one that approaches the problem keeping in mind the whole microservice architecture.
@Javatechie
@Javatechie Жыл бұрын
Thank you so much Lukasz for appreciating my work 🥰🥰
@hkkabir2024
@hkkabir2024 Жыл бұрын
you worth millions of like
@shortcuter4
@shortcuter4 Ай бұрын
Is it still applicable in 2024, in the latest version of spring?
@pierreescudie1634
@pierreescudie1634 4 ай бұрын
Finally found an understandable tutorial about securing a Spring Cloud Gateway microservices architecture! A thousand times thank you sir!
@dattatraybharde2902
@dattatraybharde2902 Жыл бұрын
Great Video sir, completely Awesome...Add the role based security through api gateway.
@feriel6929
@feriel6929 25 күн бұрын
Wow, thank you so much! You’re literally my savior 🙏 This video was a lifesaver and exactly what I needed. Keep up the amazing work! 🎉👏 It would be awesome if you could make a video on implementing microservices with role-based authorization . That would be so helpful!
@cristianlozadapadilla4896
@cristianlozadapadilla4896 Жыл бұрын
THIS IS THE VIDEO I WAS LOOKING FOR, THANKS SO MUCH FROM COLOMBIA
@sunderkrishnaupreti561
@sunderkrishnaupreti561 Жыл бұрын
Nobody explains like you do..Thank you very much for the video.
@vedhlikith6252
@vedhlikith6252 Жыл бұрын
Best course available in youtube. Thankfully it is free. Keep up the good work
@robinhowilson
@robinhowilson 9 күн бұрын
You saved my day. God bless you. Thanks so much from Mozambique.
@atulpatil1586
@atulpatil1586 4 күн бұрын
Amazing🤩, really like the way you explain and handle everything in a very simple way. thank you!! it helped me a lot.🙏
@davidevangelista1774
@davidevangelista1774 Жыл бұрын
This is the best channel about Spring and stuffs of all KZbin. Thank you Java Techie.
@sivakumar-df9kk
@sivakumar-df9kk Жыл бұрын
Actually without your tutorial I couldn't learn easily new things implementation in spring app... You are Guru. Thanks lot.
@Javatechie
@Javatechie Жыл бұрын
Thank you Siva . Keep learning 😃
@sunilchandran4u
@sunilchandran4u Жыл бұрын
This is Gold Boss... Thanks a ton for this video.. I lost most of my interview only because of not answering how to security is implemented in micro services question.... Appreciate your efforts.
@Javatechie
@Javatechie Жыл бұрын
Thank you buddy 🙂
@shanmukpaila6956
@shanmukpaila6956 3 ай бұрын
We need this kind of videos. It is an end to end tutorial for microservices with security + JWT. Plz make videos on real time deployments with microservice architecture.
@baleshwariaddula4775
@baleshwariaddula4775 10 ай бұрын
Thank you so much for clear explain no one will explain like you.
@ousmanefofana4495
@ousmanefofana4495 6 ай бұрын
i love you brother, you are the best teacher for learners in this field.
@manoharanrajendiran568
@manoharanrajendiran568 Ай бұрын
Hi , Boss, Thanks for the video , i am following you since 2018, your videos help me to get move forward .
@arundhwajiiith
@arundhwajiiith Жыл бұрын
Thanks a lot. I am looking for security in Microservices architecture. It is one of the best way, you have explained.
@Javatechie
@Javatechie Жыл бұрын
Glad to hear that😊
@sahilpatel2885
@sahilpatel2885 Жыл бұрын
I had been waiting for this topic for long time. Finally wait is over.
@cd62
@cd62 Жыл бұрын
Waited last couple of month to get solution which you explain about validate and filter the request form spring cloud getway. ##you make my weekend Basant Sir. Thank you Sir
@Javatechie
@Javatechie Жыл бұрын
Thanks buddy 😊. Keep learning 👍
@erichhc9698
@erichhc9698 Жыл бұрын
I've been waiting this long, thanks java techie greetings from peru😎
@naidu12341
@naidu12341 9 ай бұрын
No words Mind Blowing
@vaishali1843
@vaishali1843 Жыл бұрын
1:11:00 The rest call from gateway to auth service is not working. It is throwing an error saying cannot call from java.lang.illegalstateexception: block()/blockfirst()/blocklast() are blocking, which is not supported in thread reactor-http-nio-1. Please let me know if someone can help in this
@sonliman2192
@sonliman2192 5 ай бұрын
This video is very useful for me . Thank you for your time and explanation
@SayemHasnat-e4h
@SayemHasnat-e4h Жыл бұрын
it's awsome,, I was trying to solve this kind of problem and this tutorial helps me a lot. Thank You so much for the video tutorial.
@Full-Stack-Project
@Full-Stack-Project Жыл бұрын
Nice video we learn couple of thing related to microservices and spring security ❤❤❤
@PrashantJannu
@PrashantJannu 7 ай бұрын
Thanks aTon Sir ❤, No one can match your Explanation level 👍
@ManishNegi-il1kf
@ManishNegi-il1kf 6 ай бұрын
Its a very best content which i ever seen in across youtube .. thanks basant keep it up..
@ousmanefofana4495
@ousmanefofana4495 6 ай бұрын
me too
@shortcuter4
@shortcuter4 Ай бұрын
Is it still applicable in spring 3 (2024) ?
@Javatechie
@Javatechie Ай бұрын
Yes
@MohitKumar-bc1rs
@MohitKumar-bc1rs Жыл бұрын
Best video you can find for JWT auth ❤
@manoharanagiaploshan4348
@manoharanagiaploshan4348 Жыл бұрын
Searching every where finally got it thanks sir 😀
@AnilKumar-cc8px
@AnilKumar-cc8px Жыл бұрын
Grateful for such a wonderful insight on Microservices security. It will definitely help me to improve skills in my projects. Thankyou so much for the efforts. I'm learning a lot from your channel. Awaiting for more interesting videos.
@Javatechie
@Javatechie Жыл бұрын
Thanks buddy keep learning 😃
@umeshchandra6201
@umeshchandra6201 Жыл бұрын
Excellent Explanation. this is the Video i was looking for. thanks
@jh_super_soccer
@jh_super_soccer Жыл бұрын
This is what, I was waiting for ,Very Helpful for me
@yuvrajph4754
@yuvrajph4754 Жыл бұрын
Awesome video Bhai.. much needed.. thanks a lot for the content shared. 🎉
@truthpath184
@truthpath184 Жыл бұрын
Hi Basant sir, Jwt in microservices explanation is so good. Thank you so much...
@Mohamed-uf5jh
@Mohamed-uf5jh Жыл бұрын
Thanks Sir , Good explanation, your course was clear and understandable.
@nileshdasarwad1668
@nileshdasarwad1668 Ай бұрын
Thank you so much sir for wonderful explanation ❤
@kevinameda2711
@kevinameda2711 Жыл бұрын
Thank you for such an awesome lecture. We many of us benefit from such work. Continue teaching brother
@kaushikmitra1982
@kaushikmitra1982 Жыл бұрын
Awesome explanation !!! Really i feel that you are one of the most amazing solution architect !!!
@Javatechie
@Javatechie Жыл бұрын
Thank you for appreciating buddy. I am just a senior software Engineer not an architect 🤪🤪
@ВитяМаксимов-л9ш
@ВитяМаксимов-л9ш 4 ай бұрын
Bro, thank you!!! God bless you!!!
@aadiraj6126
@aadiraj6126 Жыл бұрын
Hey Basant Anna, this is awesome 👌thanks for such a smooth flow..its really a very complex topic & nightmare for interview candidates.
@giansiccardi6151
@giansiccardi6151 7 ай бұрын
bro you helped me a lot, thank you very much and greetings from Argentina
@gopisambasivarao5282
@gopisambasivarao5282 Жыл бұрын
Thanks so much Basant. Appreciate your efforts. I am learning lot from your videos. Waiting for more videos.
@maheshy5168
@maheshy5168 Жыл бұрын
Wooooow.... i seached a lot for this kind of scenario but i did not find and in so many interviews i faced this question and got stucked. A million thanks basanth.... it helps us a looooot......👏👏👏🤝🤝🤝🙏🙏🙏 Thanks you so much Next Please do videos on TESTING(mockito) microservices end to end and GLOBAL EXCEPTIONAL HANDLING (please think about it)
@Javatechie
@Javatechie Жыл бұрын
I will share the link with what you mentioned which i already uploaded. Even if you can search in the channel it's already there buddy
@Javatechie
@Javatechie Жыл бұрын
Exception handling : kzbin.info/www/bejne/nYHRlWCer7KSbKM
@Javatechie
@Javatechie Жыл бұрын
Mockito testing: kzbin.info/www/bejne/fpmUaH16pdh-p8U
@rachidbenkitou9023
@rachidbenkitou9023 Жыл бұрын
Good explanation, your course was clear and understandable.
@aryanaryan9759
@aryanaryan9759 Жыл бұрын
Much waited ❤ Thank you sir for your wonderful teaching and the knowledge your sharing .
@sriramvenky7926
@sriramvenky7926 Жыл бұрын
thanks for giving us this much excellent content and awesome video
@wimaxisp
@wimaxisp Жыл бұрын
Wonderful. Thank you very much for sharing
@hkkabir2024
@hkkabir2024 Жыл бұрын
Hello sir. there is api still open for each microservice. like calling the order in it's own microservice with port like localhost: 8082 then api is open . if anyone can call that api wihout gateway and security then what is the usage of jwt ???
@Javatechie
@Javatechie Жыл бұрын
Simple question can you please answer me how the user will know about the endpoints of your microservice ?
@hkkabir2024
@hkkabir2024 Жыл бұрын
@@Javatechie using url or somehow user know the endpoint or hacker know the endpoint. so the endpoints are not secured for each MS. you have to reconsider your code and try to figure out how to secure all the endpoints separately also
@Javatechie
@Javatechie Жыл бұрын
@@hkkabir2024 no buddy it will be known by user only if you exposed it . If we are doing that then it's the wrong approach then what is the need for a gateway?
@dhirajchavan8364
@dhirajchavan8364 Жыл бұрын
Thanks!! Helpful for basic understanding.
@TalhaHussain-zy9gw
@TalhaHussain-zy9gw 7 ай бұрын
It is authenticated only when it routes through the gateway. But the end point for the micro services are still open how to secure that?
@vinaygoswami5374
@vinaygoswami5374 6 ай бұрын
I think we need to implement spring security at service level for each service
@ahammedhussain9335
@ahammedhussain9335 5 ай бұрын
Is there any solution for this issue?
@vinaygoswami5374
@vinaygoswami5374 5 ай бұрын
@@ahammedhussain9335 I think the services need not to be public, so we cannot access them directly, we can only access them through gateway as the end user, and at gateway we filter request to check for the token and authentication for routing the request to the appropriate service.
@darshanrajashekhar5914
@darshanrajashekhar5914 5 ай бұрын
No no just implement cross origin bro
@vinaygoswami5374
@vinaygoswami5374 5 ай бұрын
@@darshanrajashekhar5914 please elaborate
@filz4461
@filz4461 Жыл бұрын
You have one of the best educational channels out there. I would love to give you a constructive opinion: It would be great if you could change your microphone into something clearer, like what the java brain and Navin have. Trust me, it makes a huge difference.
@Javatechie
@Javatechie Жыл бұрын
Thanks Filz , i noted it and going forward i will come with better audio quality. Need to look into rode configuration
@archanasingh3060
@archanasingh3060 Жыл бұрын
​@@Javatechie 🎉d o 😢😢😢😮😊😂😅😅😅😅😮😮😮😮😮😅😮fq😢😢😢😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮😮
@Javatechie
@Javatechie Жыл бұрын
Archana not getting you
@filz4461
@filz4461 Жыл бұрын
@@Javatechie I think, that's a bot.
@Javatechie
@Javatechie Жыл бұрын
Even not getting you buddy. What do you mean by bot
@adanali3652
@adanali3652 Жыл бұрын
You are super talented man.clear explanation .Thank you
@inhtruongvu7618
@inhtruongvu7618 Жыл бұрын
00:05 Triển khai Bảo mật dựa trên JWT trong microservice bằng Spring Cloud Gateway 07:12 Hai dịch vụ vi mô, Swiggi Service và dịch vụ nhà hàng, đang liên lạc với nhau thông qua API Gateway. 21:19 Cần phải viết một phương pháp để đăng ký người dùng, tạo mã thông báo và xác thực mã thông báo 28:07 Đã triển khai các điểm cuối xác thực và xác thực mã thông báo. 41:40 Xác định Dịch vụ chi tiết người dùng của riêng bạn để xác thực người dùng 48:42 Đã hoàn tất triển khai dịch vụ nhận dạng 1:02:00 Xác thực mã thông báo trong API Gateway 1:09:10 Triển khai logic xác thực mã thông báo JWT trong Cổng 1:22:07 Triển khai bảo mật microservice bằng xác thực JWT Crafted by Merlin AI.
@TinoReyna1984
@TinoReyna1984 11 ай бұрын
Looks really simple, just as I used to implement the JWT service in a monolithic way, but porting everything to a new independent webservice to validate JWT to access any endpoint without compromising the other webservices.
@Crazyfactzz123
@Crazyfactzz123 10 ай бұрын
Thank you for this wonderful video❤️❤️
@viveksingh-rt4py
@viveksingh-rt4py 11 ай бұрын
Awesome videos. Hats off to you in explaining it in a very simple and easy manner. One question. May I know if we have a requirement to secure our swiggy and restaurant service endpoint and grant access based on role, then how we can achieve this requirement .
@lucienmakutano3574
@lucienmakutano3574 Жыл бұрын
Thank you for this tutorial... Kudos
@rounakmaity4
@rounakmaity4 7 ай бұрын
Excellent Work....Thank you
@AjayGupta-ob8oe
@AjayGupta-ob8oe Жыл бұрын
Thanks for sharing the knowledge ❤
@vaderashyam7207
@vaderashyam7207 Жыл бұрын
Wow Very Nicely Explained In Easy To Understand Manner. 1 Request can you please show how to implement role based authentication with Spring API Gateway ?
@Javatechie
@Javatechie Жыл бұрын
Yes buddy it's in queue i will upload soon
@roshanpatro5777
@roshanpatro5777 Жыл бұрын
Fantastic video and an outstanding explanation ❤‍🔥. Thank you so much!!!
@andywang4189
@andywang4189 5 ай бұрын
Quite informative, thanks!
@supun_sandaruwan
@supun_sandaruwan Жыл бұрын
superb clear video
@romanas7587
@romanas7587 11 ай бұрын
Loved your explaination ❤❤❤❤
@PatilShantanu-c2t
@PatilShantanu-c2t Жыл бұрын
Thank you, Basant Bhai...
@pavankumarmantha
@pavankumarmantha Жыл бұрын
instead of completely using spring cloud stack we can make this more OSS (open source stack) like every micro service is containerised (dockerised) then use KONG as API gateway. this way we can make the configuration more simple and reduce tight coupling.
@mirarima8877
@mirarima8877 Жыл бұрын
Could you please explain more about how that works?
@amankumar-f4n5r
@amankumar-f4n5r Жыл бұрын
can you please come with your hands on similar like this using KONG.
@nirmesh44
@nirmesh44 Жыл бұрын
The best explanation
@AlmustaphaTukurUmar
@AlmustaphaTukurUmar Жыл бұрын
This Video is really helpful, Pls. Can you cover Role base authentication and Authorization on the individual microservices?
@ramojiseemakurthi155
@ramojiseemakurthi155 2 ай бұрын
My approach for this is to apply filters to individual microservice, in which set up the securitycontextholder which would look something like below UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(username, null, authorities); SecurityContextHolder.getContext().setAuthentication(authenticationToken); This is working for me.
@faixan13
@faixan13 11 ай бұрын
finally someone addressed this scenario with proper explanation. Thanks as always. one question that if auth service also has to pass through api gateway and we didn't add filter param in gateways routes for auth service then why we are checking those urls through validators in authentication filter ? because request will never land on filter in case of /register and /token api
@Javatechie
@Javatechie 11 ай бұрын
No usually we should do a rest call to identify service from gateway to validate and get token but here to avoid that I have directly used jwt logic in gateway that's why it's confusing for you
@faixan13
@faixan13 11 ай бұрын
​@@Javatechie but that rest call we are doing lately when all the checks are true before that. I am talking about that "if" condition in start (validator.isSecured.test(exchange.getRequest())) { because in this condition we are checking /register and /token urls to bypass the token check and according to implementation when we will call register or token it would never land on Authentication Filter. let me know if I am missing something still.
@Javatechie
@Javatechie 11 ай бұрын
That's correct right. In the filter we had token validation logic right? So when i don't want to authenticate the user for the first time login then why do you want this to be delegated to filter what is the sense here ? Let me know if I understand your concern correctly. If not please drop an email to javatechie4u@gmail.com
@faixan13
@faixan13 11 ай бұрын
@@Javatechie no I dont want to authenticate for the first time. I am just saying that, main if condition is of no use when we will call /register or /token , it does not matter if the condition is there or not. Will email no problem
@Javatechie
@Javatechie 11 ай бұрын
@@faixan13 okay simple things buddy remove those 2 url from validator don't bypass it and run your app then test . Hope you will get your point.
@dineshrajput1821
@dineshrajput1821 2 ай бұрын
In the gateway service when we create authfilter is good to copy default methods and paste them or memorize them bc there is a lot methods? at 59:52 onwards
@Akash-tq1ui
@Akash-tq1ui Жыл бұрын
Hi Basant , Very useful tutorial however I have one doubt, In production when the token is generated by passing a valid username and password it should automatically pass the token to the gateway right but here I saw that you are manually passing the token to the gateway through Postman for accessing microservices, My question is how we can automatically pass the token to the gateway for accessing microservices when the token is generated
@Javatechie
@Javatechie Жыл бұрын
Your question is genuine but this automatically stuff needs to handle from UI not from the backend
@Akash-tq1ui
@Akash-tq1ui Жыл бұрын
@@Javatechie ok thank you!
@Nexgenstory
@Nexgenstory 5 ай бұрын
Could you explain me : Client -> Security Service (GenerateToken) -> API Gateway -> MicroService1 (validate JWT) this flow is fine . What happen we request come directly to Client-> Microservice1 . How to check JWT for each endpoint.
@aishaprasad5555
@aishaprasad5555 5 ай бұрын
How to block each microservice endpoint to access??
@PeetCode
@PeetCode 3 ай бұрын
The API Gateway is like the front door to your entire microservices setup. Every request coming in or going out passes through it. Think of it as a super-secure, load-balanced gatekeeper that makes sure only the right people and requests get in. Once you’ve validated requests at the gateway, there’s no need to worry about extra authentication for internal services since they aren’t directly accessible from the outside world. This setup keeps everything neat, secure, and centralized, so your microservices can focus on what they do best-without worrying about who’s knocking on the door.
@akumarsingh85
@akumarsingh85 Жыл бұрын
Just what I needed. 👍
@ouyoussmeryem1916
@ouyoussmeryem1916 Ай бұрын
you're really amazing thank you so mutch
@alegutierrezmusic
@alegutierrezmusic 2 ай бұрын
Thank you so much great video. Just wanted to mention that oauth 2.1 removed the password grant type so a generated client_credentials would be a better option, and would like to see an updated video on that implementation.
@milanfaizal
@milanfaizal 4 ай бұрын
Awesome video.
@serigneibrahimafall6322
@serigneibrahimafall6322 Жыл бұрын
Wonderful and clearly explained. I want just to know how to access authentication info (principal for example) and how to do authorization if needed in microservices
@Javatechie
@Javatechie Жыл бұрын
Please check the video below 👇 you will get an idea kzbin.info/www/bejne/p4CnoHenasSbd68
@serigneibrahimafall6322
@serigneibrahimafall6322 Жыл бұрын
@@Javatechie Thanks a lot
@berkslv
@berkslv Жыл бұрын
You're a life saver!
@suresh1250
@suresh1250 9 ай бұрын
Thank you very much for providing such a detailed explanation. Your video is undoubtedly superior to paid courses that tend to overcomplicate things and stretch on for more than 8 hours. I have a question: If I were to call Swiggy or a restaurant service directly, bypassing the gateway or discovery service, how would I handle authentication?
@vivekbansal-bc9eg
@vivekbansal-bc9eg 5 ай бұрын
you can't but you can make that api endpoint in api gateway itself
@rathan235
@rathan235 Жыл бұрын
Great job
@BrilliantMindsZw
@BrilliantMindsZw Жыл бұрын
well explained concepts, thank you
@tanvirahmed7399
@tanvirahmed7399 Жыл бұрын
If I want to add userId to the order table as a primary key then how can I get the current logged-in user so that I can take the user credential then take userId and place it into the order table?
@Javatechie
@Javatechie Жыл бұрын
From controller method just call principal.getUserName()
@tanvirahmed7399
@tanvirahmed7399 Жыл бұрын
​@@Javatechie Thanx for the reply. what about swaggy microservice or restaurant microservice. there has no security configuration so how I can get the logged-in user from swaggy or restaurant microservice?
@fsoldierdeth
@fsoldierdeth Жыл бұрын
i have a question, what if i have 3 microservices (agency -> service -> activities ) and i want to get all activities from the services that an agency offers, do i need to ask for the token 3 times?
@Javatechie
@Javatechie Жыл бұрын
It should be done in one go , simply we are applying security on the entry point not in individual microservice
@Bharathidhasan-m
@Bharathidhasan-m 28 күн бұрын
Hi, You've integrated an identity security service with your API Gateway (running on port 8080) and secured it with authentication via tokens. The API Gateway is working perfectly with token-based authentication. However, the issue is where the individual microservices (on ports 8083, 8084, etc.) and even the security service (on port 9898) itself are still accessible directly, without any authentication. What’s the best way to ensure these services are secured, not accessible directly without tokens, and can only be accessed through the API Gateway? I’ve found suggestions like blocking the ports in Kubernetes, but this approach doesn’t seem scalable when auto-scaling is in use. Any insights or recommendations would be greatly appreciated. Thanks!
@AmitBenShimon
@AmitBenShimon Жыл бұрын
why did you copy the code of "/validate" to gateway? It's useless now in the identity-service if you run this piece of code from the gateway
@Javatechie
@Javatechie Жыл бұрын
Rather than doing another rest call to identity service i have used it in gateway itself
@AmitBenShimon
@AmitBenShimon Жыл бұрын
@@Javatechie i get that, but if this was the goal all along, then why did we implement this in the id-service to begin with? I want to avoid duplicate code.
@IT_Ocean
@IT_Ocean Жыл бұрын
Nice detailed video..
@xiaoze3234
@xiaoze3234 2 ай бұрын
may i know why feign cannot use within the custom filter,i had issue that my feign is null
@Javatechie
@Javatechie 2 ай бұрын
I guess we can use it. But not sure whether will it work with traditional api call or not will check and update
@sidimohamedelhamed4419
@sidimohamedelhamed4419 Жыл бұрын
Thank you! how is it going if i have the UserData in an other service, is there any video with this case ?
@Javatechie
@Javatechie Жыл бұрын
In our case also user data available in other services right
@MedAliJelidi
@MedAliJelidi Жыл бұрын
Thank you! but i have a question! is this enough in term of security in my application and how can i add more security layers
@Javatechie
@Javatechie Жыл бұрын
This is the way to implement in microservice but if you want more secure then better use 3rd party identity providers like okta or keyclok. I already uploaded a video of keyclok using microservice
@ViswanathSandilyaJandhyala
@ViswanathSandilyaJandhyala Жыл бұрын
Hi @javatechie I have a question. What is i dont want to validate the token in cloud-gateway. every request which is coming to gateway and cloud-gateway has to call identity-service to validate the token and send back to cloud-gateway and based on the response it will call the endpoint or throw an exception. Is it possible ??
@Javatechie
@Javatechie Жыл бұрын
Yes it's absolutely possible that is what I explained in PPT but while explaining code I have added validateToken logic in gateway but you can do that easily just refer flow it will be dead easy
@developersatish
@developersatish Жыл бұрын
love you bro you are helping so much
@saurabhmaurya6964
@saurabhmaurya6964 Жыл бұрын
is there any way to get the exact exception message in response ? in gateway
@Javatechie
@Javatechie Жыл бұрын
Yes we can do that
@saurabhmaurya6964
@saurabhmaurya6964 Жыл бұрын
@@Javatechie how ...i tried with global exception handling but for that web dependency required..but web and gateway both are not compatible with each other.. so how are to?..
@Javatechie
@Javatechie Жыл бұрын
Yes correct but gateway we have used wwbflux right so we can use global exception handling for reactive approach but wait let me do some cross check will update in same thread
@Javatechie
@Javatechie Жыл бұрын
Can't we play with the fallback method of resilense4j
@saurabhmaurya6964
@saurabhmaurya6964 Жыл бұрын
@@Javatechie so we have to write fallback method to get the proper exception...am I right?..
@RanuMishra-es1xf
@RanuMishra-es1xf 7 ай бұрын
keep it up good work.
@krishnan6201
@krishnan6201 Жыл бұрын
how spring cloud check that request came from web or mobile app and executes corresponding version of RequestMapping method. can you please clarify my query?
@Javatechie
@Javatechie Жыл бұрын
There is no such mechanism whether it's mobile or web app endpoint will always be the same buddy .
@krishnan6201
@krishnan6201 Жыл бұрын
@@Javatechie i am facing interview questions about it. i can't able to answer that. what could expert answer from you. plz help me on this.
@Javatechie
@Javatechie Жыл бұрын
For desktop or mobile view frontend team needs to design responsive pages. Nothing to do from the backend
@krishnan6201
@krishnan6201 Жыл бұрын
thanks @@Javatechie
@vivekbansal-bc9eg
@vivekbansal-bc9eg 5 ай бұрын
Won't the rest template call to identity service will be blocking and will lead to an issue?
@Javatechie
@Javatechie 5 ай бұрын
Yes it should be synchronous
@seriseyes
@seriseyes Жыл бұрын
Im using gateway automatic locator. How can i exclude my auth-microservice from filters?
@Javatechie
@Javatechie Жыл бұрын
You must need to specify antMatchers
@C410-u7t
@C410-u7t Жыл бұрын
Let me ask you a question. If, for example, I try to access the restaurant service directly (giving the restaurant service port), that is, without going through Gateway, I will skip the validate token part, right? So the restaurant service isn't protected at all, is it?
@Javatechie
@Javatechie Жыл бұрын
Then what is the need of the API gateway buddy? If you will directly expose your microservice endpoints to users
@C410-u7t
@C410-u7t Жыл бұрын
​@@Javatechie The point is, if a hacker knows the port of my services (for somehow), he can easily access them.
@omkarprakashbhosale8338
@omkarprakashbhosale8338 Жыл бұрын
Do you get any solution regarding this
@omkarprakashbhosale8338
@omkarprakashbhosale8338 Жыл бұрын
​@@Javatechie then how disallow it...?....bcz if somebody knows our port...he can access it
@Javatechie
@Javatechie Жыл бұрын
Knowing only port how someone can access buddy? We shouldn't expose our microservice endpoints even though it's exposed then we need to implement cross origin so that if the request comes from only api gateway then only allow that.
@amreshsinha2469
@amreshsinha2469 2 ай бұрын
What if user tries to access the microservices endpoint directly bypassing the api-gateway if endpoint for microservices is exposed to the user in any way. How to secure it.
@MrShashankTube
@MrShashankTube Жыл бұрын
When i am trying to access through post man with identity service routes via gateway its giving me like "An expected CSRF token cannot be found". I guess my request has not been forwarded from api gateway to auth service. Because its preventing me due to spring security impl in api gateway. When i try to access it from a browser it redirects me to login page. What is the issue ?
Маусымашар-2023 / Гала-концерт / АТУ қоштасу
1:27:35
Jaidarman OFFICIAL / JCI
Рет қаралды 390 М.
-5+3은 뭔가요? 📚 #shorts
0:19
5 분 Tricks
Рет қаралды 13 МЛН
Caleb Pressley Shows TSA How It’s Done
0:28
Barstool Sports
Рет қаралды 60 МЛН
🎈🎈🎈😲 #tiktok #shorts
0:28
Byungari 병아리언니
Рет қаралды 4,5 МЛН
Microservices using SpringBoot 3.0 | Full Example [NEW]
1:25:38
Daily Code Buffer
Рет қаралды 210 М.
Spring Security 6 with Spring Boot and JWT Tutorial
3:14:14
Telusko
Рет қаралды 200 М.
Spring Boot APIs Gateway in 20 Minutes
22:50
The IT Wizard
Рет қаралды 15 М.
Building an API Gateway in Java with Spring Cloud Gateway
23:01
Маусымашар-2023 / Гала-концерт / АТУ қоштасу
1:27:35
Jaidarman OFFICIAL / JCI
Рет қаралды 390 М.