@stratum-hq/nestjs 1.1.0 → 1.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.
package/README.md
CHANGED
|
@@ -16,12 +16,19 @@ Peer dependencies: `@nestjs/common >= 10`, `@nestjs/core >= 10`, `reflect-metada
|
|
|
16
16
|
import { Module } from "@nestjs/common";
|
|
17
17
|
import { StratumModule } from "@stratum-hq/nestjs";
|
|
18
18
|
|
|
19
|
+
// Without jwtSecret, the guard does not verify tokens and reads the tenant
|
|
20
|
+
// from the X-Tenant-ID header, which any client can send.
|
|
21
|
+
const jwtSecret = process.env.JWT_SECRET;
|
|
22
|
+
if (!jwtSecret) {
|
|
23
|
+
throw new Error("JWT_SECRET is required to verify bearer tokens.");
|
|
24
|
+
}
|
|
25
|
+
|
|
19
26
|
@Module({
|
|
20
27
|
imports: [
|
|
21
28
|
StratumModule.forRoot({
|
|
22
29
|
controlPlaneUrl: "http://localhost:3001",
|
|
23
30
|
apiKey: "sk_live_your_key",
|
|
24
|
-
jwtSecret
|
|
31
|
+
jwtSecret, // optional: enables JWT verification
|
|
25
32
|
jwtClaimPath: "tenant_id",
|
|
26
33
|
}),
|
|
27
34
|
],
|
|
@@ -48,7 +55,7 @@ export class DataController {
|
|
|
48
55
|
## API
|
|
49
56
|
|
|
50
57
|
- **`StratumModule.forRoot(options)` / `forRootAsync(options)`** — register the SDK client for DI. `forRootAsync` supports `useFactory` + `inject` for config that depends on other providers (e.g. `ConfigService`).
|
|
51
|
-
- **`StratumGuard`** — resolves the tenant from the `X-Tenant-ID` header,
|
|
58
|
+
- **`StratumGuard`** — resolves the tenant from a verified JWT claim, then the `X-Tenant-ID` header, then custom `resolvers`. When `jwtSecret` or `jwtVerify` is set, the guard reads the header only with `trustTenantHeader: true`, and it rejects a Bearer token that fails verification with 401. Set `jwtAudience` / `jwtIssuer` to also reject tokens whose `aud` / `iss` claim does not match. Sets `req.tenant` (full `TenantContext`), plus `req.impersonating` / `req.originalTenantId` when impersonation is enabled. Throws `UnauthorizedException` (401) if the request has no tenant ID, `NotFoundException` (404) if the tenant does not exist, `ForbiddenException` (403) if the tenant is suspended or access is denied, and `GoneException` (410) if the tenant is archived. A control plane timeout throws `GatewayTimeoutException` (504). A rejected SDK API key throws `InternalServerErrorException` (500) and writes the cause to `console.error`.
|
|
52
59
|
- **`@Tenant()`** — parameter decorator that extracts `req.tenant`.
|
|
53
60
|
- **`StratumContextInterceptor`** — binds the resolved context to AsyncLocalStorage so services can call `getTenantContext()` from `@stratum-hq/sdk` without the request object.
|
|
54
61
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stratum.guard.d.ts","sourceRoot":"","sources":["../src/stratum.guard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stratum.guard.d.ts","sourceRoot":"","sources":["../src/stratum.guard.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAuBhE,qBACa,YAAa,YAAW,WAAW;IAEpB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACtB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBADR,MAAM,EAAE,aAAa,EACpB,OAAO,EAAE,oBAAoB;IAKnE,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;CAmE/D"}
|
package/dist/stratum.guard.js
CHANGED
|
@@ -10,10 +10,29 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
12
|
};
|
|
13
|
-
import { Inject, Injectable, UnauthorizedException, ForbiddenException } from "@nestjs/common";
|
|
14
|
-
import { assertJwtSupport, resolveTenantId } from "@stratum-hq/sdk";
|
|
15
|
-
import { TenantNotFoundError } from "@stratum-hq/core";
|
|
13
|
+
import { Inject, Injectable, UnauthorizedException, ForbiddenException, GatewayTimeoutException, GoneException, HttpException, InternalServerErrorException, NotFoundException, } from "@nestjs/common";
|
|
14
|
+
import { assertJwtSupport, controlPlaneErrorResponse, resolveTenantId, tenantErrorResponse } from "@stratum-hq/sdk";
|
|
16
15
|
import { STRATUM_CLIENT, STRATUM_OPTIONS } from "./constants.js";
|
|
16
|
+
const EXCEPTIONS = {
|
|
17
|
+
403: ForbiddenException,
|
|
18
|
+
404: NotFoundException,
|
|
19
|
+
410: GoneException,
|
|
20
|
+
500: InternalServerErrorException,
|
|
21
|
+
504: GatewayTimeoutException,
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Convert a tenant resolution error into the HTTP exception for the status
|
|
25
|
+
* that the SDK's Express and Fastify middleware send for the same error.
|
|
26
|
+
* Other errors come back unchanged, so Nest answers them with a 500.
|
|
27
|
+
*/
|
|
28
|
+
function resolutionException(err, tenantId) {
|
|
29
|
+
const response = tenantErrorResponse(err, tenantId) ?? controlPlaneErrorResponse(err);
|
|
30
|
+
if (!response)
|
|
31
|
+
return err;
|
|
32
|
+
const Exception = EXCEPTIONS[response.status];
|
|
33
|
+
const message = response.body.error.message;
|
|
34
|
+
return Exception ? new Exception(message) : new HttpException(message, response.status);
|
|
35
|
+
}
|
|
17
36
|
let StratumGuard = class StratumGuard {
|
|
18
37
|
client;
|
|
19
38
|
options;
|
|
@@ -42,14 +61,11 @@ let StratumGuard = class StratumGuard {
|
|
|
42
61
|
callerContext = await this.client.resolveTenant(tenantId);
|
|
43
62
|
}
|
|
44
63
|
catch (err) {
|
|
45
|
-
|
|
46
|
-
throw new UnauthorizedException(`Tenant not found: ${tenantId}`);
|
|
47
|
-
}
|
|
48
|
-
throw err;
|
|
64
|
+
throw resolutionException(err, tenantId);
|
|
49
65
|
}
|
|
50
66
|
req["tenant"] = callerContext;
|
|
51
67
|
req["impersonating"] = false;
|
|
52
|
-
// 3. Impersonation support — mirrors express.ts
|
|
68
|
+
// 3. Impersonation support — mirrors express.ts
|
|
53
69
|
if (this.options.impersonation?.enabled) {
|
|
54
70
|
const impersonateHeader = this.options.impersonation.headerName ?? "X-Impersonate-Tenant";
|
|
55
71
|
const headers = req.headers;
|
|
@@ -65,10 +81,7 @@ let StratumGuard = class StratumGuard {
|
|
|
65
81
|
impersonatedContext = await this.client.resolveTenant(impersonateTenantId);
|
|
66
82
|
}
|
|
67
83
|
catch (err) {
|
|
68
|
-
|
|
69
|
-
throw new UnauthorizedException(`Impersonated tenant not found: ${impersonateTenantId}`);
|
|
70
|
-
}
|
|
71
|
-
throw err;
|
|
84
|
+
throw resolutionException(err, impersonateTenantId);
|
|
72
85
|
}
|
|
73
86
|
req["tenant"] = impersonatedContext;
|
|
74
87
|
req["impersonating"] = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stratum.guard.js","sourceRoot":"","sources":["../src/stratum.guard.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"stratum.guard.js","sourceRoot":"","sources":["../src/stratum.guard.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACL,MAAM,EACN,UAAU,EACV,qBAAqB,EACrB,kBAAkB,EAClB,uBAAuB,EACvB,aAAa,EACb,aAAa,EACb,4BAA4B,EAC5B,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACpH,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjE,MAAM,UAAU,GAA2D;IACzE,GAAG,EAAE,kBAAkB;IACvB,GAAG,EAAE,iBAAiB;IACtB,GAAG,EAAE,aAAa;IAClB,GAAG,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AAI,CAAC,MAAM,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;gBAC7E,CAAC;gBAAC,OAAO,GAAG,EAAE,CAAC;oBACb,MAAM,mBAAmB,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;gBACtD,CAAC;gBAED,GAAG,CAAC,QAAQ,CAAC,GAAG,mBAAmB,CAAC;gBACpC,GAAG,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC;gBAC5B,GAAG,CAAC,kBAAkB,CAAC,GAAG,QAAQ,CAAC;gBAEnC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,aAAa,EAAE,CAAC,GAAG,EAAE,QAAQ,EAAE,mBAAmB,CAAC,CAAC;gBAE/E,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAA;AA3EY,YAAY;IADxB,UAAU,EAAE;IAGR,WAAA,MAAM,CAAC,cAAc,CAAC,CAAA;IACtB,WAAA,MAAM,CAAC,eAAe,CAAC,CAAA;;GAHf,YAAY,CA2ExB"}
|
package/dist/stratum.module.d.ts
CHANGED
|
@@ -9,6 +9,10 @@ export interface StratumModuleOptions {
|
|
|
9
9
|
jwtSecret?: string;
|
|
10
10
|
/** Custom JWT verify function — takes priority over jwtSecret. */
|
|
11
11
|
jwtVerify?: (token: string) => Record<string, unknown> | null;
|
|
12
|
+
/** When set, a verified token is accepted only if its `aud` claim equals (or, for an array, includes) this value. */
|
|
13
|
+
jwtAudience?: string;
|
|
14
|
+
/** When set, a verified token is accepted only if its `iss` claim equals this value. */
|
|
15
|
+
jwtIssuer?: string;
|
|
12
16
|
/** Header to read the tenant ID from. When set, only this header is read (default: X-Tenant-ID). */
|
|
13
17
|
headerName?: string;
|
|
14
18
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stratum.module.d.ts","sourceRoot":"","sources":["../src/stratum.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,aAAa,E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O,EAAE,cAAc,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;KACxF,CAAC;CACH;AAED,MAAM,WAAW,yBAA0B,SAAQ,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC;IAChF,UAAU,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACzF,MAAM,CAAC,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAC;CACpC;AAED,qBAEa,aAAa;IACxB;;OAEG;IACH,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,oBAAoB,GAAG,aAAa;IAqB5D;;;OAGG;IACH,MAAM,CAAC,YAAY,CAAC,YAAY,EAAE,yBAAyB,GAAG,aAAa;CA0B5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stratum.module.js","sourceRoot":"","sources":["../src/stratum.module.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,MAAM,EAAiB,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"stratum.module.js","sourceRoot":"","sources":["../src/stratum.module.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,MAAM,EAAiB,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,eAAe,EA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C;YACD,MAAM,EAAE,YAAY,CAAC,MAAM,IAAI,EAAE;SAClC,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,eAAa;YACrB,OAAO,EAAE,YAAY,CAAC,OAAO,IAAI,EAAE;YACnC,SAAS,EAAE,CAAC,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,yBAAyB,EAAE,CAAC;YAC7H,OAAO,EAAE,CAAC,cAAc,EAAE,YAAY,CAAC;SACxC,CAAC;IACJ,CAAC;CACF,CAAA;AAvDY,aAAa;IAFzB,MAAM,EAAE;IACR,MAAM,CAAC,EAAE,CAAC;GACE,aAAa,CAuDzB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stratum-hq/nestjs",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Stratum NestJS integration — StratumGuard, @Tenant() decorator, and StratumModule",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"multi-tenancy",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@nestjs/common": ">=10.0.0",
|
|
45
45
|
"@nestjs/core": ">=10.0.0",
|
|
46
|
-
"@stratum-hq/core": "
|
|
47
|
-
"@stratum-hq/sdk": "
|
|
46
|
+
"@stratum-hq/core": "^1.0.0",
|
|
47
|
+
"@stratum-hq/sdk": "^1.3.0",
|
|
48
48
|
"reflect-metadata": ">=0.1.13"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|