SlideShare une entreprise Scribd logo
1  sur  33
Télécharger pour lire hors ligne
Oauth : un protocole
d'autorisation qui
authentifie ?
Maxime Féroul
Directeur Technique / KYOS IT
SECURITY

                                    Application Security Forum - 2012
                                                    Western Switzerland

                                7-8 novembre 2012 - Y-Parc / Yverdon-les-Bains
                                https://www.appsec-forum.ch
2




# who -m
 Ingénieur Informatique & Télécom (ESIGETEL /
  France)
 15 ans d'expérience : web-hosting & sécurité
 Co-fondateur de Kyos IT Security (2002) : 10 ans ;)
  – Pen-testing & intégration & IAM
  – Recherche EU : SEINIT, DEMONS,...
  – Spacecom : le wifi est correct ?
 Domaines de prédilection : en ce moment J2ee &
  IAM
3




Agenda
 Contexte : Social Login
 Oauth 2.0 : Sous le capot
 Implicit Flow : ou Implicit Flaw ?
 Mitigation : La bonne implémentation
4




Perturbation atmosphérique...
       Poursuite de la décentralisation des SI
       Utilisation de plateformes “tierces”, en
        dehors de son domaine de sécurité

Nouveaux défis pour
le contrôle d'accès
    Identités Multiples,
     BYOD, “Information and
        user centric”, ...
...et toujours le même “Graal“
                     SIMPLICITÉ
                    UTILISATEUR,
                  FACILITÉ DE MISE
                     EN OEUVRE
                          &
                      SÉCURITÉ
6




Emergence du “Social Login“




   Utiliser les services d'authentification
   d'une plateforme de réseau social
Social Login – Pourquoi ?
 Pour l'utilisateur
   –   Moins de login & mot de passe
   –   Meilleure gestion de ses identités
       • Facebook → sites perso., linkedin → sites pro., …
   • Meilleur « contrôle » : révoquer les applications
Social Login – Pourquoi ?
 Pour le fournisseur de
  service
   –   Enregistrement simplifié
   –   Information plus fiable
   –   Plus d'information !
Social Login – Comment ?
 Etablir un « lien de confiance », fédérer les identités

 Déléguer
  l'authentification et
  l'autorisation
 Echanger des
  informations sur
  l'identité
Standards : Maelström ?
                                                                                                 Connotation “web
                       Framework /                            Oauth 2.0                          / end-user”
                       message Web Service
                                                                  Web Centric API
                                                                  Délégation de l'autorisation
               Global & très modulaire
                  WS-Security, WS-
                  Federation, WS-
                                                                       User
Connotation
                  Trust,...            SOAP,           SAML            Centric REST,
“Microsoft &                           XML           assertion                        UMA
                                                                                   JSON
IBM”


                          Framework / service                            “couche identité” au
                          d'identité                                     dessus de OAuth 2.0
                                     Profile,                               Authentification,
                                     protocol,                              session, attributs                      Autorisation
                                     bindings,...                           d'identité,...


                                                                                                             Authentification,
                                                                                                             SSO, Federation

                                          Connotation
                                          “Standard Entreprise”
Oauth 2.0 – Emergence
 Facebook, Google, Salesforce,...




         REST, Simplicité, “designed for the web...”
12




Agenda
 Contexte : Social Login
 Oauth 2.0 : Sous le capot
 Implicit Flow : ou Implicit Flaw ?
 Mitigation : La bonne implémentation
13




           Password anti-pattern
 Bonjour BLOG, j'aimerais aussi que tu
  publies mes “posts” sur Facebook ?




                   Pas de problème, donne moi ton login et ton
                   mot de passe Facebook, je m'y connecterais
                   en ton nom pour mettre à jour ton profil...


Tu m'excuses mais j'ai moyennement confiance en toi BLOG, tu ne
    peux pas faire autrement que stocker mes “crédentiels” ?
14




Oauth 2.0 – Framework d'autorisation


         Permettre à des applications
         et des fournisseurs de services
         d’accéder à des données d’un
         utilisateur en lui demandant sa
         permission.
Oauth 2.0 – Rôles
     Resource        Client            Authorization          Resource
      Owner                               Server               Server




Par exemple :




     Un internaute   Utilise un blog      En s'authentifiant via Facebook et
                                          pour également publier ses
                                          « posts » sur son profil
16




               Oauth 2.0 – Principe
                   2. S'authentifie et autorise
                      l'application (client)
                                                       Authorization
                                                       Server


                   3. Délivre le token
1. Accède au          d'accès                     Délègue
   service
                                                  l'autorisation


                                                      Resource
  Client                                              Server
                   4. Accède à la ressource
                      protégée
17




        Oauth 2.0 – Spécification
 Client type & profile
   –   Confidential, public & WebApp, user agent, native
 Endpoints
   – Authorization, Token, Redirection

 Plusieurs types de « jeton d'autorisation »
   – Authorization Code, Implicit, Resource Owner Password
     Credentials, Client Credentials
   – Des requêtes et réponses pour chaque type
18




 Oauth 2.0 – Question de départ
   Oauth : un protocole d'autorisation qui authentifie ?

 Ok pour le password anti-pattern et l'autorisation
  – Mais alors quel rapport avec le social login ?
  – Comment “authentifier” ?

 Authentifier c'est obtenir des attributs d'identité
  et prouver/valider qu'ils sont justes
    Oauth permet d'accéder à des données d'identité !
19




Oauth 2.0 – Comment authentifier ?
      1.) BLOG demande à BORIS l'autorisation
      d'aller récupérer chez Facebook les données
      relatives à son identité pour l'authentifier.

                                               Profil Boris
                                                 Nom
                                                 Prénom
                                                 Email
                                                 Login



       2.) BORIS s'authentifie chez Facebook
       et autorise BLOG à lire ses données
       d'identité.
20




Agenda
 Contexte : Social Login
 Oauth : Sous le capot
 Implicit Flow : ou Implicit Flaw ?
 Mitigation : La bonne implémentation
