Operation: $offboard

Overview

The $offboard operation is a HALO-defined operation that allows a Point of Care (PoC) system to notify a Backend Service that it no longer wishes for that Backend Service to continue interacting with it. Invoking $offboard signals that the Backend Service SHALL cease requesting access tokens from the PoC's authorization server and SHALL cease attempting to access the PoC's FHIR APIs.

$offboard is the counterpart to $initiate-onboarding. The PoC passes its FHIR server base URL as the iss parameter along with the offboardingVerifier it retained from the original $initiate-onboarding invocation, allowing the Backend Service to confirm that the request originates from the same PoC (or one of its trusted subsystems) that completed onboarding before it withdraws the relationship.

$offboard is the counterpart to Operation: $initiate-onboarding. Where $initiate-onboarding supplies a Backend Service with the initial context needed to begin interacting with a PoC, $offboard supplies the same context so the Backend Service can identify, and subsequently withdraw, the established backend service relationship with the requesting PoC.

Within HALO, the PoC discovers the Backend Service's App Catalog offboardingEndpoint from the App Catalog and invokes the $offboard operation at that endpoint to end the backend services relationship previously established via $initiate-onboarding. The PoC passes its FHIR server base URL as the iss parameter along with the offboardingVerifier it retained from the original $initiate-onboarding invocation, allowing the Backend Service to confirm that the request originates from the same PoC (or one of its trusted subsystems) that completed onboarding before it withdraws the relationship. The Backend Service uses the supplied iss to locate any corresponding client registration, credentials, or discovered metadata, and to retire them according to its own deployment-specific processes. See Operation: $initiate-onboarding for the trust considerations and challenge/verifier mechanism established during onboarding.

To view the underlying FHIR OperationDefinition resource, see Offboard.

Invocations

URL: [base]/$offboard

Parameters (In)

NameCardinalityTypeDocumentation
iss1..1uri

The base URL of the Point of Care FHIR server. The Backend Service uses this value to identify the corresponding backend service relationship, if any, that was established as a result of a prior $initiate-onboarding invocation.

offboardingVerifier1..1string

The secret verifier from which the offboardingChallenge supplied during $initiate-onboarding was derived. The Backend Service recomputes the challenge from this verifier using a Base64url-encoded SHA-256 hash and compares it against the stored offboardingChallenge to confirm continuity with the system that completed onboarding.

Return Values (Out)

NameCardinalityTypeDocumentation
outcome1..1OperationOutcome

An OperationOutcome resource detailing the outcome of the operation.

Expected Behavior

When a PoC no longer wishes for a Backend Service to interact with it, for example after an administrator disables or removes the Backend Service from the PoC's local configuration, the PoC invokes that Backend Service's $offboard operation using an HTTP POST to the offboardingEndpoint advertised in the App Catalog. The request includes the PoC FHIR server base URL in the iss parameter and the offboardingVerifier retained from the original $initiate-onboarding invocation.

Upon receiving the request, the Backend Service uses the supplied iss to locate the corresponding backend service relationship, if any. Where a relationship is found, the Backend Service SHALL check that the supplied offboardingVerifier is valid by hashing it using a Base64url-encoded SHA-256 hash and confirming the result matches the offboardingChallenge recorded during onboarding. Only when the two match does the Backend Service treat the request as authoritative, using the supplied context to locate any client registration, stored credentials, cached SMART configuration metadata, or other artifacts associated with the identified PoC. The Backend Service SHALL then cease requesting new access tokens from that PoC's authorization server and SHALL cease attempting to access that PoC's FHIR APIs. Depending on the jurisdiction and implementation, offboarding may also involve the Backend Service revoking or deleting its own Dynamic Client Registration record with the PoC, discarding cached tokens, or removing the PoC from its own list of active integrations.

The $offboard operation does not itself revoke any tokens already issued by the PoC's authorization server; token revocation, where supported, is a distinct mechanism defined by that authorization server. The role of $offboard is to formally notify the Backend Service that the backend service relationship should be withdrawn and that no further token requests or FHIR API access attempts should occur going forward.

