SlideShare una empresa de Scribd logo
1 de 122
Descargar para leer sin conexión
Persona:
                   in your browsers,
                   killing your passwords




François Marier – @fmarier
X
Username:
francois


Password:
****************



                   Sign in
security
bcrypt
bcrypt

per-user salt
bcrypt

per-user salt

site secret
bcrypt

per-user salt

site secret

password & lockout policies
bcrypt

per-user salt

site secret

password & lockout policies

secure recovery
bcrypt


      0 1 2
    2
per-user salt

               o  rd
site secret
         s s w         s
   p  a & lockoutne
                li policies
password
           id e
      g u
secure recovery
conversion
   rate
# hits




         signup
# hits




         signup signup_complete
# hits


                    lost
                    cust-
                    omers




         signup signup_complete
existing solutions
client certificates
centralized authorities
so...




        storing passwords is hard
so...




        storing passwords is hard

        no suitable alternatives
decentralized
decentralized
                privacy-sensitive
decentralized
                privacy-sensitive




      simple
decentralized
                privacy-sensitive




      simple
                   open source
in your browser
how does it work?
francois@mozilla.com
getting a proof of email ownership
authenticate?
authenticate?


 public key
authenticate?


   public key


signed public key
you have a signed statement from your
provider that you own your email address
logging into a 3rd party site
assertion

         wikipedia.org

Valid for:   2 minutes
assertion

         wikipedia.org

Valid for:   2 minutes


check audience
assertion

         wikipedia.org

Valid for:   2 minutes


check audience
check expiry
assertion

         wikipedia.org

Valid for:   2 minutes


check audience
check expiry
check signature
assertion




  public key
                            wikipedia.org

               Valid for:         2 minutes
assertion




                         wikipedia.org

            Valid for:         2 minutes
assertion


session cookie
achieving
that vision
email providers

browser vendors
email providers
fmarier@gmail.com
fmarier@gmail.com
fallback identity provider:

   login.persona.org
persona.org account
connect & express      uglify

 bcrypt      ejs    underscore

computer-cluster       nodemailer

   jwcryto     client-sessions

 convict     winston      vows
“A Node.JS Holiday Season”
https://hacks.mozilla.org/
proxy identity provider:
support for all email providers
browser vendors
navigator.id.*
js
support for all
modern browsers



       >= 8
L
I
F
D
Locally
Isolated
Feature
Domain
wanted: trusted code
running in the browser
browserid.org

login.persona.org
browserid.org

login.persona.org
localStorage

localStorage.setItem("key", serializedKey);

var serializedKey = localStorage.getItem("key");
storage tied to
login.persona.org
window.postMessage()
jschannel
               localStorage
            https://login.persona.org
jschannel
                 localStorage
              https://login.persona.org




questions?
live demo
using it on your site
<script src=”https://login.persona.org/include.js”>
</script>
</body></html>
navigator.id.watch({
    loggedInEmail: “francois@mozilla.com”,
    onlogin: function (assertion) {
        $.post('/login',
            {assertion: assertion},
            function (data) {
                // do something
            }
        );
    },
    onlogout: function () {
        window.location = '/logout';
    }
});
navigator.id.watch({
    loggedInUser: “francois@mozilla.com”,
    onlogin: function (assertion) {
        $.post('/login',
            {assertion: assertion},
            function (data) {
                // do something
            }
        );
    },
    onlogout: function () {
        window.location = '/logout';
    }
});
navigator.id.watch({
    loggedInUser: null,
    onlogin: function (assertion) {
        $.post('/login',
            {assertion: assertion},
            function (data) {
                // do something
            }
        );
    },
    onlogout: function () {
        window.location = '/logout';
    }
});
navigator.id.watch({
    loggedInUser: null,
    onlogin: function (assertion) {
        $.post('/login',
            {assertion: assertion},
            function (data) {
                // do something
            }
        );
    },
    onlogout: function () {
        window.location = '/logout';
    }
});
navigator.id.watch({
    loggedInUser: null,
    onlogin: function (assertion) {
        $.post('/login',
            {assertion: assertion},
            function (data) {
                window.location = '/';
            }
        );
    },
    onlogout: function () {
        window.location = '/logout';
    }
});
navigator.id.request()
navigator.id.watch({
    loggedInUser: null,
    onlogin: function (assertion) {
        $.post('/login',
            {assertion: assertion},
            function (data) {
                window.location = '/';
            }
        );
    },
    onlogout: function () {
        window.location = '/logout';
    }
});
navigator.id.watch({
    loggedInUser: null,
    onlogin: function (assertion) {
        $.post('/login',
            {assertion: assertion},
            function (data) {
                window.location = '/home';
            }
        );
    },
    onlogout: function () {
        window.location = '/logout';
    }
});
var request = https.request({
  host: 'verifier.login.persona.org',
  path: '/verify',
  method: 'POST',
  headers: {
    'content-type':
      'application/x-www-form-urlencoded',
    'content-length': body.length
  }
}, onVerifyResponse);
var request = https.request({
  host: 'verifier.login.persona.org',
  path: '/verify',
  method: 'POST',
  headers: {
    'content-type':
      'application/x-www-form-urlencoded',
    'content-length': body.length
  }
}, onVerifyResponse);

