Auspice

Auspice

  • Docs

›Using a Custom Server

Introduction

  • Overview
  • Install Auspice
  • How to Run Auspice

Advanced Functionality

  • Displaying multiple trees
  • View Settings
  • Adding extra metadata via CSV/TSV
  • Miscellaneous

Customising Auspice

  • Customising Auspice
  • Client Customisation API
  • Requests Made from the Client

Using a Custom Server

  • Auspice servers
  • Server API
  • Authentication

Narratives

  • Communicating Results Using Narratives
  • Writing a Narrative
  • Converting a narrative to PDF

Release Notes

  • Changelog
  • Auspice Version 2.0

Contributing

  • Contributing to Auspice

Authentication

While Auspice was designed to facilitate open data sharing and rapid dissemination of results, it may be necessary to authenticate certain datasets (or indeed the entire instance). Auspice itself contains no authentication ability, but if you are running a server then it is possible -- and relatively simple -- to build in authentication.

The exact implementation details are beyond the scope of this documentation, but the following provides an outline of the approach we have implemented for nextstrain.org.

Using the Server to Verify Cookies

auth-cartoon

The server can examine cookies sent with each API request (or, the request for index.html) to verify the status of a user. This allows the server to examine the cookie and:

  • Deliver different available datasets depending on the cookie
  • Accept or reject specific dataset requests depending on the cookie
  • Redirect requests to a custom authentication page (referred to as login.html)
    • If this is from a request for index.html (i.e. you want to secure the entire site), then the redirect is simple
    • For redirects from an API request, you may have to respond with a 302 or 303 redirect header.

It is this custom authentication page which can process a login and set a cookie appropriately. As Auspice is served from the same domain, the cookie should remain with all requests.

Implementing authentication is beyond the scope of this documentation, but we can recommend PassportJS and Auth0, the latter of which allows you to easily use single sign-on strategies.

Last updated on 10/17/2019
← Server APICommunicating Results Using Narratives →
  • Using the Server to Verify Cookies
Auspice
External Links
GitHub repoNPM packageNextstrain
Contact Us
emailtwitter
Website built by James Hadfield using Docusaurus
If you use auspice, please cite Hadfield et al., 2018
Copyright © 2014-2020 Richard Neher & Trevor Bedford