A PoC SHOULD invoke $offboard any time it removes or disables a previously onboarded Backend Service, even if no backend service interactions ultimately occurred, so that the Backend Service can reliably reconcile its own records of active integrations.

Once a Backend Service has accepted an $offboard request for a given relationship, the corresponding offboardingChallenge and verifier SHALL be considered retired. If the PoC later re-onboards with that Backend Service, it SHALL generate a new verifier and offboardingChallenge via $initiate-onboarding rather than reusing the original pair.

Operation Failure

If the Backend Service cannot process the invocation or validate the supplied request parameters, it SHALL return an OperationOutcome describing the issue so the PoC can surface an actionable offboarding error to the administrator.

If the Backend Service does not recognize the supplied iss as corresponding to an existing backend service relationship, it SHALL still return a successful OperationOutcome, since the desired end state (no active relationship for that PoC) already holds. Implementers SHALL treat $offboard as idempotent for this reason.

If the Backend Service recognizes the supplied iss but the supplied offboardingVerifier does not produce the offboardingChallenge stored for that relationship, the Backend Service SHALL reject the request and SHALL NOT withdraw the relationship, since the caller has not demonstrated that it is the same system (or a trusted subsystem) that completed the original $initiate-onboarding invocation.

HTTP Response Codes

The $offboard operation is a HALO-defined offboarding operation and does not map directly to a standard FHIR create, update, or transaction interaction. The following HTTP response codes are the expected baseline for implementers:

  • 200 OK - The Backend Service accepted the offboarding request and returned an OperationOutcome confirming the result, whether or not an active relationship was found.
  • 400 Bad Request - The request was malformed, including cases where the required iss parameter was missing or invalid.
  • 401 Unauthorized / 403 Forbidden - The supplied offboardingVerifier did not match the offboardingChallenge stored for the identified relationship.
  • 405 Method Not Allowed - The caller used a method other than HTTP POST, or the server does not support this operation at the addressed endpoint.
  • 422 Unprocessable Entity - The request was syntactically valid but could not be processed according to server rules (for example, the iss and/or offboardingVerifier parameters were malformed).

Other standard HTTP status codes such as 404 and 500 may also be returned depending on deployment-specific security and operational behavior.

Examples

Invocation

See the offboard-invocation-example example for more information.

Parameters
{
"resourceType": "Parameters",
"id": "offboard-invocation-example",
{
"name": "iss",
"valueUri": "https://poc.example.com/fhir"
},
{
"name": "offboardingVerifier",
"valueString": "f2d1a6c4e9b84dfab9e1c3d2f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4"
}
]
}
<Parameters xmlns="http://hl7.org/fhir">
<id value="offboard-invocation-example" />
<name value="iss" />
<valueUri value="https://poc.example.com/fhir" />
</parameter>
<name value="offboardingVerifier" />
<valueString value="f2d1a6c4e9b84dfab9e1c3d2f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4" />
</parameter>
</Parameters>

Success Response

See the offboard-success-response-example example for more information.

Parameters
{
"resourceType": "Parameters",
"id": "offboard-success-response-example",
{
"name": "outcome",
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "information",
"code": "informational",
"details": {
"text": "Offboarding request accepted"
}
}
]
}
}
]
}
<Parameters xmlns="http://hl7.org/fhir">
<id value="offboard-success-response-example" />
<name value="outcome" />
<OperationOutcome>
<severity value="information" />
<code value="informational" />
<text value="Offboarding request accepted" />
</details>
</issue>
</OperationOutcome>
</resource>
</parameter>
</Parameters>

Error Response

See the offboard-error-response-example example for more information.

Parameters
{
"resourceType": "Parameters",
"id": "offboard-error-response-example",
{
"name": "outcome",
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "security",
"details": {
"text": "offboardingVerifier did not match the stored offboardingChallenge"
}
}
]
}
}
]
}
<Parameters xmlns="http://hl7.org/fhir">
<id value="offboard-error-response-example" />
<name value="outcome" />
<OperationOutcome>
<severity value="error" />
<code value="security" />
<text value="offboardingVerifier did not match the stored offboardingChallenge" />
</details>
</issue>
</OperationOutcome>
</resource>
</parameter>
</Parameters>