ConductScience Sequences
Contents

Installation guide · Sign-in and tokens

What sign-in checks

What the service checks at each sign-in, and how to move to another provider.

The service uses the authorization code flow with PKCE (S256), a one-time state and a nonce. It reads the provider's discovery document and keys, checks the ID token's signature (RS256, PS256, ES256 and EdDSA families, never none or a shared secret), its issuer, audience, expiry and nonce, and asks the userinfo endpoint for claims the ID token leaves out. With BIOSEQUENCE_OIDC_USER_CLAIM=email, the provider must mark the email as verified. Sessions are signed cookies (__Host-, Secure, HttpOnly, SameSite=Lax) that last BIOSEQUENCE_SESSION_HOURS. The service keeps a record of each session in sessions/ on the data volume: its account, when its sign-in ends and the working files it is making (see Working files). Each search belongs to the account's subject ID at the provider, and any other account gets "not found" for it.

Five minutes before a session ends, the page warns the person and offers to sign in again in a new tab, so the work open on the page is kept. Signing in again is a new sign-in at your provider: the rule for who may sign in is checked again, and the new session lasts BIOSEQUENCE_SESSION_HOURS from then. No session lasts longer than that setting. Signing in again before the end keeps the session's working files.

Signing out removes the session from that browser and deletes its working files. It does not sign the person out of the provider. Removing someone from the invite file ends their access at their next click. To end every session at once, for example when someone leaves and the rule that let them in is a domain or a group, replace the cookie key and restart, and everyone signs in again:

docker exec sequences rm /data/session-secret
docker restart sequences

If you set BIOSEQUENCE_SESSION_SECRET_FILE, put a new key of 32 characters or more in that file instead, then restart. A new cookie key does not end API tokens: revoke them on the usage page.

Move to another provider

Each search belongs to the user ID (sub) that your provider gave its owner, and another provider's IDs name other people. So the data volume keeps the provider it first signed in through: the first start with sign-in on writes the issuer to /data/sign-in-provider.json, and a later start with a different BIOSEQUENCE_OIDC_ISSUER stops with a message that names both. To move on purpose, choose one:

  • Start fresh. Use a new data volume with the new provider and load the snapshot into it. Keep the old volume if people need their old searches, and open it with the old provider.
  • Keep the volume. Stop and remove the container, remove the record with the commands below, put the new provider's settings in /etc/sequences/sequences.env and start the container as in step 3. Old searches stay on the volume under the old user IDs. If the new provider gives people the same user IDs (sub), for example because it reads the same user directory, they keep their searches. Otherwise nobody can open the old ones.
docker stop sequences && docker rm sequences
docker run --rm -v sequences-data:/data --entrypoint rm conductscience/sequences:<version> /data/sign-in-provider.json

Guide version 1.63.0 · For Sequences 0.155.0