21




     Oauth 2.0 – Implicit Flow

              RECHERCHE DE LA

              SIMPLICITÉ
   Délivrance « directe » du token d'accès
   Moins d'échanges
   Application mobile (native)
   Application JavaScript (user-agent)
22




Exemple – Authentification Facebook

        Sign in via
        Facebook
     Redirect vers Facebook         OAuth Implicit request
                                    AppId,
                                    redirectUri(blog.jsp)
                                                             Authentificatio
                                                                   n
     OAuth Implicit response                                 + Autorisation
     Redirect vers redirectUri(blog.jsp)                       de AppId
     +AccessToken(xxxx)
    Get
    /blog.jsp?AToken=xxxx
                                   Get
                                   /graphAPI?AToken=xxxx
                                    JSON object
                                    userId=Boris
     Welcome Boris !
23




        Access Token – Attention !
« ...This specification does not
provide any methods for the
resource server to ensure that
an access token presented to
it by a given client was issued
to that client by the
authorization server. »
Source : draft-ietf-oauth-
v2-31
24




   Implicit Flow – Usurpation


   AccessToke
                                                     Auth.+ Auto.
   n
Get
/ninjagame.jsp?ATo            Get
ken=ABXYZ                     /graphAPI?AToken=ABXYZ
                                                 userId=Boris
Welcome on NinjaGame
Boris !
                       Get
                       /blog.jsp?AToken   Get
  Réutilisation        =ABXYZ             /graphAPI?AToke
   du token !                             n=ABXYZ
                                                 userId=Boris


                        Welcome Boris !
25




La « spec. » nous avais prévenu...

  «... Authenticating Resource Owners to clients is out of
  scope for this specification.

  Any specification that uses the authorization process
  as a form of delegated end-user authentication to
  the client (e.g. third-party sign-in service) MUST NOT
  use the implicit flow without additional security
  mechanisms such as audience restricting the access
  token that enable the client to determine if the access
  token was issued for its use. »
                               Source : draft-ietf-oauth-
                               v2-31
26




 Est ce que cela nous concerne ?
     N'est ce pas plutôt un « problème » pour facebook, google, et consorts ?


 Oui si nous implémentons “nous-même” ou sans les
  framework proposés




 Oui si nous vérifions des implémentations
 Oui pour notre culture et une meilleure
  compréhension d'Oauth ;)
27




Agenda
 Contexte : Social Login
 Oauth : Sous le capot
 Implicit Flow : ou Implicit Flaw ?
 Mitigation : La bonne implémentation
Mitigation – Implicit Flow
 Restreindre l'audience / valider le token d'accès avant
  d'authentifier
   –   Signed request (Facebook JavaScript SDK)
   –   Service de validation du token
29




Mitigation – Server Side Flow

     Sign in via
     Facebook
   Redirect vers Facebook      OAuth Authorization
                               request
                               AppId, redirectUri(blog.jsp)
                                                             Authentification
OAuth Authorization response                              + Autorisation de AppId
Redirect vers redirectUri(blog.jsp) +Code(xxxx)

 Get /blog.jsp?Code=xxxx
                               OAuth Access Token request
                               AppId, Code,
    Lié à l'AppId              redirectUri(blog.jsp)
    donc invalide                AccessToken=yyyy
   pour une autre
        app !                  Get
                               /graphAPI?AToken=yyyy
                                JSON object
                                userId=Boris
   Welcome Boris !
30




   Mitigation – OpenId Connect

            Une extension de Oauth 2.0

             UserInfo endpoint
               –   Fournisseur d'information
IDENTITY           d'identité
  Layer
             ID token objects
OAUTH 2.0      –   Informations sur les évenements
  Layer            d'authentification (i.e audience,
                   contexte, temps,...)
31




Conclusion
 Un protocole d'autorisation ...
 … mais qui peut servir à authentifier ...
 … à condition de l'implémenter correctement.

 Les mécanismes de sécurité existent, il faut veiller à
            les utiliser et à les vérifier.
            … au prix d'un peu de compléxité ...

     « Il n'y a pas de simplicité véritable, il n'y a que des simplifications »
                                                                       Léon Paul Farge
32




Questions?
 Principales Sources
http://www.thread-safe.com/2012/01/problem-with-oauth-for-authentication.html
      by John Bradley
http://www.independentid.com/2011/04/oauth-does-it-authenticate-wellyes-and.html by
      Phil Hunt
http://vennofidentity.org/
      by Eve Maler
http://oauth.net/2/
http://tools.ietf.org/html/draft-ietf-oauth-v2-31
http://openid.net/connect/
https://developers.facebook.com/docs/concepts/login/
https://developers.google.com/accounts/docs/OAuth2
33




Merci/Thank you!
 Contact:
  maxime.feroul@kyos.ch
  http://www.kyos.ch
  Slides:
     http://slideshare.net/ASF-WS/presentations

Contenu connexe

Tendances

CAS, OpenID, SAML : concepts, différences et exemples
CAS, OpenID, SAML : concepts, différences et exemplesCAS, OpenID, SAML : concepts, différences et exemples
CAS, OpenID, SAML : concepts, différences et exemplesClément OUDOT
 
LemonLDAP::NG, un WebSSO libre
LemonLDAP::NG, un WebSSO libreLemonLDAP::NG, un WebSSO libre
LemonLDAP::NG, un WebSSO libreClément OUDOT
 
Matinée Pour Comprendre LinID - Mise en place de la fédération des identités...
Matinée Pour Comprendre LinID -  Mise en place de la fédération des identités...Matinée Pour Comprendre LinID -  Mise en place de la fédération des identités...
Matinée Pour Comprendre LinID - Mise en place de la fédération des identités...Clément OUDOT
 
Présentation Oauth OpenID
Présentation Oauth OpenIDPrésentation Oauth OpenID
Présentation Oauth OpenIDPascal Flamand
 