var body = qs.stringify({
  assertion: assertion,
  audience: 'http://123done.org'
});
request.write(body);

request.end();
var request = https.request({
  host: 'verifier.login.persona.org',
  path: '/verify',
  method: 'POST',
  headers: {
    'content-type':
      'application/x-www-form-urlencoded',
    'content-length': body.length
  }
}, onVerifyResponse);

var body = qs.stringify({
  assertion: assertion,
  audience: 'http://123done.org'
});
request.write(body);

request.end();
{
    status: “okay”,

    audience: “http://123done.org”,

    expires: 1344849682560,

    email: “francois@mozilla.com”,

    issuer: “login.persona.org”
}
{
    status: “failed”,

    reason: “assertion has expired”
}
navigator.id.logout()
navigator.id.watch({
    loggedInUser: null,
    onlogin: function (assertion) {
        $.post('/login',
            {assertion: assertion},
            function (data) {
                window.location = '/home';
            }
        );
    },
    onlogout: function () {
        window.location = '/logout';
    }
});
1. load javascript library
1. load javascript library

2. setup login & logout callbacks
1. load javascript library

2. setup login & logout callbacks

3. add login and logout buttons
1. load javascript library

2. setup login & logout callbacks

3. add login and logout buttons

4. verify proof of ownership
framework / CMS plugins

   Express
              Jungles
   Mootools
              Olives
   Passport
To learn more about Persona:
https://login.persona.org/
http://identity.mozilla.com/

https://developer.mozilla.org/docs/Persona/Why_Persona
https://developer.mozilla.org/docs/Persona/Quick_Setup

https://github.com/mozilla/browserid-cookbook
https://developer.mozilla.org/docs/Persona/Libraries_and_plugins

http://123done.org/
https://hacks.mozilla.org/category/a-node-js-holiday-season/




@fmarier                            http://fmarier.org
Photo credits:
Top 500 passwords: http://xato.net/passwords/more-top-worst-passwords/

Parchment: https://secure.flickr.com/photos/27613359@N03/6750396225/

Elephant in room: https://secure.flickr.com/photos/bitboy/246805948/

Beach flower: https://secure.flickr.com/photos/vwingate/4696429215/

Cookie on tray: https://secure.flickr.com/photos/jamisonjudd/4810986199/




                © 2012 François Marier <francois@mozilla.com>
                This work is licensed under a
                Creative Commons Attribution-ShareAlike 3.0 New Zealand License.

Más contenido relacionado

La actualidad más candente

Passwords and freedom: can we lose the former and retain the latter?
Passwords and freedom: can we lose the former and retain the latter?Passwords and freedom: can we lose the former and retain the latter?
Passwords and freedom: can we lose the former and retain the latter?
Francois Marier
 
Kick start with j query
Kick start with j queryKick start with j query
Kick start with j query
Md. Ziaul Haq
 
JQuery In Rails
JQuery In RailsJQuery In Rails
JQuery In Rails
Louie Zhao
 

La actualidad más candente (17)

Geb qa fest2017
Geb qa fest2017Geb qa fest2017
Geb qa fest2017
 
PythonでJWT生成からボット作成、投稿までやってみた
PythonでJWT生成からボット作成、投稿までやってみたPythonでJWT生成からボット作成、投稿までやってみた
PythonでJWT生成からボット作成、投稿までやってみた
 
Error found
Error foundError found
Error found
 
Passwords and freedom: can we lose the former and retain the latter?
Passwords and freedom: can we lose the former and retain the latter?Passwords and freedom: can we lose the former and retain the latter?
Passwords and freedom: can we lose the former and retain the latter?
 
RubyBarCamp “Полезные gems и plugins”
RubyBarCamp “Полезные gems и plugins”RubyBarCamp “Полезные gems и plugins”
RubyBarCamp “Полезные gems и plugins”
 
Easy logins for Ruby web applications
Easy logins for Ruby web applicationsEasy logins for Ruby web applications
Easy logins for Ruby web applications
 
Mobile Patrons: Better Services on the Go (For Techie)
Mobile Patrons: Better Services on the Go (For Techie)Mobile Patrons: Better Services on the Go (For Techie)
Mobile Patrons: Better Services on the Go (For Techie)
 
Intoduction on Playframework
Intoduction on PlayframeworkIntoduction on Playframework
Intoduction on Playframework
 
