Switch branches/tags
Commits on Nov 27, 2018
  1. fix: return a 415 for unsupported content-type headers

    philbooth committed Nov 27, 2018
Commits on Nov 21, 2018
  1. chore: ensure sentry shows line numbers for release builds

    philbooth committed Nov 21, 2018
Commits on Nov 6, 2018
  1. feat(logging): enable sentry

    philbooth committed Nov 6, 2018
    Adds sentry crate to the dependencies and enables two integrations,
    capturing panics and failures. We can also enable a log or env_logger
    integration when we add proper logging to this project.
    To enable it, set the SENTRY_DSN environment variable appropriately.
    Any invalid value, including the empty string, disables Sentry.
Commits on Oct 26, 2018
  1. refactor: map to failure errors in X-Weave-Timestamp middleware

    philbooth committed Oct 26, 2018
Commits on Oct 22, 2018
Commits on Oct 19, 2018
  1. refactor: convert validation errors to use failure

    philbooth committed Oct 18, 2018
  2. feat: map db and hawk errors to a common top-level error type

    philbooth committed Oct 17, 2018
Commits on Oct 16, 2018
  1. fix: use single = for equality test in docs script

    philbooth committed Oct 16, 2018
Commits on Oct 15, 2018
  1. fix: use posix-friendly logical and in docs script

    philbooth committed Oct 15, 2018
  2. chore: deploy docs to gh-pages branch

    philbooth committed Oct 15, 2018
  3. fix: return an array from GET /info/quota

    philbooth committed Oct 15, 2018
Commits on Sep 28, 2018
  1. feat: implement the /configuration endpoint

    philbooth committed Sep 25, 2018
  2. Merge pull request #41 from mozilla-services/pb/auth-docs

    philbooth committed Sep 28, 2018
Commits on Sep 26, 2018
  1. chore: add doc comments for Hawk authentication

    philbooth committed Sep 26, 2018
Commits on Sep 19, 2018
  1. feat: implement Deserialize for the master_secret setting

    philbooth committed Sep 19, 2018
    The master_secret setting is a `Vec<u8>`, for which there is no default
    deserialization. This change pulls it out to a struct and implements
    Deserialize so that it can be set with a string via environment variable
    or config file.
    That change also represented an opportunity to cache the value of
    signing_secret, which was being freshly calculated on every request
    even though the value is a constant derived from master_secret. So the
    struct is actually called `Secrets` and has two properties.
    This does leave a slightly weird naming mismatch that I wasn't sure what
    to do with. `master_secret` makes sense from the perspective of setting
    e.g. a `SYNC_MASTER_SECRET` environment variable, but it looks kind of
    funny when the code accesses that property internally as a `Secrets`
    struct with its own `master_secret` and `signing_secret` properties. I
    tried to minimise the weirdness by passing around the `Secrets` instance
    and elsewhere referring to that variable/argument as `secrets`.
  2. chore: rustup update + cargo fmt

    philbooth committed Sep 19, 2018
Commits on Sep 13, 2018
  1. refactor: move the master token secret into server state

    philbooth committed Sep 13, 2018
    `FromRequest::Config` uses the `Default` trait to create dependencies,
    which is no good for us because we don't want to use a default value for
    the master token secret. Instead, this change pushes the master secret
    into the `ServerState` struct, where we can set it after reading from
    environment variables or a config file.
    One slight downside to this is that I had to wrap it in an `Arc`, to
    avoid cloning a fresh copy of the master secret in every instance of
    `ServerState`. I did try giving `ServerState` an explicit lifetime and
    borrowing the master secret as a slice, but I couldn't get that to play
    nicely with the requirement for a static lifetime on the `App` instance.
Commits on Sep 12, 2018
  1. feat: implement hawk authentication

    philbooth committed Sep 12, 2018
Commits on Aug 23, 2018
  1. feat: define and mock a db trait

    philbooth committed Aug 23, 2018
Commits on Aug 17, 2018
  1. feat: add handler stub for DELETE /{uid}

    philbooth committed Aug 15, 2018
Commits on Aug 14, 2018
  1. fix: rip out the DBExecutor code

    philbooth committed Aug 14, 2018
Commits on Aug 9, 2018
  1. feat: add handler stubs for collection endpoints

    philbooth committed Aug 8, 2018
  2. fix: add missing info routes to server setup

    philbooth committed Aug 8, 2018
    These should have been inclued in 905304a.
    The root cause of me forgetting to include them was the duplicated route
    initialisation code in server/ and server/ Hence, while
    fixing the problem, I also extracted that duplicated code to a common
    macro that can be used in both contexts.
Commits on Aug 8, 2018
Commits on Aug 3, 2018
  1. feat: add handler stub for delete_bso

    philbooth committed Aug 3, 2018
Commits on Aug 1, 2018
  1. fix(tests): stop creating a fresh DBManager on every request

    philbooth committed Aug 1, 2018
Commits on Jul 31, 2018
  1. fix: cargo fmt

    philbooth committed Jul 31, 2018