Skip to main content

OAuth “dance” - server side flow

Getting some inspiration from this dialog about OAuth 1.0 I thought it would be nice to have something similar for OAuth 2.0


The Actors

 

The R.O. shows intent

Alice (R.O.): hey, Bob , I would like you to be able to access the profile pictures from my Facebook account so you can print for me a nice photo album.
Bob (client): no problem, I know how we can do it. All I need is you getting me an Authorization Code from Facebook.

The R.O. obtain an authorization code


Alice (R.O.): hey Mark, www.printondemand.biz wants an Authorization Code
Mark (server):
are you sure you want to give this code to www.printondemand.biz?
this will allow it to get all profile pictures from your profile.
Alice (R.O.):
yes it is ok.
Mark (server): ok I am sending you over to www.printondemand.biz

The R.O. is redirected to the client

Alice (R.O.): hey Bob here we go, this is the Authorization Code
Bob (client): thanks

The client exchange the Authorization Code for an
Access Token

Bob (client): hey Mark, I would like to trade my Authorization Code for an Access Token
Mark (server): hey Bob here we go

The client access the protected resource

Bob (client): hey Mark, give me the profile pictures, here is the
Access Token
Mark (server): here you are


Comments

Popular posts from this blog

Billion Laugh Attack in https://sites.google.com

tl;dr https://sites.google.com suffered from a Billion Laugh Attack vulnerability that made the containerized environment to crash with a single invocation.
Introduction Few months ago I applied for a talk at a security conference titled Soyouwanna be a Bug Bounty Hunter but it was rejected :(. The reason behind it is that I have been on/off in the bug bounty business for a while as you can see here:
Funny. Found in a forgotten drawer from the time I was a bug hunter :p #facebook#bug#bountypic.twitter.com/Tt4saGZVLI — Antonio Sanso (@asanso) November 30, 2018 and I would have liked to share some of the things I have learned during these years (not necessary technical advises only). You can find a couple of these advises here:


Rule #1 of any bug hunter is to have a good RSS feed list
and here


The rule #2 of any bug hunter is to DO NOT be to fussy with 'food' specifically with "left over"
Today's rule is: The rule #3 of any bug hunter is DO LOOK at the old stuff

and…

Bug bounty left over (and rant) Part III (Google and Twitter)

tl;dr in this blog post I am going to talk about some bug bounty left over with a little rant.

Here you can find bug bounty left over part I and II
Here you can find bug bounty rant part I and II
Introduction In one of my previous post I was saying that: 

"The rule #1 of any bug hunter... is to have a good RSS feed list."
Well well well allow me in this post to state rule #2 (IMHO)

"The rule #2 of any bug hunter is to DO NOT be to fussy with 'food' specifically with left over"

aka even if the most experience bug hunter was there (and it definitely was my case here, given the fact we are talking about no one less than filedescriptor) do not assume that all the vulnerabilities have been found! So if you want some examples here we go.
Part I - GoogleI have the privilege to receive from time to time Google Vulnerability Research Grant. One of the last I received had many target options to choose from, but one in particular caught my attention, namely Google Issue T…

Slack SAML authentication bypass

tl;dr  I found a severe issue in the Slack's SAML implementation that allowed me to bypass the authentication. This has now been solved by Slack.
Introduction IMHO the rule #1 of any bug hunter (note I do not consider myself one of them since I do this really sporadically) is to have a good RSS feed list.  In the course of the last years I built a pretty decent one and I try to follow other security experts trying to "steal" some useful tricks. There are many experts in different fields of the security panorama and too many to quote them here (maybe another post). But one of the leading expert (that I follow) on SAML is by far Ioannis Kakavas. Indeed he was able in the last years to find serious vulnerability in the SAML implementation of Microsoft and Github. Usually I am more an "OAuth guy" but since both, SAML and OAuth, are nothing else that grandchildren of Kerberos learning SAML has been in my todo list for long time. The Github incident gave me the final…