mozilla/fxa-auth-server — pull request #685 by dannycoates (2014-04-19 05:31:26+00:00)
Title: seperate customs (fraud / abuse) server

This moves the customs functionality to a new repository, currently https://github.com/dannycoates/fxa-customs-server

## Dev environment changes

To ease the transition this change adds the new server as a dependency. In development the npm scripts start the customs server in the background with its default configuration. It **does not** start memcached for you.

To test the auth-server and the customs server together requires a local memcached process running on the default port 11211. `npm start` and `npm test` default to not using the customs server for easier dev. The `npm run test-all` script does use the customs server and requires memcached to be running beforehand.

## Stage / Prod changes

An ElastiCache memcache instance is required. The customs server will run from the node_modules of the auth-server and be monitored by circus in this release. A future release should move customs server to its own CF template.

## Logic changes

The rate limiting logic has been *slightly* improved.

* Added IP and User-Agent data points
* The blocking period doesn't get extended on each subsequent request
* Failed login attempts are now per IP/email address pair
* All endpoints that require a password report failed attempts
* Data is stored in memcached instead of process memory

## Config addition

```json
{
"customsUrl":"http://127.0.0.1:7000"
}
```

## TODO

User-Agent based rate limiting is not functional. The user-agent validation function is not implemented.