← Identity & Access

FEAT-USER-SESSION

User Session

A clinician signs in once, the platform binds the resulting session to exactly one user, one customer organisation, and (eventually) one set of trusted devices. Every transition — sign-in, sign-out, expiry, device pairing — is visible in the audit trail. Convenience never overrides the rule that a session belongs to a single, identifiable user.

Why this matters

Healthcare data is the most sensitive thing a hospital holds, and the sessions through which clinicians reach that data are the narrowest gate where identity becomes access. A weak session model — silent renewal, ambiguous logout, "shared" workstations, unauditable device hand-offs — undoes every isolation guarantee the rest of the platform provides. A regulator asking "who was logged in when this record was read?" deserves a precise answer, not an inference.

A modern healthcare workflow also no longer lives on one screen. A clinician moves between a desktop in the consult room, a tablet on rounds, and a mobile companion app in the corridor. Each device is its own attack surface; pretending they're the same session by sharing a password is the failure mode hospitals already see. The platform's answer is a single owned session, extended to additional devices through a deliberate, auditable pairing, with a single sign-out that ends every device's inheritance simultaneously.

The strategic value: clinicians stay in flow across devices without the platform losing track of who is acting; the audit trail names the session every action belongs to; and a lost device or terminated employee is one sign-out away from being sealed out everywhere.

What's in the box

  • Sign-in establishes a session. A successful sign-in mints a session bound to exactly one user, one customer organisation, and one identity. The session carries no clinical data — only a verifier the user agent presents on every subsequent request. The boundary is set the moment the session begins.

  • Sign-out is a real action. Signing out invalidates the session immediately on the server side, clears the device-side session credential, and produces an audit event recording who signed out and when. The next request from the same browser starts unauthenticated. There is no quiet session extension on the way out.

  • Sessions are time-bounded. Every session has a defined maximum lifetime, enforced regardless of activity. After expiry the next request returns to the sign-in page, and the expiry itself is an audit event — the trail distinguishes user-initiated sign-out from a session that simply ran out.

  • One user, one customer organisation per session. A user choosing to work with a different customer organisation gets a fresh session. The platform never issues a token that authorises both customer organisations at once; impersonation between customers is structurally impossible at the session layer.

  • Suspended customer organisations reject sign-in cleanly. A user trying to sign in to a paused customer organisation sees a distinct "this organisation is paused" message — not the deliberately-vague invalid-credentials fallback. Operators can tell "wrong password" from "customer organisation suspended" without contacting support.

  • Audit covers every transition. Sign-in success, sign-in failure, sign-out, expiry — and (when device binding lands) device-pair and device-revoke — each is a regulator-readable audit event in the affected customer organisation's trail. A regulator asking "who logged in to this customer organisation in the last 30 days" gets a precise answer.

  • Device binding extends the session to a known device. (Planned.) A clinician's mobile or tablet companion app authenticates once against the user's active session and inherits its identity and organisation context. The pairing produces an audit event naming the device. The bound session follows the same lifecycle as the originating session — sign-out propagates, expiry propagates — and the user can revoke a single device without ending the whole session.

Standards we lean on

  • GDPR Article 32 — security of processing. Session security is part of the technical safeguards regulators expect.
  • HIPAA 45 CFR 164.312(a)(2)(iii) — automatic logoff. The session-expiry property is the platform's answer to this technical safeguard.
  • HIPAA 45 CFR 164.312(b) — audit controls; every session transition is captured.
  • OAuth 2.0 (RFC 6749) and OIDC — session-establishment patterns the platform builds on rather than reinvents.
  • NIST SP 800-63B — digital identity guidelines for session management.

What customers and operators experience

  • A clinician signing in is bound to their organisation for the duration of their session. The session lasts long enough for a working day but no longer; re-authentication is part of the rhythm, not an interruption to apologise for.
  • A clinician signing out can verify the session is gone — the next page-load is the sign-in screen, the audit trail records the sign-out, and any device paired to that session loses its access at the same moment.
  • A clinician on a tablet (future) pairs the tablet to their active session once; subsequent rounds use the tablet without a second password. Sign-out from desktop ends the tablet session immediately, with a clear message rather than a silent failure.
  • A clinician with the wrong password sees an invalid-credentials message that doesn't disclose whether the username or customer organisation exists. A clinician hitting a paused customer organisation sees the distinct "organisation paused" message instead.
  • A regulator auditing sign-ins for a customer organisation runs a vanilla FHIR query against the audit trail (audit record by type code, by date) and gets the full who-when-where record.
  • A platform admin investigating a session anomaly can see the same trail, scoped to the customer organisation in question, without any privileged read path.

Limits and trade-offs

  • No silent session extension. Sessions don't quietly renew on activity past the absolute lifetime; the user signs in again. Convenience would be invisible erosion of the audit-trail integrity the rest of the platform depends on.

  • One session per user-customer organisation pair. Concurrent multi-customer work means two browser sessions side-by-side, not one token authorising both. Annoying for users with several organisations; non-negotiable for the boundary.

  • Idle vs. absolute timeout — both apply. Whichever fires first ends the session. The platform errs toward the shorter of the two.

  • Device binding inherits the user's session lifecycle. (When it lands.) A device cannot outlive the session it's bound to. Hospitals that want device-only access for long-running displays will need a separate provisioning path (out of scope today).

  • A rotated signing key drains; it does not cut — but only within its window. Rotating the key that signs sessions keeps the outgoing key for verification, so sessions issued before the rotation run out their own clock instead of dropping at once. Retire the outgoing key sooner than the session lifetime and those sessions end immediately. That is a deliberate operator choice, and the only way to end every session at once on purpose.

  • Session credentials are device-side. The platform cannot revoke a stolen device's local credential after network loss; the credential's expiry is the bound on damage. This is the reason for short maximum lifetimes.

