- 20
- 255 316
Sascha Preibisch
Canada
เข้าร่วมเมื่อ 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
OpenID Connect - FAPI 1.0 - Part 01
This video discusses the highlights of FAPI 1.0, Part 01 (Financial-grade APIs). The video provides an overview of requirements for authorization servers, resource servers and clients as specified in FAPI.
The requirements are generally useful for any OAuth based service that wants to increase its API security.
To be specific, this video is about this specification: openid.net/specs/openid-financial-api-part-1-1_0.html
The requirements are generally useful for any OAuth based service that wants to increase its API security.
To be specific, this video is about this specification: openid.net/specs/openid-financial-api-part-1-1_0.html
มุมมอง: 65
วีดีโอ
OAuth 2.0 - Rich Authorization Requests (RAR)
มุมมอง 4127 หลายเดือนก่อน
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...
OAuth 2.0 - Demonstrate Proof-of-Possession
มุมมอง 1.7K11 หลายเดือนก่อน
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.4K2 ปีที่แล้ว
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
มุมมอง 12K3 ปีที่แล้ว
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
มุมมอง 6K3 ปีที่แล้ว
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.2K3 ปีที่แล้ว
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.6K4 ปีที่แล้ว
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
มุมมอง 11K4 ปีที่แล้ว
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
มุมมอง 28K4 ปีที่แล้ว
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
มุมมอง 11K4 ปีที่แล้ว
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)
มุมมอง 10K4 ปีที่แล้ว
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
มุมมอง 13K4 ปีที่แล้ว
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.1K4 ปีที่แล้ว
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
มุมมอง 25K4 ปีที่แล้ว
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...
Loginbuddy - Quickstart with demo setup
มุมมอง 1954 ปีที่แล้ว
Loginbuddy - Quickstart with demo setup
This is great and timely, thanks!
Thanks, is it possible to do the authentication part login/consent via API call (not browser)?
Hello, and thanks for the question. Generally not, no. As this flow involves a redirect to the login page at the authorization server an API-only message flow does not work. However, there are proprietary solutions that support API based flows but those do not adhere to the RFC. I hope this helps.
Very useful video and good explanation!
If I have a website (with its own frontend and backend on its own domain) and I am not looking to grant access to third-party apps or pages, is it safe to use credentials flow (username/password)? For example, imagine a small library that wants to save users in its own system and allow them to access their account to see information related to the books they have borrowed, returned, read, etc.
Hi there, thanks for your question. 'Official' reasons for not using this grant_type can be found here: datatracker.ietf.org/doc/html/rfc6819#section-4.4.3 In your scenario the library should use an access_token that was granted via an authorization_code flow. That way, users can decide 'yes' or 'no' to requested access. With that, the access_token can also be limited to exactly what the client should be able to view in a users account. If you are the only developer, if all of this is your application, if you are managing users credentials in your own directory, then the usage is not too terrible. However, please refer to that link to get a broader view on potential challenges. I hope this helps.
Oh, and please look at other questions and answers of this video.
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 TH-cam 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.