Who can see what
Passport fields by audience, organization, and membership permission.
Two gates apply before a field is returned.
Tenant. The request names one organization with X-Organization-Id. The server checks an active membership. Equipment’s private row is returned only when that organization is the manufacturer or the current custodian. Another organization’s equipment id returns 404.
Permission. Membership carries a list. The demo API checks the permission on the route. A matching tenant with a missing permission returns 403.
A third gate applies to signing: an issuer grant for that claim type. The grant is not a visibility grant. It does not let the lab read a device it does not hold.
The local seed gives each demo admin every permission, including *. Treat the tables below as the route rules, not as a promise that every member in a pilot will hold every permission.
Public passport
GET /public/passports/:passportId does not require a token. Knowing the passport id is the access. The id is an opaque link, not a secret credential.
Returned:
| Field | Example for DEMO-BED-001 |
|---|---|
passportId | ppt_demo_bed_001 |
publicFields | Category and model, as stored at registration |
category | hospital_bed |
model | DemoBed 100 |
lifecycleStatus | ACTIVE |
| Credential summary | id, claimType, status, validFrom, validTo, lifecycle |
| Recent events | Up to 20 rows: eventType, summary, occurrenceAt |
limitations | A fixed note that this view omits restricted documents and detailed custody parties, and does not establish clinical safety |
Credential rows on this view are limited to lifecycle SIGNED, ANCHOR_PENDING, and ANCHORED. Draft credentials stay off the public passport.
Omitted from this view:
- Serial number and UDI
manufacturerIdandcustodianId- Custody party identifiers and transfer state
- Document bytes, storage keys, and document digests
- Membership, audit logs, and signing material
A public chain does not add those omitted fields. Commitments on a chain can still be observable. See Data residency.
Private equipment row
GET /equipment and GET /equipment/:id require asset:read and a membership in the manufacturer or the current custodian.
Returned in addition to the public identity fields:
| Field | Who it identifies |
|---|---|
id | The equipment row |
manufacturerId | The registering organization. This value stays put |
custodianId | The organization that currently holds recorded custody |
serialNumber | The manufacturer serial, unique per manufacturer |
udi | Optional. The samples do not invent one |
custodyVersion | Increments when a transfer is accepted |
publicFields | The JSON approved for the public passport |
| Timestamps | createdAt, updatedAt |
Demo Lab can read this row only while custodianId is Demo Lab. After the supplier accepts, a lab token with X-Organization-Id set to Demo Lab receives 404. Demo Manufacturer can still read it, because manufacturerId does not change.
The lab’s signed credential remains on the passport after that handover. The hospital and any public-passport reader see the credential summary. The lab does not keep the private row.
Documents
Document versions store logicalDocId, version, storageKey, sha256, mediaType, accessPolicy, and scanStatus. The demo default for accessPolicy is RESTRICTED.
Creating an upload intent or completing an upload requires asset:update_metadata and the same manufacturer-or-custodian check. The storage key is namespaced org/{organizationId}/equipment/{equipmentId}/....
document:read is present on seeded memberships. The current demo routes do not check that permission on a separate download call. Restricted bytes are not part of the public passport. A pilot download must check the viewer before it issues a storage URL. That check is not a finished route on this API.
Custody records
Requesting a transfer requires transfer:initiate and custodianId equal to the calling organization. Accepting or rejecting requires transfer:accept and receiverOrgId equal to the calling organization.
The receiver learns the equipment through the transfer they were named on. They do not gain a private equipment read until they accept and become custodian.
A maintenance submission requires maintenance:submit and the manufacturer-or-custodian check. Recording service does not change custodianId.
Credentials
Issuing requires credential:issue plus an active issuer grant whose credentialType matches the claim. Revoking requires credential:revoke. The grant row holds organizationId, credentialType, status, and an effective window.
Readers of the public passport see the credential summary fields listed above. They do not receive canonicalClaims, signedEnvelope, or documentDigests from that route.
Organization administration
| Call | Permission |
|---|---|
| List or read an organization | Active membership in that organization |
| List members, invite, or review membership | organization:manage_members |
| Create an organization | Authenticated user. The new organization is a draft, and the creator becomes its admin |
| Submit the draft | Membership in that draft organization |
A draft is not an approved participant. Submitting it asks for platform review. Platform review, issuer grants, and key incidents are operator actions. Customer tokens do not call those routes.
Audit
audit:export is named on seeded memberships. The demo API writes audit_events (actor, organization, action, resource, summary, time). It does not yet expose an export route that checks audit:export. Export of an organization’s own records is a pilot requirement, described as proposed in Concerns.
Worked example
DEMO-BED-001 is at Demo Hospital. Demo Lab signed electrical_safety_inspection earlier.
| Viewer | Private row | Public passport | Restricted PDF |
|---|---|---|---|
Hospital member with asset:read | Yes. Hospital is custodian | Yes | Only through a future authorized download. Not on the public route |
Manufacturer member with asset:read | Yes. Manufacturer id is unchanged | Yes | Same limit |
| Lab member, lab no longer custodian | 404 | Yes, including the credential summary | No private read of the equipment row |
| Supplier member, no longer custodian | 404 | Yes | No |
| Anonymous reader with the passport id | No | Yes | No |
| Member of an unrelated organization | 404 | Yes, if they have the passport id | No |