@kernhq/module-hr 0.15.0 → 0.17.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/dist/contract/index.d.ts +1 -0
- package/dist/contract/index.d.ts.map +1 -1
- package/dist/contract/index.js +1 -0
- package/dist/contract/index.js.map +1 -1
- package/dist/contract/models.d.ts +1 -0
- package/dist/contract/models.d.ts.map +1 -1
- package/dist/contract/models.js +15 -0
- package/dist/contract/models.js.map +1 -1
- package/dist/contract/permissions.d.ts +8 -0
- package/dist/contract/permissions.d.ts.map +1 -1
- package/dist/contract/permissions.js +20 -0
- package/dist/contract/permissions.js.map +1 -1
- package/dist/contract/privacy.d.ts +860 -0
- package/dist/contract/privacy.d.ts.map +1 -0
- package/dist/contract/privacy.js +412 -0
- package/dist/contract/privacy.js.map +1 -0
- package/dist/contract/router.d.ts +815 -0
- package/dist/contract/router.d.ts.map +1 -1
- package/dist/contract/router.js +105 -0
- package/dist/contract/router.js.map +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +51 -0
- package/dist/server/index.js.map +1 -1
- package/dist/server/jobs.d.ts.map +1 -1
- package/dist/server/jobs.js +44 -7
- package/dist/server/jobs.js.map +1 -1
- package/dist/server/router.d.ts +994 -1
- package/dist/server/router.d.ts.map +1 -1
- package/dist/server/router.js +766 -282
- package/dist/server/router.js.map +1 -1
- package/dist/server/schema.d.ts +397 -1
- package/dist/server/schema.d.ts.map +1 -1
- package/dist/server/schema.js +109 -0
- package/dist/server/schema.js.map +1 -1
- package/dist/server/services/audit.d.ts +249 -0
- package/dist/server/services/audit.d.ts.map +1 -0
- package/dist/server/services/audit.js +230 -0
- package/dist/server/services/audit.js.map +1 -0
- package/dist/server/services/people.d.ts +53 -1
- package/dist/server/services/people.d.ts.map +1 -1
- package/dist/server/services/people.js +74 -1
- package/dist/server/services/people.js.map +1 -1
- package/dist/server/services/privacy.d.ts +514 -0
- package/dist/server/services/privacy.d.ts.map +1 -0
- package/dist/server/services/privacy.js +972 -0
- package/dist/server/services/privacy.js.map +1 -0
- package/migrations/0011_privacy.sql +77 -0
- package/migrations/meta/0011_snapshot.json +4450 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +1 -1
- package/src/client/messages.ts +17 -0
- package/src/client/widgets/ApprovalsWidget.svelte +119 -8
- package/src/contract/index.ts +1 -0
- package/src/contract/models.ts +15 -0
- package/src/contract/permissions.ts +22 -0
- package/src/contract/privacy.ts +452 -0
- package/src/contract/router.ts +121 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { Principal, WorkspaceId } from '@kernhq/contracts';
|
|
1
2
|
import { type Kernel, type Tx } from '@kernhq/kernel';
|
|
2
|
-
import type { EmploymentType, HrSettings, PersonStatus } from '../../contract/index.js';
|
|
3
|
+
import type { EmploymentType, HrSettings, PersonSensitive, PersonStatus } from '../../contract/index.js';
|
|
3
4
|
import { employments, officeAssignments, people } from '../schema.js';
|
|
5
|
+
import { type SensitiveReadVia } from './audit.js';
|
|
4
6
|
/** Row shapes the router turns into contract objects. */
|
|
5
7
|
export type PersonRow = typeof people.$inferSelect;
|
|
6
8
|
export type EmploymentRow = typeof employments.$inferSelect;
|
|
@@ -14,12 +16,59 @@ export type EmploymentRow = typeof employments.$inferSelect;
|
|
|
14
16
|
*/
|
|
15
17
|
export declare class PeopleService {
|
|
16
18
|
private readonly kernel;
|
|
19
|
+
private readonly audit;
|
|
17
20
|
constructor(kernel: Kernel);
|
|
21
|
+
/**
|
|
22
|
+
* Read a person's identity number, birth date and bank details — and record that it happened.
|
|
23
|
+
*
|
|
24
|
+
* **The decryption and the record are one function because they have to be one decision.** The
|
|
25
|
+
* router used to select, decrypt and return inline, and "every path that decrypts also logs" was
|
|
26
|
+
* then a rule somebody had to remember at each new call site: the subject-access export is the
|
|
27
|
+
* second such path and would have been the first chance to forget. Here there is nothing to
|
|
28
|
+
* remember. `kernel.secrets.decrypt` is called on these columns in exactly one place in the
|
|
29
|
+
* module, and it is this one, five lines above the insert that records it.
|
|
30
|
+
*
|
|
31
|
+
* ## A failure to record fails the read, and that is the decision
|
|
32
|
+
*
|
|
33
|
+
* The insert is in the same transaction as the select, on the same database, so if it fails the
|
|
34
|
+
* transaction rolls back and the caller gets an error instead of a national identity number.
|
|
35
|
+
*
|
|
36
|
+
* That direction is deliberate, and the argument for it is that the alternative buys almost
|
|
37
|
+
* nothing. The insert has no failure mode the select does not already have — a lost connection, a
|
|
38
|
+
* full disk, an unset `app.workspace_id`. There is no realistic world in which the read is healthy
|
|
39
|
+
* and the record alone fails, so catching it would not keep a working feature working; it would
|
|
40
|
+
* only convert the rare broken case from a loud error into a silent hole. And a hole is the exact
|
|
41
|
+
* failure this log exists to prevent: a subject-access response assembled from a log with gaps
|
|
42
|
+
* states in writing that nobody read a record that was read, which is worse than no log at all,
|
|
43
|
+
* because it is wrong with authority. Refusing is also the safer half of the trade in the other
|
|
44
|
+
* direction — the plaintext never leaves the process, because the transaction that would have
|
|
45
|
+
* returned it did not commit.
|
|
46
|
+
*
|
|
47
|
+
* The cost is real and worth naming: if this table or its policy is ever broken, sensitive reads
|
|
48
|
+
* stop rather than degrade. For this class of data that is the correct outcome, and it is a loud
|
|
49
|
+
* one somebody fixes in minutes instead of a quiet one nobody discovers until a regulator asks.
|
|
50
|
+
*
|
|
51
|
+
* The best-effort copy sent to core's activity feed falls the other way — see `HrAuditService`.
|
|
52
|
+
* It is sent after the transaction has committed, so a read that rolled back is never announced.
|
|
53
|
+
*
|
|
54
|
+
* `purpose` is recorded only where a caller has a real one to give, which today means an export
|
|
55
|
+
* run against a subject-access request. `sensitive.get` passes `null`: its contract has no field
|
|
56
|
+
* for a reason and inventing one would put a sentence in the reader's mouth.
|
|
57
|
+
*/
|
|
58
|
+
readSensitive(input: {
|
|
59
|
+
workspaceId: WorkspaceId;
|
|
60
|
+
personId: string;
|
|
61
|
+
principal: Principal;
|
|
62
|
+
/** Omitted for an ordinary request, where the principal says it. Passed by a bulk reader. */
|
|
63
|
+
via?: SensitiveReadVia;
|
|
64
|
+
purpose?: string | null;
|
|
65
|
+
}): Promise<PersonSensitive>;
|
|
18
66
|
/** Serialise a row for the wire. Postgres `numeric` arrives as a string; the contract says number. */
|
|
19
67
|
static toPerson(row: PersonRow): {
|
|
20
68
|
status: PersonStatus;
|
|
21
69
|
custom: Record<string, unknown>;
|
|
22
70
|
personnelHidden: boolean;
|
|
71
|
+
erasedAt: string | null;
|
|
23
72
|
createdAt: string;
|
|
24
73
|
updatedAt: string;
|
|
25
74
|
id: string;
|
|
@@ -34,6 +83,9 @@ export declare class PeopleService {
|
|
|
34
83
|
terminatedOn: string | null;
|
|
35
84
|
timezone: string | null;
|
|
36
85
|
workspaceId: string;
|
|
86
|
+
erasedBy: string | null;
|
|
87
|
+
erasureReason: string | null;
|
|
88
|
+
erasedFileIds: string[] | null;
|
|
37
89
|
};
|
|
38
90
|
static toEmployment(row: EmploymentRow): {
|
|
39
91
|
employmentType: EmploymentType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"people.d.ts","sourceRoot":"","sources":["../../../src/server/services/people.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,MAAM,EAAE,KAAK,EAAE,EAAU,MAAM,gBAAgB,CAAA;AAExE,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"people.d.ts","sourceRoot":"","sources":["../../../src/server/services/people.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EAAa,KAAK,MAAM,EAAE,KAAK,EAAE,EAAU,MAAM,gBAAgB,CAAA;AAExE,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACxG,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,E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C;IAUvF,2EAA2E;IACrE,MAAM,CACV,EAAE,EAAE,EAAE,EACN,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,GAAG,IAAI,EACtB,OAAO,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,OAAO,CAAC;QAAC,EAAE,EAAE,OAAO,CAAA;KAAE,CAAC,EAC7D,MAAM,SAAQ;IAiBhB;;;;;;OAMG;IACG,gBAAgB,CACpB,EAAE,EAAE,EAAE,EACN,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,GAAG,aAAa,GAAG,UAAU,GAAG,WAAW,CAAC,CAAC,GACnF,OAAO,CAAC,aAAa,CAAC;IAkDzB;;;;;;OAMG;IACG,YAAY,CAChB,EAAE,EAAE,EAAE,EACN,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,OAAO,EAClB,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,GAAG,IAAI;;;;;;;;;;;IAkDvB,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,OAAO,iBAAiB,CAAC,YAAY;;;;;;;;;;;IAI9D,KAAK,eAAW;CACjB"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { KernError, uuidv7 } from '@kernhq/kernel';
|
|
2
2
|
import { and, eq, isNull, sql } from 'drizzle-orm';
|
|
3
|
-
import { employments, officeAssignments, people, personHistory } from '../schema.js';
|
|
3
|
+
import { employments, officeAssignments, people, peopleSensitive, personHistory } from '../schema.js';
|
|
4
|
+
import { HrAccessService } from './access.js';
|
|
5
|
+
import { fieldsPresent, HrAuditService, viaFor } from './audit.js';
|
|
4
6
|
import { isOpen, todayIso } from './db.js';
|
|
5
7
|
/**
|
|
6
8
|
* Writing people, employment and office moves — the three things that must stay consistent.
|
|
@@ -12,8 +14,78 @@ import { isOpen, todayIso } from './db.js';
|
|
|
12
14
|
*/
|
|
13
15
|
export class PeopleService {
|
|
14
16
|
kernel;
|
|
17
|
+
audit;
|
|
15
18
|
constructor(kernel) {
|
|
16
19
|
this.kernel = kernel;
|
|
20
|
+
this.audit = new HrAuditService(kernel, new HrAccessService(kernel));
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Read a person's identity number, birth date and bank details — and record that it happened.
|
|
24
|
+
*
|
|
25
|
+
* **The decryption and the record are one function because they have to be one decision.** The
|
|
26
|
+
* router used to select, decrypt and return inline, and "every path that decrypts also logs" was
|
|
27
|
+
* then a rule somebody had to remember at each new call site: the subject-access export is the
|
|
28
|
+
* second such path and would have been the first chance to forget. Here there is nothing to
|
|
29
|
+
* remember. `kernel.secrets.decrypt` is called on these columns in exactly one place in the
|
|
30
|
+
* module, and it is this one, five lines above the insert that records it.
|
|
31
|
+
*
|
|
32
|
+
* ## A failure to record fails the read, and that is the decision
|
|
33
|
+
*
|
|
34
|
+
* The insert is in the same transaction as the select, on the same database, so if it fails the
|
|
35
|
+
* transaction rolls back and the caller gets an error instead of a national identity number.
|
|
36
|
+
*
|
|
37
|
+
* That direction is deliberate, and the argument for it is that the alternative buys almost
|
|
38
|
+
* nothing. The insert has no failure mode the select does not already have — a lost connection, a
|
|
39
|
+
* full disk, an unset `app.workspace_id`. There is no realistic world in which the read is healthy
|
|
40
|
+
* and the record alone fails, so catching it would not keep a working feature working; it would
|
|
41
|
+
* only convert the rare broken case from a loud error into a silent hole. And a hole is the exact
|
|
42
|
+
* failure this log exists to prevent: a subject-access response assembled from a log with gaps
|
|
43
|
+
* states in writing that nobody read a record that was read, which is worse than no log at all,
|
|
44
|
+
* because it is wrong with authority. Refusing is also the safer half of the trade in the other
|
|
45
|
+
* direction — the plaintext never leaves the process, because the transaction that would have
|
|
46
|
+
* returned it did not commit.
|
|
47
|
+
*
|
|
48
|
+
* The cost is real and worth naming: if this table or its policy is ever broken, sensitive reads
|
|
49
|
+
* stop rather than degrade. For this class of data that is the correct outcome, and it is a loud
|
|
50
|
+
* one somebody fixes in minutes instead of a quiet one nobody discovers until a regulator asks.
|
|
51
|
+
*
|
|
52
|
+
* The best-effort copy sent to core's activity feed falls the other way — see `HrAuditService`.
|
|
53
|
+
* It is sent after the transaction has committed, so a read that rolled back is never announced.
|
|
54
|
+
*
|
|
55
|
+
* `purpose` is recorded only where a caller has a real one to give, which today means an export
|
|
56
|
+
* run against a subject-access request. `sensitive.get` passes `null`: its contract has no field
|
|
57
|
+
* for a reason and inventing one would put a sentence in the reader's mouth.
|
|
58
|
+
*/
|
|
59
|
+
async readSensitive(input) {
|
|
60
|
+
const { workspaceId, personId } = input;
|
|
61
|
+
const via = input.via ?? viaFor(input.principal);
|
|
62
|
+
const { value, reader, access } = await this.kernel.database.withWorkspace(workspaceId, async (tx) => {
|
|
63
|
+
// Before the select, so an unattributable reader is refused without the row ever being loaded.
|
|
64
|
+
const reader = await this.audit.readerFor(tx, workspaceId, input.principal, via, input.purpose ?? null);
|
|
65
|
+
const [row] = await tx
|
|
66
|
+
.select()
|
|
67
|
+
.from(peopleSensitive)
|
|
68
|
+
.where(and(eq(peopleSensitive.workspaceId, workspaceId), eq(peopleSensitive.personId, personId)))
|
|
69
|
+
.limit(1);
|
|
70
|
+
const value = {
|
|
71
|
+
personId,
|
|
72
|
+
workspaceId,
|
|
73
|
+
nationalId: row?.nationalIdEnc ? this.kernel.secrets.decrypt(row.nationalIdEnc) : null,
|
|
74
|
+
birthDate: row?.birthDate ?? null,
|
|
75
|
+
iban: row?.ibanEnc ? this.kernel.secrets.decrypt(row.ibanEnc) : null,
|
|
76
|
+
emergencyContact: row?.emergencyContact ?? null,
|
|
77
|
+
};
|
|
78
|
+
// `fieldsPresent(value)` and not the columns selected: what is recorded is what came back, so a
|
|
79
|
+
// record holding only a birth date is not filed as though the bank details had been read too.
|
|
80
|
+
const access = [{ personId, fields: fieldsPresent(value) }];
|
|
81
|
+
await this.audit.record(tx, workspaceId, reader, access);
|
|
82
|
+
return { value, reader, access };
|
|
83
|
+
});
|
|
84
|
+
// After the commit, never inside it: a mirror sent from a transaction that then rolled back
|
|
85
|
+
// announces a read that did not happen. The same `access` the row was written from, so the
|
|
86
|
+
// console and the evidence cannot drift apart.
|
|
87
|
+
await this.audit.mirror(workspaceId, reader, access);
|
|
88
|
+
return value;
|
|
17
89
|
}
|
|
18
90
|
/** Serialise a row for the wire. Postgres `numeric` arrives as a string; the contract says number. */
|
|
19
91
|
static toPerson(row) {
|
|
@@ -27,6 +99,7 @@ export class PeopleService {
|
|
|
27
99
|
// False here and set true by `forViewer` alone, which is the only thing that withholds these
|
|
28
100
|
// fields. A record that never passed through it was never redacted.
|
|
29
101
|
personnelHidden: false,
|
|
102
|
+
erasedAt: row.erasedAt?.toISOString() ?? null,
|
|
30
103
|
createdAt: row.createdAt.toISOString(),
|
|
31
104
|
updatedAt: row.updatedAt.toISOString(),
|
|
32
105
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"people.js","sourceRoot":"","sources":["../../../src/server/services/people.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"people.js","sourceRoot":"","sources":["../../../src/server/services/people.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAwB,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACxE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AAElD,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AACrG,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,aAAa,EAAE,cAAc,EAAyB,MAAM,EAAE,MAAM,YAAY,CAAA;AACzF,OAAO,EAAE,MAAM,EA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