@nacre.work/core 0.1.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 (78) hide show
  1. package/dist/audit.d.ts +41 -0
  2. package/dist/audit.d.ts.map +1 -0
  3. package/dist/audit.js +18 -0
  4. package/dist/audit.js.map +1 -0
  5. package/dist/authz/cache.d.ts +20 -0
  6. package/dist/authz/cache.d.ts.map +1 -1
  7. package/dist/authz/cache.js +29 -0
  8. package/dist/authz/cache.js.map +1 -1
  9. package/dist/authz/index.d.ts +1 -2
  10. package/dist/authz/index.d.ts.map +1 -1
  11. package/dist/authz/index.js +1 -2
  12. package/dist/authz/index.js.map +1 -1
  13. package/dist/config.d.ts +132 -5
  14. package/dist/config.d.ts.map +1 -1
  15. package/dist/config.js +439 -22
  16. package/dist/config.js.map +1 -1
  17. package/dist/db/migrate.d.ts +45 -0
  18. package/dist/db/migrate.d.ts.map +1 -1
  19. package/dist/db/migrate.js +61 -0
  20. package/dist/db/migrate.js.map +1 -1
  21. package/dist/extensions.d.ts +298 -0
  22. package/dist/extensions.d.ts.map +1 -0
  23. package/dist/extensions.js +246 -0
  24. package/dist/extensions.js.map +1 -0
  25. package/dist/index.d.ts +16 -6
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +9 -4
  28. package/dist/index.js.map +1 -1
  29. package/dist/lifecycle.d.ts.map +1 -1
  30. package/dist/lifecycle.js +13 -26
  31. package/dist/lifecycle.js.map +1 -1
  32. package/dist/logging.d.ts +46 -0
  33. package/dist/logging.d.ts.map +1 -0
  34. package/dist/logging.js +110 -0
  35. package/dist/logging.js.map +1 -0
  36. package/dist/metrics.d.ts +11 -7
  37. package/dist/metrics.d.ts.map +1 -1
  38. package/dist/metrics.js +32 -7
  39. package/dist/metrics.js.map +1 -1
  40. package/dist/migrations/0014_retired_collections.sql +68 -0
  41. package/dist/migrations/0015_reference_queries.sql +97 -0
  42. package/dist/migrations/0016_drop_acl_tag_cache.sql +62 -0
  43. package/dist/migrations/0017_drop_workspace_admin_role.sql +30 -0
  44. package/dist/migrations/0018_group_members_nulls_not_distinct.sql +46 -0
  45. package/dist/migrations/0019_embedding_provider_write_guard.sql +58 -0
  46. package/dist/multipart.d.ts +55 -0
  47. package/dist/multipart.d.ts.map +1 -0
  48. package/dist/multipart.js +158 -0
  49. package/dist/multipart.js.map +1 -0
  50. package/dist/oauth.d.ts +10 -0
  51. package/dist/oauth.d.ts.map +1 -1
  52. package/dist/oauth.js +10 -0
  53. package/dist/oauth.js.map +1 -1
  54. package/dist/observability.d.ts.map +1 -1
  55. package/dist/observability.js +43 -46
  56. package/dist/observability.js.map +1 -1
  57. package/dist/reindex.d.ts +44 -0
  58. package/dist/reindex.d.ts.map +1 -1
  59. package/dist/reindex.js +49 -0
  60. package/dist/reindex.js.map +1 -1
  61. package/dist/s3.d.ts +111 -0
  62. package/dist/s3.d.ts.map +1 -0
  63. package/dist/s3.js +242 -0
  64. package/dist/s3.js.map +1 -0
  65. package/dist/tsconfig.tsbuildinfo +1 -1
  66. package/dist/vector/query.d.ts +7 -9
  67. package/dist/vector/query.d.ts.map +1 -1
  68. package/dist/vector/query.js +7 -6
  69. package/dist/vector/query.js.map +1 -1
  70. package/dist/vector/search.d.ts +86 -1
  71. package/dist/vector/search.d.ts.map +1 -1
  72. package/dist/vector/search.js +185 -1
  73. package/dist/vector/search.js.map +1 -1
  74. package/package.json +1 -1
  75. package/dist/authz/tags.d.ts +0 -40
  76. package/dist/authz/tags.d.ts.map +0 -1
  77. package/dist/authz/tags.js +0 -48
  78. package/dist/authz/tags.js.map +0 -1
