Тёмный

JWT Authentication Explained 

Matt on Data Science
Подписаться 3,5 тыс.
Просмотров 26 тыс.
50% 1

Here I use a simple metaphor to teach JSON Web Token (JWT) authentication and authorization.

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

 

29 сен 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 103   
@MattEland
@MattEland Год назад
This is also available in written form on my blog: newdevsguide.com/2022/11/12/json-web-tokens-simplified/
@Private-GtngxNMBKvYzXyPq
@Private-GtngxNMBKvYzXyPq 10 месяцев назад
Cyber security tip: don’t show your real identity card or badge online. Respectfully suggested.
@harithabandara3212
@harithabandara3212 4 месяца назад
Thank you❤
@EmersonMorton-e3b
@EmersonMorton-e3b 12 дней назад
Elena Square
@MatthewMiller-hk7kw
@MatthewMiller-hk7kw 5 месяцев назад
Single handedly the best explanation I've ever gotten over this!
@MattEland
@MattEland 4 месяца назад
Thanks! It's just a very well-suited metaphor.
@ChinchillaDave
@ChinchillaDave 8 месяцев назад
JWT equals hotel key card. Brilliant, thank you! Both require upfront verification once but permit use of the token in subsequent interactions as a replacement, for a certain time period and subject to further rules and limitations. So good!
@schwartztutoring
@schwartztutoring 4 месяца назад
Great analogy!
@reeseovine
@reeseovine 2 месяца назад
i've understood this pretty well for the most part, but the part that confuses me is what if a JWT gets "lost" like a keycard very easily could? anyone who picks it up could access otherwise restricted areas in theory. surely there must be something preventing something this from happening with JWTs?
@MattEland
@MattEland 2 месяца назад
Yes, if a JWT is intercepted it can be used before its expiry. This is why we have an expiration time and date. We rely primarily on transport layer security encrypting the headers to secure our JWTs. Keep in mind that even if you have a valid JWT that JWT will likely only be useful for interacting with some resources so you need to have the JWT and know which URLs it should go to - similar to finding a key card in the lobby of a hotel grants you access to a room, but you're not sure which one. Some systems also offer ways of invalidating JWTs known to be lost or compromised, such as when employees are let go, but this is not required.
@jpkeys6000
@jpkeys6000 2 месяца назад
This metaphor is great. Thank you Matt!
@muratkaradas1483
@muratkaradas1483 Год назад
I really loved the example you used in this video. Thank you for explaining it in such a clear and relatable way 👍
@MattEland
@MattEland Год назад
Thanks for the kind words!
@BruceChan-du4uf
@BruceChan-du4uf 3 месяца назад
very good explanation
@123pencilboy
@123pencilboy 17 часов назад
Thank you so much, I understand the concept now!
@MariaThompson-d7y
@MariaThompson-d7y 21 час назад
Hall Maria Lopez Donald Robinson John
@walkwithusuf82
@walkwithusuf82 7 месяцев назад
Brilliant explanation
@emma_promise_smartnbc4331
@emma_promise_smartnbc4331 7 месяцев назад
Thanks
@PhilBrito-w3l
@PhilBrito-w3l 12 дней назад
White Joseph Thompson Elizabeth Harris Daniel
@AntoinetteSusie-r3m
@AntoinetteSusie-r3m 17 дней назад
Young Kimberly Anderson Mark Brown Mark
@aashishpaudel6822
@aashishpaudel6822 4 месяца назад
loved the metaphor, best one I heard so far in this topic
@omotosoiyanu1767
@omotosoiyanu1767 6 месяцев назад
I’ve have been watching videos and reading articles on JWT for some time now and I still find myself going back to another article to understand even the basics but after watching this I don’t think I will ever go back to watching a video on just the basic understanding of JWT again … Thank you very much
@EtanRowleS
@EtanRowleS 8 дней назад
Davis Richard Harris Jason Thomas Matthew
@ariannaflannagan9820
@ariannaflannagan9820 14 дней назад
Taylor Betty Perez Karen Williams Edward
@GlendaPhillips-f8r
@GlendaPhillips-f8r 9 дней назад
Brown Jason Harris Kevin Williams Steven
@LanBothan
@LanBothan 11 дней назад
Hernandez Kenneth Taylor Kimberly Brown Helen
@GaryJackson-q7w
@GaryJackson-q7w 10 дней назад
Garcia Sharon Williams Melissa Martin Cynthia
@FredMyrna-x2f
@FredMyrna-x2f 23 дня назад
Robinson James Allen Frank Clark Betty
@ThackerayAudrey-j5g
@ThackerayAudrey-j5g 16 дней назад
Taylor Nancy Brown Paul Thompson Mark
@DollyCleveland-l1f
@DollyCleveland-l1f 24 дня назад
Martinez Barbara Williams Jason Moore Kenneth
@arnoldkeatase8584
@arnoldkeatase8584 7 дней назад
Jones Mark Brown Scott Harris Karen
@AntonioHowland
@AntonioHowland 7 дней назад
Lopez Larry Clark Melissa Harris Eric
@NelsonLambert-e4u
@NelsonLambert-e4u 27 дней назад
White Michael White Jessica Harris Edward
@ethansehodges2656
@ethansehodges2656 14 дней назад
Smith Edward Hall Scott Moore Carol
@paulmittelstaedt6970
@paulmittelstaedt6970 11 месяцев назад
this vieo is just perfect
@MattEland
@MattEland 11 месяцев назад
Glad it helped! Enjoy the journey
@BenjaminKennedy-m8m
@BenjaminKennedy-m8m 14 дней назад
Taylor John Moore Sharon Garcia Ruth
@CodeWithJude
@CodeWithJude Год назад
Great analogy to teach the concept of JWT authentication!
@RuthKing-h3b
@RuthKing-h3b 22 дня назад
Martin Sarah Davis William Walker Laura
@1337ArMaAa
@1337ArMaAa 4 месяца назад
Perfectly explained, thank you so much!
@TheJasonTorres
@TheJasonTorres 2 месяца назад
This breakdown was my lightbulb moment thank you
@SumonaYesnin-y3y
@SumonaYesnin-y3y 25 дней назад
Martinez Carol Harris Lisa Perez George
@TamaraPWork
@TamaraPWork 3 месяца назад
amazing explanation, thank you!
@HicksHoover-y2u
@HicksHoover-y2u 5 дней назад
Quigley Landing
@poriaasadipour
@poriaasadipour 5 месяцев назад
Thank you very much sir!
@nanakwasi7690
@nanakwasi7690 Год назад
Glad you could help me understand JWT better. Thanks
@tanveeransari989
@tanveeransari989 15 дней назад
Awesome analogy 🎉
@LewisFeldhaus-n8o
@LewisFeldhaus-n8o 17 дней назад
Treutel Mountains
@KatrineParker-k8f
@KatrineParker-k8f 5 дней назад
Heaney Station
@ZangwillKing-x6m
@ZangwillKing-x6m 9 дней назад
Hirthe Brooks
@hlpires101
@hlpires101 7 месяцев назад
hey this explanation was insane thx
@more-uv4nl
@more-uv4nl 21 день назад
thanks alot Sir !
@ClemensVenus-j3j
@ClemensVenus-j3j 13 дней назад
Guido Shoals
@MrMarcoAlvarado
@MrMarcoAlvarado 11 месяцев назад
I think what is hard to understand, is that you do not need the secret key for the server side validation of the token, if I'm right. Otherwise there would be no difference to using session.
@MattEland
@MattEland 11 месяцев назад
Correct. The only one who has the secret key is the server who signs the JWT.
@JerryVincent-o5e
@JerryVincent-o5e 11 дней назад
Sadie Track
@VasilikiBartleson-b2m
@VasilikiBartleson-b2m 22 дня назад
Murphy Place
@John-eq5cd
@John-eq5cd Год назад
A good analogy, thanks. From what I understand a valid jwt sent by the user's browser allows access to various restricted web pages on an app. Therefore, if the jwt is stolen somehow then the thief will also have access. How likely is this and will possession allow full access without any other checks on the user?
@MattEland
@MattEland Год назад
JWTs are intended to be private and secure. In the case that a JWT is somehow compromised, it is still valid until its expiry date, unless the server does some additional checks beyond validating that a JWT was signed by itself. In an absolute emergency, the server's signing key could be changed, but this would effectively invalidate ALL issued JWTs.
@VioletRuth-t4r
@VioletRuth-t4r 10 дней назад
Claude Plaza
@overrevvv
@overrevvv 11 месяцев назад
Thank you so much for being on youtube and this video.
@grampro8572
@grampro8572 Год назад
Very nice explanation
@MattEland
@MattEland Год назад
Thank you very much! I frequently find myself sharing this one with students curious about careers in data, so I'm glad it helped!
@WaltonValentine-i4s
@WaltonValentine-i4s 19 дней назад
Walter Roads
@MarciaMezza-y7y
@MarciaMezza-y7y 20 дней назад
Rogahn Estate
@MarySmith-j3w
@MarySmith-j3w 20 дней назад
Heller Canyon
@RositaBrockington-v9i
@RositaBrockington-v9i 15 дней назад
Keegan Plain
@ianpropst-campbell6028
@ianpropst-campbell6028 Год назад
This was actually a really helpful analogy. thank you for sharing!
@CorneliusKipkorir-c4e
@CorneliusKipkorir-c4e Год назад
This is really a very interesting content
@ConnorMerle-p6d
@ConnorMerle-p6d 25 дней назад
Bode Station
@GerryRodrguez-v3h
@GerryRodrguez-v3h 28 дней назад
Randal Avenue
@RogerMartha-e6s
@RogerMartha-e6s 15 дней назад
Coty Club
@AlexFirsikoff
@AlexFirsikoff Год назад
Great explanation, thanks a lot!
@MattEland
@MattEland Год назад
Happy to help! This explanation helps a lot of my students and I'm happy to share.
@mikes.2336
@mikes.2336 Год назад
Thank you! The analogies really helped!
@MaggieNicole-e4g
@MaggieNicole-e4g 9 дней назад
Beier Springs
@yx1566
@yx1566 Год назад
thank you so much for this explantion! I searched JWT today since I keep forgeting how JWT works, after watching your video i think i will never forget it
@MattEland
@MattEland Год назад
Glad to hear it!
@LeonAbraham-m8w
@LeonAbraham-m8w 8 дней назад
Labadie Crest
@packtrouble6270
@packtrouble6270 11 месяцев назад
I would say this is probably the best explanation I have seen.
@MattEland
@MattEland 11 месяцев назад
Thank you! I believe it came about from traveling to speak at conferences around the same time I taught my students JWT authentication.
@Iron_spider99
@Iron_spider99 9 месяцев назад
Pronouncing JWT as one word instead of saying their individual letters should be a war crime.
@MattEland
@MattEland 9 месяцев назад
You should check the JWT specification. It describes how to pronounce it.
@Iron_spider99
@Iron_spider99 9 месяцев назад
@@MattEland blasphemy
@onedev7316
@onedev7316 Год назад
thanks for the explanation. can you please do a video on User Impersonation using Identity/JWT with an example in .NET. I am unable to understand how this going to work when token is generated already. Sorry if question is dumb.
@MattEland
@MattEland Год назад
It's not a dumb question. It's not fully in my typical set of content I produce, but I'll add a backlog item for that. Can't predict when or if I'll get to it, though. You'd likely be best searching for creators who specialize in asp.net configuration and security.
@Netz0
@Netz0 Год назад
The answer to your question is that JWT's tokens are for authorization, not for authentication, different things. It just tells you when a request is authorized on a server or application, but not who or what is doing the request. You need to combine it with another authentication form that checks the user to avoid impersonation.
@PeterTurnerBexley12
@PeterTurnerBexley12 Год назад
Thank you - that was invaluable !
@MattEland
@MattEland Год назад
No worries. JWTs can be very confusing!
@iraisvalenzuela6147
@iraisvalenzuela6147 9 месяцев назад
Great explanation! Thank you!
@MattEland
@MattEland 9 месяцев назад
Glad it was helpful!
@augustinekirumba4304
@augustinekirumba4304 Год назад
Thanks for the examples, helped understand better
@MattEland
@MattEland Год назад
Glad it helped!
@PP-ow1xy
@PP-ow1xy Год назад
thank you so much for this very smart analogy Matt! you certainly made a difference to my understanding and you got yourself (at least) one more subscriber (as I am going to share this video with my bootcamp's cohort).
@MattEland
@MattEland Год назад
That's fantastic! I built this in-part for my bootcamp students as well, so happy to help others.
@PP-ow1xy
@PP-ow1xy Год назад
@@MattEland it's nice you want to pass knowledge whichever way you can. Kudos Mat! Best Regards Panagiotis (linkedin)
@neameh.karineh
@neameh.karineh Год назад
Thanks a lot. It was helpful for me.
@MattEland
@MattEland Год назад
Fantastic! Sometimes the right metaphor can do wonders.
@maziatr
@maziatr 3 месяца назад
JWT is used for Authorisation, not Authentication
@MattEland
@MattEland 3 месяца назад
Very good! Keep going on your learning journey, you're making great progress!
@maziatr
@maziatr 3 месяца назад
@@MattEland You too. Perhaps one day you will find out the difference between the two.
@MattEland
@MattEland 3 месяца назад
@maziatr I don't understand, either I knew already or you told me just now for the first time. In either of those scenarios, I'd know, right? Also, you seem like a hostile person and I wish you well, but I'll leave you on your journey from here.
@MatthewCarpino-o5z
@MatthewCarpino-o5z 25 дней назад
Klocko Mall
Далее
ID Tokens VS Access Tokens: What's the Difference?
8:38
ДЕНЬ УЧИТЕЛЯ В ШКОЛЕ
01:00
Просмотров 1,6 млн
What Is JWT and Why Should You Use JWT
14:53
Просмотров 1,2 млн
Cracking JSON Web Tokens
14:34
Просмотров 57 тыс.
Что такое JWT и как его создать
14:32
Why is JWT popular?
5:14
Просмотров 319 тыс.
#35 What is JWT and Why
14:47
Просмотров 16 тыс.
Session Vs JWT: The Differences You May Not Know!
7:00
Session vs Token Authentication in 100 Seconds
2:18
JWT token vs Server Tokens
10:25
Просмотров 32 тыс.
ДЕНЬ УЧИТЕЛЯ В ШКОЛЕ
01:00
Просмотров 1,6 млн