What it rests on
0 / 12 passing 6 without a result yet
  • cited, no result A person closed in the configuration can no longer sign in, and reopening them restores their sign-in. REQ-SES-CLOSED-PERSON-SIGNS-IN-NO-MORE
    Cited by: cloud.jengu.platform.people.APersonIsConfigurationInAPersonsDraftTest#aPersonClosedSignsInNoMore
    Based on 1 promise
    • not cited Deactivating a subject retires its credentials — every factor, at once, and never by deletion: history and audit need the record, and a login that vanishes cannot be told from one that never existed. REQ-DBO-AUTH-DEACTIVATION-RETIRES-CREDENTIALS
  • cited, no result A person whose sign-in the configuration keeps changes their own password on their Settings page by giving the current one; a person who signs in elsewhere is told to change it there. REQ-SES-OWN-PASSWORD-CHANGED-WITH-CURRENT
    Cited by: cloud.jengu.platform.settings.APersonChangesTheirOwnPasswordTest#aKeptSignInIsChangedWithItsCurrentPasswordInEveryLanguage, cloud.jengu.platform.settings.APersonChangesTheirOwnPasswordTest#aSettingIsKeptBesideItsPersonUnderTheirKey
  • cited, no result A person added with an invitation is mailed a link that works once, for three days, to set their own password, which nobody else is shown; the link sets nobody's password but theirs. REQ-SES-AN-INVITED-PERSON-SETS-THEIR-OWN-PASSWORD
    Cited by: cloud.jengu.platform.auth.AnInvitedPersonSetsTheirOwnPasswordTest#aLinkSetsNobodysPasswordButItsOwnPersons, cloud.jengu.platform.auth.AnInvitedPersonSetsTheirOwnPasswordTest#aPasswordSetButNotKeptIsSaid, cloud.jengu.platform.auth.AnInvitedPersonSetsTheirOwnPasswordTest#thePageIsDrawnInEveryLanguage, cloud.jengu.platform.auth.AnInvitedPersonSetsTheirOwnPasswordTest#theirPasswordIsKeptBesideThemAndTheInvitationDropped, cloud.jengu.platform.configuration.AnInvitationIsMailedAsALinkTest#theInvitationSaysWhereAndForHowLongInBothLanguages, cloud.jengu.platform.configuration.AnInvitationIsMailedAsALinkTest#theLinkNamesTheTenantThePersonAndTheGrantAlone, cloud.jengu.platform.people.APersonIsConfigurationInAPersonsDraftTest#aPersonAddedIsInvitedGivenAPasswordOrNeither
  • kept by its basis its basis has no result Every customer organisation has its own sign-in authority, and a credential issued for one is refused by every other before anything in it is read. REQ-SES-EACH-CUSTOMER-IS-ITS-OWN-AUTHORITY
    Based on 1 promise
    • not cited Every tenant is its own OIDC authority with its own issuer URL, discovery document, key set and token endpoint; relying parties trust exactly one tenant's authority, never the store's. A token from any other tenant fails signature verification before any claim is read. REQ-DBO-AUTH-TENANT-SCOPED-ISSUER
  • kept by its basis its basis has no result A sign-in attempt never reveals whether an account exists, either by what it answers or by how long it takes. REQ-SES-SIGN-IN-REVEALS-NOBODY
    Based on 1 promise
    • not cited No authority answer distinguishes a subject that exists from one that does not — not in what it says, not in how long it takes. The authority is the only party that knows, which is why it must not say. REQ-DBO-AUTH-NO-SUBJECT-ENUMERATION
  • kept by its basis its basis has no result Every entry names who acted, as they signed in, and when: no change is anonymous, and modules may add business events of their own but never in another's name or with an earlier date. REQ-AUD-EVERY-ENTRY-NAMES-WHO-AND-WHEN
    Based on 2 promises
    • not cited Every audit entry names its actor from the tenant authority's token (client and subject) — no anonymous mutations under any audited policy. REQ-DBO-POL-ACTOR-FROM-AUTHORITY
    • cited, no result Applications contribute business-level audit events; the machinery stamps actor and time from the validated token and its own clock, overriding caller claims — the trail can be enriched, never impersonated or backdated. REQ-DBO-POL-CUSTOM-AUDIT-EVENTS
      Cited by: cloud.jengu.dbo.fhir.element.ContributedAuditEventTest#whatWasPostedComesBack, cloud.jengu.dbo.fhir.element.ContributedAuditEventTest#whoAndWhenAreTheContainersWhateverWasClaimed
  • gap: not yet stated Signing out ends the session on the server. FEAT-GAP-0dccfcaf
  • gap: not yet stated A session has an absolute and an idle lifetime, with no silent renewal. FEAT-GAP-6782fcad
  • gap: not yet stated A sign-in, a failed sign-in, a sign-out and an expiry are each an audit event naming who acted. FEAT-GAP-4a1cb970
  • gap: not yet stated A paused organisation's users see a message of its own. FEAT-GAP-04fb327f
  • gap: not yet stated Renewing the platform's signing credentials never cuts anybody's session off. FEAT-GAP-5800e19c
  • gap: not yet stated A session is bound to the device it began on. FEAT-GAP-b75a9c5b