Do you need IdentityServer?

  Рет қаралды 28,553

Raw Coding

Raw Coding

Күн бұрын

Пікірлер: 109
@feelingeverfine
@feelingeverfine 2 жыл бұрын
No
@andreikashin
@andreikashin 2 жыл бұрын
spoiler alert
@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).
@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
@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!
@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!
@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
@hendrik2765
@hendrik2765 2 жыл бұрын
Nice to see you again, have to join the streams again ^^
@RawCoding
@RawCoding 2 жыл бұрын
Hey man, you’re always welcome )
@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.
@robertroxxor
@robertroxxor 2 жыл бұрын
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 2 жыл бұрын
Exactly glad I could spare the pain
@anurag3487
@anurag3487 2 жыл бұрын
its good to see you posting regularly. As always great content, very informative.
@rade6063
@rade6063 2 жыл бұрын
Nice to see your videos again
@dmtuan
@dmtuan 2 жыл бұрын
Very useful summary!
@RawCoding
@RawCoding 2 жыл бұрын
Thank you
@allinvanguard
@allinvanguard 2 жыл бұрын
I like this new format, happy to see you uploading regularily again! Couldn't agree more on the content
@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?
@codewkarim
@codewkarim 2 жыл бұрын
Nice video, nicer wall tag!
@RawCoding
@RawCoding 2 жыл бұрын
Cheers)
@dilankabc
@dilankabc 2 жыл бұрын
Great Explanation!!! Thank you
@michaelsniknejs6326
@michaelsniknejs6326 Жыл бұрын
Great video, thanks for making it :) Btw what country is your accent from?
@marna_li
@marna_li 2 жыл бұрын
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 2 жыл бұрын
Exactly
@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
@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?
@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
@dariuszlenartowicz
@dariuszlenartowicz Жыл бұрын
Thank you!!!
@kevinwang3674
@kevinwang3674 2 жыл бұрын
bro, i like your wall😆
@Folsets
@Folsets 2 жыл бұрын
Hello, I'm happy to see you
@Wfmike
@Wfmike 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
@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.
@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.
@blankhh7797
@blankhh7797 2 жыл бұрын
Openiddict is another option. it's free OpenID Connect server library
@RawCoding
@RawCoding 2 жыл бұрын
tisis
@lukedjuuuu
@lukedjuuuu 2 жыл бұрын
this is gold
@RawCoding
@RawCoding 2 жыл бұрын
Ta
@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
@КостяБондаренко-м8в
@КостяБондаренко-м8в 2 жыл бұрын
Instant like for dancing
@RawCoding
@RawCoding 2 жыл бұрын
pasib
@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"
@prathameshshende4
@prathameshshende4 2 жыл бұрын
Can you provide sso without indentity server examples video?
@algarud
@algarud 2 жыл бұрын
Хорошо разложил. Жопа на стене тоже хорошая.
@RawCoding
@RawCoding 2 жыл бұрын
Жопа вообще лучшая
@Programmer777
@Programmer777 5 ай бұрын
What about csrf attack?
@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.
@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!
@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
@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.
@SomeRandomDudeAF
@SomeRandomDudeAF 2 жыл бұрын
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...
@AzaKyd
@AzaKyd 2 жыл бұрын
How are you? We missed you.
@RawCoding
@RawCoding 2 жыл бұрын
Thank you
@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.
@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.
@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 kzbin.info/aero/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 ;)
@AzizjanAyupov_leo
@AzizjanAyupov_leo 9 ай бұрын
are you alive dude? do we need to make a standalone api microservice for authantication ?
@RawCoding
@RawCoding 9 ай бұрын
Yea, and whats a microservice?
@AzizjanAyupov_leo
@AzizjanAyupov_leo 9 ай бұрын
@@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 9 ай бұрын
Sounds like you have a lot of learning to do!
@AzizjanAyupov_leo
@AzizjanAyupov_leo 9 ай бұрын
@@RawCoding maybe... Gonna teach me?
@lflewwelling2
@lflewwelling2 2 жыл бұрын
Ok, so how do I get rid of my Identity Server? lol
@RawCoding
@RawCoding 2 жыл бұрын
RIP
@Дима-ч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.
@adamc1694
@adamc1694 2 жыл бұрын
Azure has out of the box OAuth solution.
@matej254sk
@matej254sk 2 жыл бұрын
Add dentityServer just in case :D
@mikhailslinko632
@mikhailslinko632 2 жыл бұрын
I'm only sure that the subtitles you don't write will help a lot of people.
@stanleysane7160
@stanleysane7160 2 жыл бұрын
Am I only see C# Rap Stand-up?..
@xxyxungxxraimexx7242
@xxyxungxxraimexx7242 2 жыл бұрын
Anton cool dawg 🦾🥰
@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?
@oladipotimothy6007
@oladipotimothy6007 2 жыл бұрын
10 minutes stand up
128. What Authentication System Should I Use For My App?
20:41
IAmTimCorey
Рет қаралды 71 М.
Dependency injection fundamentals in C# - DI vs IoC vs DIP
13:30
Amichai Mantinband
Рет қаралды 41 М.
From Small To Giant 0%🍫 VS 100%🍫 #katebrush #shorts #gummy
00:19
SIZE DOESN’T MATTER @benjaminjiujitsu
00:46
Natan por Aí
Рет қаралды 3,1 МЛН
How To Choose Mac N Cheese Date Night.. 🧀
00:58
Jojo Sim
Рет қаралды 97 МЛН
Implementing JWT Authentication in ASP.NET Core
23:51
Nick Chapsas
Рет қаралды 41 М.
You are doing .NET logging wrong. Let's fix it
25:29
Nick Chapsas
Рет қаралды 174 М.
What you should know about Threads in .NET
14:52
Raw Coding
Рет қаралды 7 М.
ASP.NET Core Authorization  (.NET 7 Minimal Apis C#)
21:31
Raw Coding
Рет қаралды 39 М.
The Value of Source Code
17:46
Philomatics
Рет қаралды 203 М.
OAuth 2.0 & 2.1 Explained
39:59
Raw Coding
Рет қаралды 26 М.
Kerberos Authentication Explained | A deep dive
16:52
Destination Certification
Рет қаралды 357 М.
From Small To Giant 0%🍫 VS 100%🍫 #katebrush #shorts #gummy
00:19