ID tokens · claims · session management

Charles Trinh — OpenID Connect for Healthcare | Las Vegas, NV · Las Vegas, Nevada · Henderson · Clark County, Nevada · North Las Vegas, Nevada

A service card reading OPENID CONNECT — verified identity, organisation and role claims
Charles Trinh — OpenID Connect for Healthcare

OpenID Connect is the identity layer that sits on top of OAuth 2.0. In healthcare it is how an app learns who the user is, and the difference between a correct implementation and a plausible one is usually in the validation.

What this is

OAuth 2.0 grants access. OpenID Connect adds an identity token: a signed JWT that asserts who authenticated, when, and by what method. The token is issued by the authorisation server and validated by the client, and every part of that sentence is a place where implementations go wrong.

The first requirement is signature validation against the issuer's published keys, with the key set fetched from the discovery document rather than hardcoded. A client that skips signature validation is trusting an unsigned assertion, which is equivalent to trusting the caller.

The second is claim validation. The issuer must match the expected issuer exactly. The audience must contain the client identifier. The expiry must be in the future and the issued-at must be plausible. The nonce must match the one the client generated. Each of these checks is a line of code and each one is routinely omitted.

The third is the flow. Healthcare apps frequently need a backend component, which means the authorisation code flow with PKCE and a confidential client. The implicit flow is deprecated for good reason, and a hybrid flow implemented without care produces tokens in places they should not be.

The fourth is session management. An identity token asserts an authentication event, not a continuing session. Logout, token revocation and session expiry are separate concerns, and a system that treats a valid token as a valid session will keep a user logged in after they believe they have left.

Finally, healthcare adds a constraint the standard does not: the identity asserted has to be linkable to a patient or a practitioner in a way that is both reliable and privacy-preserving. That linkage is the hard part, and it is where OpenID Connect meets patient matching.

There is a configuration surface that is larger than most teams expect. The authorisation server publishes a discovery document describing its endpoints, its supported flows, its signing algorithms and its claims. A client that reads that document at runtime adapts to changes; a client that hardcodes endpoints breaks when the server moves. Reading discovery is a small piece of work that removes a whole class of outage.

Token lifetimes are a design decision with clinical consequences. A short-lived access token is safer and produces more refresh traffic; a long-lived token is convenient and widens the window in which a stolen token is useful. In a clinical setting the right answer is usually short access tokens with silent refresh, so that a clinician is not interrupted but a compromised token expires quickly.

Consent and scopes interact here in a way that is easy to miss. An identity token asserts who the user is; the access token scopes determine what they may do. A client that treats a valid identity token as authorisation for every operation has confused authentication with authorisation, and that confusion is the root of a large share of access control defects.

Finally, the failure modes need to be designed rather than discovered. An authorisation server that is unavailable, a key set that cannot be fetched, a clock skew that makes a valid token appear expired: each of these produces a different user experience and each needs a defined behaviour. Stating those behaviours in advance is what keeps an identity outage from becoming a clinical one.

A further consideration is the relationship between identity and the patient record. An identity token tells the client that a person authenticated; it does not tell the client which patient record that person is entitled to see. That linkage is a separate decision, made by the resource server against its own authorisation rules, and a client that infers it from an email address or a claim is making a security decision it is not qualified to make. Keeping the two decisions separate is what prevents a whole class of cross-patient access defects.

How I do it

I start by reviewing the discovery document and the registered client configuration: which flows are enabled, which scopes are granted, which redirect URIs are registered, and whether PKCE is required. Misconfiguration here is more common than code defects.

From there I implement validation as an explicit, testable unit: signature against the published key set, issuer, audience, expiry, issued-at and nonce. Each check has a test that fails when the check is removed, which is the only way to know it is doing anything.

Token handling is designed so that tokens are short-lived, refresh is explicit, and revocation is honoured. Session state is kept separate from token state, and logout clears both.

Where the identity must link to a patient or practitioner, I design the linkage explicitly with its own matching rules and its own audit trail, rather than inferring it from an email address.

Finally, I leave a test suite that exercises the failure paths: wrong issuer, wrong audience, expired token, replayed nonce, unsigned token. Those are the cases that matter and the ones least often tested.

The client reads the discovery document at startup and refreshes it on a schedule, so endpoint or key changes are absorbed rather than causing an outage.

Token lifetimes are set deliberately: short access tokens, silent refresh where the flow supports it, and a refresh token lifetime that matches the clinical session rather than the calendar.

Authorisation is enforced from the access token scopes at every operation, with the identity token used only to establish who the user is. The two are never conflated in code.

Failure modes are documented and implemented: unavailable authorisation server, unfetchable key set, clock skew. Each has a defined behaviour and a test that exercises it.

The patient or practitioner linkage is resolved by the resource server against its own rules, never inferred by the client from a claim. The client presents the token; the server decides what that token may reach.

The handover includes the client configuration, the validation unit with its tests, the documented failure behaviours and the linkage rules. Together those four artefacts let a new engineer answer why a login failed without reading the whole codebase.

Artifacts you keep

  • A client configuration review covering flows, scopes, redirect URIs and PKCE
  • Explicit token validation with a test per check
  • Short-lived tokens with explicit refresh and honoured revocation
  • Session state kept separate from token state
  • A failure-path test suite covering issuer, audience, expiry and nonce

