Mozilla

Account Manager coming to Firefox

Update: The Account Manager is no longer maintained. Building on this experiment, we have conceived BrowserID. Please consider using it instead.

Last month Mozilla Labs announced a new concept series on online identity. As part of this exploration, we developed the Account Manager.

The Account Manager makes it incredibly easy for users to create new accounts with optional randomly generated passwords, and log into and out of them with just a click. As a web developer, adding support for this feature could take as little as fifteen minutes of hacking (in fact, we’ll mention the first 5 people to add support – read below to learn more.).

We want to make signing into websites easier for all Firefox users, and are looking to ship this feature as soon as possible in Firefox. As part of that process we’re looking for feedback to refine the specification. Now is a really good time to get involved in defining the spec.

There are three things that you can do right now:

This feature is currently available as an experimental add-on, available on the Account Manager homepage.

Here’s a video where you can get a basic idea of how Account Manager works today:

How Does It Work?

The Account Manager specification proposes two small changes to Web sites:

  1. The browser needs to know how to register, sign in, and sign out of your site. You will need a static JSON document, automatically discovered by the browser, which describes what methods the site supports and how they should be executed. For example, a web site might describe their support of “connect” (sign in) like this:

      "methods": {
        "username-password-form": {
          "connect": {
            "method": "POST",
            "path": "/accounts/LoginAuth",
            "params": {
              "username": "Email",
              "password": "Passwd"
          }
      }

    This example tells the browser that the site supports signing in with a form POST to /accounts/LoginAuth, and what parameter names to use for the username and password (Email and Passwd respectively).

  2. The browser needs a way to check which user (if any) is currently signed in. To do this, you need to set an HTTP header in the same code where you would set a cookie with a session ID. If you can’t set an HTTP header, you can also supply a URL the browser will ping.

    The header would look like this:

    X-Account-Management-Status: active; name="Joe User"

    That would tell the browser that “Joe User” is now signed in, so it can provide the appropriate UI (to switch users or sign out).

    How do I try it?

    • Install the demo add-on.
    • Place a host-meta document to your website at /.well-known/host-meta (it must be at this location). This tells the browser where to find the JSON file we described above. For examples, check the spec or Yahoo!’s host-meta.
    • Add the JSON file itself to your site. We call this the Account Manager Control Document, or AMCD for short. The AMCD should contain your form end-points for sign-in and sign-out. Note that you don’t need to change the end-points, just describe them. Check the spec for a complete example.
    • Change your site to set the correct headers when users sign in or out.
    • Make sure you have a password saved in the password manager; you may need to sign in manually once to do that if you haven’t already (this requirement will go away in the future).
    • When we add sign-up support in Account Manager, you will likely need to make minor changes to your registration code.

    Update, 5:45PM PST: Just realized while debugging an intrepid first adopter’s site that there is one more requirement:

    • You can send the status header with every request, or if you don’t want to do that, then you need to provide a sessionstatus method (see the spec) that the browser can ping to find out the user’s signed-in status.

    That’s it, folks! Be one of the first to try implementing the specification on your website, and let us know, and let us know how long it took you to add support for it. We’ll put the first five people to implement this on the @mozhacks twitter account with a link to your site!

    Next time we will go into more depth on how discovery works, our plans to support other auth schemes (like HTTP Auth, OpenID, etc), as well as other neat features we plan to add. Stay tuned! And don’t forget to tell us what you think.


    Web Developer FAQ

    • Do I need to redo all of my authentication code?

      No. Account Manager is designed to require minimal server-side changes. You do have a couple of options, but the minimal setup is just a flat file and a couple of extra headers you need to send out.

    • Do I need to redo all of my account creation code?

      Registration will require some small changes to your registration flow, but we have put extra thought into making it as simple as possible for both Web sites and users alike. Check out our discussion group and specification for the details, and let us know what you think!

    • How is this going to help my users?

      Account Manager is great for users. Here are a few highlights:

      • Simple, convenient, user control

        The browser has a couple of advantages when it comes to making this kind of UI. First, it can dedicate a spot in the browser chrome that will look and behave the same for every site, making it a convenient and automatic go-to place for users to check or change their sign-in status.

        The browser also has deep knowledge about the user. For example, the browser could implement fast user switching with just a click. Or think about picking a username: the browser can look at usernames for other accounts and make some pretty good guesses about what usernames are preferred.

      • Secure

        Many security researchers will tell you: one of the biggest security problems on the Web today is that usernames and passwords are often short and easily guessed. Account Manager makes it so that users don’t need to remember their passwords, and in fact can automatically generate strong passwords when signing up.

        Moreover, Account Manager begins the process of abstracting the plumbing of account management from the UI, making it possible in the future to support cryptographically strong protocols without any major UI changes.

      • Works on top of current and emerging solutions

        Lastly, Account Manager is not a new ID for the Web. Rather, it is designed to work on top of current and emerging solutions like OpenID or others, to bring them all under the same user experience. Users shouldn’t have to care what the underlying technology is.

    • How is this going to help me get more users?

      The easier it is to sign up and sign into your site, the more users you will get. It’s pretty much that simple.

      Note that Account Manager doesn’t force your users to make a choice: you can keep all of your current content-based flows intact, so there is really no downside to adding Account Manager support to your site.

    • Do I need to have special content for Firefox only?

      No! First of all, you don’t need to do *any* changes to your current content at all. Account Manager works behind the scenes using a sitemap and headers to communicate with your site and present the right UI to the user.

      On the other hand, we hope that Account Manager will not be a Firefox-only technology. We’re working towards defining the protocol as a formal specification that other Web browsers can implement.

    Posted by on at

74 comments

Comments are now closed.

  1. Pingback from Getting involved with Account Manager ✩ Mozilla Hacks – the Web developer blog on May 13th, 2010 at 16:01:

    [...] been a couple of weeks since we originally posted about Account Manager and we’ve gotten a lot of feedback. We’ve got a few opportunities for people to get [...]

  2. Simon B. wrote on May 21st, 2010 at 03:46:

    @Dan re Basic Auth; Yes, really a great suggestion! That way this new login/logout feature would be useful immediately, and those using HTTP Basic Auth can stop closing down the whole browser just to unlogin as they are today accustomed to. And basic auth logout is still very much needed — even recent products like Netgear ReadyNAS use Basic Auth for remote file access.

    1. Ron wrote on May 26th, 2010 at 00:02:

      Per my earlier reply to Dan, if Digest Auth is used instead, the log out can be handled on the server.

  3. Pingback from A New Type of Phishing Attack « Aza on Design on May 24th, 2010 at 16:15:

    [...] kind of attack once again shows how important Mozilla’s work on the Firefox Account Manager in keeping you [...]

  4. Pingback from Tantek Çelik Working With Mozilla » arunerblog on May 26th, 2010 at 12:37:

    [...] It is remarkable what the passage of time can do. Not only are we furthering common goals for the betterment of the web, as we have in the past, but now we’re both working in various capacities for Mozilla. Tantek will help us out with the CSS3 Flex Box Model, figuring out what the right thing to do with respect to stylable HTML5 form controls are, and help us with fundamental questions of identity and the open social web in connection with the account manager initiative in Firefox. [...]

  5. Patrick wrote on May 27th, 2010 at 06:49:

    It won’t catch on (firefox account management)….what if I’m not at my computer?

  6. Pigpromoter wrote on May 27th, 2010 at 23:44:

    How and where do you fit Captchas in this authentication model?

  7. Frank wrote on May 28th, 2010 at 11:54:

    How do you plan to incorporate authentication schemes where steps have been already taken to prevent passwords from being sent in the clear. One such technique is described here, but there are many others:

    http://srp.stanford.edu/

  8. Anthony DeRobertis wrote on June 8th, 2010 at 20:40:

    Doesn’t this mean I’d have to give up CSRF protection of login requests? Or is there some way to tell the Authentication Manager request apart from all other requests?

  9. Simon B. wrote on June 15th, 2010 at 00:05:

    @Anthony, if you’re thinking of checking session tokens and referer headers, then it seems a valid question. It does seem that people run a risk of implementing unprotected login methods meant only for account manager, which would be bad indeed.

    Obviously nobody should disable CSRF protection for the sake of Firefox. Account manager must not depend on that.

    Surely session tokens done as cookies will continue to work like always. That leats tokens inside a form (type=hidden and theoretically also url parameters) and referer headers. Perhaps add a referer: key to the JSON document? That same referer entry could be used to fish out tokens hidden in a form, but this seems an ugly hack and doesn’t really give much more protection than a session cookie.

    CSRF protection methods include http://en.wikipedia.org/wiki/Cross-site_request_forgery#Prevention and blocking anything with headers application/x-www-form-urlencoded (ref: http://directwebremoting.org/blog/joe/2007/02/07/csrf_protection.html)

  10. Anthony DeRobertis wrote on June 21st, 2010 at 10:01:

    Currently, I do CSRF protection via hidden form field (with a session-unique token, stored as part of the server’s session info). It doesn’t look like the login manager spec allows that; the login (“connect”) request has anything more than the username & password. So token-based CSRF prevention doesn’t seem possible.

    1. Preturi asigurari RCA wrote on July 15th, 2011 at 01:46:

      “Whoops! What are you doing here?” the account manager page is not working..

      1. louisremi wrote on July 20th, 2011 at 07:05:

        This experiment is being replaced by browserID. We will soon write about it on this very blog, but you can already find info on http://identity.mozilla.com/

  11. Macarthur wrote on July 13th, 2010 at 07:40:

    This doesn’t seem to going to be working exactly one hundred percent to me. My site for example(still in the drafting stages) requires you to get a one time use form token that’s generated any time a user needs to login and it HAS to of course match the one on the serverside. Also i just looked over the comments and someone’s already said it for me. So good job in bringing the web back a step in security mozilla labs. Be sure to change it up to work with CSRF like methods as stated above or else only the most stupid sites will be doing it. Ie those that store passes in plain text(ie pizza hut and other online sites that i don’t give any “real” information too). Also what about those sites that are stupid and require a maximum length? What about that then mozilla labs? Also i hash my passwords in sha512 after adding in some obscuring(based upon the password input sot hat it’s the same each and ever time) how would this work out for me then? It’d not work out since you’re just going to be posting a plaintext password which = bad.

    To me, it seems like you guys are just trying to make it “seem” more secure than what it really is.Yeah the passes will be better but it sure as hell won’t help prevent a mitm attack since the passwords have to be posted as plaintext and with the many many ways to strip ssl relying on it alone isn’t going to be enough.

    Also i normally don’t comment or sign up on sites that use recaptcha since i am not google’s worker but this seems to be something that you as in you and all of the other firefox devs need to rethink.

  12. RCA ieftin wrote on October 29th, 2010 at 07:10:

    How and where do you fit Captchas in this authentication model?

  13. Eivind wrote on February 3rd, 2011 at 01:22:

    Currently the account-manager page-link gives 404. Might want to look into that ?

  14. Pingback from Firefox 4, 5, 6 i 7: przywitasz się z nimi jeszcze w 2011 roku | Web Reporter on February 8th, 2011 at 17:15:

    [...] 5 przyniesie menedżer kont, interfejs mechanizmu F1 Simple Sharing, animacje interfejsu i 64-bitową wersję dla [...]

  15. Pingback from Mozilla presenta Account Manager (experimental add-on) on September 8th, 2011 at 19:26:

    [...] presentata da Mozilla si chiama Account Manager, deve essere implementata nei siti web (vedi Account Manager coming to Firefox) dopodichè una persona potrà effettuare il login ma anche cambiare nome utente “con 1 [...]

  16. Asigurari Locuinte wrote on October 3rd, 2011 at 22:00:

    Currently, I do CSRF protection via hidden form field (with a session-unique token, stored as part of the server’s session info). It doesn’t look like the login manager spec allows that; the login (“connect”) request has anything more than the username & password.

  17. dambovita wrote on October 19th, 2011 at 04:03:

    http://www.mozilla.org/en-US/firefox/accountmanager/ is broken.

1 2

Comments are closed for this article.