Skip to content

MOD ISE 002 GWY

Domain specifications / D02-ISE / 5. Detailed Functional Requirements / 5.2 Module Specification: API, Web and Partner Gateways

5.2 Module Specification: API, Web and Partner Gateways

5.2.1 Module Overview

Module ID: MOD-ISE-002

Purpose: Provide the secure ingress and egress points through which user channels, internal consumers, partners and patient-authorized applications reach HIS services, and the catalogue through which consumers discover APIs.

Business Capabilities: - CAP-ISE-003 Governed API and partner access

Primary Actors: - Integration Engineer (ACT-ISE-002) - Domain Service Team (ACT-ISE-008) - External Partner System (ACT-ISE-009) - Third-Party Application (ACT-ISE-014)

Dependencies: - Domain 10 (ESS) identity, authorization policy decision and consent services - MOD-ISE-006 (certificates), MOD-ISE-007 (edge zone), MOD-ISE-008 (telemetry)

5.2.2 Functional Areas

Functional Area ID: FA-ISE-004 API and web gateway

Description: Ingress protection, enforcement of authentication and authorization decisions, rate limiting, versioned routing and the API catalogue.

Scope: - Included: web gateway for user channels, API gateway for service APIs and the FHIR facade, API catalogue and lifecycle policy. - Excluded: issuing identities and making policy decisions (Domain 10); the business logic behind an API (owning domain).

Functional Area ID: FA-ISE-005 Partner gateway and third-party access

Description: Partner ingress and egress and access by patient-authorized applications.

Scope: - Included: partner routing, scoped token enforcement, revocation enforcement, enforcement of redaction decisions on external responses. - Excluded: the consent directive and the patient's management of authorizations (Domain 10 and Domain 7).

5.2.3 Detailed Requirements

Requirement FR-ISE-GWY-001: Governed Gateway Access

Attribute Description
Requirement ID FR-ISE-GWY-001
Requirement Name Governed gateway access
Requirement Type Functional
Module API, Web and Partner Gateways
Functional Area FA-ISE-004 API and web gateway
Priority Must
Criticality Critical
Requirement Status Draft
Source PRS sections 8.2, 9.1, 10.2; NFR-009; contributes to SEC-003, SEC-013 (primary Domain 10)
Related Business Rule BR-ISE-001, BR-ISE-004
Related Workflow WF-ISE-001

1. Requirement Statement

The system shall route all user-channel, partner and external API traffic through gateways that authenticate the caller, enforce the authorization decision of the Domain 10 policy service, apply rate and throughput limits, route by API version, attach a correlation identifier and record the transaction, and shall permit no direct external access to domain services or data stores.

2. Business Rationale

A single governed entry point gives consistent protection and traceability and prevents uncontrolled point-to-point connections.

3. Actors and Permissions

Actor Permission Conditions
Integration Engineer Create / Update routes and limits Reviewed change; route must reference a catalogue entry
Domain Service Team Read routes for own APIs; propose changes
External Partner System / Third-Party Application Invoke permitted routes Valid credential and scope
Security Engineer Update protection policies; suspend a client

4. Preconditions - The API is published in the catalogue (FR-ISE-GWY-002). - The caller holds a credential issued or federated through Domain 10.

5. Trigger - An inbound request at a gateway.

6. Functional Behaviour

  1. The gateway shall terminate transport encryption and reject unencrypted requests.
  2. The gateway shall authenticate the caller (user session, workload identity, partner credential or third-party token).
  3. The gateway shall obtain or validate the authorization decision from the Domain 10 policy service and pass identity, purpose and context attributes to the target service; it shall not be the only enforcement point, because services enforce at their own boundaries (PRS section 10.2).
  4. The gateway shall apply per-client and per-route rate and throughput limits.
  5. The gateway shall validate the request against the published contract where a schema is registered and reject malformed requests.
  6. The gateway shall generate a correlation identifier if none is present and propagate it.
  7. The gateway shall route to the service version requested and return a deprecation indication for deprecated versions.
  8. The gateway shall emit telemetry for every request and an audit event for every external access to patient data.
  9. Under overload, the gateway shall shed load by priority so that Tier 1 routes are preserved.

7. Input Requirements