Proof

  • OAuth 2.0 and OpenID Connect implementations built for healthcare clients
  • ONC (g)(10) self-test PASS, 317 of 317 subtests, April 2026 — public suite URL
  • 104 clearinghouse enrolments across 53 jurisdictions
  • 67 public hostnames, 51 serving, one AWS account
  • SAM.gov UEI MVKQW9DKKGB8 · CAGE 20KM5 · NPI 1194645564

Engagement

Scoped in writing before work starts; fixed fee where the deliverable is defined. First call is 20 minutes and free. 702-559-3489 · charles@trinh.io

Proof

  • ONC (g)(10) self-test PASS, 317 of 317 subtests, April 2026 — public suite URL
  • 67 public hostnames, 51 serving, one AWS account
  • 104 clearinghouse enrolments across 53 jurisdictions
  • USCDI v7 proposal — Patient Digital Identity Credential — listed at isp.healthit.gov
  • SAM.gov UEI MVKQW9DKKGB8 · CAGE 20KM5 · NPI 1194645564
  • AWS Business Associate Addendum active since 18 August 2026

Where this work is delivered

Engagements run from Las Vegas and reach across the valley: clients in Las Vegas, NV; Las Vegas, Nevada; Henderson; Clark County, Nevada; and North Las Vegas, Nevada — plus remote delivery nationwide.

How an engagement runs

1. Trace one real case

Follow a single patient or claim end to end with a timestamp at every hop, before any document is written.

2. Written findings

A findings list naming the defect, the system, the owner and the date.

3. Monthly review

Review the list monthly and check whether the dates held.

Frequently asked

What is this service?

This page describes charles trinh — openid connect for healthcare — the scope, the failure modes it prevents and how the work is measured. It sits in the Identity and Consent category at trinh.io.

Where is the work delivered?

Engagements run from Las Vegas, Nevada across the valley — Las Vegas, Henderson, North Las Vegas, Spring Valley, Paradise, Winchester, Sunrise Manor, Enterprise, Summerlin, Clark County — and remotely anywhere in the United States. On-site work in the Las Vegas valley, remote delivery elsewhere.

What does it cost?

Standard rate $195 per hour, committed $165 per hour at twenty hours or more per week for three months or more; $1,600 standard day, $1,350 committed day. Scoped in writing before work starts, fixed fee where the deliverable is defined.

Who is Charles Trinh?

A technology architect in Las Vegas, Nevada, working in healthcare identity, consent and interoperability. Not a physician, not a medical practice, and not affiliated with any other Charles Trinh.

How does an engagement start?

With one trace of a real case and a written findings list naming the defect, the system, the owner and the date. The first call is twenty minutes and free: 702-559-3489.

Engagement

Scoped in writing before work starts; fixed fee where the deliverable is defined. First call is 20 minutes and free. 702-559-3489 · charles@trinh.io

Talk to Charles

Record

Profile

Healthcare technology architect working where federal regulation becomes production infrastructure. Built and operates a FHIR R4 clinical platform — SMART App Launch authorization server, patient and provider portals, SQLite — on a hardened single-host AWS estate of 67 public hostnames. The platform returned a self-test PASS on the ONC (g)(10) Standardized API test suite in April 2026, 317 of 317 subtests, publicly verifiable. Designed a consent architecture in which a permissioned ledger records patient grant, refusal and revocation as immutable events while all clinical data stays off-chain and encrypted per patient — no PHI on the ledger by design. Filed a proposed USCDI v7 data element with ONC on verifiable patient identity. Translates the Federal Register, HHS/CMS guidance and HITRUST requirements into architecture, controls and audit evidence.

Selected engineering scale

  • Self-managed estate of 67 public hostnames, 51 serving, on one AWS account.
  • FHIR R4 API with a SMART App Launch authorization server; patient and provider portals; an AI service layer; Hyperledger Fabric peer, orderer and CA; IPFS; a 337-table SQLite clinical store.
  • Two permissioned distributed ledgers in production, one operating a consent registry that records grant, refusal and revocation with no PHI on chain.
  • X12 005010 pipelines across eight transaction sets.
  • Designed, built, deployed and operated end to end by one person.

Credentials and standards work

  • Inferno (g)(10) self-test PASS, 317 of 317 subtests, April 2026 — the ONC Standardized API test suite. Standards validated: US Core 6.1.0, USCDI v3, SMART App Launch 2.0.0, Bulk Data 2.0.0. Public suite URL.
  • USCDI v7 public comment submission, April 2026 — proposed Patient Digital Identity Credential under the Provenance data class, listed publicly on the ONC Interoperability Standards Platform.
  • SAM.gov UEI MVKQW9DKKGB8 · CAGE 20KM5 · NPI 1194645564. AWS Business Associate Addendum active 18 August 2026.

Technical environment

AWS us-east-1 (compute, storage, messaging, SMS, email, voice) · Linux and systemd hardening · nginx · Fabric and EVM ledgers · FHIR R4 · X12 005010 · HL7 · SQLite · self-hosted mail, drive, search and monitoring · Git-based change control and CI release gates.

TRINH — Charles Trinh, technology architect
TRINH

Charles Trinh

Fractional CTO/CIO and Technology Architect — Healthcare Data, Identity & Regulated Infrastructure · Las Vegas, NV

Las Vegas, Nevada · US citizen · Fractional and project engagements

(702) 559-3489 Email Charles Trinh