Oauth2 & OpenID Connect
Oauth2 & OpenID ConnectOauth2 & OpenID Connect
Oauth2 & OpenID ConnectPascal Flamand
 
SAML, Open ID et CAS dans un seul WebSSO : LemonLDAP::NG
SAML, Open ID et CAS dans un seul WebSSO : LemonLDAP::NGSAML, Open ID et CAS dans un seul WebSSO : LemonLDAP::NG
SAML, Open ID et CAS dans un seul WebSSO : LemonLDAP::NGClément OUDOT
 
Paris Web 2015 - France Connect et OpenId Connect
Paris Web 2015 - France Connect et OpenId ConnectParis Web 2015 - France Connect et OpenId Connect
Paris Web 2015 - France Connect et OpenId ConnectFrançois Petitit
 
[JDLL 2016] OpenID Connect et FranceConnect
[JDLL 2016] OpenID Connect et FranceConnect[JDLL 2016] OpenID Connect et FranceConnect
[JDLL 2016] OpenID Connect et FranceConnectClément OUDOT
 
Oauth2 et OpenID Connect
Oauth2 et OpenID ConnectOauth2 et OpenID Connect
Oauth2 et OpenID ConnectPascal Flamand
 
S2LQ - Authentification unique sur le Web avec le logiciel libre LemonLDAP::NG
S2LQ - Authentification unique sur le Web avec le logiciel libre LemonLDAP::NGS2LQ - Authentification unique sur le Web avec le logiciel libre LemonLDAP::NG
S2LQ - Authentification unique sur le Web avec le logiciel libre LemonLDAP::NGClément OUDOT
 
ASFWS 2013 - Quels sont les défis de la fédération d’identité dans le Cloud ?...
ASFWS 2013 - Quels sont les défis de la fédération d’identité dans le Cloud ?...ASFWS 2013 - Quels sont les défis de la fédération d’identité dans le Cloud ?...
ASFWS 2013 - Quels sont les défis de la fédération d’identité dans le Cloud ?...Cyber Security Alliance
 
Gérer facilement les identités dans le cloud
Gérer facilement les identités dans le cloudGérer facilement les identités dans le cloud
Gérer facilement les identités dans le cloudAymeric Weinbach
 
Introduction oauth 2.0 et openid connect 1.0
Introduction oauth 2.0 et openid connect 1.0Introduction oauth 2.0 et openid connect 1.0
Introduction oauth 2.0 et openid connect 1.0Marc-André Tousignant
 
14.4 tout ce que vous voulez savoir sur l'authentification par revendications
14.4   tout ce que vous voulez savoir sur l'authentification par revendications14.4   tout ce que vous voulez savoir sur l'authentification par revendications
14.4 tout ce que vous voulez savoir sur l'authentification par revendicationsNicolas Georgeault
 
LemonLDAP::NG et le support SAML2 (RMLL 2010)
LemonLDAP::NG et le support SAML2 (RMLL 2010)LemonLDAP::NG et le support SAML2 (RMLL 2010)
LemonLDAP::NG et le support SAML2 (RMLL 2010)Clément OUDOT
 
La gestion des identités pour qui, pourquoi ?
La gestion des identités pour qui, pourquoi ?La gestion des identités pour qui, pourquoi ?
La gestion des identités pour qui, pourquoi ?Benoit Mortier
 

Tendances (20)

Sso fédération
Sso fédérationSso fédération
Sso fédération
 
Drupal sso
Drupal ssoDrupal sso
Drupal sso
 
CAS, OpenID, SAML : concepts, différences et exemples
CAS, OpenID, SAML : concepts, différences et exemplesCAS, OpenID, SAML : concepts, différences et exemples
CAS, OpenID, SAML : concepts, différences et exemples
 
La Grande Famille OAuth 2.0
La Grande Famille OAuth 2.0La Grande Famille OAuth 2.0
La Grande Famille OAuth 2.0
 
LemonLDAP::NG, un WebSSO libre
LemonLDAP::NG, un WebSSO libreLemonLDAP::NG, un WebSSO libre
LemonLDAP::NG, un WebSSO libre
 
Matinée Pour Comprendre LinID - Mise en place de la fédération des identités...
Matinée Pour Comprendre LinID -  Mise en place de la fédération des identités...Matinée Pour Comprendre LinID -  Mise en place de la fédération des identités...
Matinée Pour Comprendre LinID - Mise en place de la fédération des identités...
 
Présentation Oauth OpenID
Présentation Oauth OpenIDPrésentation Oauth OpenID
Présentation Oauth OpenID
 
Oauth2 & OpenID Connect
Oauth2 & OpenID ConnectOauth2 & OpenID Connect
Oauth2 & OpenID Connect
 
SAML, Open ID et CAS dans un seul WebSSO : LemonLDAP::NG
SAML, Open ID et CAS dans un seul WebSSO : LemonLDAP::NGSAML, Open ID et CAS dans un seul WebSSO : LemonLDAP::NG
SAML, Open ID et CAS dans un seul WebSSO : LemonLDAP::NG
 
Paris Web 2015 - France Connect et OpenId Connect
Paris Web 2015 - France Connect et OpenId ConnectParis Web 2015 - France Connect et OpenId Connect
Paris Web 2015 - France Connect et OpenId Connect
 
[JDLL 2016] OpenID Connect et FranceConnect
[JDLL 2016] OpenID Connect et FranceConnect[JDLL 2016] OpenID Connect et FranceConnect
[JDLL 2016] OpenID Connect et FranceConnect
 
Oauth2 et OpenID Connect
Oauth2 et OpenID ConnectOauth2 et OpenID Connect
Oauth2 et OpenID Connect
 
S2LQ - Authentification unique sur le Web avec le logiciel libre LemonLDAP::NG
S2LQ - Authentification unique sur le Web avec le logiciel libre LemonLDAP::NGS2LQ - Authentification unique sur le Web avec le logiciel libre LemonLDAP::NG
S2LQ - Authentification unique sur le Web avec le logiciel libre LemonLDAP::NG
 
