Тёмный

Do you need IdentityServer? 

Raw Coding
Подписаться 73 тыс.
Просмотров 28 тыс.
50% 1

Who needs Identity Server anyway? When to use and Identity Server?
Patreon 🤝 / raw_coding
Courses 📚 learning.raw-c...
Shop 🛒 shop.raw-codin...
Discord 💬 / discord
Twitter 📣 / anton_t0shik
Twitch 🎥 / raw_coding
Authentication Series Playlist
• (UPDATED check descrip...
#identityserver4 #csharp

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

 

26 сен 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 109   
@feelingeverfine
@feelingeverfine 2 года назад
No
@andreikashin
@andreikashin 2 года назад
spoiler alert
@coleworld3061
@coleworld3061 2 года назад
Thank you … not introducing unnecessary complexity into the stack is a skill I’m trying to improve. All the tools … All the shiny things
@RawCoding
@RawCoding 2 года назад
Not all that shines is gold...
@fieryscorpion
@fieryscorpion 2 года назад
This is great video. I needed some guidance in its use cases. I'll watch it again to fully absorb it. Since I'm a visual person, can you please create videos like this using some diagrams? Diagrams would be immensely helpful in understanding topics like this. Thank you!
@AhmedMohammed23
@AhmedMohammed23 2 года назад
is he dancing i feel like he is dancing 😅😅
@RawCoding
@RawCoding 2 года назад
it's hard not to dance when I stand
@AhmedMohammed23
@AhmedMohammed23 2 года назад
@@RawCoding i feel you most people tell me to stop moving or set down when i'm talking to them because i keep moving in place
@iri5621
@iri5621 Год назад
Jeez, finally a simple explanation of this holly mess of auth options! You helped me a lot to make make an informed decision on what I actually need for my app
@RawCoding
@RawCoding Год назад
Glad you liked it, if you want more auth videos check out my recent playlist
@shucaybmili
@shucaybmili 2 года назад
thanks, you've just talked about my frustrations, thanks for clarifying it
@cicpolk
@cicpolk Год назад
Really useful explanation Anton. Thanks!
@rade6063
@rade6063 2 года назад
Nice to see your videos again
@hendrik2765
@hendrik2765 2 года назад
Nice to see you again, have to join the streams again ^^
@RawCoding
@RawCoding 2 года назад
Hey man, you’re always welcome )
@anurag3487
@anurag3487 2 года назад
its good to see you posting regularly. As always great content, very informative.
@frankhaugen
@frankhaugen Год назад
"need identity server" and "need an identity server" is quite confusing, as Identity Server is a product, but have a service/server for managing identity is a good idea always as it can be given it's own infrastructure that is more resilient and secure than the rest of your application, so even if you are doing simple email and a password hash for authentication, this should be compartmentalized and regardless of what technology you are doing authentication with
@brandonpearman9218
@brandonpearman9218 2 года назад
I dont understand why this type of thinking is not more common in software development. Everyone always says "it depends" but never says what it depends on, they never seem to expand on why you should not use something.
@dilankabc
@dilankabc 2 года назад
Great Explanation!!! Thank you
@robertroxxor
@robertroxxor Год назад
great. spent a full day researching and copy-pasting tutorial code, repeatedly asking myself "do i even need this". i'm deving a spa app with a single database backend and probably some rest api in the future. guess this falls into the "no" category. thanks for this video :)
@RawCoding
@RawCoding Год назад
Exactly glad I could spare the pain
@gerarduab9960
@gerarduab9960 2 года назад
In my point of view. I think that the problem comes from net. I think there aren't a simple solution in order to implement a sso into spa and the team of Microsoft have to do more effort. No I don't need a identity server but what other settings exists in order to have a secure jwt into a web app with sso?
@algarud
@algarud 2 года назад
Хорошо разложил. Жопа на стене тоже хорошая.
@RawCoding
@RawCoding 2 года назад
Жопа вообще лучшая
@michaelsniknejs6326
@michaelsniknejs6326 Год назад
Great video, thanks for making it :) Btw what country is your accent from?
@IndieBeto
@IndieBeto 2 года назад
Damn, you got a new camera man? Looks dope. Been missing hanging on with you on twitch though. Cheers!
@RawCoding
@RawCoding 2 года назад
Thank you, I'll stream more been busy with the course
@lukedjuuuu
@lukedjuuuu 2 года назад
this is gold
@RawCoding
@RawCoding 2 года назад
Ta
@kevinwang3674
@kevinwang3674 2 года назад
bro, i like your wall😆
@huzzah4139
@huzzah4139 2 года назад
Thank you, this is exactly what I needed! I just have a question regarding sso for multiple apps in different subdomains. The apps are owned and developed by the same company, they are under the same domain but different subdomains. You mentioned that since it's not cut by domain its easy to implement sso without IdentityServer. Could you share how that could be done? Every solution I came up seemed like it involved a lot of custom implementation and I was wondering if I missed something.
@RawCoding
@RawCoding 2 года назад
1) share data protection key's between identity and other apps: docs.microsoft.com/en-us/aspnet/core/security/data-protection/configuration/overview?view=aspnetcore-6.0#setapplicationname 2) issue cookie to main domain on identity broker component services.ConfigureApplicationCookie(o => { o.Cookie.Name = "cookiename"; o.Cookie.Domain = ".mydomain.com"; }); 3) configure to accept said cookie on the app side services.AddAuthentication("anything") .AddCookie("anything", options => { options.Cookie.Name ="cookiename"; });
@huzzah4139
@huzzah4139 2 года назад
Thanks!
@alperyesilyurt3374
@alperyesilyurt3374 2 года назад
@@RawCoding This explanation is great. With simple cookie configuration it is possible to obtain sso easily under such a scenario
@КостяБондаренко-м8в
Instant like for dancing
@RawCoding
@RawCoding 2 года назад
pasib
@marna_li
@marna_li Год назад
Unless you need go be a fancy Auth Provider that store your own data, then you don’t need one. Identity Server is hard to wrap your head around since there are so many use case mainly for bigger applications.
@RawCoding
@RawCoding Год назад
Exactly
@Folsets
@Folsets 2 года назад
Hello, I'm happy to see you
@prathameshshende4
@prathameshshende4 2 года назад
Can you provide sso without indentity server examples video?
@ebrahimalkadim7551
@ebrahimalkadim7551 2 года назад
IMHO I think it would be perfect to use if you have multiple clients(e.g. Bank with multiple branches, e.g. Assume you own Google or Facebook ,etc xD), otherwise no need to add more complexity to your project,
@RawCoding
@RawCoding 2 года назад
Exactly
@blankhh7797
@blankhh7797 2 года назад
Openiddict is another option. it's free OpenID Connect server library
@RawCoding
@RawCoding 2 года назад
tisis
@diegomelgar2696
@diegomelgar2696 Год назад
Hi, What about solutions where you have one frontend and multiple backend services that this frontend consumes in which every service requires a user to be authenticated? Frontend X make requests to: Service A: Authenticating users and managing roles and permissions. (Authentication can be database, azure AD, etc.) Management of roles and permissions is custom Service B: Products service (only authenticated users from Service A can access) Service C: Orders service (only authenticated users from Service A can access) Service C communicates with Service B (validating product stock, etc.), so Firewall infrastructure can be suitable instead of client credentials flow. So, would I need Identity server for this scenario? If no, what can we use/do in such scenario?
@Programmer777
@Programmer777 3 месяца назад
What about csrf attack?
@maxamundsen
@maxamundsen Год назад
Thanks to these videos I finally ACTUALLY understand how auth flow is supposed to work. About 3 years ago I thought it was as simple as sending post requests, hashing passwords, then sending back a session cookie (all done manually in poorly written PHP). I now understand when and why you should use certain levels of auth management and how to properly implement it (or when you shouldn't).
@weifengmao
@weifengmao 2 года назад
The recent trend especially with ID5 is to move away from client side jwt due to token exfiltration and use server side cookie when possible.
@RawCoding
@RawCoding 2 года назад
yesir
@paulo_pastore
@paulo_pastore 2 года назад
what about using jwt token in cookies in a secure mode as I know it is the safest approach
@RawCoding
@RawCoding 2 года назад
That works
@TheAzerue
@TheAzerue 2 года назад
Hi Great video. Just one question. If i have 3 services in .Net, Java and python. And Java and python need to validate jwt produced by .Net. Then do i need Identity server 4 as it can get public certificate from {domain-name}/.well-known/openid-configuration/jwks and can validate token or we implement our self. What are your thoughts on this
@RawCoding
@RawCoding 2 года назад
Well you got the public key, you got the algo in the jwt header, slap the 2 together against the token and you should be able to validate it.
@shahzeb5130
@shahzeb5130 2 года назад
i started your authentication and authorization series. i still didn't got what is the best case to use identity server 4. Just wondering have you correctly use in one your series
@RawCoding
@RawCoding 2 года назад
when clients have a many to many relationships with the api's or your application is being extended by other apps.
@Tymonello
@Tymonello Год назад
So if I have a WebAPI and Blazor ServerSide application, and only the frontend is public, I can use only .NET Identity for user authentication and that's it? Because the frontend fill communicate with API through local network only.
@RawCoding
@RawCoding Год назад
Exactly, David fowler has an example that shows how to do it with JWT tokens, and it’s way too complex you don’t need it. Service to service just use firewall
@Tymonello
@Tymonello Год назад
@@RawCoding ok thanks!
@youseff1015
@youseff1015 2 года назад
Omg thank you, please explain this more.. if you Google API authentication, jwt pops up. my question is, if we are using jwt do we need refresh tokens? Do we write our own implementation of refresh tokens? Writing refresh token implementation is fishy because everyone implements it differently and I don't know what to believe anymore
@youseff1015
@youseff1015 2 года назад
So my thinking be like : if refresh token implementation is not very clear, then we use identify server to do it for us ! Right? Wrong according to what you said Then we just implement our own fishy refresh token implementation?
@RawCoding
@RawCoding 2 года назад
If you are using JWT, you do not need a refresh token. datatracker.ietf.org/doc/html/rfc6749#section-1.5 > Issuing a refresh token is optional at the discretion of the authorization server. If the authorization server issues a refresh token, it is included when issuing an access token > A refresh token is a string representing the authorization granted to the client by the resource owner. The string is usually opaque to the client. The token denotes an identifier used to retrieve the authorization information. Unlike access tokens, refresh tokens are intended for use only with authorization servers and are never sent to resource servers. a refresh token is a string with an expiry value in the database.
@youseff1015
@youseff1015 2 года назад
@@RawCoding thanks for response, if I'm not using refresh token instead long lived JWT and someone changes their password, how do I invalidate their active session with the old password?
@RawCoding
@RawCoding 2 года назад
A database record of jwt which you invalidate if password is changed, or a hash claim based on the user password hash, if that changes token becomes invalid.
@AdamCiszewski
@AdamCiszewski 2 года назад
The life of IS4 support seems to be running out. IS5 is a paid solution. Do you see any alternative of a similar format? Azure B2C? Auth0?
@RawCoding
@RawCoding 2 года назад
Did you not watch the video? It’s free while you earn less than a mil
@AzaKyd
@AzaKyd 2 года назад
How are you? We missed you.
@RawCoding
@RawCoding 2 года назад
Thank you
@Mo-ef9yt
@Mo-ef9yt 2 года назад
I have an web api backend and blazor server on frontend. I have used jwt which works fine. However due to having blazor server at frontend it is impossible for me to have jwt refresh token working on the blazor server. If I had chosen identity server I wouldn't be in t this situation.
@diligencehumility6971
@diligencehumility6971 2 года назад
When you talk about Identity Server, do you mean the one from duende software? Or just the regular Identity Core library?
@samettt54
@samettt54 2 года назад
Around 04:10 he says "Asp .Net Core has its own jwt management API you dont need Identity Server" something along these lines. So I believe he talks about Identity Server from duende when he says Identity Server and he started his speech calling it "Identity Server 4"
@YashwantMestry
@YashwantMestry 2 года назад
What about sticky sessions problem with Cookie authentication. If we scale up application then cookie auth creates problem. Because session data stored on one server and problem comes client request passed to other server.
@RawCoding
@RawCoding 2 года назад
Cookies are stateless
@paulo_pastore
@paulo_pastore 2 года назад
@@RawCoding what is the difference between stateless cookies from jwt tokens?
@RawCoding
@RawCoding 2 года назад
Cookies get handled automatically by the browser.
@Themicke90able
@Themicke90able Год назад
it's like walking into a tech store. Do i need to buy this thing? No! Am i GOING to buy this thing? Yepp! So what has I learned? That I am going to use IDP. Not because I need it, but because i want it. So weak minded...
@Дима-ч3у3х
@Дима-ч3у3х 2 года назад
Thank you! I have a question. I need to implement microservices app(back-end). I also have angular app(front-end). And i need to authenticate and authorize users. My mentor says me, that i need to implement authentication logic using IS4. But i dont see any sence to do that. My application will not allows third party application be integrated. How should i implemet authentication and authorization logic? (I want to use JWT)
@RawCoding
@RawCoding 2 года назад
Create a jwt token and return it in a header or body.
@TheRockbio
@TheRockbio 2 года назад
Can you do a series on cookie authentication with webapi and spa?
@joehernandez3231
@joehernandez3231 2 года назад
I was wondering if maybe he's done one already and would link to it in the video. And include a mobile app too. It would be great to see these pieces without IdentityServer because I too came to believe that as soon as you throw in web api and some client then you need some dedicated identity provider.
@RawCoding
@RawCoding 2 года назад
authentication series from cookie to identity server ru-vid.com/group/PLOeFnOV9YBa7dnrjpOG6lMpcyd7Wn7E8V
@RawCoding
@RawCoding 2 года назад
otherwise you do: fetch("/login", { method: 'POST', body: JSON.stringify({u:"username", p:"password"})})
@TheRockbio
@TheRockbio 2 года назад
The problem is everywhere I worked they have spa and webapi are on different domain. Therefore do not know how cookie would ever work from webapi, as they except it to be stateless.
@RawCoding
@RawCoding 2 года назад
Cookie is just a value in the header ;)
@matej254sk
@matej254sk 2 года назад
Add dentityServer just in case :D
@adamc1694
@adamc1694 2 года назад
Azure has out of the box OAuth solution.
@AzizjanAyupov_leo
@AzizjanAyupov_leo 7 месяцев назад
are you alive dude? do we need to make a standalone api microservice for authantication ?
@RawCoding
@RawCoding 7 месяцев назад
Yea, and whats a microservice?
@AzizjanAyupov_leo
@AzizjanAyupov_leo 7 месяцев назад
@@RawCoding I wanna create a .net web api microservice for authorization purposes. But I don't know how to make it properly using public key and asymmetric algorythm
@RawCoding
@RawCoding 7 месяцев назад
Sounds like you have a lot of learning to do!
@AzizjanAyupov_leo
@AzizjanAyupov_leo 7 месяцев назад
@@RawCoding maybe... Gonna teach me?
@mikhailslinko632
@mikhailslinko632 2 года назад
I'm only sure that the subtitles you don't write will help a lot of people.
@xxyxungxxraimexx7242
@xxyxungxxraimexx7242 2 года назад
Anton cool dawg 🦾🥰
@lflewwelling2
@lflewwelling2 Год назад
Ok, so how do I get rid of my Identity Server? lol
@RawCoding
@RawCoding Год назад
RIP
@clearlyunwell
@clearlyunwell 2 года назад
👍🏽
@cocoscacao6102
@cocoscacao6102 2 года назад
Well, if *your* company needs an identity server, I think it is safe to say that at that point, you'll have a security expert employee, so *you* don't need to learn identity server 😉 On a more serious note, those videos helped me a quite a bit, since a lot of the things apply to the Azure's identity framework, which probably uses identity server in the background.
@RawCoding
@RawCoding 2 года назад
> I think it is safe to say that at that point, you'll have a security expert employee couldn't be further from the truth, unfortunately.
@cocoscacao6102
@cocoscacao6102 2 года назад
@@RawCoding Then I assume that's how you've learned it. Thrown into the fire eh?
@stanleysane7160
@stanleysane7160 2 года назад
Am I only see C# Rap Stand-up?..
@oladipotimothy6007
@oladipotimothy6007 2 года назад
10 minutes stand up
@codewkarim
@codewkarim 2 года назад
Nice video, nicer wall tag!
@RawCoding
@RawCoding 2 года назад
Cheers)
@dmtuan
@dmtuan 2 года назад
Very useful summary!
@RawCoding
@RawCoding 2 года назад
Thank you
@mateuszfryc48
@mateuszfryc48 Год назад
I got to say I almost got sea seek from watching how you rock left and right almost as if on the boat. Did any one tried to put some rap music to your videos? Otherwise great explanation, thank you so much.
@allinvanguard
@allinvanguard 2 года назад
I like this new format, happy to see you uploading regularily again! Couldn't agree more on the content
@dariuszlenartowicz
@dariuszlenartowicz Год назад
Thank you!!!
Далее
What you should know about Threads in .NET
14:52
Просмотров 7 тыс.
Это ваши Патрики ?
00:33
Просмотров 28 тыс.
Avaz Oxun - Turqi sovuq kal
14:50
Просмотров 828 тыс.
ASP.NET Core Authorization  (.NET 7 Minimal Apis C#)
21:31
What Authentication System Should I Use For My App?
20:41
The Only Database Abstraction You Need | Prime Reacts
21:42
Turns out REST APIs weren't the answer (and that's OK!)
10:38
Kerberos Authentication Explained | A deep dive
16:52
Просмотров 344 тыс.