Input Field Data Type Mandatory Validation Description
Credential / token Opaque Yes Valid, unexpired, unrevoked Caller authentication
API version String Yes Must be an active or deprecated version Explicit or default per catalogue
Correlation ID String No Format check Generated if absent
Purpose of use Code Where policy requires Must be a permitted purpose for the client Passed to policy decision
Idempotency key String For state-changing calls on routes that declare it Uniqueness per client Passed to the service

8. Processing Rules

Rule ID Processing Rule Expected Result
PR-GWY-001-1 Missing, invalid or revoked credential Request rejected as unauthenticated
PR-GWY-001-2 Policy decision is deny or unavailable Request rejected; the gateway fails closed for patient data
PR-GWY-001-3 Client exceeds its limit Request rejected with a retry indication
PR-GWY-001-4 Request to a retired version Request rejected with reference to the successor version

9. Output Requirements

Output Format Recipient Description
Routed request As per API contract Target service With identity, context and correlation ID
Error response Standard error structure Caller Code, message, correlation ID; no internal detail
Access telemetry and audit event Structured MOD-ISE-008; Domain 10 audit service Per request

10. Validation and Error Handling

Scenario Validation System Response User Message / Action
Target service unavailable Health and circuit state Fail fast with service-unavailable; circuit breaker opens Caller retries per policy
Malformed payload Schema validation Rejected with validation detail Correct and resubmit
Policy service unreachable Dependency health; timeout and circuit breaker of CFG-ISE-031 Decision treated as Deny. Fail closed for external and patient-data egress routes. Internal Tier 1 clinical read paths may use a cached Permit up to the Domain 10 maximum age, never for restricted content; internal writes are rejected (section 9.1) "Authorization service unavailable; the action was not saved", with retry indication; Break-the-Glass remains available; alert raised; see RISK-ISE-010

11. State and Lifecycle Behaviour

Routes follow the lifecycle of the API version they expose (FR-ISE-GWY-002). Client registrations can be Active, Suspended or Revoked.

12. Audit Requirements

The gateway shall record caller identity, route, action, patient or resource reference where present, purpose, source endpoint, outcome, timestamp and correlation ID. Route and limit changes are recorded with before/after values.

13. Security and Privacy Requirements

Gateways reside in the secure edge zone with no direct database access. Error responses reveal no internal structure. Front-end hiding is not treated as an authorization control.

14. Acceptance Criteria

  • AC-01: Given an external client, when it attempts to reach a domain service directly, then the network refuses the connection and only the gateway path succeeds.
  • AC-02: Given a request with a revoked credential, when it reaches the gateway, then it is rejected and logged.
  • AC-03: Given a client exceeding its rate limit, when further requests arrive, then they are rejected without affecting other clients.
  • AC-04: Given any request, when it is traced, then the same correlation identifier is present in gateway, service and audit records.
  • AC-05: Given a policy decision of deny, when the request is for patient data, then no data is returned.

15. Dependencies and Integration

  • Upstream dependencies: Domain 10 identity and authorization.
  • Downstream dependencies: all domain services exposing APIs; Domain 7 (PEX) channels.
  • Required events or APIs: IF-ISE-001.

16. Open Questions / Assumptions

  • Default rate limits are not given in the sources; common-practice defaults derived from the reference workload profile are set in CFG-ISE-001.

Requirement FR-ISE-GWY-002: API Catalogue and Compatibility Policy

Attribute Description
Requirement ID FR-ISE-GWY-002
Requirement Name API catalogue and compatibility policy
Requirement Type Functional
Module API, Web and Partner Gateways
Functional Area FA-ISE-004 API and web gateway
Priority Must
Criticality High
Requirement Status Draft
Source CFG-004; NFR-009; PRS section 9.1
Related Business Rule BR-ISE-008
Related Workflow WF-ISE-001

1. Requirement Statement

The system shall maintain a documented catalogue of all APIs and event contracts with their schemas, scopes, versions and lifecycle status, and shall enforce a compatibility and deprecation policy for contract changes.

2. Business Rationale

Consumers must be able to discover and rely on contracts; uncontrolled change breaks integrations and creates clinical risk.

3. Actors and Permissions

Actor Permission Conditions
Domain Service Team Create / Update entries for own APIs and events Contract tests must pass
Integration Engineer Approve or reject publication; Update lifecycle status Rejection needs a reason
Any authorized consumer Read Partner view limited to APIs they may use

