The Mozilla Personas Protocol
This is a write down of the Mozila Personas protocol (1) as if the messages were exchanged over instant messaging.
In the first exchange, a website (in this example example.com) asks for the browser for an assertion:
navigator.id.get(callback);
The browser takes it from there and switches to a private group with the user to figure out which IDP they'd like to use:
Knowing which IDP to use, the Browser uses a convention to figure out how to load the provisioning URL:
https://email.com/.well-known/browserid
Which points the user to:
https://email.com/browserid/provision.html,
The Browser then proceeds to chat with the IDP:
This conversation happens via newly introduced APIs:
// get parameters of provisioning
navigator.id.beginProvisioning(function(email, cert_duration) {
// ... check if the current user is authenticated as 'email' ...
if (notAuthenticated()) {
navigator.id.raiseProvisioningFailure("user isn't authenticated");
return;
}
// request a keypair be generated by browserid and get the public key
navigator.id.genKeyPair(function(pubkey) {
// ... interact with the server to sign the public key and get
// a certificate ...
someServerInteraction(function(cert){
// pass the certificate back to BrowserID and complete the
// provisioining process
navigator.id.registerCertificate(cert);
});
});
});
With a newly minted certificate, the browser takes it back to the chat with example.com:
And the user is now logged in.
This is a large oversimplification, but should give you a sense of the kinda of privacy property it has.
Specifically, the IDP is unaware of most of the interaction here, namelly:
- which relying party the user is signing-in to
- at which moment the user is signing in