@haneinfo/m2m-api-key 8.1.31 → 8.1.32

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 CHANGED
@@ -1,3 +1,27 @@
1
1
  # Machine-to-machine API keys
2
2
 
3
+ ## Scope catalog
4
+
5
+ The grantable catalog comes from mounted REST `@Scopes()` declarations and App-provided
6
+ `M2M_SCOPE_SOURCES` (`ScopeSource[]`). Concrete scopes use `<resource>:<action>`, split at the
7
+ **last colon**. Each resource segment and the action must contain only `[a-z0-9_-]`, with at
8
+ least one character per segment. For example, `users:read`, `haneinfo-reports:definition:read`
9
+ and `haneinfo-reports:reports:data:read` are valid when declared. Empty segments, whitespace,
10
+ uppercase characters and embedded wildcards are rejected. Actions are not limited to read/write.
11
+
12
+ New grants must be declared concrete scopes, `*` (the existing global grant), or
13
+ `<resource>:*` for a resource with at least one concrete catalog entry. A wildcard declaration
14
+ alone does not establish a resource. Resource matching is exact: `haneinfo-reports:definition:*`
15
+ matches `haneinfo-reports:definition:read`, whereas `haneinfo-reports:*` does not. The latter
16
+ cannot be issued unless a concrete scope with resource exactly `haneinfo-reports` is declared.
17
+
18
+ `list()` returns sorted concrete scopes; `describe()` and `groupOf()` use the entire resource
19
+ for App `M2M_SCOPE_GROUPS` display grouping. Key creation validates all grants; updates validate
20
+ only newly added grants, preserving existing legacy scopes through unrelated edits. ScopeGuard
21
+ and the `SCOPE_MATCHER` capability used by MCP delegate matching to plugin-api `matchScope`.
22
+
23
+ See [the agent guide](agent-guide.md) for App wiring and verification.
24
+
25
+ ## Authentication observation
26
+
3
27
  Successful API key authentication records `lastUsedAt` asynchronously. Writes are throttled per key across processes using a conditional database update. The default interval is 60 seconds; set `M2M_API_KEY_LAST_USED_INTERVAL_SECONDS` to an integer from 0 to 86400 to change it (0 disables throttling). Invalid or absent values use 60 seconds. The timestamp can lag the latest successful authentication by up to the configured interval, plus asynchronous database delay; write failures are logged and retried on a later request. This timestamp is observational and does not determine authentication or authorization.