ASFWS 2013 - Quels sont les défis de la fédération d’identité dans le Cloud ?...
ASFWS 2013 - Quels sont les défis de la fédération d’identité dans le Cloud ?...ASFWS 2013 - Quels sont les défis de la fédération d’identité dans le Cloud ?...
ASFWS 2013 - Quels sont les défis de la fédération d’identité dans le Cloud ?...
 
Gérer facilement les identités dans le cloud
Gérer facilement les identités dans le cloudGérer facilement les identités dans le cloud
Gérer facilement les identités dans le cloud
 
OpenSSO Aquarium Paris
OpenSSO Aquarium ParisOpenSSO Aquarium Paris
OpenSSO Aquarium Paris
 
Introduction oauth 2.0 et openid connect 1.0
Introduction oauth 2.0 et openid connect 1.0Introduction oauth 2.0 et openid connect 1.0
Introduction oauth 2.0 et openid connect 1.0
 
14.4 tout ce que vous voulez savoir sur l'authentification par revendications
14.4   tout ce que vous voulez savoir sur l'authentification par revendications14.4   tout ce que vous voulez savoir sur l'authentification par revendications
14.4 tout ce que vous voulez savoir sur l'authentification par revendications
 
LemonLDAP::NG et le support SAML2 (RMLL 2010)
LemonLDAP::NG et le support SAML2 (RMLL 2010)LemonLDAP::NG et le support SAML2 (RMLL 2010)
LemonLDAP::NG et le support SAML2 (RMLL 2010)
 
La gestion des identités pour qui, pourquoi ?
La gestion des identités pour qui, pourquoi ?La gestion des identités pour qui, pourquoi ?
La gestion des identités pour qui, pourquoi ?
 

En vedette

OAuth with Restful Web Services
OAuth with Restful Web Services OAuth with Restful Web Services
OAuth with Restful Web Services Vinay H G
 
Présentation sécurité informatique naceur chafroud de cynapsys
Présentation sécurité informatique naceur chafroud de cynapsysPrésentation sécurité informatique naceur chafroud de cynapsys
Présentation sécurité informatique naceur chafroud de cynapsysJihen KOCHBATI
 
Sécurité informatique
Sécurité informatiqueSécurité informatique
Sécurité informatiqueoussama Hafid
 

En vedette (6)

UMA for ACE
UMA for ACEUMA for ACE
UMA for ACE
 
Oauth
OauthOauth
Oauth
 
OAuth with Restful Web Services
OAuth with Restful Web Services OAuth with Restful Web Services
OAuth with Restful Web Services
 
Présentation sécurité informatique naceur chafroud de cynapsys
Présentation sécurité informatique naceur chafroud de cynapsysPrésentation sécurité informatique naceur chafroud de cynapsys
Présentation sécurité informatique naceur chafroud de cynapsys
 
Twitter - comment ça marche ?
Twitter - comment ça marche ?Twitter - comment ça marche ?
Twitter - comment ça marche ?
 
Sécurité informatique
Sécurité informatiqueSécurité informatique
Sécurité informatique
 

Similaire à ASFWS 2012 - OAuth : un protocole d’autorisation qui authentifie ? par Maxime Feroulcole_qui_authentifie

Présentation de Microsoft Office 365 et des briques de sécurité Fédération, P...
Présentation de Microsoft Office 365 et des briques de sécurité Fédération, P...Présentation de Microsoft Office 365 et des briques de sécurité Fédération, P...
Présentation de Microsoft Office 365 et des briques de sécurité Fédération, P...Microsoft Technet France
 
Implémenter de l’authentification forte pour vos environnements Cloud
Implémenter de l’authentification forte pour vos environnements CloudImplémenter de l’authentification forte pour vos environnements Cloud
Implémenter de l’authentification forte pour vos environnements CloudMicrosoft Décideurs IT
 
La fédération d'identité, quels avantages pour mon SharePoint - Marocco Share...
La fédération d'identité, quels avantages pour mon SharePoint - Marocco Share...La fédération d'identité, quels avantages pour mon SharePoint - Marocco Share...
La fédération d'identité, quels avantages pour mon SharePoint - Marocco Share...Joris Faure
 
Séminaire Evolution des technologies d’authentification
Séminaire Evolution des technologies d’authentificationSéminaire Evolution des technologies d’authentification
Séminaire Evolution des technologies d’authentificatione-Xpert Solutions SA
 
LemonLDAP::NG et le support SAML2
LemonLDAP::NG et le support SAML2LemonLDAP::NG et le support SAML2
LemonLDAP::NG et le support SAML2Clément OUDOT
 
Secure a REST API for external public access
Secure a REST API for external public accessSecure a REST API for external public access
Secure a REST API for external public accessThierry Gayet
 
Sécurisation d'accès à un CRM pour appareils Nomade
Sécurisation d'accès à un CRM pour appareils NomadeSécurisation d'accès à un CRM pour appareils Nomade
Sécurisation d'accès à un CRM pour appareils NomadePRONETIS
 
identité-as-a-service pour vos applications b2c - marius zaharia - samir arez...
identité-as-a-service pour vos applications b2c - marius zaharia - samir arez...identité-as-a-service pour vos applications b2c - marius zaharia - samir arez...
identité-as-a-service pour vos applications b2c - marius zaharia - samir arez...Samir Arezki ☁
 
chap 4 Sécurité des accès.pdf
chap 4 Sécurité des accès.pdfchap 4 Sécurité des accès.pdf
chap 4 Sécurité des accès.pdfdepinfo
 
Presentation x.509
Presentation x.509Presentation x.509
Presentation x.509Ossama Jimil
 