4. Preconditions - The contract is defined in a machine-readable schema.

5. Trigger - Publication of a new API or event contract or a new version; deprecation; retirement.

6. Functional Behaviour

  1. The catalogue shall record, per contract: owner, purpose, schema, security scopes, data classification, version, lifecycle status, consumers and support contact.
  2. On submission of a new version, the system shall run an automated compatibility check against the previous version and classify the change as compatible or breaking.
  3. A breaking change shall require a new major version; the previous version shall remain available for the configured deprecation window.
  4. The system shall maintain a consumer inventory per version and notify registered consumers of deprecation and retirement dates.
  5. The system shall refuse retirement of a version that still has active consumers unless the interface owner and Release Manager approve.
  6. The catalogue shall be discoverable by authorized consumers, including the published FHIR capability statement and supported profiles.

7. Input Requirements

Input Field Data Type Mandatory Validation Description
Contract name and owner String / reference Yes Owner is an active team Identity
Schema Machine-readable document Yes Parses; passes lint rules Contract definition
Version Semantic version string Yes Greater than previous Version
Scopes List Yes for APIs Must exist in Domain 10 scope registry Required authorization scopes
Data classification Enumeration Yes Section 9.3 values Classification

8. Processing Rules

Rule ID Processing Rule Expected Result
PR-GWY-002-1 Breaking change submitted under a compatible version number Publication refused
PR-GWY-002-2 Deprecation date set earlier than the minimum deprecation window Refused unless approved exception

9. Output Requirements

Output Format Recipient Description
Catalogue entry Structured record and human-readable documentation Consumers Schema, scopes, version, lifecycle
Deprecation notice Notification Registered consumers Version, dates, successor

10. Validation and Error Handling

Scenario Validation System Response User Message / Action
Schema fails to parse Schema validation Entry rejected Shows parse errors
Retirement with active consumers Consumer inventory Refused Lists remaining consumers

11. State and Lifecycle Behaviour

A contract version is Draft, In Review, Active, Deprecated or Retired. A Draft version submitted for publication becomes In Review while it awaits approval. The Integration Engineer approves it, and it becomes Active, or rejects it with a reason, and it returns to Draft (section 4.3). Transitions are recorded and notified.

12. Audit Requirements

Publication, lifecycle transitions and approvals are recorded with actor, time and version.

13. Security and Privacy Requirements

Partner-visible documentation exposes only contracts the partner is entitled to. Internal schemas of domain databases are never published as APIs (PRS section 7.2).

14. Acceptance Criteria

  • AC-01: Given the catalogue, when a consumer searches it, then schemas, scopes, versions and lifecycle are discoverable (CFG-004).
  • AC-02: Given a breaking change submitted as a minor version, when the compatibility check runs, then publication is refused.
  • AC-03: Given a deprecated version, when it is invoked, then it still works within the window and a deprecation indication is returned.
  • AC-04: Given a version with active consumers, when retirement is attempted without approval, then it is refused.

15. Dependencies and Integration

  • Upstream dependencies: domain teams; MOD-ISE-005 contract tests.
  • Downstream dependencies: MOD-ISE-002 routing; MOD-ISE-004 schema validation.
  • Required events or APIs: EVT-ISE-015 (contract version lifecycle changed).

16. Open Questions / Assumptions

  • The length of the deprecation window is not given in the sources; the default is 12 months for partner-facing and 6 months for internal contracts (CFG-ISE-002).

Requirement FR-ISE-GWY-003: Patient-Authorized Third-Party Access and External Response Protection

Attribute Description
Requirement ID FR-ISE-GWY-003
Requirement Name Patient-authorized third-party access and external response protection
Requirement Type Functional
Module API, Web and Partner Gateways
Functional Area FA-ISE-005 Partner gateway and third-party access
Priority Must
Criticality High
Requirement Status Draft
Source INT-007; contributes to SEC-016, SEC-017 (primary Domain 10)
Related Business Rule BR-ISE-001
Related Workflow WF-ISE-001

1. Requirement Statement