@@ -0,0 +1,41 @@
1
+ /**
2
+ * What the journal is allowed to say about a query.
3
+ *
4
+ * `docs/audit.md` is normative and says two things here. Neither was true:
5
+ *
6
+ * > **Never:** document contents, chunk text, and — with
7
+ * > `NACRE_AUDIT_QUERY_TEXT=false`, the default — full query text. A query
8
+ * > hash is stored instead.
9
+ *
10
+ * There was no hash. The `detail` written for a search carried a count and
11
+ * nothing about the query at all, so the promise that a hash is "enough to
12
+ * investigate an incident" was a promise about a field that did not exist —
13
+ * and `NACRE_AUDIT_QUERY_TEXT` was validated at startup and read by nothing,
14
+ * so the deployments that had decided otherwise got the same nothing.
15
+ *
16
+ * ─── why the hash is unconditional and the text is not ───
17
+ *
18
+ * The hash answers the question an investigation actually asks — *did this
19
+ * agent run this query, and how often* — by comparing hashes, and it cannot
20
+ * leak what was searched for. The text answers a different question, is a
21
+ * decision with a compliance owner, and is the reason the flag exists.
22
+ *
23
+ * One function so the two surfaces cannot disagree. A search over MCP and the
24
+ * same search over REST must leave the same record; that they did not is what
25
+ * `nacre_acl_denials_total` and the rate limiter both had to be fixed for.
26
+ */
27
+ export interface QueryAudit {
28
+ /** `sha256:` and hex, the same shape as `documents.content_hash`. */
29
+ readonly query_hash: string;
30
+ /** Present only where a deployment set `NACRE_AUDIT_QUERY_TEXT`. */
31
+ readonly query?: string;
32
+ }
33
+ /**
34
+ * Bounded, because the journal is not a place to put an unbounded caller
35
+ * string. A query longer than this is truncated in the record and still hashed
36
+ * whole — the hash is of what was asked, not of what was stored, or two records
37
+ * of the same long query would not match each other.
38
+ */
39
+ export declare const MAX_AUDITED_QUERY = 1024;
40
+ export declare function queryAudit(query: string, includeText: boolean): QueryAudit;
41
+ //# sourceMappingURL=audit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../audit.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,WAAW,UAAU;IACzB,qEAAqE;IACrE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,oEAAoE;IACpE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CACxB;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,OAAO,CAAA;AAErC,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,UAAU,CAO1E"}
package/dist/audit.js ADDED
@@ -0,0 +1,18 @@
1
+ import { createHash } from 'node:crypto';
2
+ /**
3
+ * Bounded, because the journal is not a place to put an unbounded caller
4
+ * string. A query longer than this is truncated in the record and still hashed
5
+ * whole — the hash is of what was asked, not of what was stored, or two records
6
+ * of the same long query would not match each other.
7
+ */
8
+ export const MAX_AUDITED_QUERY = 1024;
9
+ export function queryAudit(query, includeText) {
10
+ const hash = `sha256:${createHash('sha256').update(query, 'utf8').digest('hex')}`;
11
+ if (!includeText)
12
+ return { query_hash: hash };
13
+ return {
14
+ query_hash: hash,
15
+ query: query.length > MAX_AUDITED_QUERY ? `${query.slice(0, MAX_AUDITED_QUERY)}…` : query,
16
+ };
17
+ }
18
+ //# sourceMappingURL=audit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit.js","sourceRoot":"","sources":["../audit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAmCxC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAA;AAErC,MAAM,UAAU,UAAU,CAAC,KAAa,EAAE,WAAoB;IAC5D,MAAM,IAAI,GAAG,UAAU,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAA;IACjF,IAAI,CAAC,WAAW;QAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,CAAA;IAC7C,OAAO;QACL,UAAU,EAAE,IAAI;QAChB,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,iBAAiB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK;KAC1F,CAAA;AACH,CAAC"}
@@ -23,6 +23,26 @@ export interface CacheStore {
23
23
  get(key: string): Promise<string | undefined>;
24
24
  set(key: string, value: string, ttlSeconds: number): Promise<void>;
25
25
  }
