Retour : Page Principale > sommaire aide > sommaire aide-mémos

Single Sign On (SSO) et autorisations partagées


Date : 2014

ATTENTION (2017-07-20) - la situation peut avoir changé depuis que ces informations ont été écrites


Notes en vrac


  • OAuth2 est LE truc qui fait consensus ( FaceBook, Google+)
  •  OpenID Connect, qui utilise OAuth2 semble un truc bien cool mĂŞme s'il dĂ©voie le principe d'autorisation pour obtenir de l'identification (bien pratique)
  •  OpenID (pas Connect) est mort
  • OAuth (v1) est remplacĂ© par le 2, mais pas compatible
  • Facebook Connect est bien foutu et logique mais n'utilise pas ces standards, il est maintenant obsolète
  • tous les autres trucs ont l'air de puer du cul

DiffĂ©rences entre  OpenID, OAuth et  OpenIDConnect

Avec une métaphore bien foutue sur le maître des clefs dans un hôtel.
(lu sur http://security.stackexchange.com/questions/44611/difference-between-oauth-openid-and-openid-connect-in-very-simple-term)

 OpenID is a protocol for authentication while OAuth is for authorization. Authentication is about making sure that the guy you are talking to is indeed who he claims to be. Authorization is about deciding what that guy should be allowed to do.

In  OpenID, authentication is delegated: server A wants to authenticate user U, but U's credentials (e.g. U's name and password) are sent to another server, B, that A trusts (at least, trusts for authenticating users). Indeed, server B makes sure that U is indeed U, and then tells to A: "ok, that's the genuine U".

In OAuth, authorization is delegated: entity A obtains from entity B an "access right" which A can show to server S to be granted access; B can thus deliver temporary, specific access keys to A without giving them too much power. You can imagine an OAuth server as the key master in a big hotel; he gives to employees keys which open the doors of the rooms that they are supposed to enter, but each key is limited (it does not give access to all rooms); furthermore, the keys self-destruct after a few hours.

To some extent, authorization can be abused into some pseudo-authentication, on the basis that if entity A obtains from B an access key through OAuth, and shows it to server S, then server S may infer that B authenticated A before granting the access key. So some people use OAuth where they should be using  OpenID. This schema may or may not be enlightening; but I think this pseudo-authentication is more confusing than anything.  OpenID Connect does just that: it abuses OAuth into an authentication protocol. In the hotel analogy: if I encounter a purported employee and that person shows me that he has a key which opens my room, then I suppose that this is a true employee, on the basis that the key master would not have given him a key which opens my room if he was not.