@astram/guard 0.2.0 → 0.3.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.
Files changed (170) hide show
  1. package/dist/auth/account.controller.d.ts +245 -0
  2. package/dist/auth/account.controller.d.ts.map +1 -0
  3. package/dist/auth/account.controller.js +673 -0
  4. package/dist/auth/account.controller.js.map +1 -0
  5. package/dist/auth/auth.controller.d.ts +219 -5
  6. package/dist/auth/auth.controller.d.ts.map +1 -1
  7. package/dist/auth/auth.controller.js +790 -12
  8. package/dist/auth/auth.controller.js.map +1 -0
  9. package/dist/auth/auth.module.d.ts +100 -2
  10. package/dist/auth/auth.module.d.ts.map +1 -1
  11. package/dist/auth/auth.module.js +299 -7
  12. package/dist/auth/auth.module.js.map +1 -0
  13. package/dist/auth/connections.js.map +1 -0
  14. package/dist/auth/dto.d.ts +16 -6
  15. package/dist/auth/dto.d.ts.map +1 -1
  16. package/dist/auth/dto.js.map +1 -0
  17. package/dist/auth/pending-mfa-store.js.map +1 -0
  18. package/dist/auth/persistence.module.js.map +1 -0
  19. package/dist/auth/ports/audit-sink.d.ts +47 -0
  20. package/dist/auth/ports/audit-sink.d.ts.map +1 -0
  21. package/dist/auth/ports/audit-sink.js +20 -0
  22. package/dist/auth/ports/audit-sink.js.map +1 -0
  23. package/dist/auth/ports/credential-writer.d.ts +23 -0
  24. package/dist/auth/ports/credential-writer.d.ts.map +1 -0
  25. package/dist/auth/ports/credential-writer.js +2 -0
  26. package/dist/auth/ports/credential-writer.js.map +1 -0
  27. package/dist/auth/ports/email-sender.d.ts +14 -0
  28. package/dist/auth/ports/email-sender.d.ts.map +1 -0
  29. package/dist/auth/ports/email-sender.js +2 -0
  30. package/dist/auth/ports/email-sender.js.map +1 -0
  31. package/dist/auth/ports/mfa-device-store.d.ts +45 -0
  32. package/dist/auth/ports/mfa-device-store.d.ts.map +1 -0
  33. package/dist/auth/ports/mfa-device-store.js +13 -0
  34. package/dist/auth/ports/mfa-device-store.js.map +1 -0
  35. package/dist/auth/ports/profile-writer.d.ts +12 -0
  36. package/dist/auth/ports/profile-writer.d.ts.map +1 -0
  37. package/dist/auth/ports/profile-writer.js +2 -0
  38. package/dist/auth/ports/profile-writer.js.map +1 -0
  39. package/dist/auth/ports/recovery-code-store.d.ts +10 -0
  40. package/dist/auth/ports/recovery-code-store.d.ts.map +1 -0
  41. package/dist/auth/ports/recovery-code-store.js +2 -0
  42. package/dist/auth/ports/recovery-code-store.js.map +1 -0
  43. package/dist/auth/ports/reset-token-store.d.ts +12 -0
  44. package/dist/auth/ports/reset-token-store.d.ts.map +1 -0
  45. package/dist/auth/ports/reset-token-store.js +2 -0
  46. package/dist/auth/ports/reset-token-store.js.map +1 -0
  47. package/dist/auth/ports/session-facts-projector.d.ts +44 -0
  48. package/dist/auth/ports/session-facts-projector.d.ts.map +1 -0
  49. package/dist/auth/ports/session-facts-projector.js +30 -0
  50. package/dist/auth/ports/session-facts-projector.js.map +1 -0
  51. package/dist/auth/ports/session-sweeper.d.ts +12 -0
  52. package/dist/auth/ports/session-sweeper.d.ts.map +1 -0
  53. package/dist/auth/ports/session-sweeper.js +2 -0
  54. package/dist/auth/ports/session-sweeper.js.map +1 -0
  55. package/dist/auth/profile-resolver.d.ts +73 -0
  56. package/dist/auth/profile-resolver.d.ts.map +1 -0
  57. package/dist/auth/profile-resolver.js +28 -0
  58. package/dist/auth/profile-resolver.js.map +1 -0
  59. package/dist/auth/rate-limit/attempt-limiter.d.ts +91 -0
  60. package/dist/auth/rate-limit/attempt-limiter.d.ts.map +1 -0
  61. package/dist/auth/rate-limit/attempt-limiter.js +133 -0
  62. package/dist/auth/rate-limit/attempt-limiter.js.map +1 -0
  63. package/dist/auth/tokens.d.ts +174 -0
  64. package/dist/auth/tokens.d.ts.map +1 -1
  65. package/dist/auth/tokens.js +190 -1
  66. package/dist/auth/tokens.js.map +1 -0
  67. package/dist/auth/totp-enrollment.d.ts +42 -0
  68. package/dist/auth/totp-enrollment.d.ts.map +1 -0
  69. package/dist/auth/totp-enrollment.js +96 -0
  70. package/dist/auth/totp-enrollment.js.map +1 -0
  71. package/dist/authentication/argon2id-password-hasher.js.map +1 -0
  72. package/dist/authentication/mariadb-credential-resolver.d.ts +38 -24
  73. package/dist/authentication/mariadb-credential-resolver.d.ts.map +1 -1
  74. package/dist/authentication/mariadb-credential-resolver.js +42 -28
  75. package/dist/authentication/mariadb-credential-resolver.js.map +1 -0
  76. package/dist/authz/cross-tenant-grant-writer.d.ts +259 -0
  77. package/dist/authz/cross-tenant-grant-writer.d.ts.map +1 -0
  78. package/dist/authz/cross-tenant-grant-writer.js +397 -0
  79. package/dist/authz/cross-tenant-grant-writer.js.map +1 -0
  80. package/dist/authz/manifest-operation-authority-adapter.d.ts +65 -0
  81. package/dist/authz/manifest-operation-authority-adapter.d.ts.map +1 -0
  82. package/dist/authz/manifest-operation-authority-adapter.js +108 -0
  83. package/dist/authz/manifest-operation-authority-adapter.js.map +1 -0
  84. package/dist/authz/mariadb-cross-tenant-grant-adapter.d.ts +90 -0
  85. package/dist/authz/mariadb-cross-tenant-grant-adapter.d.ts.map +1 -0
  86. package/dist/authz/mariadb-cross-tenant-grant-adapter.js +211 -0
  87. package/dist/authz/mariadb-cross-tenant-grant-adapter.js.map +1 -0
  88. package/dist/authz/mariadb-record-rule-adapter.d.ts +60 -0
  89. package/dist/authz/mariadb-record-rule-adapter.d.ts.map +1 -0
  90. package/dist/authz/mariadb-record-rule-adapter.js +154 -0
  91. package/dist/authz/mariadb-record-rule-adapter.js.map +1 -0
  92. package/dist/authz/mariadb-record-share-adapter.d.ts +75 -0
  93. package/dist/authz/mariadb-record-share-adapter.d.ts.map +1 -0
  94. package/dist/authz/mariadb-record-share-adapter.js +106 -0
  95. package/dist/authz/mariadb-record-share-adapter.js.map +1 -0
  96. package/dist/authz/record-share-cascade.d.ts +52 -0
  97. package/dist/authz/record-share-cascade.d.ts.map +1 -0
  98. package/dist/authz/record-share-cascade.js +49 -0
  99. package/dist/authz/record-share-cascade.js.map +1 -0
  100. package/dist/authz/record-share-writer.d.ts +175 -0
  101. package/dist/authz/record-share-writer.d.ts.map +1 -0
  102. package/dist/authz/record-share-writer.js +225 -0
  103. package/dist/authz/record-share-writer.js.map +1 -0
  104. package/dist/authz/wire-record-authorization.d.ts +66 -0
  105. package/dist/authz/wire-record-authorization.d.ts.map +1 -0
  106. package/dist/authz/wire-record-authorization.js +34 -0
  107. package/dist/authz/wire-record-authorization.js.map +1 -0
  108. package/dist/boot/boot-sequence.js.map +1 -0
  109. package/dist/boot/boot.module.js.map +1 -0
  110. package/dist/completeness/catalog-reconciler.d.ts +21 -0
  111. package/dist/completeness/catalog-reconciler.d.ts.map +1 -0
  112. package/dist/completeness/catalog-reconciler.js +74 -0
  113. package/dist/completeness/catalog-reconciler.js.map +1 -0
  114. package/dist/completeness/operation-inventory-scanner.d.ts +17 -0
  115. package/dist/completeness/operation-inventory-scanner.d.ts.map +1 -0
  116. package/dist/completeness/operation-inventory-scanner.js +79 -0
  117. package/dist/completeness/operation-inventory-scanner.js.map +1 -0
  118. package/dist/completeness/ports/catalog-store.d.ts +33 -0
  119. package/dist/completeness/ports/catalog-store.d.ts.map +1 -0
  120. package/dist/completeness/ports/catalog-store.js +2 -0
  121. package/dist/completeness/ports/catalog-store.js.map +1 -0
  122. package/dist/config/app-config.js.map +1 -0
  123. package/dist/config/config.module.js.map +1 -0
  124. package/dist/enforcement/classification.decorator.d.ts +33 -14
  125. package/dist/enforcement/classification.decorator.d.ts.map +1 -1
  126. package/dist/enforcement/classification.decorator.js +34 -14
  127. package/dist/enforcement/classification.decorator.js.map +1 -0
  128. package/dist/enforcement/core-seam.js.map +1 -0
  129. package/dist/enforcement/enforcement.module.js.map +1 -0
  130. package/dist/enforcement/global-enforcement.guard.d.ts +29 -19
  131. package/dist/enforcement/global-enforcement.guard.d.ts.map +1 -1
  132. package/dist/enforcement/global-enforcement.guard.js +108 -25
  133. package/dist/enforcement/global-enforcement.guard.js.map +1 -0
  134. package/dist/enforcement/reenroll-allowlist.d.ts +49 -0
  135. package/dist/enforcement/reenroll-allowlist.d.ts.map +1 -0
  136. package/dist/enforcement/reenroll-allowlist.js +77 -0
  137. package/dist/enforcement/reenroll-allowlist.js.map +1 -0
  138. package/dist/index.d.ts +35 -3
  139. package/dist/index.d.ts.map +1 -1
  140. package/dist/index.js +159 -7
  141. package/dist/index.js.map +1 -0
  142. package/dist/module/shield-tokens.d.ts +15 -0
  143. package/dist/module/shield-tokens.d.ts.map +1 -0
  144. package/dist/module/shield-tokens.js +17 -0
  145. package/dist/module/shield-tokens.js.map +1 -0
  146. package/dist/module/shield.module.d.ts +153 -9
  147. package/dist/module/shield.module.d.ts.map +1 -1
  148. package/dist/module/shield.module.js +181 -24
  149. package/dist/module/shield.module.js.map +1 -0
  150. package/dist/request-auth/request-principal.d.ts +42 -0
  151. package/dist/request-auth/request-principal.d.ts.map +1 -0
  152. package/dist/request-auth/request-principal.js +87 -0
  153. package/dist/request-auth/request-principal.js.map +1 -0
  154. package/dist/request-auth/session-facts-als.d.ts +65 -0
  155. package/dist/request-auth/session-facts-als.d.ts.map +1 -0
  156. package/dist/request-auth/session-facts-als.js +57 -0
  157. package/dist/request-auth/session-facts-als.js.map +1 -0
  158. package/dist/request-auth/session-token-binder.d.ts +130 -0
  159. package/dist/request-auth/session-token-binder.d.ts.map +1 -0
  160. package/dist/request-auth/session-token-binder.js +277 -0
  161. package/dist/request-auth/session-token-binder.js.map +1 -0
  162. package/dist/request-auth/tokens.d.ts +14 -0
  163. package/dist/request-auth/tokens.d.ts.map +1 -0
  164. package/dist/request-auth/tokens.js +16 -0
  165. package/dist/request-auth/tokens.js.map +1 -0
  166. package/dist/session/crypto-adapters.js.map +1 -0
  167. package/dist/session/index.js.map +1 -0
  168. package/dist/session/mariadb-session-record-store.js.map +1 -0
  169. package/dist/session/redis-hot-session-store.js.map +1 -0
  170. package/package.json +2 -2
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Phase 4 MFA-enrollment — the **pure TOTP-enrollment helpers**: generate a fresh
3
+ * base32 TOTP secret, compose the `otpauth://` provisioning URI an authenticator app
4
+ * scans, and mint one-time recovery codes.
5
+ *
6
+ * ── WHY THIS LIVES IN GUARD (not core) ──────────────────────────────────────
7
+ * Core owns the TOTP *verifier* (`createTotpFactorVerifier`, RFC 6238) but is
8
+ * ZERO-dep + node-type-free (ADR-0003), so it cannot mint secrets (needs
9
+ * `node:crypto.randomBytes`) nor build a URI. Enrollment is the *provisioning* side
10
+ * — it produces the secret the verifier later checks against. Guard owns node
11
+ * builtins, so the generation lives here. NO core change: the secret this emits is a
12
+ * plain base32 string, exactly what `createTotpFactorVerifier` decodes.
13
+ *
14
+ * ── SECURITY ─────────────────────────────────────────────────────────────────
15
+ * The secret + recovery codes are credential material: never logged, returned to the
16
+ * user exactly ONCE at enrollment, and (recovery codes) stored only Argon2-hashed.
17
+ * These functions are PURE (no I/O, no storage) — the caller decides what to persist.
18
+ *
19
+ * ADR-0003: guard owns `node:crypto`; this file has NO framework/HTTP/DB coupling.
20
+ */
21
+ /**
22
+ * Generate a fresh, cryptographically-random base32 TOTP secret (160 bits → 32
23
+ * chars). This is what the user's authenticator app is provisioned with and what the
24
+ * core verifier later checks presented codes against.
25
+ */
26
+ export declare function generateTotpSecret(): string;
27
+ /**
28
+ * Build the `otpauth://totp/...` provisioning URI an authenticator app scans (or the
29
+ * user enters manually). `label` identifies the account (shown in the app), `issuer`
30
+ * names the service. All three URI components are percent-encoded so a label/issuer
31
+ * with spaces or `:`/`?`/`&` cannot break the URI. Fixed to the defaults the core
32
+ * verifier uses (SHA-1, 6 digits, 30s period).
33
+ */
34
+ export declare function buildOtpauthUri(secret: string, label: string, issuer: string): string;
35
+ /**
36
+ * Mint `count` unique one-time recovery codes (each `xxxxx-xxxxx`, 10 lowercase hex
37
+ * chars grouped for readability). Returned RAW to the caller ONCE at enrollment; the
38
+ * store persists them Argon2-hashed. Uniqueness is enforced (a hex collision at this
39
+ * entropy is astronomically unlikely, but the loop guarantees `count` distinct codes).
40
+ */
41
+ export declare function generateRecoveryCodes(count?: number): string[];
42
+ //# sourceMappingURL=totp-enrollment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"totp-enrollment.d.ts","sourceRoot":"","sources":["../../src/auth/totp-enrollment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AA4CH;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAOrF;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,GAAE,MAAoC,GAAG,MAAM,EAAE,CAO3F"}
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ /**
3
+ * Phase 4 MFA-enrollment — the **pure TOTP-enrollment helpers**: generate a fresh
4
+ * base32 TOTP secret, compose the `otpauth://` provisioning URI an authenticator app
5
+ * scans, and mint one-time recovery codes.
6
+ *
7
+ * ── WHY THIS LIVES IN GUARD (not core) ──────────────────────────────────────
8
+ * Core owns the TOTP *verifier* (`createTotpFactorVerifier`, RFC 6238) but is
9
+ * ZERO-dep + node-type-free (ADR-0003), so it cannot mint secrets (needs
10
+ * `node:crypto.randomBytes`) nor build a URI. Enrollment is the *provisioning* side
11
+ * — it produces the secret the verifier later checks against. Guard owns node
12
+ * builtins, so the generation lives here. NO core change: the secret this emits is a
13
+ * plain base32 string, exactly what `createTotpFactorVerifier` decodes.
14
+ *
15
+ * ── SECURITY ─────────────────────────────────────────────────────────────────
16
+ * The secret + recovery codes are credential material: never logged, returned to the
17
+ * user exactly ONCE at enrollment, and (recovery codes) stored only Argon2-hashed.
18
+ * These functions are PURE (no I/O, no storage) — the caller decides what to persist.
19
+ *
20
+ * ADR-0003: guard owns `node:crypto`; this file has NO framework/HTTP/DB coupling.
21
+ */
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ exports.generateTotpSecret = generateTotpSecret;
24
+ exports.buildOtpauthUri = buildOtpauthUri;
25
+ exports.generateRecoveryCodes = generateRecoveryCodes;
26
+ const node_crypto_1 = require("node:crypto");
27
+ /** RFC 4648 base32 alphabet — the standard TOTP secret encoding (no padding here). */
28
+ const BASE32_ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567';
29
+ /**
30
+ * Bytes of entropy behind a generated TOTP secret. 20 bytes = 160 bits → exactly
31
+ * 32 base32 characters (20 × 8 / 5 = 32, no remainder → no padding), the RFC 4226
32
+ * recommended HMAC-SHA1 key length.
33
+ */
34
+ const SECRET_BYTES = 20;
35
+ /** How many recovery codes to mint by default (industry-standard batch of 10). */
36
+ const DEFAULT_RECOVERY_CODE_COUNT = 10;
37
+ /** Bytes per recovery code → 5 bytes = 10 lowercase hex chars, split into two groups. */
38
+ const RECOVERY_CODE_BYTES = 5;
39
+ /**
40
+ * Encode raw bytes into an RFC 4648 base32 string (no padding). Used to turn the
41
+ * random secret into the base32 string an authenticator app + the core verifier both
42
+ * expect. Pure bit-packing: 5 bits per output char, MSB-first.
43
+ */
44
+ function base32Encode(bytes) {
45
+ let bits = 0;
46
+ let value = 0;
47
+ let out = '';
48
+ for (const byte of bytes) {
49
+ value = (value << 8) | byte;
50
+ bits += 8;
51
+ while (bits >= 5) {
52
+ bits -= 5;
53
+ out += BASE32_ALPHABET[(value >>> bits) & 0x1f];
54
+ }
55
+ }
56
+ if (bits > 0) {
57
+ // Flush the remaining <5 bits, left-padded with zeros to a full 5-bit group.
58
+ out += BASE32_ALPHABET[(value << (5 - bits)) & 0x1f];
59
+ }
60
+ return out;
61
+ }
62
+ /**
63
+ * Generate a fresh, cryptographically-random base32 TOTP secret (160 bits → 32
64
+ * chars). This is what the user's authenticator app is provisioned with and what the
65
+ * core verifier later checks presented codes against.
66
+ */
67
+ function generateTotpSecret() {
68
+ return base32Encode((0, node_crypto_1.randomBytes)(SECRET_BYTES));
69
+ }
70
+ /**
71
+ * Build the `otpauth://totp/...` provisioning URI an authenticator app scans (or the
72
+ * user enters manually). `label` identifies the account (shown in the app), `issuer`
73
+ * names the service. All three URI components are percent-encoded so a label/issuer
74
+ * with spaces or `:`/`?`/`&` cannot break the URI. Fixed to the defaults the core
75
+ * verifier uses (SHA-1, 6 digits, 30s period).
76
+ */
77
+ function buildOtpauthUri(secret, label, issuer) {
78
+ const encIssuer = encodeURIComponent(issuer);
79
+ const encLabel = encodeURIComponent(label);
80
+ return (`otpauth://totp/${encIssuer}:${encLabel}` +
81
+ `?secret=${secret}&issuer=${encIssuer}&digits=6&period=30`);
82
+ }
83
+ /**
84
+ * Mint `count` unique one-time recovery codes (each `xxxxx-xxxxx`, 10 lowercase hex
85
+ * chars grouped for readability). Returned RAW to the caller ONCE at enrollment; the
86
+ * store persists them Argon2-hashed. Uniqueness is enforced (a hex collision at this
87
+ * entropy is astronomically unlikely, but the loop guarantees `count` distinct codes).
88
+ */
89
+ function generateRecoveryCodes(count = DEFAULT_RECOVERY_CODE_COUNT) {
90
+ const codes = new Set();
91
+ while (codes.size < count) {
92
+ const hex = (0, node_crypto_1.randomBytes)(RECOVERY_CODE_BYTES).toString('hex'); // 10 hex chars
93
+ codes.add(`${hex.slice(0, 5)}-${hex.slice(5)}`);
94
+ }
95
+ return [...codes];
96
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"totp-enrollment.js","sourceRoot":"","sources":["../../src/auth/totp-enrollment.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;AAiDH,gDAEC;AASD,0CAOC;AAQD,sDAOC;AAhFD,6CAA0C;AAE1C,sFAAsF;AACtF,MAAM,eAAe,GAAG,kCAAkC,CAAC;AAE3D;;;;GAIG;AACH,MAAM,YAAY,GAAG,EAAE,CAAC;AAExB,kFAAkF;AAClF,MAAM,2BAA2B,GAAG,EAAE,CAAC;AAEvC,yFAAyF;AACzF,MAAM,mB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AAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,IAAY,EAAE,SAAiB;QAC1C,IAAI,CAAC;YACH,OAAO,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAC9C,CAAC;QAAC,MAAM,CAAC;YACP,yEAAyE;YACzE,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;CACF;AA/BD,wDA+BC;AAED;;;;;GAKG;AACH,SAAgB,sBAAsB,CAAC,SAAyB,EAAE;IAIhE,OAAO;QACL,OAAO,EAAE,8BAAsB;QAC/B,QAAQ,EAAE,IAAI,sBAAsB,CAAC,MAAM,CAAC;KAC7C,CAAC;AACJ,CAAC"}
@@ -1,20 +1,30 @@
1
1
  /**
2
- * `MariaDbCredentialResolver` — the concrete {@link CredentialResolver} (core
3
- * port) backed by the `shield_identity.identity_credential` table. Resolves an
4
- * `identityHint` (username / email) → a {@link ResolvedCredential} the
5
- * Authentication engine verifies, or `null` for an unknown hint.
2
+ * `MariaDbCredentialResolver` — the framework-DEFAULT concrete
3
+ * {@link CredentialResolver} (core port) backed by the single
4
+ * `shield_identity.identity_credential` table. Resolves an `identityHint`
5
+ * (username / email) → a {@link ResolvedCredential} the Authentication engine
6
+ * verifies, or `null` for an unknown hint.
6
7
  *
7
- * ⛔⛔ PHASE 0b PRELUDE SKELETON — the CONTRACT is frozen here; **Team A fills the
8
- * body**. `resolve()` currently THROWS "not implemented" so a missing Team-A impl
9
- * fails CLOSED (a broken resolver can NEVER silently authenticate). Do not change
10
- * the constructor shape (it takes the `SHIELD_DB_POOL`) or the return type — the
11
- * composition (Team B) and the engine depend on them.
8
+ * ⛔ PASSWORD-ONLY BY DESIGN. This default resolver reads ONLY the columns the
9
+ * framework's shipped seed (`infra/mariadb/init/30-identity-credential.sql`)
10
+ * actually creates: `ic_password_hash, ic_principal_id, ic_tenant_id, ic_roles`.
11
+ * It therefore ALWAYS returns `requiredFactors: []` — it does NOT provide an
12
+ * MFA/second-factor challenge. There is no TOTP column here: the multi-device MFA
13
+ * model moved authenticator secrets out of `identity_credential` into a separate
14
+ * `mfa_device` table, which the framework ships only as an UNIMPLEMENTED port.
15
+ *
16
+ * MFA / required-factors are a CONSUMER concern, delivered by plugging a custom
17
+ * `credentialResolver` (+ a concrete `MfaDeviceStore`) via `ShieldModule.forRoot`
18
+ * — NOT by this default. See astram3's `IdentityCredentialResolver`, which reads
19
+ * this same table AND folds in the consumer's confirmed authenticators via
20
+ * `listConfirmedSecrets(mfa_device)` to populate `requiredFactors`. That seam is
21
+ * the supported way to add MFA-at-login on top of this password-only default.
12
22
  *
13
23
  * ─────────────────────────────────────────────────────────────────────────────
14
- * THE TABLE CONTRACT Team A must create (infra migration/seed
15
- * `infra/mariadb/init/30-identity-credential.sql`, in `shield_identity`; the
16
- * runtime `shield_core` account already has DML there — no new grant). Columns
17
- * per spec §3 (prefix `ic_` to match the repo's session-table convention):
24
+ * THE TABLE CONTRACT (infra seed `infra/mariadb/init/30-identity-credential.sql`,
25
+ * in `shield_identity`; the runtime `shield_core` account already has DML there —
26
+ * no new grant). Columns per spec §3 (prefix `ic_` to match the repo's
27
+ * session-table convention):
18
28
  *
19
29
  * identity_credential
20
30
  * ┌────────────────────────┬──────────────┬────────────────────────────────────┐
@@ -25,16 +35,16 @@
25
35
  * │ ic_principal_id │ VARCHAR(255) │ → ResolvedCredential.claims.id │
26
36
  * │ ic_tenant_id │ VARCHAR(255) │ → claims.tenantId │
27
37
  * │ ic_roles │ JSON / TEXT │ role-id array → claims.roleIds │
28
- * │ ic_totp_secret │ VARCHAR(255) │ NULLABLE — base32 TOTP secret; │
29
- * │ │ │ present ⇒ requiredFactors:[totp] │
30
38
  * │ ic_created_at_ms │ BIGINT │ UTC epoch ms (platform sets UTC) │
31
39
  * │ ic_updated_at_ms │ BIGINT │ UTC epoch ms │
32
40
  * └────────────────────────┴──────────────┴────────────────────────────────────┘
33
41
  * PRIMARY KEY / UNIQUE on ic_identity_hint (single-row resolve by hint).
42
+ * (No `ic_totp_secret` column — MFA secrets live in the consumer's `mfa_device`
43
+ * table, resolved by a consumer-plugged resolver, not by this default.)
34
44
  *
35
45
  * The resolver's SELECT must:
36
- * 1. `SELECT ic_password_hash, ic_principal_id, ic_tenant_id, ic_roles,
37
- * ic_totp_secret FROM shield_identity.identity_credential
46
+ * 1. `SELECT ic_password_hash, ic_principal_id, ic_tenant_id, ic_roles
47
+ * FROM shield_identity.identity_credential
38
48
  * WHERE ic_identity_hint = ? LIMIT 1` (parameterized — NEVER string-built).
39
49
  * 2. Return `null` when NO row matches — the ONLY "not found" signal
40
50
  * (anti-enumeration; MUST NOT throw for an unknown hint; the engine burns a
@@ -43,16 +53,16 @@
43
53
  * passwordHash = ic_password_hash
44
54
  * claims = { id: ic_principal_id, tenantId: ic_tenant_id,
45
55
  * roleIds: <parsed ic_roles> } // canonical Internal claims
46
- * requiredFactors = ic_totp_secret ? [{ factor:'totp', secret: ic_totp_secret }] : []
47
- * 4. NEVER log the hash, the TOTP secret, or the raw row.
56
+ * requiredFactors = [] // ALWAYS empty — password-only default (see above)
57
+ * 4. NEVER log the hash or the raw row.
48
58
  * 5. A store outage (connection/query error) MAY throw — the engine treats a
49
59
  * resolver throw as fail-closed `authentication_unavailable` (never a leak).
50
- * Team A does NOT need to swallow it, but MUST NOT convert it into a `null`
51
- * (that would make an outage look like "unknown user").
60
+ * It MUST NOT convert a throw into a `null` (that would make an outage look
61
+ * like "unknown user").
52
62
  *
53
63
  * (`claims.kind` is optional — the Internal adapter defaults an absent kind; add
54
64
  * an `ic_kind` column later if a deployment needs non-`user` principals. Do NOT
55
- * put any superuser flag in the row — superuser is the broker's server-side
65
+ * put any root flag in the row — root is the broker's server-side
56
66
  * allowlist, never a claim, per core/identity.)
57
67
  * ─────────────────────────────────────────────────────────────────────────────
58
68
  *
@@ -88,8 +98,12 @@ export declare class MariaDbCredentialResolver implements CredentialResolver {
88
98
  * unknown user; the engine treats a resolver throw as fail-closed
89
99
  * `authentication_unavailable`. We never convert an error into `null` (that
90
100
  * would mask an outage AND make it look like "no such user").
91
- * - The password hash and TOTP secret are NEVER logged; the raw row is never
92
- * logged. On success they are returned to the engine as verify inputs only.
101
+ * - The password hash is NEVER logged; the raw row is never logged. On success
102
+ * it is returned to the engine as a verify input only.
103
+ * - **Password-only:** `requiredFactors` is ALWAYS `[]`. This default provides
104
+ * no second-factor challenge; MFA-at-login is delivered by a consumer-plugged
105
+ * `credentialResolver` (+ `MfaDeviceStore`) — see the class doc header and
106
+ * astram3's `IdentityCredentialResolver`.
93
107
  */
94
108
  resolve(identityHint: string): Promise<ResolvedCredential | null>;
95
109
  }