BYOD demo Extravaganza : un exemple de mise en œuvre de bout-en-bout avec les...
BYOD demo Extravaganza : un exemple de mise en œuvre de bout-en-bout avec les...BYOD demo Extravaganza : un exemple de mise en œuvre de bout-en-bout avec les...
BYOD demo Extravaganza : un exemple de mise en œuvre de bout-en-bout avec les...Microsoft
 
Le futur de l'authentification webAuthn
Le futur de l'authentification webAuthnLe futur de l'authentification webAuthn
Le futur de l'authentification webAuthnChristophe Villeneuve
 
Gouvernance et sécurisation de vos ressources cloud avec Azure Active Directo...
Gouvernance et sécurisation de vos ressources cloud avec Azure Active Directo...Gouvernance et sécurisation de vos ressources cloud avec Azure Active Directo...
Gouvernance et sécurisation de vos ressources cloud avec Azure Active Directo...Marius Zaharia
 
Sayeh hiba-karaa-eya-ferjani-maroua-hamzaoui-balkiss-sys-complexes
Sayeh hiba-karaa-eya-ferjani-maroua-hamzaoui-balkiss-sys-complexesSayeh hiba-karaa-eya-ferjani-maroua-hamzaoui-balkiss-sys-complexes
Sayeh hiba-karaa-eya-ferjani-maroua-hamzaoui-balkiss-sys-complexesSayehHiba1
 
Windows Azure : Modèle hybride et réversibilité
Windows Azure : Modèle hybride et réversibilitéWindows Azure : Modèle hybride et réversibilité
Windows Azure : Modèle hybride et réversibilitéMicrosoft Technet France
 
Certifs x509
Certifs x509Certifs x509
Certifs x509hamduvski
 
La fédération d'identité, quels avantages pour mon SharePoint -- Montreal
La fédération d'identité, quels avantages pour mon SharePoint -- MontrealLa fédération d'identité, quels avantages pour mon SharePoint -- Montreal
La fédération d'identité, quels avantages pour mon SharePoint -- MontrealJoris Faure
 
Identite-as-a-service pour vos applications B2C - MS Cloud Summit Paris 2017
Identite-as-a-service pour vos applications B2C - MS Cloud Summit Paris 2017Identite-as-a-service pour vos applications B2C - MS Cloud Summit Paris 2017
Identite-as-a-service pour vos applications B2C - MS Cloud Summit Paris 2017Marius Zaharia
 
Mise en place d’un serveur proxy : Cas du CCProxy
Mise en place d’un serveur proxy : Cas du CCProxyMise en place d’un serveur proxy : Cas du CCProxy
Mise en place d’un serveur proxy : Cas du CCProxyJeff Hermann Ela Aba
 

Similaire à ASFWS 2012 - OAuth : un protocole d’autorisation qui authentifie ? par Maxime Feroulcole_qui_authentifie (20)

Présentation de Microsoft Office 365 et des briques de sécurité Fédération, P...
Présentation de Microsoft Office 365 et des briques de sécurité Fédération, P...Présentation de Microsoft Office 365 et des briques de sécurité Fédération, P...
Présentation de Microsoft Office 365 et des briques de sécurité Fédération, P...
 
Implémenter de l’authentification forte pour vos environnements Cloud
Implémenter de l’authentification forte pour vos environnements CloudImplémenter de l’authentification forte pour vos environnements Cloud
Implémenter de l’authentification forte pour vos environnements Cloud
 
La fédération d'identité, quels avantages pour mon SharePoint - Marocco Share...
La fédération d'identité, quels avantages pour mon SharePoint - Marocco Share...La fédération d'identité, quels avantages pour mon SharePoint - Marocco Share...
La fédération d'identité, quels avantages pour mon SharePoint - Marocco Share...
 
Séminaire Evolution des technologies d’authentification
Séminaire Evolution des technologies d’authentificationSéminaire Evolution des technologies d’authentification
Séminaire Evolution des technologies d’authentification
 
LemonLDAP::NG et le support SAML2
LemonLDAP::NG et le support SAML2LemonLDAP::NG et le support SAML2
LemonLDAP::NG et le support SAML2
 
Secure a REST API for external public access
Secure a REST API for external public accessSecure a REST API for external public access
Secure a REST API for external public access
 
Rapport sécurité
Rapport sécuritéRapport sécurité
Rapport sécurité
 
Sécurisation d'accès à un CRM pour appareils Nomade
Sécurisation d'accès à un CRM pour appareils NomadeSécurisation d'accès à un CRM pour appareils Nomade
Sécurisation d'accès à un CRM pour appareils Nomade
 
identité-as-a-service pour vos applications b2c - marius zaharia - samir arez...
identité-as-a-service pour vos applications b2c - marius zaharia - samir arez...identité-as-a-service pour vos applications b2c - marius zaharia - samir arez...
identité-as-a-service pour vos applications b2c - marius zaharia - samir arez...
 
chap 4 Sécurité des accès.pdf
chap 4 Sécurité des accès.pdfchap 4 Sécurité des accès.pdf
chap 4 Sécurité des accès.pdf
 
Presentation x.509
Presentation x.509Presentation x.509
Presentation x.509
 
BYOD demo Extravaganza : un exemple de mise en œuvre de bout-en-bout avec les...
BYOD demo Extravaganza : un exemple de mise en œuvre de bout-en-bout avec les...BYOD demo Extravaganza : un exemple de mise en œuvre de bout-en-bout avec les...
BYOD demo Extravaganza : un exemple de mise en œuvre de bout-en-bout avec les...
 
Le futur de l'authentification webAuthn
Le futur de l'authentification webAuthnLe futur de l'authentification webAuthn
Le futur de l'authentification webAuthn
 
Gouvernance et sécurisation de vos ressources cloud avec Azure Active Directo...
Gouvernance et sécurisation de vos ressources cloud avec Azure Active Directo...Gouvernance et sécurisation de vos ressources cloud avec Azure Active Directo...
Gouvernance et sécurisation de vos ressources cloud avec Azure Active Directo...
 
