- Видео 19
- Просмотров 250 479
Sascha Preibisch
Канада
Добавлен 30 янв 2016
My videos are about my professional interests in the identity space. Currently that means OAuth, as a protocol, and Loginbuddy, my open source project.
I have been working in the identity space since around 2012. I try to explain complex technologies in a simple to understand and easy follow manor.
As a result of my work I published a book about API Development. That book can be found on Amazon and on my publishers website, Apress: www.apress.com/gp/book/9781484241394.
My open source project Loginbuddy simplifies the integration of social login into web projects. Please find that here: github.com/SaschaZeGerman/loginbuddy.
Here are some other resources that may be useful to you:
- Identity blog posts: oauth.blog
- RESTApi Tutorial: restapitutorial.com
Since many people seem to care, I do not care about race or skin color or religion or citizenship.
If you find my videos helpful for you: www.buymeacoffee.com/saschazegerman
I have been working in the identity space since around 2012. I try to explain complex technologies in a simple to understand and easy follow manor.
As a result of my work I published a book about API Development. That book can be found on Amazon and on my publishers website, Apress: www.apress.com/gp/book/9781484241394.
My open source project Loginbuddy simplifies the integration of social login into web projects. Please find that here: github.com/SaschaZeGerman/loginbuddy.
Here are some other resources that may be useful to you:
- Identity blog posts: oauth.blog
- RESTApi Tutorial: restapitutorial.com
Since many people seem to care, I do not care about race or skin color or religion or citizenship.
If you find my videos helpful for you: www.buymeacoffee.com/saschazegerman
OAuth 2.0 - Rich Authorization Requests (RAR)
This is an introduction to OAuth 2.0 Rich Authorization Requests (RAR). This is an addition to OAuth 2.0 found in RFC 9396.
Whenever there is a use case that requires detailed permissions from resource owners (users) and OAuth SCOPEs are not sufficient, this extension can be considered.
After watching this video it should be possible for developers to understand how this extension works and how it could be useful.
As always, please leave a comment with questions, thoughts, or ideas for future videos.
And please remember that you can also leave comments in German as that is my native language.
Whenever there is a use case that requires detailed permissions from resource owners (users) and OAuth SCOPEs are not sufficient, this extension can be considered.
After watching this video it should be possible for developers to understand how this extension works and how it could be useful.
As always, please leave a comment with questions, thoughts, or ideas for future videos.
And please remember that you can also leave comments in German as that is my native language.
Просмотров: 328
Видео
OAuth 2.0 - Demonstrate Proof-of-Possession
Просмотров 1,5 тыс.9 месяцев назад
Demonstrate Proof-of-Possession (DPoP) is an extension to OAuth 2.0 that supports sender constraint token. This extension prevents leaked token from being usable by fraudulent clients (relying parties). This video concentrates on how to update a relying party in order to take advantage of it.
FIDO2 - Passkeys
Просмотров 3,2 тыс.Год назад
This video provides an introduction to FIDO2 Passkeys. It highlights differences between common FIDO2 based authentications and FIDO Passkeys. Please be aware that the content is based on my knowledge as of November 2022 and may needs to be updated in the future. The Fido Alliance is still finalizing the details. The content is based on a talk that I gave at a Vancouver Digital Identity Meetup ...
OAuth 2.0 - Token Exchange
Просмотров 12 тыс.2 года назад
In this video I am showing how the OAuth 2.0 extension RFC 8693, Token Exchange, works and how it may be used. The RFC is an extension as it allows a client to exchange one type of token for another. Typical use cases would be to exchange an external facing token for an internal facing token or a token issued for one domain being exchanged for a token of a different domain. In this video I am r...
OAuth 2.0 - OAuth vs. LDAP
Просмотров 6 тыс.3 года назад
In this short video I am responding to a question that I read on Twitter, quite some time ago. But I still feel it needs to be answered. The questions was: Are you still using LDAP or OAuth? In my view that question is not valid and shows that there is still a misconception about OAuth, what it is and what it does. Hopefully, this video clarifies the relationship between those two technologies....
OpenID Connect - login_hint and prompt
Просмотров 4,1 тыс.3 года назад
This short video explains the main idea behind the OpenID Connect parameters login_hint and prompt. These parameters enable a client to influence the user journey of the authentication and authorization flow during a social login experience. Where login_hint indicates who the current user may be, prompt helps to reduce the number a screens a user is seeing during the flow. More information on t...
OAuth 2.0 - PAR, Pushed Authorization Requests
Просмотров 2,5 тыс.4 года назад
This is an introduction to an upcoming OAuth 2.0 extension called 'OAuth 2.0 Pushed Authorization Requests'. This specification is currently in draft 04 and can be found here: tools.ietf.org/html/draft-ietf-oauth-par-04. The specification adds a request to authorization flows that happens before the initial call to the /authorize endpoint. The goal of this video is create awareness so that it d...
OpenID Connect - id_token, what they are, how they work
Просмотров 11 тыс.4 года назад
In this video I am explaining how OpenID Connect id_token work and how they can be used. The video concentrates more on the usage than on all details about ways for retrieving or validate them. The video should help viewers understand the value of these token for their application. References are made to the OpenID Connect specifications (openid.net/connect), JSON Web Token (tools.ietf.org/html...
OpenID Connect - Basics
Просмотров 27 тыс.4 года назад
This video provides a very first step into OpenID Connect. It covers basics only and explains the main difference to OAuth 2.0. This should be helpful to anyone who is new to this topic. OpenID Connect is generally needed as soon as an application should not only have access to a protected resources but should also know about the current user (resource_owner). Links to start reading about it: -...
OAuth 2.0 - Grant Types and how to choose one
Просмотров 11 тыс.4 года назад
In this video I am using an image, which I call the 'OAuth-Decision-Tree', to help deciding which grant type to use for which use case. Please feel free to print out or share the image (but keep the source information). I hope it helps demystifying the OAuth 2.0 complexity!
OAuth 2.0 - Resource Owner Password Credentials (ROPC)
Просмотров 10 тыс.4 года назад
In this video I am explaining how the OAuth 2.0 ROPC flow works (often referred to as password flow). The video also talks about typical use cases. Especially on mobile devices this flow has the potential to leak user credentials. The video suggests alternatives too. This video is the last one on OAuth 2.0 grant_types, all four main grant_types have now been covered.
OAuth 2.0 - Client Credentials
Просмотров 13 тыс.4 года назад
In this video I am explaining how the OAuth 2.0 client credentials flow works (grant_type=client_credentials). The video should help understand when and when not to use this grant type. The video also explains how the request looks like and what typical use cases are.
OAuth 2.0 - Client Types
Просмотров 2,1 тыс.4 года назад
This is a video about client types in OAuth 2.0. It is very short, but since this is an important aspect in OAuth I wanted to cover it. Find the RFC definition here: RFC 6749 (tools.ietf.org/html/rfc6749#section-2.1) Knowing about client types is important for creating awareness about client limitations. For example, knowing that a client is 'public' indicates that this client cannot authentica...
OAuth 2.0 - Implicit grant and how it works
Просмотров 24 тыс.4 года назад
This video explains how the implicit flow in OAuth 2.0 works. Specifically, it compares the authorization code flow with the implicit flow indicated by response_type=token. At the end of this video the advantages and disadvantages of this flow should hopefully be known. The flow refers to RFC 6749, OAuth 2.0, section 4.2 (tools.ietf.org/html/rfc6749#section-4.2). I also speak about OAuth 2.0 in...
OAuth 2.0 - Refresh Token
Просмотров 53 тыс.4 года назад
This video explains the main use case for refresh_token. In also touches on user session management in the context of OAuth. The video is too short to explain all aspects but the viewer should get a good idea how these token work and what effect different types of expirations have. To find more information checkout these web sites and RFCs - RFC 6749 (OAuth 2.0) - RFC 7009 (Revocation) - oauth....
Loginbuddy - Quickstart with demo setup
Просмотров 1914 года назад
Loginbuddy - Quickstart with demo setup
One of the best videos I’ve seen on PKCE explanation.
well explained, thanks
u missed the Refresh Tokens
Thanks for your comment! I did not miss the refresh_token, I simply ignored it since this was about an introductory overview of this flow. In addition, there are products that allow the developer to configure if a refresh_token should be issued to its client or not. I still hope it was informative.
Hi Sacsha, just want to confirm if the documentation of the specific APIs that is being developed will specify the ways to use the grant types mentioned in this video?
Thanks for the question. In my experience you, as a developer, have to know. It usually works like this: configure the type of application (web, sp), then choose the grant_type. Most services share the supported grant_types via the well-known endpoint. For example, this is google: accounts.google.com/.well-known/openid-configuration You will find "grant_types_supported", you can choose one of those. I hope this helps
Thank you Sacscha for explaining this rarely used topic in such details, which hard to find a good content....
The best Video on PKCE till date...thank you🙏
Thank you for this :) Very good explanation
Great content and well explained, thank you!
I realize this is an old video but if you're still paying attention to comments, I am a little confused about the code verifier. Does the server know the verifier beforehand? What keeps the hacker app from sending it's own verifier code,?
Hi Matt! The verifier is generated by the client, on the fly, per authorization request. The hacker would have to be able to derive the verifier from the sha-256 hash of it. The chances are basically 0 to achieve that. For example: this is the base64 encoded hash of a short string and the chances of you figuring out what the sentence is ... probably not going to happen: yWIgwAZPNpBFshwG7lIU2KTFntFQKQ+LRebfFZrBiDQ=. This means, whatever verifier the hacker app sends, the server will use it to regenerated the sha-256 hash of it and it will not match the value that was given to the server in the beginning of the authorization flow. I hope this helps!
well explained!!
This video and the first one, was immensely helpful in understanding the concepts. Thanks for making it very informative.
Valuable Information 🎉
Excelent Presentation 💯! Would like to see a follow up with a real use-case though it is still new 😅 !!
I would be interested in setting up a fixed RefreshToken. As in case we've a sliding window, it is a never ending case, as long as somebody frequently uses the RefreshToken. All the time the RefreshToken Expiry time will again start from scratch. So where can we configure the hard fixed expiration limits? Thx.
Thank you for your question. Unfortunately, any possible configuration depends on the product you are using. So, it may not be possible at all. If this type of configuration is important for you, you may need to choose your OAuth server based on that requirement. I hope this helps.
Vielen Dank! Sehr gut erklärt. 👍
Extremely low audio..., having said that can you please make a video explaining how DPoP works with public clients (browser apps)? Thank you.
the 11:36 section "Resource Server", the orange icon in the diagram should be "Resource Server" instead of "Authorization Server". Correct?
Damn it, yes :-) Thank you
Header Payload Signature must be equal to sha-256(Base64(header)+Base 64(payload)) {abcd} {name:”Mani”} Now I will generate signature as above {efgh} {name:”Suresh”} Now I will generate signature as above, they will verify whether my signature is sha-256(Base64(header)+Base 64(payload)) or not, it will be correct , how can they assure my payload is not tampered
Hi! SHA256 is only true for algorithms that use sha256. And base46url encoding is done on the output of generated hash. Do you think you identified something that should have been explained differently?
I didn't understand at all, sh-256 itself cant be reversed why to do base 64 on hash
@@manideepkumar959 Base64url encoding transforms the hash value into a regular string which can be transferred in an http message
Good catch. Actually the OP explained that part but it is missing. comparing the calculated hash value with signature hash in the token is not enough. There is an encryption and decryption process to verify the signature. It works like this: you have a data and a public/private pair. Data is hashed end encrypted with Private key and the result is a Signature. To verify that if signature is correct: Signature is decrypted with Public key and the result should be the hash value of the data. This is the validation. In the ID token scenario, Issuer creates the signature using its Private key. To validate the signature you have to use the Public key which you can get from the jwks_url. Creating the signature works like Encryption, validating the signature works like Decryption. This detail is missing in the video. (i.stack.imgur.com/B93DO.png)
@@sonyolcu23 Thank you for your comment. But please note that your comment contains a few wrong messages. Private keys are not used for encryption, public keys are not used for decryption as you mentioned it above. The id_token is not encrypted, only signed in this video. Private key -> create signature, public key -> verify signature. No encryption is used in this context. In this video only JWT, JWS (signature) are referenced, not JWE (encryption).
u should have given some more examples of open id
Hi there! Do you have anything specific on your mind?
Great clarification, thanks.
Thanks for the effort, the video was very helpful!
Which is more widely accepted from a Auth/Resource side, DPoP or mTLS PoP?
Thanks for the question. I do not know, but since DPoP is quite new I am assuming it would still be mTLS. However, DPoP is probably simpler to implement.
Great Explanation!!!
Thank you
Glad to see another great topic on OAuth protocol.
Do you think you can make a video on a topic of common bugs /missed considerations not just on this DPoP topic but other topics you covered so far?
I guess I could that that, yes. Thanks for the idea!
Incredible video, thanks!
Woa, this is the only video on yhis token exchange base on rfc 8693 !
13:54 a sight of relieve? 😊. Nice explaination
Sounds like it, true 🙂
This is a very clean explanation for the PKCE flow. I have bookmarked this RUclips video. Thank you Sascha!
Excellently explained 💪
Very good explained!
Thanks for explaining it in simple and clear terms!
I'm confused by the word "may". For example, at 12:22, the words "refresh_token may be one time use only" are on the screen. In that context, does the word "may" indicate certainty or possibility? Perhaps the word "might" would be clearer. We commonly use "may not" to indicate certainty. We use "might not" to indicate uncertainty. The English language is imprecise here. I guess that you are saying "might be", as in "sometimes, it will be 'X' and sometimes 'not X'." But I'm just guessing.
Hello, thanks for your question. Refresh_token usages are often implemented differently. Some OAuth/ OpenID Connect providers allow multiple usages, some just once. Therefore 'MAY'. If you plan to work against a provider, you need to read their developer documentation. If you plan on implementing a server yourself, I would try the 'once only' approach first. I hope this helps!
Most services also limit the capabilities, or possible scopes, of clients using implicit flow. Their use case is mostly 'web app', so only need limited features, and since it is less secure...
Excellent explanation
Thank you for the great video. With the example that you used of an administrator needing to replicate an issue, couldn't you use the "on behalf of" method? I'm trying to avoid using the impersonate method because logging of activities becomes more difficult. My scenario is the exact same as your example. Any thoughts?
at 9:45, yes the token is digitally signed, but only the Authorization server can verify if the signature is correct, the client can't make that verification.
Hi there! These days JWT are typically signed with private keys. Any party that has access to the public key can verify the signature. Generally, authorization servers provide the /jwks endpoint which allows the recipient of a JWT to retrieve the public key and verify the signature. Therefore, the client can also verify it. I hope this helps
Thank you
8:48 very well invested. Thank you Sascha, brilliantly verbalized.
If Issuer_A generates an Access Token using secret_A and sends Access_Token_A to the client. Then client sends Access_Token_A to API_Gate_Way_B, how is API_Gate_Way_B supposed to validate Access_Token_A it doesn't have secret_A? If you let API_Gate_Way_B know secret_A you could create your own Access_Token_As.
Hi there! Thanks for watching my video and asking a question. Well, in most cases access_token are issued as JWT these days. That means, the signature can be verified and therefore the authenticity of the token. In addition introspection endpoints are usually available. Wherever Token Exchange is supported authorization servers usually are configured to only accept certain token issuers. It is usually not a blind "let's exchange any token for ours" scenario. Please let me know if this helps.
@@saschazegermannice answer. Thx
can someone explain why the hacker can access our get request but cant access our post request?
Hi there! Please scroll down and find the second last comment and find my response which answers exactly this question. I hope that helps!
You passed 'openid email profile' in the request when obtaining the Id token. Does this mean when you decode the Id token, you will see the users email as a claim?
Hello! By OIDC spec. you do not get claims in id_token. Your client would receive email via a request to the /userinfo endpoint. However, you will find many implementations that do include claims in id_token, which means you have to read the documentation of the OIDC provider of your choice. I hope that helps!
Is it OK for a public client to do the token exchange? (3:59 so in case of the example having the client do the token exchange instead of the API gateway). I have a use-case where I might want to implement this flow, but I'm not sure if I'm understanding it fully. The use case: I have a game and normally I allow my users to login using Authorization Code with PKCE. However this game is also on Steam, and when a user launches the game though Steam they get an unique token. Instead of showing the default login flow I want to exchange this Steam token for a token that my resource server understands. So what I have in mind is the following: the game client performs the token_exchange with the auth server, it puts the Steam token in the subject_token field, and use a custom URI in the subject_token_type field (so the auth server can determine that it's a Steam token). Is this the correct approach? TLDR: Can I do the token exchange from the client? Can I use a custom URI in the subject_token_type field?
Hi there! Please have a look at this example of the token exchange spec: datatracker.ietf.org/doc/html/rfc8693#section-2.3. To me it sounds very similar to what you are trying to do. The main idea is what you ask for, receive a token of an accepted issuer (Stream) and issue a token for your resource server. Alternatively, you could also look into using id_token_hint. Since you re already supporting authcode with PKCE, you could accept an id_token (basically a JWT) issued by Steam which would be just a small extension to the protocol you already support. I hope this helps!
Hey, the Token Exchange Flow can also be used at one IdP to exchange a Token from one Client to another?
Hi Jonas! To be honest, your question completely confused me. Until this moment is was cleat to me that token exchange is meant for one client exchanging token for another, different token. If clients change, and they are internal clients that work within an infrastructure, I would say yes. Otherwise, I have to say it depends on the use case and has to be documented well. Sorry that I do not have a better answer for you.
Thank you.
You're welcome, glad you liked it
well done!
Sir, did you write any book on this topics, if yes could you please share the link ?
Hello Kousher! Yes, I did writ ea book: a.co/d/jfDY2BJ The link takes you to amazon.
So why the operating system can lauch the hacker app for the response of the first request but no for the response to token endpoint??
Hello! Imagine it like this (not completely accurate, but good for understanding the difference): - the authorization_code is delivered to the app like a letter to an apartment building. Imagine a high-rise with 100 apartments but two of those have the same apartment numbers. The letter will end up in one of those two letter boxes. Just like the OS which selects one app having the same redirect_uri. - The token exchange is more like a phone call between two parties. I hope this helps!
Thanks, that really made it clear!
why do we need refresh token? if basically refresh token can be exchanged for access token, why don't we just make the access token to lives longer? some people say that longer lives of access token is not recommended because when the token is stolen and it is still active, the attacker can use the token (and therefore we shortened the access token lifetime). but refresh token can also be stolen right 🤷♂?
Hello Riza! The difference is that a refresh_token is never exchanged with the resource_server. IT is only used between the issuing authorization_server and the requesting client. Therefore, it is at leas only less party that has access to it. And it cannot be used to retrieve protected data from a resource_server. And yes, access_token lifetimes are usually short. There are cases where they can even only be used once. For example, transferring USD 10.000 to another account, could be such case. I hope this helps, if not, please let me know.
Sascha any idea what happens when a company changes their domain sometime later for any reason? I'm asking this in ref. of 10:29 where you mentioned that device hardware will store domain as well.
Hello Ajit, thanks for the question. Users have to register again, unfortunately. If users register under 'auth.ajit.com' and you change the domain to 'auth.ajitsingh.com', a new registration is required. I hope this helps!
@@saschazegermanOkay... but then all my data with my "old" account would be lost? (if my only login method would have been a passkey)
@@unmapped89361 That is correct. That is why all FIDO2 (or Passkey) providers have more than one option to sign into an account and will almost always want you to setup a recovery method for your account. I hope this helps!
Why use PKCE for private applications that can store secrets (ie the client_secret)? Just in case the secret is exposed?
Hi there! You do not have to, but it is encouraged, it does no harm. It is just one more tool to keep your application and your users data safe.