Skip to content

Security and data

Where the data is stored, how each client's data is kept apart, how evidence is protected, how SCORM packages are sandboxed, and how accounts are secured.

EU Training holds training evidence for organisations that may have to show it to a regulator, so the controls below are built around three things: the evidence can’t be changed after the fact, one client never sees another’s data, and course content from a vendor never runs with a user’s access. Each section says what holds today and marks what’s planned.

  • The app runs on Cloudflare Workers.
  • The database is Cloudflare D1. People, assignments, progress, training records, certificates, the audit log and sign-in sessions all live there.
  • SCORM package files are stored in Cloudflare R2 object storage.
  • Email for invites, password resets and password changes goes out through Cloudflare Email Sending.

The app holds what training needs. That’s people’s names and work emails, their organisation, assignments, progress, scores, training records, certificates, and the audit log. Clients that connect BambooHR also store the subdomain and an encrypted API key. The app reads the BambooHR directory when a client admin opens the page and keeps only the people they invite.

Every client is an organisation, and a client admin works only inside their own.

  • Code reaches a client’s data only through a repository bound to one organisation. It adds the organisation to every read and sets it on every write, and tests check that one organisation can’t read, count or change another’s rows.
  • The database enforces it too. Every tenant table carries its organisation, and the foreign keys include it, so a record can’t point at a person or a seat in another organisation whatever the code does.
  • A learner opens only their own courses, progress and certificates.
  • A client admin can’t name a person from another organisation in an assignment, and the app never tells them that an email address belongs to someone elsewhere. BambooHR matching and CSV imports look only inside their own organisation.
  • Only agency admins see across organisations.
  • A training record is written once, when a course is passed or failed, and a certificate once for each pass. The database refuses any update or delete of either. A correction is a new row that points at the one it replaces.
  • A certificate is signed with ECDSA on the P-256 curve the first time it’s needed, and the signature is stored once and never changed. The private key is a secret on the server, separate for preview and production. The public keys are published at /verify/keys. The signature holds a salted fingerprint of the person’s name, never the name, and the name and salt are stored apart from it, so erasing a person leaves nothing in the signature that points to them.
  • A withdrawn certificate keeps its row. The withdrawal is a row of its own, with the reason and who did it, and it’s in the organisation’s audit log.
  • The public check at /verify/ needs the code printed on the certificate as well as its number, and answers the same way for a made-up number as for a wrong code. It shows the name only to someone holding that code, and it limits how many checks one network can make in ten minutes.
  • The record captures the course version it certified. A published course version and its modules are frozen in the database, so the content behind a record can’t change later.
  • Certificate numbers come from a counter, and each number is unique.
  • Passing a course closes the attempt, writes the record and issues the certificate in one database batch. A failure part way leaves nothing half done, and a retry settles it.
  • Audit events are append-only in the database. Each one carries the hash of the one before it in the same organisation, so an agency admin can check that nobody changed or added an entry outside the app.

A SCORM package is code written by whoever made the course, so the app treats it as untrusted.

  • The package plays in a sandboxed frame with an origin of its own. It can’t read the app’s pages, it gets no cookies, and it can’t navigate the app’s window.
  • The session cookie never reaches the package, so the package can’t call the app as the learner or an admin.
  • Each launch creates an attempt with a random token, valid for 12 hours, for one learner and one module. The package’s files are served only to that token, and its results are saved only under that attempt.
  • A launch needs an assignment. Without one there’s no token, so nobody can fetch a licensed package without a seat.
  • An attempt settles once. Repeated or replayed results after that are refused, so a pass can’t produce two records or two certificate numbers.
  • An uploaded package is checked before anything is unpacked: its size, the number and size of its files, paths that would land outside the package, links and encrypted files. Nothing of a refused package is kept.

SCORM, like every system that plays it, takes the course result from the package running in the learner’s browser. The checks above mean a result has to come from an attempt the learner launched, and a bare “completed” never certifies a pass: the package has to report a pass, or a score at or above the pass mark.

Aigentcy’s own courses can play in EU Training’s own player, and there the server decides the pass. The browser gets the lessons and, for each attempt, the questions drawn for it with their options in a random order. It never gets the answer key. The learner’s answers go to the server, which marks them against the course file and records the result.

  • The course file is checked when it’s added and frozen with its version, with its SHA-256. Content that no longer matches the hash is refused, so it can’t be played or used for marking.
  • Every draw and every submission is kept as evidence and never changed: which questions were asked, what was picked, what was right, the score and when.
  • A draw is marked once. A second submission, at once or later, gets the first result back. Submissions are rate limited per person.
  • A pass settles exactly as a SCORM pass does, in the same single write: the record, the certificate and the audit event.
  • Nobody signs up on their own. An account exists because an admin invited the person.
  • Invite tokens are 32 random bytes, stored only as a hash, valid for 7 days and usable once. No admin ever sees an invite link. Resending makes a new link and closes the old one.
  • Client admins and agency admins must have a second factor, a passkey or a code from an authenticator app, and can’t remove their last one. An admin whose only second factor is a passkey can’t sign in with the password alone. Learners sign in with their password, or a passkey if they add one, and may add an authenticator app.
  • Changing a password, replacing or turning off an authenticator app and making new backup codes each need the current password, and each sends an email to the account’s address and writes an audit event. A new authenticator app replaces the old one only once a code from it is accepted. Backup codes are encrypted at rest and shown once.
  • An admin’s last second factor is checked in the same database statement that removes a passkey or turns off the authenticator app, so two changes at once can’t leave an admin with neither.
  • Passkeys are WebAuthn credentials bound to EU Training’s own address, and the device must verify the person with a fingerprint, face or PIN at every sign-in. Only the public key is stored. Each person manages their own, and nobody else can see or remove them.
  • Passwords are 12 to 128 characters and stored as scrypt hashes.
  • Password sign-in, password reset and invitations are behind a Cloudflare Turnstile check. Sign-in, passkey and reset attempts, and every password check on the Account page, are rate limited per address.
  • The password reset form answers the same way for every address, and a failed sign-in gives the same message whether or not the account exists, so neither shows who has an account.
  • Password reset links last one hour, work once and are stored only as a hash. Resetting or changing a password signs out every other session.
  • An admin can reset someone else’s sign-in: a client admin for people in their own organisation only, Aigentcy for anyone in a client. Nobody resets their own or an agency admin’s. The admin confirms their own password first, and tries are rate limited per admin. A reset signs the person out everywhere, removes their passkeys, authenticator app, backup codes, open reset links and password. Only a learner’s password can be kept, and no session is made from the old password until the recovery link is used. It emails them a recovery link of 32 random bytes, stored only as a hash, that works once for 24 hours. An admin then sets up a new second factor before reaching any portal. Each reset and each use of a link is in the audit log.
  • Sessions are stored server-side and last 12 hours, in an HttpOnly, SameSite=Lax cookie that page scripts can’t read. Deactivating someone ends their sessions, and nobody in an archived organisation can sign in.
  • A client’s BambooHR API key is encrypted with AES-256-GCM under a key of its own, which is wrapped by a key only the app holds.
  • Every page is sent with a content security policy, HSTS, and headers that stop it being framed by another site.

If you think you’ve found a security issue, report it privately to Aigentcy, through your Aigentcy contact, and don’t post it publicly. Include what you found, how to reproduce it and what an attacker could do with it.