Sayeh hiba-karaa-eya-ferjani-maroua-hamzaoui-balkiss-sys-complexes
Sayeh hiba-karaa-eya-ferjani-maroua-hamzaoui-balkiss-sys-complexesSayeh hiba-karaa-eya-ferjani-maroua-hamzaoui-balkiss-sys-complexes
Sayeh hiba-karaa-eya-ferjani-maroua-hamzaoui-balkiss-sys-complexes
 
Windows Azure : Modèle hybride et réversibilité
Windows Azure : Modèle hybride et réversibilitéWindows Azure : Modèle hybride et réversibilité
Windows Azure : Modèle hybride et réversibilité
 
Certifs x509
Certifs x509Certifs x509
Certifs x509
 
La fédération d'identité, quels avantages pour mon SharePoint -- Montreal
La fédération d'identité, quels avantages pour mon SharePoint -- MontrealLa fédération d'identité, quels avantages pour mon SharePoint -- Montreal
La fédération d'identité, quels avantages pour mon SharePoint -- Montreal
 
Identite-as-a-service pour vos applications B2C - MS Cloud Summit Paris 2017
Identite-as-a-service pour vos applications B2C - MS Cloud Summit Paris 2017Identite-as-a-service pour vos applications B2C - MS Cloud Summit Paris 2017
Identite-as-a-service pour vos applications B2C - MS Cloud Summit Paris 2017
 
Mise en place d’un serveur proxy : Cas du CCProxy
Mise en place d’un serveur proxy : Cas du CCProxyMise en place d’un serveur proxy : Cas du CCProxy
Mise en place d’un serveur proxy : Cas du CCProxy
 

Plus de Cyber Security Alliance

Robots are among us, but who takes responsibility?
Robots are among us, but who takes responsibility?Robots are among us, but who takes responsibility?
Robots are among us, but who takes responsibility?Cyber Security Alliance
 
iOS malware: what's the risk and how to reduce it
iOS malware: what's the risk and how to reduce itiOS malware: what's the risk and how to reduce it
iOS malware: what's the risk and how to reduce itCyber Security Alliance
 
Why huntung IoC fails at protecting against targeted attacks
Why huntung IoC fails at protecting against targeted attacksWhy huntung IoC fails at protecting against targeted attacks
Why huntung IoC fails at protecting against targeted attacksCyber Security Alliance
 
Corporations - the new victims of targeted ransomware
Corporations - the new victims of targeted ransomwareCorporations - the new victims of targeted ransomware
Corporations - the new victims of targeted ransomwareCyber Security Alliance
 
Introducing Man in the Contacts attack to trick encrypted messaging apps
Introducing Man in the Contacts attack to trick encrypted messaging appsIntroducing Man in the Contacts attack to trick encrypted messaging apps
Introducing Man in the Contacts attack to trick encrypted messaging appsCyber Security Alliance
 
Understanding the fundamentals of attacks
Understanding the fundamentals of attacksUnderstanding the fundamentals of attacks
Understanding the fundamentals of attacksCyber Security Alliance
 
Reverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemReverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemCyber Security Alliance
 
Easy public-private-keys-strong-authentication-using-u2 f
Easy public-private-keys-strong-authentication-using-u2 fEasy public-private-keys-strong-authentication-using-u2 f
Easy public-private-keys-strong-authentication-using-u2 fCyber Security Alliance
 
Create a-strong-two-factors-authentication-device-for-less-than-chf-100
Create a-strong-two-factors-authentication-device-for-less-than-chf-100Create a-strong-two-factors-authentication-device-for-less-than-chf-100
Create a-strong-two-factors-authentication-device-for-less-than-chf-100Cyber Security Alliance
 
Offline bruteforce attack on wi fi protected setup
Offline bruteforce attack on wi fi protected setupOffline bruteforce attack on wi fi protected setup
Offline bruteforce attack on wi fi protected setupCyber Security Alliance
 
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...Cyber Security Alliance
 
Warning Ahead: SecurityStorms are Brewing in Your JavaScript
Warning Ahead: SecurityStorms are Brewing in Your JavaScriptWarning Ahead: SecurityStorms are Brewing in Your JavaScript
Warning Ahead: SecurityStorms are Brewing in Your JavaScriptCyber Security Alliance
 
Killing any security product … using a Mimikatz undocumented feature
Killing any security product … using a Mimikatz undocumented featureKilling any security product … using a Mimikatz undocumented feature
Killing any security product … using a Mimikatz undocumented featureCyber Security Alliance
 

Plus de Cyber Security Alliance (20)

Bug Bounty @ Swisscom
Bug Bounty @ SwisscomBug Bounty @ Swisscom
Bug Bounty @ Swisscom
 
Robots are among us, but who takes responsibility?
Robots are among us, but who takes responsibility?Robots are among us, but who takes responsibility?
Robots are among us, but who takes responsibility?
 
iOS malware: what's the risk and how to reduce it
iOS malware: what's the risk and how to reduce itiOS malware: what's the risk and how to reduce it
iOS malware: what's the risk and how to reduce it
 
Why huntung IoC fails at protecting against targeted attacks
Why huntung IoC fails at protecting against targeted attacksWhy huntung IoC fails at protecting against targeted attacks
Why huntung IoC fails at protecting against targeted attacks
 
Corporations - the new victims of targeted ransomware
Corporations - the new victims of targeted ransomwareCorporations - the new victims of targeted ransomware
Corporations - the new victims of targeted ransomware
 
Blockchain for Beginners
Blockchain for Beginners Blockchain for Beginners
Blockchain for Beginners
 
Le pentest pour les nuls #cybsec16
Le pentest pour les nuls #cybsec16Le pentest pour les nuls #cybsec16
Le pentest pour les nuls #cybsec16
 
Introducing Man in the Contacts attack to trick encrypted messaging apps
Introducing Man in the Contacts attack to trick encrypted messaging appsIntroducing Man in the Contacts attack to trick encrypted messaging apps
Introducing Man in the Contacts attack to trick encrypted messaging apps
 
