@pegasimed.com/pegasi-sail-connect-shared 0.1.0-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +125 -0
- package/dist/audit.d.ts +100 -0
- package/dist/audit.d.ts.map +1 -0
- package/dist/audit.js +112 -0
- package/dist/audit.js.map +1 -0
- package/dist/clinical-operations.d.ts +81 -0
- package/dist/clinical-operations.d.ts.map +1 -0
- package/dist/clinical-operations.js +254 -0
- package/dist/clinical-operations.js.map +1 -0
- package/dist/config.d.ts +6 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +40 -0
- package/dist/config.js.map +1 -0
- package/dist/ids.d.ts +3 -0
- package/dist/ids.d.ts.map +1 -0
- package/dist/ids.js +22 -0
- package/dist/ids.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/jwt.d.ts +57 -0
- package/dist/jwt.d.ts.map +1 -0
- package/dist/jwt.js +219 -0
- package/dist/jwt.js.map +1 -0
- package/dist/phi-redaction.d.ts +47 -0
- package/dist/phi-redaction.d.ts.map +1 -0
- package/dist/phi-redaction.js +126 -0
- package/dist/phi-redaction.js.map +1 -0
- package/dist/stable-json.d.ts +2 -0
- package/dist/stable-json.d.ts.map +1 -0
- package/dist/stable-json.js +28 -0
- package/dist/stable-json.js.map +1 -0
- package/dist/worker-logger.d.ts +14 -0
- package/dist/worker-logger.d.ts.map +1 -0
- package/dist/worker-logger.js +31 -0
- package/dist/worker-logger.js.map +1 -0
- package/package.json +102 -0
- package/scripts/lint-phi.mjs +266 -0
package/README.md
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# pegasi-sail-connect-shared
|
|
2
|
+
|
|
3
|
+
Helpers TypeScript compartidos y versionados para los servicios de PEGASI SAIL/CONNECT.
|
|
4
|
+
|
|
5
|
+
Paquete npm: `@pegasimed.com/pegasi-sail-connect-shared`.
|
|
6
|
+
|
|
7
|
+
## Propósito
|
|
8
|
+
|
|
9
|
+
Este paquete elimina helpers de bajo nivel duplicados sin acoplar los repositorios de servicio entre sí. Los servicios dependen de versiones publicadas del paquete, nunca de rutas de código de repositorios hermanos.
|
|
10
|
+
|
|
11
|
+
Es propiedad de SAIL/CONNECT: los cambios de la línea IOB no llegan a los servicios SAIL/CONNECT a través de este paquete.
|
|
12
|
+
|
|
13
|
+
## Origen
|
|
14
|
+
|
|
15
|
+
Deriva de `@pegasimed.com/pegasi-iob-shared` 0.6.2 (commit `3b0ec62`, septiembre de 2026). El código fuente y las pruebas se copiaron sin cambios funcionales; sólo se adaptaron los textos que nombraban el paquete o el producto IOB. A partir de ese punto no existe acoplamiento de código con `pegasi-iob-shared`: ninguno de los dos repositorios importa ni sincroniza el otro.
|
|
16
|
+
|
|
17
|
+
## Alcance
|
|
18
|
+
|
|
19
|
+
| Export | Contenido |
|
|
20
|
+
| --- | --- |
|
|
21
|
+
| `.` | Reexporta todos los módulos siguientes. |
|
|
22
|
+
| `./config` | Primitivas de lectura de variables de entorno. |
|
|
23
|
+
| `./ids` | Generación y validación de IDs con prefijo. |
|
|
24
|
+
| `./audit` | Línea base de auditoría HTTP (`audit_event`). |
|
|
25
|
+
| `./clinical-operations` | Invariantes de operaciones clínicas heredados de la versión de origen. |
|
|
26
|
+
| `./jwt` | Verificación HS256 genérica (con rotación de secreto) y verificación OIDC por JWKS. |
|
|
27
|
+
| `./phi-redaction` | Rutas canónicas de redacción de PHI/PII para logs estructurados. |
|
|
28
|
+
| `./stable-json` | Serialización JSON estable para huellas y hashes deterministas. |
|
|
29
|
+
| `./worker-logger` | Logger Pino para workers fuera de Fastify. |
|
|
30
|
+
|
|
31
|
+
También publica el binario `lint-phi` (`scripts/lint-phi.mjs`), que detecta `console.*`, escrituras directas a stdout/stderr y listas de redacción locales.
|
|
32
|
+
|
|
33
|
+
> **Limitación de `lint-phi`.** Para la regla de redacción, el script sólo comprueba que el texto `PHI_LOG_REDACT_PATHS` aparezca en el archivo; no verifica que se importe ni que se use de verdad en la configuración de `redact` (basta, por ejemplo, con mencionarlo en un comentario). Por tanto, no garantiza una redacción efectiva. Es una limitación heredada de la copia funcionalmente idéntica de `pegasi-iob-shared`.
|
|
34
|
+
|
|
35
|
+
## Fuera de alcance
|
|
36
|
+
|
|
37
|
+
- Decoradores o tipos de request específicos de Fastify.
|
|
38
|
+
- Adaptadores de base de datos, AWS, colas o servicios.
|
|
39
|
+
- Reglas de negocio propias de un servicio concreto.
|
|
40
|
+
- Importaciones directas desde repositorios de servicio.
|
|
41
|
+
|
|
42
|
+
## Canales de publicación
|
|
43
|
+
|
|
44
|
+
La publicación en npm la hace el workflow `.github/workflows/publish.yml`. Se dispara con:
|
|
45
|
+
|
|
46
|
+
- un push a `dev` o `master` que cambie `package.json`, `src/**`, `scripts/**` o el propio `.github/workflows/publish.yml`;
|
|
47
|
+
- una ejecución manual (`workflow_dispatch`) sobre `dev` o `master`, que sigue exactamente las mismas reglas.
|
|
48
|
+
|
|
49
|
+
No se publica desde máquinas locales con `npm publish`.
|
|
50
|
+
|
|
51
|
+
| Rama | Versión en `package.json` | Resultado | dist-tag | Uso |
|
|
52
|
+
| --- | --- | --- | --- | --- |
|
|
53
|
+
| `dev` | `X.Y.Z-dev.N` (prerelease) | Publica | `dev` | Entornos bajos |
|
|
54
|
+
| `dev` | `X.Y.Z` (estable) | No publica; termina con éxito y un aviso | — | Preparar la promoción |
|
|
55
|
+
| `master` | `X.Y.Z` (estable) | Publica | `latest` | PROD |
|
|
56
|
+
|
|
57
|
+
Cualquier otra forma de versión hace fallar la publicación antes de instalar nada: `-rc.N`, metadatos de build `+...`, `-dev` sin número, ceros a la izquierda como `01.2.3`, segmentos numéricos de más de 9 dígitos o un prerelease en `master`. También falla una ejecución manual sobre cualquier otra rama. Así, el workflow nunca publica un prerelease con `latest`.
|
|
58
|
+
|
|
59
|
+
Una ref que no es rama (por ejemplo, un tag llamado `dev` o `master` elegido en una ejecución manual) no falla: la condición del job la omite y el job no llega a ejecutarse.
|
|
60
|
+
|
|
61
|
+
Antes de publicar, el workflow ejecuta `npm view <paquete>@<versión> version --json` y decide sólo con el JSON estructurado:
|
|
62
|
+
|
|
63
|
+
- **Exit 0 y el JSON es exactamente esa versión:** ya está publicada. Se omite con un aviso, sin error.
|
|
64
|
+
- **Exit distinto de 0 y un objeto JSON (en stdout o en stderr) cuyo `error.code` es exactamente `E404`:** todavía no existe, así que publica.
|
|
65
|
+
- **Cualquier otro caso:** falla sin publicar. Incluye errores de autenticación, red o timeout, salida vacía o ilegible, otra versión, o un `E404` que sólo aparece en texto libre.
|
|
66
|
+
|
|
67
|
+
En caso de error, el log muestra sólo `error.code` y un resumen truncado, nunca la salida cruda de npm.
|
|
68
|
+
|
|
69
|
+
> **Primera publicación.** npm exige que todo paquete tenga un dist-tag `latest`, así que la primera publicación de este paquete nuevo (`0.1.0-dev.0` desde `dev`) deja también `latest` apuntando a esa versión. Hasta que se publique la primera versión estable desde `master`, `npm install` sin tag instalaría `0.1.0-dev.0`. Mientras tanto, los consumidores deben fijar la versión exacta o usar el tag `dev`.
|
|
70
|
+
|
|
71
|
+
Ciclo de vida de versiones:
|
|
72
|
+
|
|
73
|
+
1. En `dev` cada cambio publicable exige subir `-dev.N` (por ejemplo de `0.1.0-dev.0` a `0.1.0-dev.1`). Si esa versión exacta ya existe en npm, no se vuelve a publicar.
|
|
74
|
+
2. Para promover, en `dev` se fija la versión estable `X.Y.Z`. El workflow de `dev` termina con éxito sin publicar ni instalar.
|
|
75
|
+
3. El PR `dev` → `master` publica `X.Y.Z` con el dist-tag `latest`.
|
|
76
|
+
4. Después, `dev` sube a la siguiente `X.(Y+1).0-dev.0`.
|
|
77
|
+
|
|
78
|
+
Se sigue SemVer. La API pública (export raíz y subpaths) se mantiene compatible dentro de una misma línea menor.
|
|
79
|
+
|
|
80
|
+
## Instalación en consumidores
|
|
81
|
+
|
|
82
|
+
Entornos bajos (prerelease del canal `dev`):
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
npm install @pegasimed.com/pegasi-sail-connect-shared@dev
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Los rangos SemVer como `^0.1.0` no seleccionan prereleases de otra versión base, así que conviene fijar la versión exacta que instala el dist-tag (por ejemplo `0.1.0-dev.3`) y actualizarla con un PR.
|
|
89
|
+
|
|
90
|
+
PROD (canal estable):
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
npm install @pegasimed.com/pegasi-sail-connect-shared@latest
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Los servicios fijan una versión exacta o un rango controlado y actualizan de forma deliberada mediante PR. `@latest` sólo es el canal estable una vez publicada la primera versión estable desde `master` (ver "Primera publicación").
|
|
97
|
+
|
|
98
|
+
## Publicación sin provenance (decisión del propietario)
|
|
99
|
+
|
|
100
|
+
El repositorio de GitHub es privado y el paquete npm es público. npm sólo firma la atestación de procedencia (provenance) cuando el repositorio de origen es público. El propietario decidió mantener el repositorio privado, así que las versiones se publican con `npm publish --access public`, sin atestación de procedencia, y el workflow no solicita el token OIDC (`id-token`).
|
|
101
|
+
|
|
102
|
+
Si algún día se quiere provenance, habría que hacer público el repositorio. Antes habría que resolver dos dependencias que dejarían de estar disponibles para él:
|
|
103
|
+
|
|
104
|
+
- el workflow de calidad reutilizable, que vive en un repositorio privado de la organización;
|
|
105
|
+
- el secreto `NPM_TOKEN`, que es de la organización y sólo es visible para los repositorios privados.
|
|
106
|
+
|
|
107
|
+
## Validación local
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
npm ci
|
|
111
|
+
npm run validate
|
|
112
|
+
npm run build
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
`npm run validate` ejecuta typecheck, lint y pruebas con umbrales de cobertura del 90 %.
|
|
116
|
+
|
|
117
|
+
## Dependencias
|
|
118
|
+
|
|
119
|
+
El lockfile se heredó sin cambios de la versión de origen. `npm ci` reporta 12 vulnerabilidades en dependencias (4 moderadas y 8 altas). Se corregirán con las actualizaciones de Dependabot (semanales, contra `dev`), revisadas mediante PR como cualquier otro cambio.
|
|
120
|
+
|
|
121
|
+
## Próximos pasos
|
|
122
|
+
|
|
123
|
+
- Módulo de catálogo de capacidades.
|
|
124
|
+
- Sincronización de ese catálogo con Access API.
|
|
125
|
+
- Migración de los servicios SAIL/CONNECT, que por ahora siguen usando `pegasi-iob-shared`.
|
package/dist/audit.d.ts
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTP audit baseline for PEGASI SAIL/CONNECT services.
|
|
3
|
+
*
|
|
4
|
+
* Emits one structured "audit_event" log line per non-health request,
|
|
5
|
+
* stamped with: actor (sub), tenant_scope_id, HTTP method + path,
|
|
6
|
+
* status code, duration, correlation + request IDs. The output flows
|
|
7
|
+
* through the existing pino logger so it lands in Loki + CloudWatch
|
|
8
|
+
* Logs without any extra plumbing — query with
|
|
9
|
+
* `{audit_event="true"}` in Loki.
|
|
10
|
+
*
|
|
11
|
+
* What this complements:
|
|
12
|
+
* - DB-level audit (pgaudit on Aurora) captures every SQL mutation
|
|
13
|
+
* with actor=db_user. That's the ground truth for what happened
|
|
14
|
+
* to data, but does NOT carry the JWT actor / tenant — only the
|
|
15
|
+
* shared service DB user.
|
|
16
|
+
* - This module captures the HTTP-level "who (JWT actor + tenant)
|
|
17
|
+
* called which API endpoint with what outcome" so the two layers
|
|
18
|
+
* join: pgaudit gives you "what changed", this gives you "who
|
|
19
|
+
* asked for that change to happen via the API".
|
|
20
|
+
*
|
|
21
|
+
* What this intentionally does NOT log:
|
|
22
|
+
* - Request bodies. Bodies are the most likely PHI/PII vector and
|
|
23
|
+
* redaction at this layer would be incomplete. The pgaudit stream
|
|
24
|
+
* already carries the SQL (with binds replaced by <not logged>).
|
|
25
|
+
* - Response bodies. Same reason.
|
|
26
|
+
* - Authorization header. Already redacted by the pino redact list
|
|
27
|
+
* in @pegasimed.com/pegasi-sail-connect-shared/phi-redaction.
|
|
28
|
+
*/
|
|
29
|
+
import type { FastifyInstance, FastifyRequest } from "fastify";
|
|
30
|
+
/**
|
|
31
|
+
* Minimal shape of the auth context attached to a request by the
|
|
32
|
+
* service's BearerAuthVerifier. Kept as `unknown` here because each
|
|
33
|
+
* service has its own AuthContext type with extra fields (roles,
|
|
34
|
+
* tenant_scope_id pattern, etc.); the audit hook only reads the two
|
|
35
|
+
* common fields by duck-type.
|
|
36
|
+
*/
|
|
37
|
+
export interface AuditAuthRef {
|
|
38
|
+
readonly subject?: string;
|
|
39
|
+
readonly tenant_scope_id?: string;
|
|
40
|
+
readonly actor?: {
|
|
41
|
+
readonly actor_type?: string;
|
|
42
|
+
readonly subject?: string;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export interface AuditEvent {
|
|
46
|
+
readonly audit_event: true;
|
|
47
|
+
readonly service: string;
|
|
48
|
+
readonly actor_subject: string | null;
|
|
49
|
+
readonly tenant_scope_id: string | null;
|
|
50
|
+
readonly actor_type: string | null;
|
|
51
|
+
readonly method: string;
|
|
52
|
+
readonly url: string;
|
|
53
|
+
readonly status_code: number;
|
|
54
|
+
readonly duration_ms: number;
|
|
55
|
+
readonly correlation_id: string | null;
|
|
56
|
+
readonly request_id: string | null;
|
|
57
|
+
readonly remote_addr: string | null;
|
|
58
|
+
readonly outcome: "success" | "client_error" | "server_error";
|
|
59
|
+
readonly occurred_at: string;
|
|
60
|
+
}
|
|
61
|
+
export interface AuditLogger {
|
|
62
|
+
record(event: AuditEvent): void;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Default logger — writes through Fastify's `request.log`. The pino
|
|
66
|
+
* logger sees the `audit_event: true` field and forwards the rest.
|
|
67
|
+
* Loki/CloudWatch consumers query by that label.
|
|
68
|
+
*/
|
|
69
|
+
export declare class FastifyLogAuditLogger implements AuditLogger {
|
|
70
|
+
private readonly request;
|
|
71
|
+
constructor(request: FastifyRequest);
|
|
72
|
+
record(event: AuditEvent): void;
|
|
73
|
+
}
|
|
74
|
+
/** Test helper. */
|
|
75
|
+
export declare class InMemoryAuditLogger implements AuditLogger {
|
|
76
|
+
readonly events: AuditEvent[];
|
|
77
|
+
record(event: AuditEvent): void;
|
|
78
|
+
}
|
|
79
|
+
export interface AuditHookOptions {
|
|
80
|
+
/** Service name (e.g. "commercial-core-api") — included on every event. */
|
|
81
|
+
readonly serviceName: string;
|
|
82
|
+
/**
|
|
83
|
+
* Path globs to skip. Defaults skip /health/*, the typical noise.
|
|
84
|
+
* Match is exact-or-startsWith on the URL path before the query string.
|
|
85
|
+
*/
|
|
86
|
+
readonly skipPathPrefixes?: readonly string[];
|
|
87
|
+
/**
|
|
88
|
+
* Inject a non-default logger (typically only used in tests). When
|
|
89
|
+
* unset, each request gets a {@link FastifyLogAuditLogger} bound to
|
|
90
|
+
* the request's pino child logger.
|
|
91
|
+
*/
|
|
92
|
+
readonly loggerFactory?: (request: FastifyRequest) => AuditLogger;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Registers the audit hook on a Fastify instance. Call once at app
|
|
96
|
+
* boot, after auth handlers are registered (so request.authContext is
|
|
97
|
+
* populated before onResponse fires).
|
|
98
|
+
*/
|
|
99
|
+
export declare function registerAuditHook(app: FastifyInstance, options: AuditHookOptions): void;
|
|
100
|
+
//# sourceMappingURL=audit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../src/audit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EACV,eAAe,EAEf,cAAc,EAEf,MAAM,SAAS,CAAC;AAEjB;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,KAAK,CAAC,EAAE;QA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UAAU,GAAG,IAAI;CAGhC;AAED,MAAM,WAAW,gBAAgB;IAC/B,2EAA2E;IAC3E,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9C;;;;OAIG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,WAAW,CAAC;CACnE;AAID;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,eAAe,EAAE,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAkDvF"}
|
package/dist/audit.js
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTP audit baseline for PEGASI SAIL/CONNECT services.
|
|
3
|
+
*
|
|
4
|
+
* Emits one structured "audit_event" log line per non-health request,
|
|
5
|
+
* stamped with: actor (sub), tenant_scope_id, HTTP method + path,
|
|
6
|
+
* status code, duration, correlation + request IDs. The output flows
|
|
7
|
+
* through the existing pino logger so it lands in Loki + CloudWatch
|
|
8
|
+
* Logs without any extra plumbing — query with
|
|
9
|
+
* `{audit_event="true"}` in Loki.
|
|
10
|
+
*
|
|
11
|
+
* What this complements:
|
|
12
|
+
* - DB-level audit (pgaudit on Aurora) captures every SQL mutation
|
|
13
|
+
* with actor=db_user. That's the ground truth for what happened
|
|
14
|
+
* to data, but does NOT carry the JWT actor / tenant — only the
|
|
15
|
+
* shared service DB user.
|
|
16
|
+
* - This module captures the HTTP-level "who (JWT actor + tenant)
|
|
17
|
+
* called which API endpoint with what outcome" so the two layers
|
|
18
|
+
* join: pgaudit gives you "what changed", this gives you "who
|
|
19
|
+
* asked for that change to happen via the API".
|
|
20
|
+
*
|
|
21
|
+
* What this intentionally does NOT log:
|
|
22
|
+
* - Request bodies. Bodies are the most likely PHI/PII vector and
|
|
23
|
+
* redaction at this layer would be incomplete. The pgaudit stream
|
|
24
|
+
* already carries the SQL (with binds replaced by <not logged>).
|
|
25
|
+
* - Response bodies. Same reason.
|
|
26
|
+
* - Authorization header. Already redacted by the pino redact list
|
|
27
|
+
* in @pegasimed.com/pegasi-sail-connect-shared/phi-redaction.
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* Default logger — writes through Fastify's `request.log`. The pino
|
|
31
|
+
* logger sees the `audit_event: true` field and forwards the rest.
|
|
32
|
+
* Loki/CloudWatch consumers query by that label.
|
|
33
|
+
*/
|
|
34
|
+
export class FastifyLogAuditLogger {
|
|
35
|
+
request;
|
|
36
|
+
constructor(request) {
|
|
37
|
+
this.request = request;
|
|
38
|
+
}
|
|
39
|
+
record(event) {
|
|
40
|
+
this.request.log.info(event, "audit");
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/** Test helper. */
|
|
44
|
+
export class InMemoryAuditLogger {
|
|
45
|
+
events = [];
|
|
46
|
+
record(event) {
|
|
47
|
+
this.events.push(event);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const DEFAULT_SKIP_PREFIXES = ["/health/"];
|
|
51
|
+
/**
|
|
52
|
+
* Registers the audit hook on a Fastify instance. Call once at app
|
|
53
|
+
* boot, after auth handlers are registered (so request.authContext is
|
|
54
|
+
* populated before onResponse fires).
|
|
55
|
+
*/
|
|
56
|
+
export function registerAuditHook(app, options) {
|
|
57
|
+
const skip = options.skipPathPrefixes ?? DEFAULT_SKIP_PREFIXES;
|
|
58
|
+
const loggerFactory = options.loggerFactory ?? ((req) => new FastifyLogAuditLogger(req));
|
|
59
|
+
app.addHook("onRequest", (request, _reply, done) => {
|
|
60
|
+
request.__auditStart = process.hrtime.bigint();
|
|
61
|
+
done();
|
|
62
|
+
});
|
|
63
|
+
app.addHook("onResponse", (request, reply, done) => {
|
|
64
|
+
try {
|
|
65
|
+
const path = (request.url ?? "").split("?", 1)[0] ?? "";
|
|
66
|
+
if (skip.some((prefix) => path === prefix || path.startsWith(prefix))) {
|
|
67
|
+
done();
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const start = request.__auditStart;
|
|
71
|
+
const durationNs = start !== undefined ? Number(process.hrtime.bigint() - start) : 0;
|
|
72
|
+
const auth = request.authContext;
|
|
73
|
+
const headers = request.headers;
|
|
74
|
+
const correlationId = pickHeader(headers, "x-correlation-id");
|
|
75
|
+
const requestId = pickHeader(headers, "x-request-id");
|
|
76
|
+
const remoteAddr = pickHeader(headers, "x-forwarded-for")?.split(",")[0]?.trim() ?? request.ip ?? null;
|
|
77
|
+
const status = reply.statusCode;
|
|
78
|
+
const outcome = status >= 500 ? "server_error" : status >= 400 ? "client_error" : "success";
|
|
79
|
+
const event = {
|
|
80
|
+
audit_event: true,
|
|
81
|
+
service: options.serviceName,
|
|
82
|
+
actor_subject: auth?.actor?.subject ?? auth?.subject ?? null,
|
|
83
|
+
tenant_scope_id: auth?.tenant_scope_id ?? null,
|
|
84
|
+
actor_type: auth?.actor?.actor_type ?? null,
|
|
85
|
+
method: request.method,
|
|
86
|
+
url: path,
|
|
87
|
+
status_code: status,
|
|
88
|
+
duration_ms: Math.round(durationNs / 1_000_000),
|
|
89
|
+
correlation_id: correlationId ?? null,
|
|
90
|
+
request_id: requestId ?? null,
|
|
91
|
+
remote_addr: remoteAddr,
|
|
92
|
+
outcome,
|
|
93
|
+
occurred_at: new Date().toISOString()
|
|
94
|
+
};
|
|
95
|
+
loggerFactory(request).record(event);
|
|
96
|
+
}
|
|
97
|
+
catch (err) {
|
|
98
|
+
// Audit must never break a request. Log + swallow.
|
|
99
|
+
request.log.warn({ err: err instanceof Error ? err.message : String(err) }, "audit hook failed");
|
|
100
|
+
}
|
|
101
|
+
done();
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
function pickHeader(headers, name) {
|
|
105
|
+
const v = headers[name];
|
|
106
|
+
if (typeof v === "string")
|
|
107
|
+
return v;
|
|
108
|
+
if (Array.isArray(v) && v.length > 0)
|
|
109
|
+
return v[0];
|
|
110
|
+
return undef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AO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export interface ClinicalPinSet {
|
|
2
|
+
readonly tenant_scope_id: string;
|
|
3
|
+
readonly facility_scope_id: string;
|
|
4
|
+
readonly activation_pin_set_id: string;
|
|
5
|
+
readonly package_id: string;
|
|
6
|
+
readonly manifest_digest: string;
|
|
7
|
+
readonly build_recipe_digest: string;
|
|
8
|
+
readonly build_digest: string;
|
|
9
|
+
readonly digest_algorithm: "SHA-256";
|
|
10
|
+
readonly certification_id: string;
|
|
11
|
+
readonly certification_evidence_digest: string;
|
|
12
|
+
readonly abi_version: "1.0.0";
|
|
13
|
+
readonly contract_version: "1.0.0";
|
|
14
|
+
readonly profile_id: string;
|
|
15
|
+
readonly mapping_version: string;
|
|
16
|
+
readonly value_set_version: string;
|
|
17
|
+
readonly route_version: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ReplayApprovalRef {
|
|
20
|
+
readonly approval_id: string;
|
|
21
|
+
readonly actor_identity: string;
|
|
22
|
+
readonly preview_digest: string;
|
|
23
|
+
}
|
|
24
|
+
export interface ReplayInvariantInput {
|
|
25
|
+
readonly requester_actor: string;
|
|
26
|
+
readonly original: ClinicalPinSet;
|
|
27
|
+
readonly requested: ClinicalPinSet;
|
|
28
|
+
readonly preview_digest: string;
|
|
29
|
+
readonly approvals: readonly ReplayApprovalRef[];
|
|
30
|
+
readonly migration?: {
|
|
31
|
+
readonly approved: true;
|
|
32
|
+
readonly migration_id: string;
|
|
33
|
+
readonly target: ClinicalPinSet;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export type ReconciliationClass = "MATCHED" | "MISSING" | "DUPLICATE" | "COLLISION" | "LATE" | "DIVERGENT" | "CORRECTED";
|
|
37
|
+
export interface ReconciliationTotals {
|
|
38
|
+
readonly source_total: number;
|
|
39
|
+
readonly framed_total: number;
|
|
40
|
+
readonly admission_total: number;
|
|
41
|
+
readonly canonical_total: number;
|
|
42
|
+
readonly effect_total: number;
|
|
43
|
+
readonly quarantine_total: number;
|
|
44
|
+
readonly pending_total: number;
|
|
45
|
+
readonly missing_total: number;
|
|
46
|
+
readonly duplicate_total: number;
|
|
47
|
+
readonly collision_total: number;
|
|
48
|
+
readonly late_total: number;
|
|
49
|
+
readonly divergent_total: number;
|
|
50
|
+
readonly corrected_total: number;
|
|
51
|
+
readonly discrepancy_class: ReconciliationClass;
|
|
52
|
+
}
|
|
53
|
+
export type OperationalAuditScalar = string | number | boolean | null;
|
|
54
|
+
export interface OperationalAuditInput {
|
|
55
|
+
readonly audit_record_id: string;
|
|
56
|
+
readonly tenant_scope_id: string;
|
|
57
|
+
readonly actor_identity: string;
|
|
58
|
+
readonly event_type: string;
|
|
59
|
+
readonly object_type: string;
|
|
60
|
+
readonly object_id: string;
|
|
61
|
+
readonly outcome: "SUCCEEDED" | "DENIED" | "FAILED";
|
|
62
|
+
readonly reason_code?: string;
|
|
63
|
+
readonly occurred_at: string;
|
|
64
|
+
readonly attributes?: Readonly<Record<string, OperationalAuditScalar>>;
|
|
65
|
+
}
|
|
66
|
+
export interface TamperEvidentAuditRecord extends OperationalAuditInput {
|
|
67
|
+
readonly previous_digest: string | null;
|
|
68
|
+
readonly digest_algorithm: "SHA-256";
|
|
69
|
+
readonly record_digest: string;
|
|
70
|
+
}
|
|
71
|
+
export declare class ClinicalOperationsInvariantError extends Error {
|
|
72
|
+
readonly reasonCode: string;
|
|
73
|
+
constructor(reasonCode: string, message: string);
|
|
74
|
+
}
|
|
75
|
+
export declare function assertReplayInvariant(input: ReplayInvariantInput): void;
|
|
76
|
+
export declare function assertReconciliationTotals(window: ReconciliationTotals): void;
|
|
77
|
+
export declare function assertPhiFreeOperationalRecord(value: unknown): void;
|
|
78
|
+
export declare function createTamperEvidentAuditRecord(input: OperationalAuditInput, previousDigest: string | null): TamperEvidentAuditRecord;
|
|
79
|
+
export declare function verifyTamperEvidentAuditChain(records: readonly TamperEvidentAuditRecord[]): void;
|
|
80
|
+
export declare function clinicalPinSetDigest(pinSet: ClinicalPinSet): string;
|
|
81
|
+
//# sourceMappingURL=clinical-operations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clinical-operations.d.ts","sourceRoot":"","sources":["../src/clinical-operations.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,gBAAgB,EAAE,SAAS,CAAC;IACrC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,6BAA6B,EAAE,MAAM,CAAC;IAC/C,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAA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