Kick start with j query
Kick start with j queryKick start with j query
Kick start with j query
 
Secured SOA
Secured SOASecured SOA
Secured SOA
 
Ruby Robots
Ruby RobotsRuby Robots
Ruby Robots
 
Command-Oriented Architecture
Command-Oriented ArchitectureCommand-Oriented Architecture
Command-Oriented Architecture
 
Php if
Php ifPhp if
Php if
 
Django at the Disco
Django at the DiscoDjango at the Disco
Django at the Disco
 
Introduction to ECMAScript 2015
Introduction to ECMAScript 2015Introduction to ECMAScript 2015
Introduction to ECMAScript 2015
 
JQuery In Rails
JQuery In RailsJQuery In Rails
JQuery In Rails
 
Django at the Disco
Django at the DiscoDjango at the Disco
Django at the Disco
 

Destacado

Securing the Web without site-specific passwords
Securing the Web without site-specific passwordsSecuring the Web without site-specific passwords
Securing the Web without site-specific passwords
Francois Marier
 

Destacado (7)

How not to delete your important files
How not to delete your important filesHow not to delete your important files
How not to delete your important files
 
Defeating Cross-Site Scripting with Content Security Policy
Defeating Cross-Site Scripting with Content Security PolicyDefeating Cross-Site Scripting with Content Security Policy
Defeating Cross-Site Scripting with Content Security Policy
 
Privacy and Tracking Protection in Firefox
Privacy and Tracking Protection in FirefoxPrivacy and Tracking Protection in Firefox
Privacy and Tracking Protection in Firefox
 
Integrity protection for third-party JavaScript
Integrity protection for third-party JavaScriptIntegrity protection for third-party JavaScript
Integrity protection for third-party JavaScript
 
BrowserID: Distributed Identity in the Browser
BrowserID: Distributed Identity in the BrowserBrowserID: Distributed Identity in the Browser
BrowserID: Distributed Identity in the Browser
 
URL to HTML
URL to HTMLURL to HTML
URL to HTML
 
Securing the Web without site-specific passwords
Securing the Web without site-specific passwordsSecuring the Web without site-specific passwords
Securing the Web without site-specific passwords
 

Similar a Persona: in your browsers, killing your passwords

Killing Passwords with JavaScript
Killing Passwords with JavaScriptKilling Passwords with JavaScript
Killing Passwords with JavaScript
Francois Marier
 
Authentication
AuthenticationAuthentication
Authentication
soon
 
Taking Web Apps Offline
Taking Web Apps OfflineTaking Web Apps Offline
Taking Web Apps Offline
Pedro Morais
 
Nko workshop - node js crud & deploy
Nko workshop - node js crud & deployNko workshop - node js crud & deploy
Nko workshop - node js crud & deploy
Simon Su
 

Similar a Persona: in your browsers, killing your passwords (20)