Understanding the fundamentals of attacks
Understanding the fundamentals of attacksUnderstanding the fundamentals of attacks
Understanding the fundamentals of attacks
 
Rump : iOS patch diffing
Rump : iOS patch diffingRump : iOS patch diffing
Rump : iOS patch diffing
 
An easy way into your sap systems v3.0
An easy way into your sap systems v3.0An easy way into your sap systems v3.0
An easy way into your sap systems v3.0
 
Reverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemReverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande Modem
 
Easy public-private-keys-strong-authentication-using-u2 f
Easy public-private-keys-strong-authentication-using-u2 fEasy public-private-keys-strong-authentication-using-u2 f
Easy public-private-keys-strong-authentication-using-u2 f
 
Create a-strong-two-factors-authentication-device-for-less-than-chf-100
Create a-strong-two-factors-authentication-device-for-less-than-chf-100Create a-strong-two-factors-authentication-device-for-less-than-chf-100
Create a-strong-two-factors-authentication-device-for-less-than-chf-100
 
Offline bruteforce attack on wi fi protected setup
Offline bruteforce attack on wi fi protected setupOffline bruteforce attack on wi fi protected setup
Offline bruteforce attack on wi fi protected setup
 
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
 
Warning Ahead: SecurityStorms are Brewing in Your JavaScript
Warning Ahead: SecurityStorms are Brewing in Your JavaScriptWarning Ahead: SecurityStorms are Brewing in Your JavaScript
Warning Ahead: SecurityStorms are Brewing in Your JavaScript
 
Killing any security product … using a Mimikatz undocumented feature
Killing any security product … using a Mimikatz undocumented featureKilling any security product … using a Mimikatz undocumented feature
Killing any security product … using a Mimikatz undocumented feature
 
Rump attaque usb_caralinda_fabrice
Rump attaque usb_caralinda_fabriceRump attaque usb_caralinda_fabrice
Rump attaque usb_caralinda_fabrice
 
Operation emmental appsec
Operation emmental appsecOperation emmental appsec
Operation emmental appsec
 

