Skip to content

Redfly

Redfly is the identity and master-data service for every Olivia Douglas Support Services BC app. It signs people in with their phone, issues short-lived signed tokens, revokes sessions everywhere at once, takes in telemetry and keeps the master database.

Redfly logo

What Redfly is

The single sign-in and identity service shared by Bubbl, Caulight, DarkCrow, FairFeather and WordPress sites, plus the master database of users, tenants and Bubbl record copies.

How it benefits you

No passwords to manage or leak. People sign in with a phone code, apps verify tokens offline, and one sign-out reaches every app.

How it works

A Twilio code (and TOTP for Bubbl staff) opens a session. Redfly issues 15-minute Ed25519-signed PASETO tokens and publishes revocations and telemetry over Pulsar.

Phone sign-in with a 6-digit code

People sign in with a phone number and a 6-digit code sent by Twilio Programmable Messaging. There are no magic links, email sign-ins or passwords.

  • Numbers are normalized to E.164 before any code is sent.
  • A code is valid for 10 minutes and allows 5 wrong attempts.
  • Each phone gets at most 5 codes per hour, and per-IP limits apply too.
  • Redfly generates the code itself and stores only its HMAC, never the code.

A second factor for Bubbl staff

Anyone holding a Bubbl staff role adds a TOTP (RFC 6238) step after the phone code before a session is issued.

  • Enrolment returns the provisioning URI once.
  • TOTP secrets are encrypted in Cassandra with a Redfly data key wrapped by OpenBao Transit.

Short-lived, verifiable tokens

Redfly issues PASETO v4.public tokens signed with Ed25519 and valid for 15 minutes. Apps verify them offline with Redfly’s published public keys.

  • Claims: sub (user id), sid (session id), ten (tenant ids), app, iat, exp and jti.
  • GET /v1/auth/keys publishes the current and previous public keys with key ids, so keys rotate without downtime.
  • Sign-in sessions end after 12 hours idle or 30 days at most; the token is refreshed within the session.

Session revocation across every app

Signing out, an admin revocation or a suspension is published to the Pulsar topic persistent://odssbc/redfly/revocations. Every app keeps a deny-list in SeaWave until each entry expires.

  • Revocations can target a single token, a session or a whole user.

Per-device app passwords

For Bubbl’s CalDAV, CardDAV and WebDAV device sync, Redfly issues named, revocable app passwords after a full sign-in.

  • The secret is shown once; Redfly stores only an Argon2id hash.
  • Each password is scoped to sync:devices and can be revoked individually.
  • Bubbl checks DAV credentials with Redfly over service-to-service mTLS.

Pseudonymous telemetry intake

Apps and WordPress sites send telemetry to POST /v1/telemetry. Redfly validates each event and publishes it to Pulsar for DarkCrow.

  • Unknown fields, oversized attributes and malformed user hashes are rejected.
  • Values that look like phone numbers or email addresses are rejected, so no contact details reach telemetry.

The master database

Redfly’s master database holds users and identities, tenants across apps, and copies of Bubbl records received through Bubbl’s outbox.

  • Signed-in users reach it through /v1/db/{entity} with Shiro permissions, scoped to their own tenants.
  • Bubbl’s encrypted fields are stored as ciphertext, untouched; only Bubbl can decrypt them.

SMS notifications on behalf of apps

Bubbl and Caulight send SMS through POST /v1/notify/sms by user id. Redfly alone holds the phone numbers and Twilio credentials.

  • Messages use registered plain-text templates of up to 320 characters with no record content.
  • At most 20 messages per user per day, per app. Sends are logged without the message body.

Get Redfly

Source code, compiled builds and container images are on the Downloads page.