DEPRECATED - Migrated to https://github.com/mozilla/fxa
Перейти к файлу
Danny Coates b91396fff9 reorg. renamed models dir to tokens 2013-10-29 13:47:00 -07:00
bin reorg. renamed models dir to tokens 2013-10-29 13:47:00 -07:00
bundle Enhanced logging experience 2013-08-29 13:56:04 -07:00
client Adding copyright headers 2013-10-29 11:56:54 -07:00
config Make TOOBUSY_MAX_LAG be automatically converted to an int. 2013-10-28 11:39:13 -07:00
db reorg. renamed models dir to tokens 2013-10-29 13:47:00 -07:00
docs wip on db api 2013-10-29 13:47:00 -07:00
loadtest Adding copyright headers 2013-10-29 11:56:54 -07:00
routes more WIP on db api 2013-10-29 13:47:00 -07:00
scripts Merge branch 'master' into cassy 2013-09-23 11:37:52 -07:00
server more WIP on db api 2013-10-29 13:47:00 -07:00
templates/email Cleanup static IDP-related views, and add some basic tests. 2013-10-25 15:48:48 +11:00
test Adding copyright headers 2013-10-29 11:56:54 -07:00
tokens reorg. renamed models dir to tokens 2013-10-29 13:47:00 -07:00
.awsbox.json Simplify and cleanup heka+awsbox setup. 2013-09-23 11:52:48 +10:00
.gitignore Add an "overview" document with higher-level description of the service. 2013-10-16 17:26:17 +11:00
.jshintrc added more tests and changed verify_code api to not use sessionToken 2013-07-29 12:11:02 -07:00
.travis.yml Disable node-toobusy entirely under travis. 2013-10-28 11:39:13 -07:00
LICENSE Skeleton Hapi app 2013-05-13 17:00:22 -07:00
README.md Add an "overview" document with higher-level description of the service. 2013-10-16 17:26:17 +11:00
error.js Adding copyright headers 2013-10-29 11:56:54 -07:00
hkdf.js Add missing copyright headers 2013-07-25 18:49:45 -07:00
log.js removed extra log config options 2013-09-17 11:19:30 -07:00
mailer.js Adding copyright headers 2013-10-29 11:56:54 -07:00
memory_monitor.js Add missing copyright headers 2013-07-25 18:49:45 -07:00
package.json more WIP on db api 2013-10-29 13:47:00 -07:00

README.md

Firefox Accounts Server

This project implements the core server-side API for Firefox Accounts. It provides account, device and encryption-key management for the Mozilla Cloud Services ecosystem.

Overview

Detailed design document

Detailed API spec

Prerequisites

  • node 0.10.x or higher
  • npm
  • pgrep
    • Usually available by default on Mac OS X 10.8+ and Linux.
    • On older versions of Mac OS X, get it via: brew install proctools.
  • libgmp
    • On Linux: install libgmp and libgmp-dev packages
    • On Mac OS X: brew install gmp

Install

You'll need node 0.10.x or higher and npm to run the server.

Clone the git repository and install dependencies:

git clone git://github.com/mozilla/picl-idp.git
cd picl-idp
npm install
node ./scripts/gen_keys.js

To start the server, run:

npm start

It will listen on http://localhost:9000 by default.

Testing

Run tests with:

npm test

Reference Client

A node library that implements the client side of the protocol and an example script is located in the /client directory.

/client/index.js /client/example.js

Dev Deployment

There is a development server running the moz-svc-dev AWS environment, at the following address:

http://idp.dev.lcip.org/

It is managed using awsbox and configured to automatically update itself to track the git master branch. You can force-push a particular version of the code by doing:

$> git remote add idp-dev-lcip-org app@idp.dev.lcip.org:git
$> git push idp-dev-lcip-org HEAD:master

The dev deployment is configured to send emails via Amazon SES. If you need to re-create, or want to stand up a similar server, you will need to:

  1. Obtain the SES SMTP credentials; ping @rfk or @zaach for details.
  2. Deploy the new machine using awsbox.
  3. Configure postfix to use the SES credentials:
    1. Edit /etc/postfix/sasl_passwd to insert the SES credentials.
    2. Run /usr/sbin/postmap /etc/postfix/sasl_passwd to compile them.
    3. Edit /etc/postfix/main.cf to change 'relayhost' to the SES SMTP host (typically "email-smtp.us-east-1.amazonaws.com:25").
    4. Run service postfix restart to restart postfix.

Configuration

To set the url of the account bridge, edit config.json on your deployed instance and add:

"bridge": {
  "url": "http://your.account.bridge.org"
}

License

MPL 2.0