DEPRECATED - Migrated to https://github.com/mozilla/fxa
Перейти к файлу
Ryan Kelly 40d557a368 Don't apply /v1 prefix to .well-known or related files. 2013-10-23 10:49:29 +11:00
awsboxen Use pre-computed credentials for most loadtest operations. 2013-09-04 17:45:06 -07:00
bin removed special handling of stats and server.log file 2013-09-17 11:07:39 -07:00
bundle Enhanced logging experience 2013-08-29 13:56:04 -07:00
client Prepend version identifier to all API URLs. 2013-10-22 16:08:02 +11:00
config use https url for fab 2013-09-27 12:12:14 -07:00
docs Update document error codes based on feedback from dcoates and warner. 2013-10-22 15:55:42 +11:00
loadtest Tweak loadtests to run using the AWS cluster, rather than local machine. 2013-09-20 10:38:33 +10:00
models move keyfetchtoken to cache 2013-09-03 12:03:53 -07:00
routes Don't apply /v1 prefix to .well-known or related files. 2013-10-23 10:49:29 +11:00
scripts Merge branch 'master' into cassy 2013-09-23 11:37:52 -07:00
server Make hawk use the public URL when checking request signature. 2013-09-05 14:29:00 +10:00
templates Use HTML email templates, proxy the verification page through the bridge 2013-08-20 13:39:23 -07:00
test add verify reset code to client api 2013-09-25 15:38:50 -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 now generates certs from a signToken and public key 2013-05-16 17:13:01 -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 return a 400 error for incorrect verification codes 2013-08-20 17:53:48 -07:00
hkdf.js Add missing copyright headers 2013-07-25 18:49:45 -07:00
kv.js Enhanced logging experience 2013-08-29 13:56:04 -07:00
log.js removed extra log config options 2013-09-17 11:19:30 -07:00
mailer.js Enhanced logging experience 2013-08-29 13:56:04 -07:00
memory_monitor.js Add missing copyright headers 2013-07-25 18:49:45 -07:00
package.json upgrade to 0.2.4 which fixes npm warnings 2013-10-14 11:21:18 +03:00
provision.html stubbed some idp stuff 2013-05-14 16:23:36 -07:00
sign_in.html stubbed some idp stuff 2013-05-14 16:23:36 -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