26
+ /**
27
+ * The shared implementation, over the Redis this deployment already runs.
28
+ *
29
+ * Lives here rather than in `packages/api` because MCP needs the same one, and
30
+ * two processes caching effective principals under two different key schemes
31
+ * would give the two surfaces different answers for the same principal — which
32
+ * is the failure mode `NACRE_RATE_*` had before both surfaces shared a bucket.
33
+ *
34
+ * Every method swallows nothing: `cachedEffectivePrincipals` is what decides
35
+ * that a cache failure falls through to the graph, and it can only decide that
36
+ * if the failure reaches it.
37
+ */
38
+ export declare class RedisCache implements CacheStore {
39
+ private readonly redis;
40
+ constructor(redis: {
41
+ command(...parts: string[]): Promise<string | number | null | unknown[]>;
42
+ });
43
+ get(key: string): Promise<string | undefined>;
44
+ set(key: string, value: string, ttlSeconds: number): Promise<void>;
45
+ }
26
46
  /** For a single process, and for tests. Redis is the shared implementation. */
27
47
  export declare class MemoryCache implements CacheStore {
28
48
  #private;
@@ -1 +1 @@
1
- {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../authz/cache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1D,OAAO,EAAuB,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEtE;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAC7C,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACnE;AAED,+EAA+E;AAC/E,qBAAa,WAAY,YAAW,UAAU;;IAGtC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAU7C,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE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this deployment already runs.
4
+ *
5
+ * Lives here rather than in `packages/api` because MCP needs the same one, and
6
+ * two processes caching effective principals under two different key schemes
7
+ * would give the two surfaces different answers for the same principal — which
8
+ * is the failure mode `NACRE_RATE_*` had before both surfaces shared a bucket.
9
+ *
10
+ * Every method swallows nothing: `cachedEffectivePrincipals` is what decides
11
+ * that a cache failure falls through to the graph, and it can only decide that
12
+ * if the failure reaches it.
13
+ */
14
+ export class RedisCache {
15
+ redis;
16
+ constructor(redis) {
17
+ this.redis = redis;
18
+ }
19
+ async get(key) {
20
+ const reply = await this.redis.command('GET', key);
21
+ return typeof reply === 'string' ? reply : undefined;
22
+ }
23
+ async set(key, value, ttlSeconds) {
24
+ // EX rather than a separate EXPIRE: two commands leave a window where a
25
+ // crash between them writes a key that never expires, and this key is
26
+ // per principal per version — the set of them that never expire is
27
+ // unbounded.
28
+ await this.redis.command('SET', key, value, 'EX', String(Math.max(1, Math.floor(ttlSeconds))));
29
+ }
30
+ }
2
31
  /** For a single process, and for tests. Redis is the shared implementation. */
3
32
  export class MemoryCache {
4
33
  #entries = new Map();
@@ -1 +1 @@
1
- {"version":3,"file":"cache.js","sourceRoot":"","sources":["../../authz/cache.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAmB,MAAM,iBAAiB,CAAA;AA2BtE,+EAA+E;AAC/E,MAAM,OAAO,WAAW;IACb,QAAQ,GAAG,IAAI,GAAG,EAA8C,CAAA;IAEzE,KAAK,CAAC,GAAG,CAAC,GAAW;QACnB,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QACpC,IAAI,KAAK,KAAK,SAAS;YAAE,OAAO,SAAS,CAAA;QACzC,IAAI,KAAK,CAAC,OAAO,IAAI,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC;YAChC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;YACzB,OAAO,SAAS,CAAA;QAClB,CAAC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AAI,GAAG,KAAK,SAAS,EAAE,CAAC;YACtB,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;YACvC,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,EAAE,CAAC;gBACxE,OAAO,IAAI,GAAG,CAAC,MAAwB,CAAC,CAAA;YAC1C,CAAC;YACD,yEAAyE;YACzE,oEAAoE;YACpE,kBAAkB;QACpB,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,mCAAmC;IACrC,CAAC;IAED,MAAM,UAAU,GAAG,mBAAmB,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,SAAS,EAAE,CAAC,CAAA;IAE5E,IAAI,CAAC;QACH,MAAM,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAA;IAC3E,CAAC;IAAC,MAAM,CAAC;QACP,6EAA6E;IAC/E,CAAC;IAED,OAAO,UAAU,CAAA;AACnB,CAAC"}
@@ -9,7 +9,6 @@ export { buildFilter, METADATA_PREFIX } from './filter.js';
9
9
  export type { FilterClause, MetadataValue, Narrowing, QueryablePlan, VectorFilter } from './filter.js';
10
10
  export { ancestry, MemoryScopeTree } from './scope-tree.js';
11
11
  export type { ScopeTree, ScopeTreeData } from './scope-tree.js';
12
- export { aclTags, principalTag, DEFAULT_TAG_BYTES } from './tags.js';
13
- export { cachedEffectivePrincipals, MemoryCache, principalsCacheKey } from './cache.js';
12
+ export { cachedEffectivePrincipals, MemoryCache, RedisCache, principalsCacheKey } from './cache.js';
14
13
  export type { CacheStore, CachedPrincipalsOptions } from './cache.js';
15
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","source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E,MAAM,cAAc,CAAA;AACtC,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC1D,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AACtG,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAC3D,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/D,OAAO,EAAE,yBAAyB,EAAE,WAAW,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AACnG,YAAY,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAA"}
@@ -4,6 +4,5 @@ export { resolve } from './resolve.js';
4
4
  export { referenceAllows } from './reference.js';
5
5
  export { buildFilter, METADATA_PREFIX } from './filter.js';
6
6
  export { ancestry, MemoryScopeTree } from './scope-tree.js';
7
- export { aclTags, principalTag, DEFAULT_TAG_BYTES } from './tags.js';
8
- export { cachedEffectivePrincipals, MemoryCache, principalsCacheKey } from './cache.js';
7
+ export { cachedEffectivePrincipals, MemoryCache, RedisCache, principalsCacheKey } from './cache.js';
9
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../authz/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAEvE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE1D,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AACpE,OAAO,EAAE,yBAAyB,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../authz/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAEvE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE1D,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAE3D,OAAO,EAAE,yBAAyB,EAAE,WAAW,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA"}
package/dist/config.d.ts CHANGED
@@ -14,6 +14,7 @@
14
14
  * obviously right value — and never fine for anything naming a host or
15
15
  * carrying a credential.
16
16
  */
17
+ import { type KeyObject } from 'node:crypto';
17
18
  export interface Config {
18
19
  readonly env: 'development' | 'production';
19
20
  readonly canonicalUrl: string;
@@ -28,8 +29,16 @@ export interface Config {
28
29
  * ourselves would be worse than leaving it out.
29
30
  */
30
31
  readonly oauthAuthorizationServer: string;
31
- readonly logLevel: string;
32
+ readonly logLevel: 'debug' | 'info' | 'warn' | 'error';
32
33
  readonly logFormat: 'json' | 'text';
34
+ /**
35
+ * Packages to import at startup so they can register extensions.
36
+ *
37
+ * Named rather than imported, because this repository's CI fails if its
38
+ * source mentions the commercial package at all — see `extensions.ts`. Empty
39
+ * is the default and is the whole open-core product.
40
+ */
41
+ readonly modules: readonly string[];
33
42
  readonly pgUrl: string;
34
43
  readonly pgPoolMax: number;
35
44
  readonly qdrantUrl: string;
@@ -48,8 +57,6 @@ export interface Config {
48
57
  readonly accessTokenTtl: number;
49
58
  readonly refreshTokenTtl: number;
50
59
  readonly aclCacheTtl: number;
51
- readonly aclPropagationSla: number;
52
- readonly aclTagHashBytes: number;
53
60
  /**
54
61
  * How long a tombstoned document keeps its vectors before the sweep removes
55
62
  * them. A tunable, so a default is fine — and it is not a correctness knob:
@@ -79,6 +86,34 @@ export interface Config {
79
86
  readonly maxDocumentBytes: number;
80
87
  readonly auditRetentionDays: number;
81
88
  readonly auditQueryText: boolean;
89
+ /** The reindex rollback window: how long a superseded collection survives. */
90
+ readonly collectionRetentionDays: number;
91
+ /**
92
+ * The recall a reindex must reach before its layer switches, as a fraction.
93
+ *
94
+ * Read from a whole-number percentage. Applies only to a layer that has a
95
+ * reference query set — there is no gate without one.
96
+ */
97
+ readonly reindexMinRecall: number;
98
+ /** How long a presigned link to a document's bytes stays valid. */
99
+ readonly presignTtl: number;
100
+ /**
101
+ * Object storage, or `undefined` when a deployment has none.
102
+ *
103
+ * Absent is a supported configuration and not a degraded one: document bytes
104
+ * then live in `documents.source_ref`, which is what every deployment did
105
+ * before this existed. What is *not* supported is half of it — see the
106
+ * cross-field check, and the reason it is a check rather than a set of
107
+ * independent optionals.
108
+ */
109
+ readonly s3: {
110
+ readonly endpoint: string;
111
+ readonly bucket: string;
112
+ readonly region: string;
113
+ readonly accessKey: string;
114
+ readonly secretKey: string;
115
+ readonly forcePathStyle: boolean;
116
+ } | undefined;
82
117
  }
83
118
  /**
84
119
  * The keys a token may be verified against, and the one it is signed with.
@@ -91,11 +126,103 @@ export interface Config {
91
126
  */
92
127
  export interface JwtKeys {
93
128
  /** Everything issued from now on is signed with this. */
94
- readonly key: Uint8Array;
129
+ readonly signing: KeyObject | Uint8Array;
130
+ /**
131
+ * What a token is verified against.
132
+ *
133
+ * The same value as `signing` for a shared secret, and the **public half**
134
+ * for Ed25519 — which is the whole reason the asymmetric mode is worth
135
+ * having. A process that only verifies never needs the private key, so the
136
+ * blast radius of reading a container's environment stops at "can check
137
+ * tokens" instead of "can mint them".
138
+ */
139
+ readonly verification: KeyObject | Uint8Array;
95
140
  /** Accepted on verification, never used to sign. Empty outside a rotation. */
96
- readonly alsoAccept: readonly Uint8Array[];
141
+ readonly alsoAccept: readonly (KeyObject | Uint8Array)[];
142
+ /**
143
+ * Pinned, and passed to `jwtVerify` rather than left to the token's header.
144
+ *
145
+ * A verifier that accepts whatever `alg` a token claims is the classic JWT
146
+ * mistake. `jose` already refuses the worst shapes — `none`, and an HMAC
147
+ * algorithm against an asymmetric `KeyObject` — but "the library happens to
148
+ * stop it" is not the same statement as "this deployment accepts exactly one
149
+ * algorithm", and only the second one survives a dependency upgrade.
150
+ */
151
+ readonly algorithm: 'HS256' | 'EdDSA';
152
+ /**
153
+ * The current key's `kid`, put in the header of every token this process
154
+ * signs so a JWKS consumer can select rather than try each. Absent for HMAC,
155
+ * where it would name nothing anyone could fetch.
156
+ */
157
+ readonly keyId?: string;
158
+ /**
159
+ * What `/.well-known/jwks.json` serves. Absent for HMAC.
160
+ *
161
+ * A shared secret has no publishable half, and serving one would be serving
162
+ * the signing key — so this is optional rather than always present, and the
163
+ * endpoint exists only when there is something safe to put in it.
164
+ *
165
+ * The retired key is in here too during a rotation, for the same reason it is
166
+ * still accepted: there are tokens in the wild signed with it, and a verifier
167
+ * outside this process has to be able to check them. Assembled here rather
168
+ * than by each caller, because a JWKS missing the previous key is a rotation
169
+ * that breaks every external verifier at the restart.
170
+ */
171
+ readonly jwks?: readonly Record<string, unknown>[];
97
172
  }
173
+ /**
174
+ * What a process that only *verifies* tokens needs — the verification key, the
175
+ * keys still accepted during a rotation, and the one algorithm it will honour.
176
+ * No `signing`, no `jwks` to publish: a resource server such as the MCP
177
+ * transport checks tokens and never mints them, and `loadJwtVerification` lets
178
+ * it be configured with only the public half, so reading its environment gets
179
+ * an attacker to "can check tokens" and no further.
180
+ */
181
+ export interface JwtVerification {
182
+ readonly verification: KeyObject | Uint8Array;
183
+ readonly alsoAccept: readonly (KeyObject | Uint8Array)[];
184
+ readonly algorithm: 'HS256' | 'EdDSA';
185
+ }
186
+ /**
187
+ * A short, non-reversible name for whichever key is in use, for a startup line.
188
+ *
189
+ * An operator needs to know *which* key a process loaded when two environments
190
+ * disagree — and nobody needs the key itself in a log. `api` and `mcp` each had
191
+ * their own copy of this, taking a `Uint8Array`; two copies of a function that
192
+ * hashes a secret is two chances for one of them to log the wrong thing.
193
+ *
194
+ * For an asymmetric key it is a digest of the **public** half, which means the
195
+ * value printed by a process holding the private key matches the one printed by
196
+ * a process holding only the public key. That is precisely the comparison this
197
+ * exists to let someone make.
198
+ */
199
+ export declare function keyFingerprint(key: KeyObject | Uint8Array): string;
98
200
  export declare function loadJwtKeys(env?: NodeJS.ProcessEnv): JwtKeys;
201
+ /**
202
+ * Verification-only key material, for a process that checks tokens and never
203
+ * signs one — the MCP transport, which is a resource server.
204
+ *
205
+ * Three ways to name the key, exactly one of them at a time:
206
+ *
207
+ * - `NACRE_JWT_PUBLIC_KEY_REF` — the Ed25519 **public** key, and nothing else.
208
+ * This is the one that makes the asymmetric mode worth what it claims: the
209
+ * verifier holds no secret and no private key, so an attacker who reads its
210
+ * environment can check tokens and cannot mint them. `NACRE_JWT_PREVIOUS_PUBLIC_KEY_REF`
211
+ * is its rotation overlap, mirroring the private side.
212
+ * - `NACRE_JWT_PRIVATE_KEY_REF` — the private key, from which the public half is
213
+ * derived. Accepted so a process co-located with the signer, or one that
214
+ * simply has the private key, still verifies; it just does not get the
215
+ * separation the public-only path does.
216
+ * - `NACRE_JWT_SECRET` — the shared secret. Verifying and signing are the same
217
+ * key here by definition, so there is no separation to be had and the process
218
+ * holds the secret regardless; this exists so a Compose deployment that runs
219
+ * on a shared secret still starts.
220
+ *
221
+ * Setting more than one is refused, for the same reason `loadJwtKeys` refuses
222
+ * two answers to "what signs a token": whichever won, the others would be
223
+ * configured, apparently in use, and ignored.
224
+ */
225
+ export declare function loadJwtVerification(env?: NodeJS.ProcessEnv): JwtVerification;
99
226
  export declare class ConfigError extends Error {
100
227
  readonly problems: readonly string[];
101
228
  constructor(problems: readonly string[]);
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,GAAG,EAAE,aAAa,GAAG,YAAY,CAAA;IAC1C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B;;;;;;;;;OASG;IACH,QAAQ,CAAC,wBAAwB,EAAE,MAAM,CAAA;IACzC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAA;IAEnC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;IACzC,QAAQ,CAAC,aAAa,EAAE,YAAY,GAAG,QAAQ,CAAA;IAC/C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IAEzB,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAA;IAClC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7C,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAA;IACjC,QAA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