roles · attributes · policy engine
Charles Trinh — RBAC and ABAC Policy | Las Vegas, NV · Las Vegas, Nevada · Henderson · Clark County, Nevada · North Las Vegas, Nevada

Roles answer what someone does; attributes answer what this record is and where this request came from. Clinical access usually needs both, decided in one place.
What this is
Role-based access control is simple and auditable: a user has roles, a role has permissions, and access follows. It breaks down when the same role needs different access in different contexts — a nurse on their own unit versus a nurse covering another, a clinician during an emergency versus during normal hours.
Attribute-based control adds the context: the patient's relationship to the user, the sensitivity of the record, the network, the time, whether a break-glass justification exists. It is more expressive and considerably harder to audit, because a decision depends on data that changes rather than on a role assignment that was reviewed last quarter.
The practical pattern is a role that establishes the outer bound and attributes that narrow it within that bound. A nurse may read records for patients in their unit; the unit is an attribute of the request and of the record. The role never grants access to the whole organisation, and the attribute never grants access outside the role.
Wherever this lives, it has to be one decision point. Policies scattered across application code cannot be reviewed, cannot be tested, and drift apart until two systems disagree about the same question — which is an audit finding and, in a clinical setting, sometimes a safety issue.
Policy also needs a lifecycle. Roles change, data sources change and the attributes a policy depends on can disappear. A policy that silently falls back to permissive when an attribute is missing is a policy that will eventually grant access nobody intended, so the fallback is the first thing I test.Reporting closes the loop. A quarterly extract of granted versus used access shows which entitlements nobody exercised and which were exercised outside their intended context. That report, reviewed by the business owner, is how least privilege is maintained rather than merely asserted.
None of this is worth much without the inventory: which applications enforce policy, which enforce it in code, and which enforce nothing. That list is usually shorter than expected and more surprising, and it is the first artefact I produce.
The output is a decision table per application: the question, the inputs, the answer, and the test. Once that exists, policy changes become reviewable artifacts rather than console edits, and the audit question stops requiring a reconstruction.
How I do it
Document the decisions first: for each application, what question the access check answers, what data it uses and what happens when the answer is 'not sure'. Fail-closed is the only acceptable default.
Then the policy model: roles as the outer bound, attributes as the narrowing context, and a written list of which attributes are authoritative and where they come from.
Finally the tests. Policies need a test suite as much as code does: an allowed case, a denied case, an ambiguous case and a break-glass case, run against the policy engine rather than through the UI.
Every policy change is reviewed like code: a diff, a test run and a named approver. Policies edited directly in a vendor console, with no record, are the ones that produce unexplainable access during an investigation.The decision point is also instrumented: every allow and every deny is recorded with the policy version that produced it, so an access question months later is answered by a query rather than a reconstruction.
Artifacts you keep
- A decision inventory per application with its fail-closed behaviour
- A policy model separating role bounds from attribute narrowing
- Authoritative sources named for every attribute used
- A policy test suite covering allow, deny, ambiguous and break-glass
- A review cycle that re-checks policies when roles or data sources change
Role plus attribute, not one or the other
Roles encode too much. A role called clinician in a healthcare organisation spans a resident who should see their panel, an attending who should see a department, a locum who should see one facility for six weeks, and a specialist consulting on a single case. Every one of those is the same role and a different entitlement, so a role-only model forces either over-granting or a role explosion nobody can maintain.
Attributes alone encode too little. Pure ABAC sounds elegant and produces policies nobody can review, because the decision depends on the interaction of a dozen attributes evaluated at runtime and the only way to know what someone can reach is to ask the system at that moment.
The model that holds up uses both in a fixed order. Role supplies the coarse grant: this person may read clinical records at all. Attributes supply the constraint: which patients, which facility, which purpose, which window of time. The combination is expressible, reviewable, and testable separately from the endpoint that calls it.
Where the policy must be evaluated
In the data path, not at the gateway. A gateway that authenticates and forwards an identity has performed authentication; it has not performed authorisation. Authorisation is the decision about whether this subject may read this object for this purpose right now, and it can only be made where the object is.
That means the policy engine is called on the read path, receives the subject, the object, the action and the purpose, and returns a decision that is logged with its inputs. The log matters because an access decision you cannot replay is an access decision you cannot defend six months later when the question arrives.
It also means the policy is data rather than code. A policy expressed as an if-statement inside a route handler cannot be reviewed as a whole, cannot be tested independently, and cannot answer the auditor's request for the access model without becoming a code review.
The three tests that prove the model works
Take a person who changed roles mid-quarter and confirm their access reflects the change on the day it happened. Recompute their entitlements from the new role and diff against what they hold; anything they retained that the new role does not require is either a derivation defect or an undocumented exception, and both need a decision rather than a clean-up.
Take a clinician and attempt to read a patient outside their panel by changing the identifier in the request. Confirm refusal at the data layer, not at the screen. Then attempt it through a different endpoint that returns the same resource, because the second path is where the missing check usually lives.
Take a leaver and confirm every session dies within the defined window rather than at token expiry. A revocation that takes effect at the next refresh is not a revocation from the perspective of the person who requested it.
Why this is worth the effort now
Because entitlement questions arrive from three directions at once: an auditor asking for the access model, a patient asking who looked at their record, and an incident responder asking what a compromised account could reach. A model that answers all three from one place is cheaper than three separate investigations, and it is the difference between an answer in an hour and an answer in a quarter.
The same model is what makes break-glass safe. Emergency access is a defined elevation with a recorded reason and a review afterwards, not an exception to the policy. If the emergency path is undocumented, it is being used routinely and nobody can say by whom.
What a reviewable policy looks like
A single store of policy, one language for expressing it, and a test suite per policy. The test suite is what makes the policy reviewable, because it converts a rule into a set of examples that a non-engineer can read and disagree with.
Version it. Record which version produced each access decision, so a dispute about a specific read can be answered from the decision log rather than by re-running today's policy against yesterday's data.
And keep the review cycle tied to something that actually changes. Re-review when a role changes, when a data source changes, or when an incident reveals a gap — not on a calendar alone, because a calendar review of a stable model produces sign-offs rather than findings.
The failure mode nobody tests
An attribute that is missing at evaluation time. If the engine treats a missing facility as unrestricted, one bad event produces a population-wide read. The default must be deny, and the deny must be logged with the attribute that was missing, because a silent deny is only marginally better than a silent allow.
Test it deliberately: remove the attribute, call the endpoint, and confirm a refusal that names what was absent. That test takes ten minutes and it is the one that distinguishes a policy engine from a policy aspiration.
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 — rbac and abac policy — 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
- Phone: 702-559-3489
- Email: charles@trinh.io
- Based in Las Vegas, Nevada · working remotely across the United States
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.