package/agent-guide.md ADDED
@@ -0,0 +1,43 @@
1
+ # M2M API key integration
2
+
3
+ Read [README.md](README.md) for scope syntax and the `lastUsedAt` observation contract.
4
+
5
+ ## Declare before issuing
6
+
7
+ The scope catalog discovers mounted REST handlers at bootstrap. Handler `@Scopes()` metadata
8
+ overrides controller metadata, including for request-scoped controllers. Undecorated helpers do
9
+ not contribute scopes. For non-REST capabilities such as MCP tools, provide an array of
10
+ `ScopeSource` objects under `M2M_SCOPE_SOURCES`; each exposes `listScopes(): readonly string[]`.
11
+ Declare the concrete `requiredScopes` used by the tools, not wildcard grants. Sources are read
12
+ at bootstrap; changing tool scopes requires updating the source and restarting the App.
13
+
14
+ Scopes split at their last colon into resource and action, as in plugin-api `parseScope`.
15
+ The catalog additionally retains its lowercase `[a-z0-9_-]+` alphabet for every segment:
16
+ `haneinfo-reports:reports:data:read` has resource `haneinfo-reports:reports:data` and action `read`.
17
+ No segment may be empty, contain whitespace or contain `*`. The sole action wildcard `*` is
18
+ allowed only as a grant for an exactly known resource; it is never listed as a concrete scope.
19
+ The legacy standalone `*` grant remains available.
20
+
21
+ For display, provide `ScopeGroupDefinition[]` under `M2M_SCOPE_GROUPS`. Its `resources` must
22
+ contain complete resource names, for example `['haneinfo-reports:definition']`. Unclaimed
23
+ resources use the platform group. The API key editor consumes `describe()` without reparsing
24
+ scope strings. A prefix wildcard such as `haneinfo-reports:*` neither grants access to
25
+ `haneinfo-reports:definition:read` nor becomes issuable from that declaration.
26
+
27
+ ## Authorization and persistence
28
+
29
+ Use `ApiKeysService.create()` and `update()` for issuance; do not bypass the catalog by writing
30
+ grant strings directly. Creation checks every grant; updates check newly added grants and
31
+ retain existing legacy grants. ScopeGuard and `ScopeMatcherService` delegate to plugin-api
32
+ `matchScope`, keeping REST and MCP capability matching consistent. Scope matching does not
33
+ replace RBAC or an acting-user check required by the App's tools.
34
+
35
+ This change needs no dependency upgrade, schema migration or existing-key rewrite.
36
+
37
+ ## Verification
38
+
39
+ Run workspace gates in order: `pnpm install`, `pnpm build`, `pnpm build:graph`, `pnpm typecheck`,
40
+ `pnpm -r --no-bail test`, `pnpm lint`, `pnpm specs:lint`, `pnpm exec changeset status`.
41
+ Run `git diff --check` as well. The package's `pnpm test` includes Nest discovery, real
42
+ ApiKeysService with a stateful Prisma test double, invalid/new-grant rejection and REST/MCP
43
+ scope-matcher parity. These unit tests do not connect to PostgreSQL or an HTTP MCP transport.
@@ -2,7 +2,7 @@ import { CanActivate, ExecutionContext } from '@nestjs/common';
2
2
  /**
3
3
  * Checks whether `grantedScopes` (an API key's scopes, or an MCP call context's scopes) satisfy
4
4
  * `requiredScope`. Shared between this guard and `@haneinfo/mcp-server`'s tool registry, which
5
- * has the same `module:action` scope shape and the same "*" wildcard convention.
5
+ * has the same `<resource>:<action>` shape (split at the last colon) and "*" wildcard convention.
6
6
  */
7
7
  export declare function matchScope(grantedScopes: string[], requiredScope: string): boolean;