The system shall allow a registered third-party application to access patient data only through scoped, revocable authorization granted by the patient, limited to the permitted patient, data and purpose scopes, and shall enforce at the partner gateway the redaction decisions of the Domain 10 consent and policy services on every external response.

2. Business Rationale

Patients may authorize applications to use their data, and external exchange must honour consent and privacy segmentation. The gateway is the last enforcement point before data leaves the HIS.

3. Actors and Permissions

Actor Permission Conditions
Third-Party Application Read permitted resources Registered client; valid token; within granted scopes
Patient / representative Grant / Revoke authorization Through Domain 7 channels using Domain 10 services
Integration Engineer Create / Update / Suspend client registrations Onboarding completed
Security and privacy office Approve client registration

4. Preconditions - The application is registered and certified (WF-ISE-001). - A current authorization grant exists in Domain 10.

5. Trigger - An API request from a third-party application or a partner system for patient data.

6. Functional Behaviour

  1. The gateway shall validate the token and confirm with Domain 10 that the grant is current and not revoked.
  2. The gateway shall restrict the request to the patient, resource types and purpose in the grant.
  3. The gateway shall pass the request to the FHIR facade or target API with the grant context.
  4. Before returning a response, the gateway shall apply the redaction decision returned by the Domain 10 policy service for labelled or restricted data, and shall not return restricted resources or fields.
  5. On revocation, the gateway shall refuse subsequent requests within the configured propagation time.
  6. Every access shall be recorded for the patient-facing access history provided by other domains.

7. Input Requirements

Input Field Data Type Mandatory Validation Description
Client identifier String Yes Registered and Active Application identity
Access token Opaque Yes Valid, unexpired, unrevoked Carries scopes
Patient context Reference Yes Must equal the patient in the grant Patient scope
Requested resource and purpose Code Yes Within granted scopes Data and purpose scope

8. Processing Rules

Rule ID Processing Rule Expected Result
PR-GWY-003-1 Request outside granted patient, data or purpose scope Rejected; no data returned
PR-GWY-003-2 Redaction decision unavailable Response withheld (fail closed)
PR-GWY-003-3 Grant revoked Requests refused after propagation time

9. Output Requirements

Output Format Recipient Description
Filtered response FHIR resources per published profile Third-party application / partner Only permitted, unredacted content
Access record Audit event Domain 10 audit service Client, patient, scope, purpose, outcome

10. Validation and Error Handling

Scenario Validation System Response User Message / Action
Token for a different patient Scope check Rejected Insufficient scope
Suspended client Registration status Rejected Client suspended
Response contains a labelled resource without a permit decision Policy decision Resource omitted No indication of omitted content beyond what policy allows

11. State and Lifecycle Behaviour

Client registrations are Proposed, Certified, Active, Suspended or Revoked. The authorization grant lifecycle is owned by Domain 10.

12. Audit Requirements

Each access, denial and redaction application is recorded with client, patient reference, scopes, purpose, policy version, outcome, time and correlation ID.

13. Security and Privacy Requirements

Access is limited to the minimum scopes granted. Consent, purpose and security-label decisions are made by Domain 10; the gateway enforces them and never widens them.

14. Acceptance Criteria

  • AC-01: Given a valid grant, when the application requests data within scope, then only the permitted patient, data and purpose scopes are returned (INT-007).
  • AC-02: Given a revoked grant, when the application requests data after the propagation time, then the request is refused.
  • AC-03: Given a response containing restricted data, when it leaves the gateway, then restricted data is redacted according to valid consent and legal basis (SEC-016).
  • AC-04: Given the policy service is unavailable, when an external request for patient data arrives, then no data is returned.

15. Dependencies and Integration

  • Upstream dependencies: Domain 10 (authorization, consent, security labels); Domain 7 (grant presentation).
  • Downstream dependencies: FHIR facade (FR-ISE-INT-003).
  • Required events or APIs: IF-ISE-001, IF-ISE-004.

16. Open Questions / Assumptions

  • Primary ownership of INT-007 between Domain 2 and Domain 10 is a judgement recorded in DEC-ISE-008. The authorization protocol profile (REF-003 mentions SMART on FHIR "where applicable") is not fixed (DEC-ISE-004).

← 5.1 Module Specification: Platform and Deployment Topology | Contents | Identifier index | 5.3 Module Specification: Integration Engine and Standards Exchange →