Aller au contenu

← Tous les contrats

OHN-38 Authentication and Identity Federation

Version
1.1.0
OpenAPI
3.1.0
Source dans le dépôt
modules/OHN-38/api/openapi.yaml
Serveurs
https://opeshealthnetwork.com
Authentification
bearerAuth: http bearer (JWT)

Télécharger le contrat (YAML)

Les contrats sont rédigés en anglais.

Reconciled with the observed behaviour of the TypeScript reference (backend/modules/ohn-38), see docs/program/java/ohn-38-contract-changes.md. Administration routes need a gateway token with role security_administrator or identity_admin (default deny); login, token exchange, introspection and OIDC discovery are public.

Opérations

ohn38

GET/.well-known/openid-configuration

Static OIDC metadata. Answers 503 not_configured when the issuer is not configured. Never contains keys or secrets.

Identifiant d’opération: ohn38_discovery

Réponses

CodeDescriptionType de média
200OIDC metadata
application/json: object
503Not configured or dependency unavailable; nothing was done—
GET/health/ohn-38

Public liveness probe (Java only; the reference has none). 200 {status, module} when the database answers, 503 otherwise.

Identifiant d’opération: ohn38_health

Réponses

CodeDescriptionType de média
200ok
application/json: object
503unavailable
application/json: object
POST/api/ohn/v1/authenticators/enroll

Creates an authenticator and returns its provisioning secret ONCE (never readable afterwards). A re-enrolment supersedes every earlier TOTP secret of the principal.

Identifiant d’opération: ohn38_enrollAuthenticator

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Enrolled (id, principal_id, factor_type, provisioning_secret, otpauth_url, receipt)
application/json: object
401Authentication failed without credential enumeration—
403Default-deny policy refusal—
422Field/domain validation failed (domain_validation_failed)—
POST/api/ohn/v1/auth/login

Public. TOTP sign-in. A code is accepted once. After the configured number of failed codes inside the window the principal is locked (423, Retry-After) and even a correct code is refused. A malformed lockout configuration answers 503.

Identifiant d’opération: ohn38_login

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200MFA-backed session (access_token, token_type, session_id, expires_in)
application/json: object
401authentication_failed with risk_ref (no credential enumeration)
application/json: object
422Field/domain validation failed (domain_validation_failed)—
423account_locked (Retry-After, retry_after_seconds, risk_ref)
application/json: object
429Retry after the rate-limit window—
503Not configured or dependency unavailable; nothing was done—
POST/api/ohn/v1/sessions/introspect

Public. The signature, issuer, audience and expiry are checked, then the stored session must exist with the same token hash, unrevoked and unexpired.

Identifiant d’opération: ohn38_introspectSession

Paramètres

NomEmplacementTypeObligatoireDescription
X-Device-AttestationheaderstringnonThe device the session is bound to (UUID). A missing or different value answers 403 device_binding_mismatch.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Active session (active, session_id, principal_id, expires_at)
application/json: object
401{active:false}
application/json: object
403{active:false, reason:device_binding_mismatch}
application/json: object
422Field/domain validation failed (domain_validation_failed)—
GET/api/ohn/v1/sessions

Sessions, enrollments (no secrets), trusts, clients (no secrets), role bindings, revocations and workflow history of the caller's jurisdiction and organization, with a summary and provenance.

Identifiant d’opération: ohn38_listIdentityState

Authentification: bearerAuth

Réponses

CodeDescriptionType de média
200Scoped identity state
application/json: object
403Default-deny policy refusal—
POST/api/ohn/v1/sessions/revoke

Revokes the listed sessions of the caller's jurisdiction and organization immediately and opens the privilege_revocation workflow at token_invalidated (version 2).

Identifiant d’opération: ohn38_revokeSessions

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Revoked immediately (id, workflow_id, state, revoked_count, receipt)
application/json: object
409Idempotency or optimistic concurrency conflict—
422Field/domain validation failed (domain_validation_failed)—
POST/api/ohn/v1/identity-federation/trusts

Records an HTTPS issuer trust for the caller's own jurisdiction (a different jurisdiction_id is 403). A second trust for the same issuer is 409 conflict.

Identifiant d’opération: ohn38_configureTrust

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Trust configured (id, issuer_url, status, key_rotation_at, receipt)
application/json: object
403Default-deny policy refusal—
409Idempotency or optimistic concurrency conflict—
422Field/domain validation failed (domain_validation_failed)—
POST/api/ohn/v1/privileged-role-bindings

Identifiant d’opération: ohn38_bindRole

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Expiring role binding created (id, role, expires_at, receipt)
application/json: object
403Default-deny policy refusal—
422Field/domain validation failed (domain_validation_failed)—
POST/api/ohn/v1/oauth/clients