8
8
  export declare class ScopeGuard implements CanActivate {
@@ -14,7 +14,7 @@ const scopes_decorator_1 = require("../decorators/scopes.decorator");
14
14
  /**
15
15
  * Checks whether `grantedScopes` (an API key's scopes, or an MCP call context's scopes) satisfy
16
16
  * `requiredScope`. Shared between this guard and `@haneinfo/mcp-server`'s tool registry, which
17
- * has the same `module:action` scope shape and the same "*" wildcard convention.
17
+ * has the same `<resource>:<action>` shape (split at the last colon) and "*" wildcard convention.
18
18
  */
19
19
  function matchScope(grantedScopes, requiredScope) {
20
20
  return (0, plugin_api_1.matchScope)(grantedScopes, requiredScope);
@@ -1 +1 @@
1
- {"version":3,"file":"scope-catalog.d.ts","sourceRoot":"","sources":["../src/scope-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,sBAAsB,EAAY,MAAM,gBAAgB,CAAC;AAE3F,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAGjE;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,UAAU,IAAI,SAAS,MAA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AyE;IACzE,IAAI,IAAI,MAAM,EAAE;IAIhB,+FAA+F;IAC/F,MAAM,IAAI,YAAY,EAAE;IAOxB,+FAA+F;IAC/F,QAAQ,IAAI,YAAY,EAAE;IAI1B,iGAAiG;IACjG,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAO9B;;;OAGG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;CAKhC"}
@@ -13,6 +13,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.M2mScopeCatalogService = exports.WILDCARD_SCOPE = exports.PLATFORM_SCOPE_GROUP = exports.M2M_SCOPE_GROUPS = exports.M2M_SCOPE_SOURCES = void 0;
16
+ const plugin_api_1 = require("@haneinfo/plugin-api");
16
17
  const common_1 = require("@nestjs/common");
17
18
  const constants_1 = require("@nestjs/common/constants");
18
19
  const core_1 = require("@nestjs/core");
@@ -21,11 +22,19 @@ exports.M2M_SCOPE_SOURCES = Symbol.for('haneinfo.m2m-scope-sources');
21
22
  exports.M2M_SCOPE_GROUPS = Symbol.for('haneinfo.m2m-scope-groups');
22
23
  exports.PLATFORM_SCOPE_GROUP = { key: 'platform', label: 'Platform' };
23
24
  exports.WILDCARD_SCOPE = '*';
24
- // `resource:action`, where both halves are lowercase identifiers. The action half is NOT limited to
25
- // read/write/call: any action an App declares via `@Scopes()` (e.g. `esign-templates:publish`) is
26
- // valid once it appears in the catalog.
27
- const SCOPE_FORMAT = /^[a-z0-9_-]+:[a-z0-9_-]+$/;
28
- const RESOURCE_WILDCARD_FORMAT = /^([a-z0-9_-]+):\*$/;
25
+ const SCOPE_SEGMENT = /^[a-z0-9_-]+$/;
26
+ // Use the matching contract's last-colon resource boundary, retaining the catalog's lowercase
27
+ // identifier alphabet. Wildcard actions are recognized here but are never concrete declarations.
28
+ function parseCatalogScope(scope) {
29
+ const parsed = (0, plugin_api_1.parseScope)(scope);
30
+ if (!parsed)
31
+ return null;
32
+ if (!parsed.resource.split(':').every((segment) => SCOPE_SEGMENT.test(segment)) ||
33
+ (parsed.action !== '*' && !SCOPE_SEGMENT.test(parsed.action))) {
34
+ return null;
35
+ }
36
+ return parsed;
37
+ }
29
38
  /**
30
39
  * The single source of truth for which scopes exist. Derived at bootstrap from the mounted REST
31
40
  * controllers (`@Scopes()` metadata) and any App-supplied `ScopeSource`. Display, issuance and
@@ -62,9 +71,16 @@ let M2mScopeCatalogService = class M2mScopeCatalogService {
62
71
  for (const scope of source.listScopes())
63
72
  found.add(scope);
64
73
  }
65
- // `*` is the legacy all-access grant and is handled separately; it is not a catalog entry.
66
- this.scopes = new Set([...found].filter((scope) => scope !== exports.WILDCARD_SCOPE && SCOPE_FORMAT.test(scope)));
67
- this.resources = new Set([...this.scopes].map((scope) => scope.split(':')[0]));
74
+ // Wildcards are grants, not declarations. Only concrete declarations establish a resource.
75
+ this.scopes = new Set();
76
+ this.resources = new Set();
77
+ for (const scope of found) {
78
+ const parsed = parseCatalogScope(scope);
79
+ if (!parsed || parsed.action === '*')
80
+ continue;
81
+ this.scopes.add(scope);
82
+ this.resources.add(parsed.resource);
83
+ }
68
84
  }
69
85
  /** Every concrete scope the catalog knows, sorted for stable display. */
70
86
  list() {
@@ -83,7 +99,9 @@ let M2mScopeCatalogService = class M2mScopeCatalogService {
83
99
  }
84
100
  /** The group a scope belongs to: the first App group that claims its resource, else platform. */
85
101
  groupOf(scope) {
86
- const resource = scope.split(':')[0];
102
+ const resource = parseCatalogScope(scope)?.resource;
103
+ if (!resource)
104
+ return exports.PLATFORM_SCOPE_GROUP.key;
87
105
  const match = (this.groupDefinitions ?? []).find((group) => group.resources.includes(resource));
88
106
  return match?.key ?? exports.PLATFORM_SCOPE_GROUP.key;
89
107
  }
@@ -94,8 +112,8 @@ let M2mScopeCatalogService = class M2mScopeCatalogService {
94
112
  isKnown(scope) {
95
113
  if (scope === exports.WILDCARD_SCOPE || this.scopes.has(scope))
96
114
  return true;
97
- const match = RESOURCE_WILDCARD_FORMAT.exec(scope);
98
- return match !== null && this.resources.has(match[1]);
115
+ const parsed = parseCatalogScope(scope);
116
+ return parsed !== null && parsed.action === '*' && this.resources.has(parsed.resource);
99
117
  }
100
118
  };
101
119
  exports.M2mScopeCatalogService = M2mScopeCatalogService;
@@ -1 +1 @@
1
- {"version":3,"file":"scope-catalog.js","sourceRoot":"","sources":["../src/scope-catalog.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA2F;AAC3F,wDAA2D;AAC3D,uCAAiE;AACjE,oEAA2D;AAU9C,QAAA,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;AAa7D,QAAA,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;AAE3D,QAAA,oBAAoB,GAAG,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAW,CAAC;AAYvE,QAAA,cAAc,GAAG,GAAG,CAAC;AAElC,oGAAoG;AACpG,kGAAkG;AAClG,wCAAwC;AACxC,MAAM,YAAY,GAAG,2BAA2B,CAAC;AACjD,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAEtD;;;;GAIG;AAEI,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAIjC,YAC4B,SAA4C,EAC7C,OAAyC,EAC3B,OAAwC,EAG/E,gBAA0D;QALf,cAAS,GAAT,SAAS,CAAkB;QAC5B,YAAO,GAAP,OAAO,CAAiB;QACV,YAAO,GAAP,OAAO,CAAgB;QAG9D,qBAAgB,GAAhB,gBAAgB,CAAyB;QATpD,WAAM,GAAG,IAAI,GAAG,EAAU,CAAC;QAC3B,cAAS,GAAG,IAAI,GAAG,EAAU,CAAC;IASnC,CAAC;IAEJ,sBAAsB;QACpB,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;QAEhC,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,SAAS,CAAC,cAAc,EA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,WAAA,IAAA,eAAM,EAAC,yBAAiB,CAAC,CAAA;IACrC,WAAA,IAAA,iBAAQ,GAAE,CAAA;IACV,WAAA,IAAA,eAAM,EAAC,wBAAgB,CAAC,CAAA;qCAJ6B,uBAAgB;QACnB,sBAAe;GANzD,sBAAsB,CAiFlC"}
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@haneinfo/m2m-api-key",
3
- "version": "8.1.31",
3
+ "version": "8.1.32",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
7
+ "agent-guide.md",
7
8
  "prisma",
8
9
  "haneinfo.plugin.json",
9
10
  "plugin.js",
@@ -31,8 +32,8 @@
31
32
  },
32
33
  "dependencies": {
33
34
  "@haneinfo/common": "0.6.1",
34
- "@haneinfo/frontend-shell": "1.6.1",
35
- "@haneinfo/plugin-api": "1.28.0"
35
+ "@haneinfo/plugin-api": "1.28.0",
36
+ "@haneinfo/frontend-shell": "1.6.1"
36
37
  },
37
38
  "peerDependencies": {
38
39
  "@haneinfo/common": "^0.6.1",
@@ -79,10 +80,10 @@
79
80
  "vitest": "^4.1.11",
80
81
  "zod": "^4.4.0",
81
82
  "@haneinfo/common": "0.6.1",
82
- "@haneinfo/frontend-shell": "1.6.1",
83
83
  "@haneinfo/plugin-host-nest": "2.1.1",
84
- "@haneinfo/plugin-testkit": "2.3.1",
85
- "@haneinfo/rbac": "8.2.17"
84
+ "@haneinfo/frontend-shell": "1.6.1",
85
+ "@haneinfo/rbac": "8.2.17",
86
+ "@haneinfo/plugin-testkit": "2.3.1"
86
87
  },
87
88
  "license": "UNLICENSED",
88
89
  "publishConfig": {