Building Persona: federated and privacy-sensitive identity for the Web (Open ...
Building Persona: federated and privacy-sensitive identity for the Web (Open ...Building Persona: federated and privacy-sensitive identity for the Web (Open ...
Building Persona: federated and privacy-sensitive identity for the Web (Open ...
 
Building Persona: federated and privacy-sensitive identity for the Web (LCA 2...
Building Persona: federated and privacy-sensitive identity for the Web (LCA 2...Building Persona: federated and privacy-sensitive identity for the Web (LCA 2...
Building Persona: federated and privacy-sensitive identity for the Web (LCA 2...
 
Easy logins for JavaScript web applications
Easy logins for JavaScript web applicationsEasy logins for JavaScript web applications
Easy logins for JavaScript web applications
 
Killing Passwords with JavaScript
Killing Passwords with JavaScriptKilling Passwords with JavaScript
Killing Passwords with JavaScript
 
Webauthn Tutorial
Webauthn TutorialWebauthn Tutorial
Webauthn Tutorial
 
Cross-Platform Authentication with Google+ Sign-In
Cross-Platform Authentication with Google+ Sign-InCross-Platform Authentication with Google+ Sign-In
Cross-Platform Authentication with Google+ Sign-In
 
Authenticating and Securing Node.js APIs
Authenticating and Securing Node.js APIsAuthenticating and Securing Node.js APIs
Authenticating and Securing Node.js APIs
 
Authentication
AuthenticationAuthentication
Authentication
 
Taking Web Apps Offline
Taking Web Apps OfflineTaking Web Apps Offline
Taking Web Apps Offline
 
Tame Accidental Complexity with Ruby and MongoMapper
Tame Accidental Complexity with Ruby and MongoMapperTame Accidental Complexity with Ruby and MongoMapper
Tame Accidental Complexity with Ruby and MongoMapper
 
KISS: Keep It Simple Security - Oleg Zinchenko - Symfony Cafe Kyiv
KISS: Keep It Simple Security - Oleg Zinchenko - Symfony Cafe KyivKISS: Keep It Simple Security - Oleg Zinchenko - Symfony Cafe Kyiv
KISS: Keep It Simple Security - Oleg Zinchenko - Symfony Cafe Kyiv
 
KISS: Keep It Simple Security - Oleg Zinchenko - Symfony Cafe Kyiv
KISS: Keep It Simple Security - Oleg Zinchenko - Symfony Cafe KyivKISS: Keep It Simple Security - Oleg Zinchenko - Symfony Cafe Kyiv
KISS: Keep It Simple Security - Oleg Zinchenko - Symfony Cafe Kyiv
 
Mashing up JavaScript
Mashing up JavaScriptMashing up JavaScript
Mashing up JavaScript
 
Client-side Auth with Ember.js
Client-side Auth with Ember.jsClient-side Auth with Ember.js
Client-side Auth with Ember.js
 
You Shall Not Pass - Security in Symfony
You Shall Not Pass - Security in SymfonyYou Shall Not Pass - Security in Symfony
You Shall Not Pass - Security in Symfony
 
Mashing up JavaScript – Advanced Techniques for modern Web Apps
Mashing up JavaScript – Advanced Techniques for modern Web AppsMashing up JavaScript – Advanced Techniques for modern Web Apps
Mashing up JavaScript – Advanced Techniques for modern Web Apps
 
Nko workshop - node js crud & deploy
Nko workshop - node js crud & deployNko workshop - node js crud & deploy
Nko workshop - node js crud & deploy
 
Drive chrome(headless) with puppeteer
Drive chrome(headless) with puppeteerDrive chrome(headless) with puppeteer
Drive chrome(headless) with puppeteer
 
PHP SA 2014 - Releasing Your Open Source Project
PHP SA 2014 - Releasing Your Open Source ProjectPHP SA 2014 - Releasing Your Open Source Project
PHP SA 2014 - Releasing Your Open Source Project
 
Detecting headless browsers
Detecting headless browsersDetecting headless browsers
Detecting headless browsers
 

Más de Francois Marier

Más de Francois Marier (15)

Security and Privacy settings for Firefox Power Users
Security and Privacy settings for Firefox Power UsersSecurity and Privacy settings for Firefox Power Users
Security and Privacy settings for Firefox Power Users
 
Getting Browsers to Improve the Security of Your Webapp
Getting Browsers to Improve the Security of Your WebappGetting Browsers to Improve the Security of Your Webapp
Getting Browsers to Improve the Security of Your Webapp
 
Hardening Firefox for Security and Privacy
Hardening Firefox for Security and PrivacyHardening Firefox for Security and Privacy
Hardening Firefox for Security and Privacy
 
Security and Privacy on the Web in 2016
Security and Privacy on the Web in 2016Security and Privacy on the Web in 2016
Security and Privacy on the Web in 2016
 
Security and Privacy on the Web in 2015
Security and Privacy on the Web in 2015Security and Privacy on the Web in 2015
Security and Privacy on the Web in 2015
 
Integrity protection for third-party JavaScript
Integrity protection for third-party JavaScriptIntegrity protection for third-party JavaScript
Integrity protection for third-party JavaScript
 
URL to HTML
URL to HTMLURL to HTML
URL to HTML
 
Supporting Debian machines for friends and family
Supporting Debian machines for friends and familySupporting Debian machines for friends and family
Supporting Debian machines for friends and family
 
Outsourcing your webapp maintenance to Debian
Outsourcing your webapp maintenance to DebianOutsourcing your webapp maintenance to Debian
Outsourcing your webapp maintenance to Debian
 
Securing the Web without site-specific passwords
Securing the Web without site-specific passwordsSecuring the Web without site-specific passwords
Securing the Web without site-specific passwords
 
Easy logins for PHP web applications
Easy logins for PHP web applicationsEasy logins for PHP web applications
Easy logins for PHP web applications
 
Mozilla Persona for your domain
Mozilla Persona for your domainMozilla Persona for your domain
Mozilla Persona for your domain
 
Login de usuários: podemos fazer algo melhor que usar senhas ou serviços cent...
Login de usuários: podemos fazer algo melhor que usar senhas ou serviços cent...Login de usuários: podemos fazer algo melhor que usar senhas ou serviços cent...
Login de usuários: podemos fazer algo melhor que usar senhas ou serviços cent...
 
The problem with passwords on the web and what to do about it
The problem with passwords on the web and what to do about itThe problem with passwords on the web and what to do about it
The problem with passwords on the web and what to do about it
 
Persona: un système d'identité pour le Web
Persona: un système d'identité pour le WebPersona: un système d'identité pour le Web
Persona: un système d'identité pour le Web
 

Último

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Último (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

Persona: in your browsers, killing your passwords