@@ -1 +1 @@
1
- {"version":3,"file":"mariadb-credential-resolver.d.ts","sourceRoot":"","sources":["../../src/authentication/mariadb-credential-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,KAAK,EACV,kBAAkB,EAElB,kBAAkB,EACnB,MAAM,cAAc,CAAC;AAEtB,kFAAkF;AAClF,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAwD/D;;;;;;;GAOG;AACH,qBAAa,yBAA0B,YAAW,kBAAkB;IACtD,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,IAAI;IAEvC;;;;;;;;;;;;;;;;OAgBG;IACG,OAAO,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;CAgCxE"}
1
+ {"version":3,"file":"mariadb-credential-resolver.d.ts","sourceRoot":"","sources":["../../src/authentication/mariadb-credential-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsEG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,KAAK,EACV,kBAAkB,EAElB,kBAAkB,EACnB,MAAM,cAAc,CAAC;AAEtB,kFAAkF;AAClF,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAqD/D;;;;;;;GAOG;AACH,qBAAa,yBAA0B,YAAW,kBAAkB;IACtD,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,IAAI;IAEvC;;;;;;;;;;;;;;;;;;;;OAoBG;IACG,OAAO,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;CAgCxE"}
@@ -1,21 +1,31 @@
1
1
  "use strict";
2
2
  /**
3
- * `MariaDbCredentialResolver` — the concrete {@link CredentialResolver} (core
4
- * port) backed by the `shield_identity.identity_credential` table. Resolves an
5
- * `identityHint` (username / email) → a {@link ResolvedCredential} the
6
- * Authentication engine verifies, or `null` for an unknown hint.
3
+ * `MariaDbCredentialResolver` — the framework-DEFAULT concrete
4
+ * {@link CredentialResolver} (core port) backed by the single
5
+ * `shield_identity.identity_credential` table. Resolves an `identityHint`
6
+ * (username / email) → a {@link ResolvedCredential} the Authentication engine
7
+ * verifies, or `null` for an unknown hint.
7
8
  *
8
- * ⛔⛔ PHASE 0b PRELUDE SKELETON — the CONTRACT is frozen here; **Team A fills the
9
- * body**. `resolve()` currently THROWS "not implemented" so a missing Team-A impl
10
- * fails CLOSED (a broken resolver can NEVER silently authenticate). Do not change
11
- * the constructor shape (it takes the `SHIELD_DB_POOL`) or the return type — the
12
- * composition (Team B) and the engine depend on them.
9
+ * ⛔ PASSWORD-ONLY BY DESIGN. This default resolver reads ONLY the columns the
10
+ * framework's shipped seed (`infra/mariadb/init/30-identity-credential.sql`)
11
+ * actually creates: `ic_password_hash, ic_principal_id, ic_tenant_id, ic_roles`.
12
+ * It therefore ALWAYS returns `requiredFactors: []` — it does NOT provide an
13
+ * MFA/second-factor challenge. There is no TOTP column here: the multi-device MFA
14
+ * model moved authenticator secrets out of `identity_credential` into a separate
15
+ * `mfa_device` table, which the framework ships only as an UNIMPLEMENTED port.
16
+ *
17
+ * MFA / required-factors are a CONSUMER concern, delivered by plugging a custom
18
+ * `credentialResolver` (+ a concrete `MfaDeviceStore`) via `ShieldModule.forRoot`
19
+ * — NOT by this default. See astram3's `IdentityCredentialResolver`, which reads
20
+ * this same table AND folds in the consumer's confirmed authenticators via
21
+ * `listConfirmedSecrets(mfa_device)` to populate `requiredFactors`. That seam is
22
+ * the supported way to add MFA-at-login on top of this password-only default.
13
23
  *
14
24
  * ─────────────────────────────────────────────────────────────────────────────
15
- * THE TABLE CONTRACT Team A must create (infra migration/seed
16
- * `infra/mariadb/init/30-identity-credential.sql`, in `shield_identity`; the
17
- * runtime `shield_core` account already has DML there — no new grant). Columns
18
- * per spec §3 (prefix `ic_` to match the repo's session-table convention):
25
+ * THE TABLE CONTRACT (infra seed `infra/mariadb/init/30-identity-credential.sql`,
26
+ * in `shield_identity`; the runtime `shield_core` account already has DML there —
27
+ * no new grant). Columns per spec §3 (prefix `ic_` to match the repo's
28
+ * session-table convention):
19
29
  *
20
30
  * identity_credential
21
31
  * ┌────────────────────────┬──────────────┬────────────────────────────────────┐
@@ -26,16 +36,16 @@
26
36
  * │ ic_principal_id │ VARCHAR(255) │ → ResolvedCredential.claims.id │
27
37
  * │ ic_tenant_id │ VARCHAR(255) │ → claims.tenantId │
28
38
  * │ ic_roles │ JSON / TEXT │ role-id array → claims.roleIds │
29
- * │ ic_totp_secret │ VARCHAR(255) │ NULLABLE — base32 TOTP secret; │
30
- * │ │ │ present ⇒ requiredFactors:[totp] │
31
39
  * │ ic_created_at_ms │ BIGINT │ UTC epoch ms (platform sets UTC) │
32
40
  * │ ic_updated_at_ms │ BIGINT │ UTC epoch ms │
33
41
  * └────────────────────────┴──────────────┴────────────────────────────────────┘
34
42
  * PRIMARY KEY / UNIQUE on ic_identity_hint (single-row resolve by hint).
43
+ * (No `ic_totp_secret` column — MFA secrets live in the consumer's `mfa_device`
44
+ * table, resolved by a consumer-plugged resolver, not by this default.)
35
45
  *
36
46
  * The resolver's SELECT must:
37
- * 1. `SELECT ic_password_hash, ic_principal_id, ic_tenant_id, ic_roles,
38
- * ic_totp_secret FROM shield_identity.identity_credential
47
+ * 1. `SELECT ic_password_hash, ic_principal_id, ic_tenant_id, ic_roles
48
+ * FROM shield_identity.identity_credential
39
49
  * WHERE ic_identity_hint = ? LIMIT 1` (parameterized — NEVER string-built).
40
50
  * 2. Return `null` when NO row matches — the ONLY "not found" signal
41
51
  * (anti-enumeration; MUST NOT throw for an unknown hint; the engine burns a
@@ -44,16 +54,16 @@
44
54
  * passwordHash = ic_password_hash
45
55
  * claims = { id: ic_principal_id, tenantId: ic_tenant_id,
46
56
  * roleIds: <parsed ic_roles> } // canonical Internal claims
47
- * requiredFactors = ic_totp_secret ? [{ factor:'totp', secret: ic_totp_secret }] : []
48
- * 4. NEVER log the hash, the TOTP secret, or the raw row.
57
+ * requiredFactors = [] // ALWAYS empty — password-only default (see above)
58
+ * 4. NEVER log the hash or the raw row.
49
59
  * 5. A store outage (connection/query error) MAY throw — the engine treats a
50
60
  * resolver throw as fail-closed `authentication_unavailable` (never a leak).
51
- * Team A does NOT need to swallow it, but MUST NOT convert it into a `null`
52
- * (that would make an outage look like "unknown user").
61
+ * It MUST NOT convert a throw into a `null` (that would make an outage look
62
+ * like "unknown user").
53
63
  *
54
64
  * (`claims.kind` is optional — the Internal adapter defaults an absent kind; add
55
65
  * an `ic_kind` column later if a deployment needs non-`user` principals. Do NOT
56
- * put any superuser flag in the row — superuser is the broker's server-side
66
+ * put any root flag in the row — root is the broker's server-side
57
67
  * allowlist, never a claim, per core/identity.)
58
68
  * ─────────────────────────────────────────────────────────────────────────────
59
69
  *
@@ -123,14 +133,18 @@ class MariaDbCredentialResolver {
123
133
  * unknown user; the engine treats a resolver throw as fail-closed
124
134
  * `authentication_unavailable`. We never convert an error into `null` (that
125
135
  * would mask an outage AND make it look like "no such user").
126
- * - The password hash and TOTP secret are NEVER logged; the raw row is never
127
- * logged. On success they are returned to the engine as verify inputs only.
136
+ * - The password hash is NEVER logged; the raw row is never logged. On success
137
+ * it is returned to the engine as a verify input only.
138
+ * - **Password-only:** `requiredFactors` is ALWAYS `[]`. This default provides
139
+ * no second-factor challenge; MFA-at-login is delivered by a consumer-plugged
140
+ * `credentialResolver` (+ `MfaDeviceStore`) — see the class doc header and
141
+ * astram3's `IdentityCredentialResolver`.
128
142
  */
129
143
  async resolve(identityHint) {
130
144
  // A failed query rejects out of here unchanged (fail-closed): we deliberately
131
145
  // do NOT wrap this in a try/catch that returns null — only a genuine "no row"
132
146
  // maps to null (below), never a store outage.
133
- const rows = (await this.pool.query(`SELECT ic_password_hash, ic_principal_id, ic_tenant_id, ic_roles, ic_totp_secret
147
+ const rows = (await this.pool.query(`SELECT ic_password_hash, ic_principal_id, ic_tenant_id, ic_roles
134
148
  FROM shield_identity.identity_credential
135
149
  WHERE ic_identity_hint = ?
136
150
  LIMIT 1`, [identityHint]));
@@ -139,9 +153,9 @@ class MariaDbCredentialResolver {
139
153
  if (!row) {
140
154
  return null;
141
155
  }
142
- const requiredFactors = row.ic_totp_secret
143
- ? [{ factor: 'totp', secret: row.ic_totp_secret }]
144
- : [];
156
+ // Password-only default: no second factor is derived here. MFA is a consumer
157
+ // concern (custom resolver + MfaDeviceStore), so requiredFactors is always [].
158
+ const requiredFactors = [];
145
159
  return {
146
160
  passwordHash: row.ic_password_hash,
147
161
  claims: {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mariadb-credential-resolver.js","sourceRoot":"","sources":["../../src/authentication/mariadb-credential-resolver.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsEG;;;AASH,kFAAk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