ASFWS 2012 - OAuth : un protocole d’autorisation qui authentifie ? par Maxime Feroulcole_qui_authentifie

  • 1. Oauth : un protocole d'autorisation qui authentifie ? Maxime Féroul Directeur Technique / KYOS IT SECURITY Application Security Forum - 2012 Western Switzerland 7-8 novembre 2012 - Y-Parc / Yverdon-les-Bains https://www.appsec-forum.ch
  • 2. 2 # who -m  Ingénieur Informatique & Télécom (ESIGETEL / France)  15 ans d'expérience : web-hosting & sécurité  Co-fondateur de Kyos IT Security (2002) : 10 ans ;) – Pen-testing & intégration & IAM – Recherche EU : SEINIT, DEMONS,... – Spacecom : le wifi est correct ?  Domaines de prédilection : en ce moment J2ee & IAM
  • 3. 3 Agenda Contexte : Social Login Oauth 2.0 : Sous le capot Implicit Flow : ou Implicit Flaw ? Mitigation : La bonne implémentation
  • 4. 4 Perturbation atmosphérique...  Poursuite de la décentralisation des SI  Utilisation de plateformes “tierces”, en dehors de son domaine de sécurité Nouveaux défis pour le contrôle d'accès Identités Multiples, BYOD, “Information and user centric”, ...
  • 5. ...et toujours le même “Graal“ SIMPLICITÉ UTILISATEUR, FACILITÉ DE MISE EN OEUVRE & SÉCURITÉ
  • 6. 6 Emergence du “Social Login“ Utiliser les services d'authentification d'une plateforme de réseau social
  • 7. Social Login – Pourquoi ?  Pour l'utilisateur – Moins de login & mot de passe – Meilleure gestion de ses identités • Facebook → sites perso., linkedin → sites pro., … • Meilleur « contrôle » : révoquer les applications
  • 8. Social Login – Pourquoi ?  Pour le fournisseur de service – Enregistrement simplifié – Information plus fiable – Plus d'information !
  • 9. Social Login – Comment ?  Etablir un « lien de confiance », fédérer les identités  Déléguer l'authentification et l'autorisation  Echanger des informations sur l'identité
  • 10. Standards : Maelström ? Connotation “web Framework / Oauth 2.0 / end-user” message Web Service Web Centric API Délégation de l'autorisation Global & très modulaire WS-Security, WS- Federation, WS- User Connotation Trust,... SOAP, SAML Centric REST, “Microsoft & XML assertion UMA JSON IBM” Framework / service “couche identité” au d'identité dessus de OAuth 2.0 Profile, Authentification, protocol, session, attributs Autorisation bindings,... d'identité,... Authentification, SSO, Federation Connotation “Standard Entreprise”
  • 11. Oauth 2.0 – Emergence  Facebook, Google, Salesforce,... REST, Simplicité, “designed for the web...”
  • 12. 12 Agenda Contexte : Social Login Oauth 2.0 : Sous le capot Implicit Flow : ou Implicit Flaw ? Mitigation : La bonne implémentation
  • 13. 13 Password anti-pattern Bonjour BLOG, j'aimerais aussi que tu publies mes “posts” sur Facebook ? Pas de problème, donne moi ton login et ton mot de passe Facebook, je m'y connecterais en ton nom pour mettre à jour ton profil... Tu m'excuses mais j'ai moyennement confiance en toi BLOG, tu ne peux pas faire autrement que stocker mes “crédentiels” ?
  • 14. 14 Oauth 2.0 – Framework d'autorisation Permettre à des applications et des fournisseurs de services d’accéder à des données d’un utilisateur en lui demandant sa permission.
  • 15. Oauth 2.0 – Rôles Resource Client Authorization Resource Owner Server Server Par exemple : Un internaute Utilise un blog En s'authentifiant via Facebook et pour également publier ses « posts » sur son profil
  • 16. 16 Oauth 2.0 – Principe 2. S'authentifie et autorise l'application (client) Authorization Server 3. Délivre le token 1. Accède au d'accès Délègue service l'autorisation Resource Client Server 4. Accède à la ressource protégée
  • 17. 17 Oauth 2.0 – Spécification  Client type & profile – Confidential, public & WebApp, user agent, native  Endpoints – Authorization, Token, Redirection  Plusieurs types de « jeton d'autorisation » – Authorization Code, Implicit, Resource Owner Password Credentials, Client Credentials – Des requêtes et réponses pour chaque type
  • 18. 18 Oauth 2.0 – Question de départ Oauth : un protocole d'autorisation qui authentifie ?  Ok pour le password anti-pattern et l'autorisation – Mais alors quel rapport avec le social login ? – Comment “authentifier” ?  Authentifier c'est obtenir des attributs d'identité et prouver/valider qu'ils sont justes Oauth permet d'accéder à des données d'identité !
  • 19. 19 Oauth 2.0 – Comment authentifier ? 1.) BLOG demande à BORIS l'autorisation d'aller récupérer chez Facebook les données relatives à son identité pour l'authentifier. Profil Boris Nom Prénom Email Login 2.) BORIS s'authentifie chez Facebook et autorise BLOG à lire ses données d'identité.
  • 20. 20 Agenda Contexte : Social Login Oauth : Sous le capot Implicit Flow : ou Implicit Flaw ? Mitigation : La bonne implémentation
  • 21. 21 Oauth 2.0 – Implicit Flow RECHERCHE DE LA SIMPLICITÉ  Délivrance « directe » du token d'accès  Moins d'échanges  Application mobile (native)  Application JavaScript (user-agent)
  • 22. 22 Exemple – Authentification Facebook Sign in via Facebook Redirect vers Facebook OAuth Implicit request AppId, redirectUri(blog.jsp) Authentificatio n OAuth Implicit response + Autorisation Redirect vers redirectUri(blog.jsp) de AppId +AccessToken(xxxx) Get /blog.jsp?AToken=xxxx Get /graphAPI?AToken=xxxx JSON object userId=Boris Welcome Boris !
  • 23. 23 Access Token – Attention ! « ...This specification does not provide any methods for the resource server to ensure that an access token presented to it by a given client was issued to that client by the authorization server. » Source : draft-ietf-oauth- v2-31
  • 24. 24 Implicit Flow – Usurpation AccessToke Auth.+ Auto. n Get /ninjagame.jsp?ATo Get ken=ABXYZ /graphAPI?AToken=ABXYZ userId=Boris Welcome on NinjaGame Boris ! Get /blog.jsp?AToken Get Réutilisation =ABXYZ /graphAPI?AToke du token ! n=ABXYZ userId=Boris Welcome Boris !
  • 25. 25 La « spec. » nous avais prévenu... «... Authenticating Resource Owners to clients is out of scope for this specification. Any specification that uses the authorization process as a form of delegated end-user authentication to the client (e.g. third-party sign-in service) MUST NOT use the implicit flow without additional security mechanisms such as audience restricting the access token that enable the client to determine if the access token was issued for its use. » Source : draft-ietf-oauth- v2-31
  • 26. 26 Est ce que cela nous concerne ? N'est ce pas plutôt un « problème » pour facebook, google, et consorts ?  Oui si nous implémentons “nous-même” ou sans les framework proposés  Oui si nous vérifions des implémentations  Oui pour notre culture et une meilleure compréhension d'Oauth ;)
  • 27. 27 Agenda Contexte : Social Login Oauth : Sous le capot Implicit Flow : ou Implicit Flaw ? Mitigation : La bonne implémentation
  • 28. Mitigation – Implicit Flow  Restreindre l'audience / valider le token d'accès avant d'authentifier – Signed request (Facebook JavaScript SDK) – Service de validation du token
  • 29. 29 Mitigation – Server Side Flow Sign in via Facebook Redirect vers Facebook OAuth Authorization request AppId, redirectUri(blog.jsp) Authentification OAuth Authorization response + Autorisation de AppId Redirect vers redirectUri(blog.jsp) +Code(xxxx) Get /blog.jsp?Code=xxxx OAuth Access Token request AppId, Code, Lié à l'AppId redirectUri(blog.jsp) donc invalide AccessToken=yyyy pour une autre app ! Get /graphAPI?AToken=yyyy JSON object userId=Boris Welcome Boris !
  • 30. 30 Mitigation – OpenId Connect Une extension de Oauth 2.0  UserInfo endpoint – Fournisseur d'information IDENTITY d'identité Layer  ID token objects OAUTH 2.0 – Informations sur les évenements Layer d'authentification (i.e audience, contexte, temps,...)
  • 31. 31 Conclusion  Un protocole d'autorisation ...  … mais qui peut servir à authentifier ...  … à condition de l'implémenter correctement. Les mécanismes de sécurité existent, il faut veiller à les utiliser et à les vérifier. … au prix d'un peu de compléxité ... « Il n'y a pas de simplicité véritable, il n'y a que des simplifications » Léon Paul Farge
  • 32. 32 Questions?  Principales Sources http://www.thread-safe.com/2012/01/problem-with-oauth-for-authentication.html by John Bradley http://www.independentid.com/2011/04/oauth-does-it-authenticate-wellyes-and.html by Phil Hunt http://vennofidentity.org/ by Eve Maler http://oauth.net/2/ http://tools.ietf.org/html/draft-ietf-oauth-v2-31 http://openid.net/connect/ https://developers.facebook.com/docs/concepts/login/ https://developers.google.com/accounts/docs/OAuth2
  • 33. 33 Merci/Thank you!  Contact: maxime.feroul@kyos.ch http://www.kyos.ch Slides: http://slideshare.net/ASF-WS/presentations