Implementing API Gateway Authentication With YARP + .NET 8

  Рет қаралды 13,411

Milan Jovanović

Milan Jovanović

Күн бұрын

Пікірлер: 60
@MilanJovanovicTech
@MilanJovanovicTech 4 ай бұрын
Get the source code for this video for FREE → the-dotnet-weekly.ck.page/gateway-auth Want to master Clean Architecture? Go here: bit.ly/3PupkOJ Want to unlock Modular Monoliths? Go here: bit.ly/3SXlzSt
@Ebrahem-outlook
@Ebrahem-outlook 4 ай бұрын
Milon, I thank you very much because you provide the source code for free. I have never seen anyone do that. You are a dedicated person who loves others, and this reflects the love of others for you. Thank you, Milon, for all this hard work.
@MilanJovanovicTech
@MilanJovanovicTech 4 ай бұрын
Thanks!
@MB-Kajtech
@MB-Kajtech 4 ай бұрын
Nice one, haven't actually had the change to look at YARP much due to NGINX and AGIC, with our apps being monolithic in nature. Have you considered doing a video on Keycloak from .NET dev point of view. For work I'm stuck with Entra Id, but been using keycloak on my own cluster. Great piece of software imo. Might not be in high demand due to everyone being stuck with Okta, Entra Id or similar, but then again I still, from time to time, see identity server 4 mentioned, so might be the lack of content about it? Then again I know atleast some government agencies are using Keycloak so there is usage but not much content.
@MilanJovanovicTech
@MilanJovanovicTech 4 ай бұрын
I'm planning a nice content series about it soon! :)
@MB-Kajtech
@MB-Kajtech 4 ай бұрын
@@MilanJovanovicTech Awesome! Looking forward to it! :)
@dotnetMasterCSharp
@dotnetMasterCSharp 4 ай бұрын
This is awesome and useful content for devs!
@MilanJovanovicTech
@MilanJovanovicTech 4 ай бұрын
Glad to hear it!
@josepvg
@josepvg 4 ай бұрын
Great video, i'm a fan now
@MilanJovanovicTech
@MilanJovanovicTech 4 ай бұрын
Welcome aboard!
@vuhoang5903
@vuhoang5903 2 ай бұрын
This is awesome
@MilanJovanovicTech
@MilanJovanovicTech 2 ай бұрын
Glad you think so 😁
@kodindoyannick5328
@kodindoyannick5328 4 ай бұрын
Thanks Milan for the video.
@MilanJovanovicTech
@MilanJovanovicTech 4 ай бұрын
You're welcome! :)
@leakeymaina5495
@leakeymaina5495 Ай бұрын
Hi Milan, Thanks for this video...please can you use KeyCloak for the YARP API Gateway Authentication
@MilanJovanovicTech
@MilanJovanovicTech Ай бұрын
Just watch my Keycloak video and integrate it into YARP, not too difficult
@antonmartyniuk
@antonmartyniuk 4 ай бұрын
Nice tutorial. Milan, what other API gateways did you use except YARP ?
@MilanJovanovicTech
@MilanJovanovicTech 4 ай бұрын
Out of open source ones, I used Ocelot. Also cloud gateways on AWS/Azure.
@mridulpaul1378
@mridulpaul1378 2 ай бұрын
Could you please make a video on implementing resiliency on yarp gateway? Thanks :)
@MilanJovanovicTech
@MilanJovanovicTech 2 ай бұрын
Yes!
@mridulpaul1378
@mridulpaul1378 2 ай бұрын
@@MilanJovanovicTech Thanks a lot :)
@HelloWorld-th9vb
@HelloWorld-th9vb 4 ай бұрын
Hi Milan, which of your paid courses can you recommend which cover DDD and clean architecture, authentication and authorisation end to end, I feel like it will help me gain confidence as a dotnet developer 😊
@MilanJovanovicTech
@MilanJovanovicTech 4 ай бұрын
Pragmatic Clean Architecture sounds like a good fit for what you're looking for. Check the full curriculum here to see if it's aligned with your goals: www.milanjovanovic.tech/pragmatic-clean-architecture#curriculum
@HelloWorld-th9vb
@HelloWorld-th9vb 4 ай бұрын
@@MilanJovanovicTech Thanks Milan
@cengizhanbalci
@cengizhanbalci 3 ай бұрын
Hi Milan, I have been researching for a few days on developing a route-based retry and circuit breaker for my .NET application using Yarp.ReverseProxy. How can we do this using the Polly library? I couldn't find a source on this subject, can you make a KZbin video? Thanks
@MilanJovanovicTech
@MilanJovanovicTech 3 ай бұрын
Check out this: www.milanjovanovic.tech/blog/building-resilient-cloud-applications-with-dotnet But I'm not sure if we can apply these policies with YARP 🤔
@stickyamp5996
@stickyamp5996 4 ай бұрын
Does the internal apis have some kind of authentication? Or does they trust the api gateway? Maybe it is more interesting to secure the internal apis because gateway is exposed to users and is more security risk imo. What do you think?
@MilanJovanovicTech
@MilanJovanovicTech 4 ай бұрын
Typically they do, you can also setup JWT auth on the APIs (and you will in 99.99% cases).
@ojhkhofdgfd
@ojhkhofdgfd 3 ай бұрын
Thank you for the video. Is it possible to have .NET generate an accessToken which is JWT that could be refreshed by the refreshToken that is already shared in the login endpoint?
@MilanJovanovicTech
@MilanJovanovicTech 2 ай бұрын
Oh yes, there's nothing magical about it. I'll see if I can do a video dedicated to that.
@ArjunLearnsTech
@ArjunLearnsTech 4 ай бұрын
How should we approach implementing zero trust in an API gateway architecture? While an API gateway can centralize access control and minimize the attack surface, is it advisable to forward the complete JWT to downstream services for validation against the authority again?
@MilanJovanovicTech
@MilanJovanovicTech 4 ай бұрын
Yes, definitely. In reality you'll also have auth in downstream services.
@mathisbidault3331
@mathisbidault3331 2 ай бұрын
@@MilanJovanovicTech Great video Milan ! Is limiting network access to services by exposing them only to the API Gateway or via the server's internal network rather than validating JWT tokens a second time in downstream services a potential solution in your opinion? I'm aware that the ZTA principle wouldn't be respected, but I was wondering about this for small infrastructures. Maybe mTLS service-to-service authentication could be a good topic for a video 😜 Thanks!
@kattamanchiarjun
@kattamanchiarjun 4 ай бұрын
Thanks for the video. Can YARP replace Azure APIM? What is the difference between them?
@MilanJovanovicTech
@MilanJovanovicTech 4 ай бұрын
We'd be comparing a cloud API Gateway vs a self-managed one. Does that comparison make sense? Azure APIM is a much more robust product. Definitely use it if you're on Azure.
@mahmadmusffir8459
@mahmadmusffir8459 4 ай бұрын
Can you make one tutorial on full microservices and api gateway
@MilanJovanovicTech
@MilanJovanovicTech 4 ай бұрын
Maybe
@mahmadmusffir8459
@mahmadmusffir8459 4 ай бұрын
I am using asynchronous communication in microservices but i need user information in request or response form , how i can do it because it is synchronization communication
@MilanJovanovicTech
@MilanJovanovicTech 4 ай бұрын
Send an HTTP request? Or do messaging request-response
@nanny07
@nanny07 4 ай бұрын
How to pass the token to the inner APIs?
@MilanJovanovicTech
@MilanJovanovicTech 4 ай бұрын
It'll be automatically forwarded. You'd just need to use a real JWT to be able to decode it in the downstream APIs.
@chuannguyen1686
@chuannguyen1686 4 ай бұрын
Yeah
@MilanJovanovicTech
@MilanJovanovicTech 4 ай бұрын
👈
@chuannguyen1686
@chuannguyen1686 4 ай бұрын
@@MilanJovanovicTech The approach is to authorize in api gateway. Imagine that we have many services and we need to config a bunch of endpoints, and each endpoint has its own policy. Is it a good way? Or maybe we just authen in apigateway and we pass token to downstream service, they will authorize it by themselve.
@Max1weber
@Max1weber 4 ай бұрын
Is it also posible the change the authentication type towards the backend api. Eg api Gateway incoming jwt auth but backend uses client certificate
@MilanJovanovicTech
@MilanJovanovicTech 4 ай бұрын
Probably, but you'll need to implement that yourself on the gateway
@Max1weber
@Max1weber 4 ай бұрын
@@MilanJovanovicTech but the gateway calls the backend service? So it has to change the authorization
@Max1weber
@Max1weber 4 ай бұрын
@@MilanJovanovicTech probably custom forwarder?
@shivanff3709
@shivanff3709 7 сағат бұрын
@Milan Jovanović Bro the source code link is not working please give a valid link it's my kind request.
@MilanJovanovicTech
@MilanJovanovicTech 4 сағат бұрын
Fixed it. Can you try again?
@sunzhang-d9v
@sunzhang-d9v 4 ай бұрын
Consul ,kubernates ? Is there a plan😋
@MilanJovanovicTech
@MilanJovanovicTech 4 ай бұрын
Maybe there's something coming today 👀
@yevgenletin5531
@yevgenletin5531 4 ай бұрын
good :)
@MilanJovanovicTech
@MilanJovanovicTech 4 ай бұрын
Thank you! Cheers!
@TheinTunZaw-uj1un
@TheinTunZaw-uj1un 4 ай бұрын
Can we use cloud api gateway instead?
@MilanJovanovicTech
@MilanJovanovicTech 4 ай бұрын
Yes, definitely
@RamiNassarPlus
@RamiNassarPlus 4 ай бұрын
I'm the first viewer :D
@MilanJovanovicTech
@MilanJovanovicTech 4 ай бұрын
Congrats 🏆🏆
Which API Gateway is better? YARP vs Ocelot
24:01
Milan Jovanović
Рет қаралды 6 М.
Multiple JWTs in .NET: How to Implement Multi-Token Authentication
17:40
This Game Is Wild...
00:19
MrBeast
Рет қаралды 174 МЛН
A Step-by-Step Guide for the Cache-Aside Pattern + Stampede Protection
19:29
Reverse proxying is easy with YARP | .NET Conf 2023
29:46
dotnet
Рет қаралды 11 М.
Car Management System: Complete GO Lang Project
4:40:00
Code Alley with Anurag
Рет қаралды 2 М.
Implementing JWT Authentication in ASP.NET Core
23:51
Nick Chapsas
Рет қаралды 41 М.
Junior .NET Developer Rozmowa rekrutacyjna #1 - CERQ
1:04:56
Kajetan Duszyński - Szkoła Dotneta
Рет қаралды 2,5 М.
.NET 8  💥  - API Gateway Authentication with YARP
15:40
Mohamad Lawand
Рет қаралды 2,9 М.
Exceptions Are Extremely Expensive… Do This Instead
17:15
Milan Jovanović
Рет қаралды 47 М.
Secure Your .NET Application With Keycloak: Step-by-Step Guide
17:05
Milan Jovanović
Рет қаралды 20 М.
Migrating From Docker Compose to .NET Aspire (my experience)
17:01
Milan Jovanović
Рет қаралды 13 М.