Identifiant d’opération: ohn38_onboardClient

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Client attested (id, client_id, state, version, receipt)
application/json: object
422Field/domain validation failed (domain_validation_failed)—
POST/api/ohn/v1/oauth/clients/{id}/transitions

Same handler as /workflows/{id}/transitions (the reference accepts either route for a client or a revocation).

Identifiant d’opération: ohn38_transitionClient

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstringouiUUID of the client or revocation; anything else is 404
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Guarded transition committed (id, state, version, client_secret ONCE when credential_issued, receipt)
application/json: object
404Non-disclosing not found—
409Idempotency or optimistic concurrency conflict—
422Field/domain validation failed (domain_validation_failed)—
POST/api/ohn/v1/workflows/{id}/transitions

Workflow service_principal_onboarding: client_attested, workflow_identity_bound, scope_approved, credential_issued (the secret is returned once). Workflow privilege_revocation: token_invalidated, sessions_terminated, audit_recorded. Only the next state is allowed; expected_version must match (409 stale_version, 422 invalid_transition).

Identifiant d’opération: ohn38_transitionWorkflow

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstringouiUUID of the client or revocation; anything else is 404
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Guarded transition committed
application/json: object
404Non-disclosing not found—
409Idempotency or optimistic concurrency conflict—
422Field/domain validation failed (domain_validation_failed)—
POST/api/ohn/v1/oauth/token

Public. client_credentials exchange (JSON body). grant_type is optional but any value other than client_credentials is 422. Every failure is 401 invalid_client.

Identifiant d’opération: ohn38_exchangeToken

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Service session (access_token, token_type, expires_in, scope, session_id)
application/json: object
401Authentication failed without credential enumeration—
422Field/domain validation failed (domain_validation_failed)—
429Retry after the rate-limit window—
503Not configured or dependency unavailable; nothing was done—
GET/api/ohn/v1/reports/{id}

Identifiant d’opération: ohn38_getReport

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstringouiOHN-38-R001, OHN-38-R002 or OHN-38-R003; any other value is 404

Réponses

CodeDescriptionType de média
200Scoped report with metrics and provenance
application/json: object
404Non-disclosing not found—
POST/api/ohn/v1/reports/{id}/export

HMAC-SHA256 signed content (base64) with five-minute expiry metadata and an audit receipt. Answers 503 not_configured when the export signing key is not configured.

Identifiant d’opération: ohn38_exportReport

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstringoui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Signed content
application/json: object
403Default-deny policy refusal—
404Non-disclosing not found—
422Field/domain validation failed (domain_validation_failed)—
503Not configured or dependency unavailable; nothing was done—

Schémas

EnrollmentCommand

NomTypeObligatoireDescription
principal_idstring (uuid)oui
factor_type"totp" | "passkey"ouipasskey needs device_attestation; only totp can sign in
device_attestationstring (uuid)non
verification_proofstring (uuid)oui
recovery_method"identity_proofing" | "dual_control" | "recovery_codes"oui

SessionRevocationCommand

NomTypeObligatoireDescription
principal_idstring (uuid)oui
session_idsstringouiOne session UUID per line
reasonstringoui
effective_atstring (date-time)oui

FederationTrustCommand

NomTypeObligatoireDescription
issuer_urlstringouiAn https URL
client_registration_refstring (uuid)oui
signing_key_refstring (uuid)oui
allowed_audiencesstringouiOne audience per line, unique
jurisdiction_idstring (uuid)oui

RoleBindingCommand

NomTypeObligatoireDescription
principal_idstring (uuid)oui
role"security_administrator" | "identity_admin" | "clinician" | "patient" | "technical_client" | "pharmacist" | "lab_technologist" | "radiologist" | "claims_adjudicator" | "partner_staff" | "integration_developer"oui
organization_idstring (uuid)oui
approval_refstring (uuid)oui
expires_atstring (date-time)ouiMust be in the future

LoginCommand

NomTypeObligatoireDescription
principal_idstring (uuid)oui
otpstringoui
device_attestationstring (uuid)oui

IntrospectionCommand

NomTypeObligatoireDescription
tokenstringoui

OAuthClientCommand

NomTypeObligatoireDescription
attestation_refstring (uuid)oui
allowed_scopesstringouiOne scope per line

WorkflowCommand

NomTypeObligatoireDescription
expected_versionintegeroui
to_statestringoui
evidence_refstring (uuid)oui
reasonstringoui

TokenExchangeCommand

NomTypeObligatoireDescription
grant_typestringnonOptional; only client_credentials is accepted
client_idstring (uuid)oui
client_secretstringoui
scopestringouiSpace separated scopes; all must be allowed for the client

ExportCommand

NomTypeObligatoireDescription
format"csv" | "pdf"oui