@futdevpro/fsm-dynamo 1.20.58 → 1.20.59
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/build/_collections/utils/operation-authz.util.d.ts +44 -0
- package/build/_collections/utils/operation-authz.util.d.ts.map +1 -0
- package/build/_collections/utils/operation-authz.util.js +109 -0
- package/build/_collections/utils/operation-authz.util.js.map +1 -0
- package/build/_models/control-models/operation-settings.control-model.d.ts +3 -0
- package/build/_models/control-models/operation-settings.control-model.d.ts.map +1 -1
- package/build/_models/control-models/operation-settings.control-model.js +12 -0
- package/build/_models/control-models/operation-settings.control-model.js.map +1 -1
- package/build/_models/interfaces/operation-authz-result.interface.d.ts +23 -0
- package/build/_models/interfaces/operation-authz-result.interface.d.ts.map +1 -0
- package/build/_models/interfaces/operation-authz-result.interface.js +3 -0
- package/build/_models/interfaces/operation-authz-result.interface.js.map +1 -0
- package/build/_models/interfaces/operation-authz.interface.d.ts +28 -0
- package/build/_models/interfaces/operation-authz.interface.d.ts.map +1 -0
- package/build/_models/interfaces/operation-authz.interface.js +3 -0
- package/build/_models/interfaces/operation-authz.interface.js.map +1 -0
- package/build/index.d.ts +3 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +3 -0
- package/build/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { DyFM_OperationContext_ControlModel } from '../../_models/control-models/operation-context.control-model';
|
|
2
|
+
import { DyFM_OperationSettings_ControlModel } from '../../_models/control-models/operation-settings.control-model';
|
|
3
|
+
import { DyFM_OperationAuthz_Result } from '../../_models/interfaces/operation-authz-result.interface';
|
|
4
|
+
/**
|
|
5
|
+
* Transport-independent authorization checks of an operation call (HP-DOPL MP-1.4).
|
|
6
|
+
*
|
|
7
|
+
* Two phases, because ownership needs the loaded entity:
|
|
8
|
+
* 1. `check` / `assert` — identity + API key scope, BEFORE the operation runs;
|
|
9
|
+
* 2. `checkOwnership` / `assertOwnership` — inside `run`, once the target entity is loaded.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* DyFM_OperationAuthz_Util.assert(operation, ctx);
|
|
14
|
+
* const task: Task = await loadTask(id);
|
|
15
|
+
* DyFM_OperationAuthz_Util.assertOwnership(operation, ctx, task);
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare class DyFM_OperationAuthz_Util {
|
|
19
|
+
/**
|
|
20
|
+
* Checks the identity and API key scope requirements of the operation.
|
|
21
|
+
* @param operation - the operation being called
|
|
22
|
+
* @param ctx - the call context built by the transport adapter
|
|
23
|
+
*/
|
|
24
|
+
static check(operation: DyFM_OperationSettings_ControlModel<unknown, unknown[], unknown>, ctx: DyFM_OperationContext_ControlModel): DyFM_OperationAuthz_Result;
|
|
25
|
+
/**
|
|
26
|
+
* Same as `check`, but throws a coded `DyFM_Error` (with `status`) on denial.
|
|
27
|
+
* @returns the allowed result, so a `warning` can still be surfaced by the adapter
|
|
28
|
+
*/
|
|
29
|
+
static assert(operation: DyFM_OperationSettings_ControlModel<unknown, unknown[], unknown>, ctx: DyFM_OperationContext_ControlModel): DyFM_OperationAuthz_Result;
|
|
30
|
+
/**
|
|
31
|
+
* Checks that the caller owns the loaded target entity, when the operation declares `authz.ownership`.
|
|
32
|
+
* @param operation - the operation being called
|
|
33
|
+
* @param ctx - the call context; its `clientUserId` is the owner identity (never `issuer`)
|
|
34
|
+
* @param target - the loaded entity the operation acts on
|
|
35
|
+
*/
|
|
36
|
+
static checkOwnership(operation: DyFM_OperationSettings_ControlModel<unknown, unknown[], unknown>, ctx: DyFM_OperationContext_ControlModel, target: object): DyFM_OperationAuthz_Result;
|
|
37
|
+
/** Same as `checkOwnership`, but throws a coded `DyFM_Error` (with `status`) on denial. */
|
|
38
|
+
static assertOwnership(operation: DyFM_OperationSettings_ControlModel<unknown, unknown[], unknown>, ctx: DyFM_OperationContext_ControlModel, target: object): DyFM_OperationAuthz_Result;
|
|
39
|
+
/** Builds a denial result. */
|
|
40
|
+
private static deny;
|
|
41
|
+
/** Converts a denial into a thrown `DyFM_Error`; the identity is logged by requestId only. */
|
|
42
|
+
private static throwIfDenied;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=operation-authz.util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-authz.util.d.ts","sourceRoot":"","sources":["../../../src/_collections/utils/operation-authz.util.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kCAAkC,EACnC,MAAM,8DAA8D,CAAC;AAEtE,OAAO,EACL,mCAAmC,EACpC,MAAM,+DAA+D,CAAC;AACvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,2DAA2D,CAAC;AAGvG;;;;;;;;;;;;;GAaG;AACH,qBAAa,wBAAwB;IACnC;;;;OAIG;IACH,MAAM,CAAC,KAAK,CACV,SAAS,EAAE,mCAAmC,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,OAAO,CAAC,EAC3E,GAAG,EAAE,kCAAkC,GACtC,0BAA0B;IAyC7B;;;OAGG;IACH,MAAM,CAAC,MAAM,CACX,SAAS,EAAE,mCAAmC,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,OAAO,CAAC,EAC3E,GAAG,EAAE,kCAAkC,GACtC,0BAA0B;IAM7B;;;;;OAKG;IACH,MAAM,CAAC,cAAc,CACnB,SAAS,EAAE,mCAAmC,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,OAAO,CAAC,EAC3E,GAAG,EAAE,kCAAkC,EACvC,MAAM,EAAE,MAAM,GACb,0BAA0B;IA6B7B,2FAA2F;IAC3F,MAAM,CAAC,eAAe,CACpB,SAAS,EAAE,mCAAmC,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,OAAO,CAAC,EAC3E,GAAG,EAAE,kCAAkC,EACvC,MAAM,EAAE,MAAM,GACb,0BAA0B;IAM7B,8BAA8B;IAC9B,OAAO,CAAC,MAAM,CAAC,IAAI;IAInB,8FAA8F;IAC9F,OAAO,CAAC,MAAM,CAAC,aAAa;CAoB7B"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DyFM_OperationAuthz_Util = void 0;
|
|
4
|
+
const operation_auth_type_enum_1 = require("../../_enums/operation-auth.type-enum");
|
|
5
|
+
const operation_context_control_model_1 = require("../../_models/control-models/operation-context.control-model");
|
|
6
|
+
const error_control_model_1 = require("../../_models/control-models/error.control-model");
|
|
7
|
+
/**
|
|
8
|
+
* Transport-independent authorization checks of an operation call (HP-DOPL MP-1.4).
|
|
9
|
+
*
|
|
10
|
+
* Two phases, because ownership needs the loaded entity:
|
|
11
|
+
* 1. `check` / `assert` — identity + API key scope, BEFORE the operation runs;
|
|
12
|
+
* 2. `checkOwnership` / `assertOwnership` — inside `run`, once the target entity is loaded.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* DyFM_OperationAuthz_Util.assert(operation, ctx);
|
|
17
|
+
* const task: Task = await loadTask(id);
|
|
18
|
+
* DyFM_OperationAuthz_Util.assertOwnership(operation, ctx, task);
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
class DyFM_OperationAuthz_Util {
|
|
22
|
+
/**
|
|
23
|
+
* Checks the identity and API key scope requirements of the operation.
|
|
24
|
+
* @param operation - the operation being called
|
|
25
|
+
* @param ctx - the call context built by the transport adapter
|
|
26
|
+
*/
|
|
27
|
+
static check(operation, ctx) {
|
|
28
|
+
const issuerRequired = operation?.authz?.issuerRequired !== false;
|
|
29
|
+
const authKind = ctx?.authKind ?? operation_auth_type_enum_1.DyFM_OperationAuth_Type.none;
|
|
30
|
+
// a missing identity is 401, the caller may retry with credentials
|
|
31
|
+
if (issuerRequired && (authKind === operation_auth_type_enum_1.DyFM_OperationAuth_Type.none || !ctx?.issuer)) {
|
|
32
|
+
return DyFM_OperationAuthz_Util.deny('DyFM-OPZ-UNA', 401, `operation "${operation?.name}" requires an authenticated caller`);
|
|
33
|
+
}
|
|
34
|
+
// scopes only restrict API keys; a token call is not scope-limited
|
|
35
|
+
if (authKind !== operation_auth_type_enum_1.DyFM_OperationAuth_Type.apiKey) {
|
|
36
|
+
return { allowed: true };
|
|
37
|
+
}
|
|
38
|
+
// legacy key (created before scopes): full access, but the adapter must surface the warning
|
|
39
|
+
if (operation_context_control_model_1.DyFM_OperationContext_ControlModel.isLegacyApiKey(ctx)) {
|
|
40
|
+
return { allowed: true, warning: 'legacy-api-key' };
|
|
41
|
+
}
|
|
42
|
+
const requiredScope = operation?.authz?.apiKeyScope;
|
|
43
|
+
// least privilege: a scoped key can not reach an operation that belongs to no scope
|
|
44
|
+
if (!requiredScope) {
|
|
45
|
+
return DyFM_OperationAuthz_Util.deny('DyFM-OPZ-NSC', 403, `operation "${operation?.name}" declares no apiKeyScope, a scoped API key can not call it`);
|
|
46
|
+
}
|
|
47
|
+
// exact match only — no wildcard until it is an explicit decision
|
|
48
|
+
if (!(ctx.apiKeyScopes ?? []).includes(requiredScope)) {
|
|
49
|
+
return DyFM_OperationAuthz_Util.deny('DyFM-OPZ-SCP', 403, `API key lacks scope "${requiredScope}" for operation "${operation?.name}"`);
|
|
50
|
+
}
|
|
51
|
+
return { allowed: true };
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Same as `check`, but throws a coded `DyFM_Error` (with `status`) on denial.
|
|
55
|
+
* @returns the allowed result, so a `warning` can still be surfaced by the adapter
|
|
56
|
+
*/
|
|
57
|
+
static assert(operation, ctx) {
|
|
58
|
+
return DyFM_OperationAuthz_Util.throwIfDenied(DyFM_OperationAuthz_Util.check(operation, ctx), operation, ctx);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Checks that the caller owns the loaded target entity, when the operation declares `authz.ownership`.
|
|
62
|
+
* @param operation - the operation being called
|
|
63
|
+
* @param ctx - the call context; its `clientUserId` is the owner identity (never `issuer`)
|
|
64
|
+
* @param target - the loaded entity the operation acts on
|
|
65
|
+
*/
|
|
66
|
+
static checkOwnership(operation, ctx, target) {
|
|
67
|
+
const ownershipField = operation?.authz?.ownership;
|
|
68
|
+
// no ownership declared: nothing to check
|
|
69
|
+
if (!ownershipField) {
|
|
70
|
+
return { allowed: true };
|
|
71
|
+
}
|
|
72
|
+
// a declared ownership check without a caller identity must fail closed, not pass
|
|
73
|
+
if (!ctx?.clientUserId) {
|
|
74
|
+
return DyFM_OperationAuthz_Util.deny('DyFM-OPZ-OWN', 403, `operation "${operation?.name}" requires the caller's clientUserId for the ownership check`);
|
|
75
|
+
}
|
|
76
|
+
const owner = target ? Reflect.get(target, ownershipField) : undefined;
|
|
77
|
+
// strict equality: an entity without owner is not owned by anybody
|
|
78
|
+
if (owner === undefined || owner === null || String(owner) !== ctx.clientUserId) {
|
|
79
|
+
return DyFM_OperationAuthz_Util.deny('DyFM-OPZ-OWN', 403, `caller does not own the target of operation "${operation?.name}" (field: ${ownershipField})`);
|
|
80
|
+
}
|
|
81
|
+
return { allowed: true };
|
|
82
|
+
}
|
|
83
|
+
/** Same as `checkOwnership`, but throws a coded `DyFM_Error` (with `status`) on denial. */
|
|
84
|
+
static assertOwnership(operation, ctx, target) {
|
|
85
|
+
return DyFM_OperationAuthz_Util.throwIfDenied(DyFM_OperationAuthz_Util.checkOwnership(operation, ctx, target), operation, ctx);
|
|
86
|
+
}
|
|
87
|
+
/** Builds a denial result. */
|
|
88
|
+
static deny(errorCode, status, reason) {
|
|
89
|
+
return { allowed: false, errorCode: errorCode, status: status, reason: reason };
|
|
90
|
+
}
|
|
91
|
+
/** Converts a denial into a thrown `DyFM_Error`; the identity is logged by requestId only. */
|
|
92
|
+
static throwIfDenied(result, operation, ctx) {
|
|
93
|
+
if (result.allowed) {
|
|
94
|
+
return result;
|
|
95
|
+
}
|
|
96
|
+
throw new error_control_model_1.DyFM_Error({
|
|
97
|
+
errorCode: result.errorCode,
|
|
98
|
+
status: result.status,
|
|
99
|
+
message: `Operation authorization failed: ${result.reason}`,
|
|
100
|
+
additionalContent: {
|
|
101
|
+
operation: operation?.name,
|
|
102
|
+
requestId: ctx?.requestId,
|
|
103
|
+
authKind: ctx?.authKind,
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
exports.DyFM_OperationAuthz_Util = DyFM_OperationAuthz_Util;
|
|
109
|
+
//# sourceMappingURL=operation-authz.util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-authz.util.js","sourceRoot":"","sources":["../../../src/_collections/utils/operation-authz.util.ts"],"names":[],"mappings":";;;AAAA,oFAAgF;AAChF,kHAEsE;AACtE,0FAA8E;AAO9E;;;;;;;;;;;;;GAaG;AACH,MAAa,wBAAwB;IACnC;;;;OAIG;IACH,MAAM,CAAC,KAAK,CACV,SAA2E,EAC3E,GAAuC;QAEvC,MAAM,cAAc,GAAY,SAAS,EAAE,KAAK,EAAE,cAAc,KAAK,KAAK,CAAC;QAC3E,MAAM,QAAQ,GAA4B,GAAG,EAAE,QAAQ,IAAI,kDAAuB,CAAC,IAAI,CAAC;QAExF,mEAAmE;QACnE,IAAI,cAAc,IAAI,CAAC,QAAQ,KAAK,kDAAuB,CAAC,IAAI,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,CAAC;YAClF,OAAO,wBAAwB,CAAC,IAAI,CAClC,cAAc,EAAE,GAAG,EAAE,cAAc,SAAS,EAAE,IAAI,oCAAoC,CACvF,CAAC;QACJ,CAAC;QAED,mEAAmE;QACnE,IAAI,QAAQ,KAAK,kDAAuB,CAAC,MAAM,EAAE,CAAC;YAChD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC3B,CAAC;QAED,4FAA4F;QAC5F,IAAI,oEAAkC,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;YAC3D,OAAO,EAAE,OAAO,EAAE,IAAI,EAA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,EAAE,SAAS,EAAE,IAAI;gBAC1B,SAAS,EAAE,GAAG,EAAE,SAAS;gBACzB,QAAQ,EAAE,GAAG,EAAE,QAAQ;aACxB;SACF,CAAC,CAAC;IACL,CAAC;CACF;AA3ID,4DA2IC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DyFM_Operation_Authz } from '../interfaces/operation-authz.interface';
|
|
1
2
|
import { DyFM_Operation_Exposure } from '../interfaces/operation-exposure.interface';
|
|
2
3
|
import { DyFM_OperationInput_Settings } from '../interfaces/operation-input-settings.interface';
|
|
3
4
|
import { DyFM_DataModel_Params } from './data-model-params.control-model';
|
|
@@ -39,6 +40,8 @@ export declare class DyFM_OperationSettings_ControlModel<T_Result = unknown, T_I
|
|
|
39
40
|
bodyParams?: DyFM_DataModel_Params<any>;
|
|
40
41
|
/** Transports the operation is exposed on; missing flags default to `true`. */
|
|
41
42
|
expose?: DyFM_Operation_Exposure;
|
|
43
|
+
/** Declarative authorization; `issuerRequired` defaults to `true`. */
|
|
44
|
+
authz?: DyFM_Operation_Authz;
|
|
42
45
|
/** Source location of the construction, for debugging duplicated or misconfigured operations. */
|
|
43
46
|
stackLocation?: string;
|
|
44
47
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation-settings.control-model.d.ts","sourceRoot":"","sources":["../../../src/_models/control-models/operation-settings.control-model.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,4BAA4B,EAAE,MAAM,kDAAkD,CAAC;AAEhG,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAU1E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,mCAAmC,CAC9C,QAAQ,GAAG,OAAO,EAClB,QAAQ,SAAS,OAAO,EAAE,GAAG,OAAO,EAAE,EACtC,MAAM,GAAG,SAAS;IAMlB,gEAAgE;IAChE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,MAAM,EAAE,MAAM,CAAC;IACf,0FAA0F;IAC1F,MAAM,EAAE,MAAM,CAAC;IACf,wFAAwF;IACxF,WAAW,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,4BAA4B,CAAC,CAAM;IAC3D,oEAAoE;IACpE,UAAU,CAAC,EAAE,qBAAqB,CAAC,GAAG,CAAC,CAAC;IACxC,+EAA+E;IAC/E,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC,iGAAiG;IACjG,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;gBAED,GAAG,EAAE,mCAAmC,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"operation-settings.control-model.d.ts","sourceRoot":"","sources":["../../../src/_models/control-models/operation-settings.control-model.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,4BAA4B,EAAE,MAAM,kDAAkD,CAAC;AAEhG,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAU1E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,mCAAmC,CAC9C,QAAQ,GAAG,OAAO,EAClB,QAAQ,SAAS,OAAO,EAAE,GAAG,OAAO,EAAE,EACtC,MAAM,GAAG,SAAS;IAMlB,gEAAgE;IAChE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,MAAM,EAAE,MAAM,CAAC;IACf,0FAA0F;IAC1F,MAAM,EAAE,MAAM,CAAC;IACf,wFAAwF;IACxF,WAAW,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,4BAA4B,CAAC,CAAM;IAC3D,oEAAoE;IACpE,UAAU,CAAC,EAAE,qBAAqB,CAAC,GAAG,CAAC,CAAC;IACxC,+EAA+E;IAC/E,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC,sEAAsE;IACtE,KAAK,CAAC,EAAE,oBAAoB,CAAC;IAC7B,iGAAiG;IACjG,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;gBAED,GAAG,EAAE,mCAAmC,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC;IA2GtE,mEAAmE;IACnE,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAKzC,4FAA4F;IAC5F,OAAO,CAAC,MAAM,CAAC,OAAO;CAOvB;AAED,OAAO,EACL,mCAAmC,IAAI,uBAAuB,EAC/D,CAAC"}
|
|
@@ -49,6 +49,8 @@ class DyFM_OperationSettings_ControlModel {
|
|
|
49
49
|
bodyParams;
|
|
50
50
|
/** Transports the operation is exposed on; missing flags default to `true`. */
|
|
51
51
|
expose;
|
|
52
|
+
/** Declarative authorization; `issuerRequired` defaults to `true`. */
|
|
53
|
+
authz;
|
|
52
54
|
/** Source location of the construction, for debugging duplicated or misconfigured operations. */
|
|
53
55
|
stackLocation;
|
|
54
56
|
/**
|
|
@@ -91,6 +93,15 @@ class DyFM_OperationSettings_ControlModel {
|
|
|
91
93
|
throw DyFM_OperationSettings_ControlModel.invalid('DyFM-OPS-INT', `input "${inputName}" has an invalid type (got: ${JSON.stringify(input?.type)}) (${label})`, stackLocation);
|
|
92
94
|
}
|
|
93
95
|
});
|
|
96
|
+
// authz: the declared fields must be usable, and ownership needs an authenticated caller
|
|
97
|
+
const authz = { issuerRequired: true, ...set.authz };
|
|
98
|
+
if ((authz.ownership !== undefined && !DyFM_operationInputName.test(authz.ownership)) ||
|
|
99
|
+
(authz.apiKeyScope !== undefined && (typeof authz.apiKeyScope !== 'string' || !authz.apiKeyScope.trim()))) {
|
|
100
|
+
throw DyFM_OperationSettings_ControlModel.invalid('DyFM-OPS-AZF', `authz.ownership must be a field name and authz.apiKeyScope a non-empty string (${label})`, stackLocation);
|
|
101
|
+
}
|
|
102
|
+
if (authz.ownership !== undefined && authz.issuerRequired === false) {
|
|
103
|
+
throw DyFM_OperationSettings_ControlModel.invalid('DyFM-OPS-AZO', `authz.ownership can not be combined with issuerRequired: false (${label})`, stackLocation);
|
|
104
|
+
}
|
|
94
105
|
Object.assign(this, set);
|
|
95
106
|
this.domain = set.domain;
|
|
96
107
|
this.action = set.action;
|
|
@@ -99,6 +110,7 @@ class DyFM_OperationSettings_ControlModel {
|
|
|
99
110
|
this.inputs = inputs;
|
|
100
111
|
// a missing expose flag means: exposed on that transport
|
|
101
112
|
this.expose = { rest: true, mcp: true, cli: true, ...set.expose };
|
|
113
|
+
this.authz = authz;
|
|
102
114
|
this.stackLocation = stackLocation;
|
|
103
115
|
}
|
|
104
116
|
/** Checks the `name` format: dot-separated kebab-case segments. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation-settings.control-model.js","sourceRoot":"","sources":["../../../src/_models/control-models/operation-settings.control-model.ts"],"names":[],"mappings":";;;AAAA,oEAAwF;AACxF,oFAAgF;
|
|
1
|
+
{"version":3,"file":"operation-settings.control-model.js","sourceRoot":"","sources":["../../../src/_models/control-models/operation-settings.control-model.ts"],"names":[],"mappings":";;;AAAA,oEAAwF;AACxF,oFAAgF;AAMhF,+DAAmD;AAGnD,gFAAgF;AAChF,MAAM,0BAA0B,GAAW,+BAA+B,CAAC;AAE3E,6FAA6F;AAC7F,MAAM,uBAAuB,GAAW,wBAAwB,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAa,mCAAmC;IAK9C;QACE,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,yBAAyB,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED,gEAAgE;IAChE,IAAI,CAAU;IACd,qDAAqD;IACrD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D,IAAI,CAAC,MAAM,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC;QAClE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAED,mEAAmE;IACnE,MAAM,CAAC,WAAW,CAAC,IAAY;QAC7B,OAAO,OAAO,IAAI,KAAK,QAAQ;YAC7B,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,OAAe,EAAW,EAAE,CAAC,0BAA0B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAClG,CAAC;IAED,4FAA4F;IACpF,MAAM,CAAC,OAAO,CAAC,SAAiB,EAAE,MAAc,EAAE,aAAqB;QAC7E,OAAO,IAAI,gCAAU,CAAC;YACpB,SAAS,EAAE,SAAS;YACpB,OAAO,EAAE,gDAAgD,MAAM,EAAE;YACjE,iBAAiB,EAAE,EAAE,aAAa,EAAE,aAAa,EAAE;SACpD,CAAC,CAAC;IACL,CAAC;CACF;AA1JD,kFA0JC;AAGwC,sEAAuB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Outcome of an operation authorization check; `allowed: false` always carries a code and a status.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* const result: DyFM_OperationAuthz_Result = DyFM_OperationAuthz_Util.check(operation, ctx);
|
|
7
|
+
* if (!result.allowed) {
|
|
8
|
+
* res.status(result.status).send(result.errorCode);
|
|
9
|
+
* }
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export interface DyFM_OperationAuthz_Result {
|
|
13
|
+
allowed: boolean;
|
|
14
|
+
/** Stable error code of the denial (`DyFM-OPZ-*`). */
|
|
15
|
+
errorCode?: string;
|
|
16
|
+
/** HTTP-equivalent status of the denial: 401 (not authenticated) or 403 (not permitted). */
|
|
17
|
+
status?: 401 | 403;
|
|
18
|
+
/** Human-readable reason of the denial. */
|
|
19
|
+
reason?: string;
|
|
20
|
+
/** Set when the call is allowed only through the legacy, scope-less API key path (D-6). */
|
|
21
|
+
warning?: 'legacy-api-key';
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=operation-authz-result.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-authz-result.interface.d.ts","sourceRoot":"","sources":["../../../src/_models/interfaces/operation-authz-result.interface.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,OAAO,CAAC;IACjB,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4FAA4F;IAC5F,MAAM,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;IACnB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2FAA2F;IAC3F,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-authz-result.interface.js","sourceRoot":"","sources":["../../../src/_models/interfaces/operation-authz-result.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Declarative authorization of an operation, checked by `DyFM_OperationAuthz_Util` in the same way on
|
|
3
|
+
* every transport (REST, MCP, CLI).
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* const authz: DyFM_Operation_Authz = {
|
|
8
|
+
* ownership: 'userId',
|
|
9
|
+
* apiKeyScope: 'task:write',
|
|
10
|
+
* };
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export interface DyFM_Operation_Authz {
|
|
14
|
+
/** The caller must be authenticated (default: `true` — an operation is public only when stated). */
|
|
15
|
+
issuerRequired?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Field name on the target entity that holds its owner's `clientUserId` (e.g. `userId`).
|
|
18
|
+
* When set, the entity may only be touched by its owner. The owner is compared with
|
|
19
|
+
* `ctx.clientUserId`, never with `ctx.issuer` (`fdp-issuer-is-account-id`).
|
|
20
|
+
*/
|
|
21
|
+
ownership?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Scope an API key must grant to call the operation (e.g. `task:write`).
|
|
24
|
+
* A scoped API key can not call an operation that declares no scope.
|
|
25
|
+
*/
|
|
26
|
+
apiKeyScope?: string;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=operation-authz.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-authz.interface.d.ts","sourceRoot":"","sources":["../../../src/_models/interfaces/operation-authz.interface.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,oBAAoB;IACnC,oGAAoG;IACpG,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-authz.interface.js","sourceRoot":"","sources":["../../../src/_models/interfaces/operation-authz.interface.ts"],"names":[],"mappings":""}
|
package/build/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export * from './_collections/utils/string-case.util';
|
|
|
19
19
|
export * from './_collections/utils/time.util';
|
|
20
20
|
export * from './_collections/utils/type-cloning-facility.util';
|
|
21
21
|
export * from './_collections/utils/utilities.util';
|
|
22
|
+
export * from './_collections/utils/operation-authz.util';
|
|
22
23
|
export * from './_collections/utils/uuid.util';
|
|
23
24
|
export * from './_collections/utils/math/box-bounds.util';
|
|
24
25
|
export * from './_collections/utils/math/math.util';
|
|
@@ -58,6 +59,8 @@ export * from './_models/data-models/errors.data-model';
|
|
|
58
59
|
export * from './_models/data-models/metadata.data-model';
|
|
59
60
|
export * from './_models/interfaces/box-bounds.interface';
|
|
60
61
|
export * from './_models/interfaces/error-defaults.interface';
|
|
62
|
+
export * from './_models/interfaces/operation-authz-result.interface';
|
|
63
|
+
export * from './_models/interfaces/operation-authz.interface';
|
|
61
64
|
export * from './_models/interfaces/operation-exposure.interface';
|
|
62
65
|
export * from './_models/interfaces/operation-input-settings.interface';
|
|
63
66
|
export * from './_models/interfaces/paged.interface';
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,2CAA2C,CAAC;AAC1D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AAGrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iDAAiD,CAAC;AAChE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iDAAiD,CAAC;AAChE,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAG/C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,wCAAwC,CAAC;AAGvD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,uCAAuC,CAA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AAGtD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC;AAKjD,cAAc,0DAA0D,CAAC;AACzE,cAAc,6DAA6D,CAAC;AAC5E,cAAc,8CAA8C,CAAC;AAC7D,cAAc,0DAA0D,CAAC;AACzE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,6CAA6C,CAAC;AAC5D,cAAc,oDAAoD,CAAC;AACnE,cAAc,sDAAsD,CAAC;AACrE,cAAc,uEAAuE,CAAC;AAGtF,cAAc,iEAAiE,CAAC;AAChF,cAAc,0DAA0D,CAAC;AACzE,cAAc,wDAAwD,CAAC;AAGvE,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAG1D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,uDAAuD,CAAC;AACtE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,mDAAmD,CAAC;AAClE,cAAc,yDAAyD,CAAC;AACxE,cAAc,sCAAsC,CAAC;AACrD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,wDAAwD,CAAC;AACvE,cAAc,wCAAwC,CAAC;AAGvD,cAAc,gEAAgE,CAAC;AAC/E,cAAc,4DAA4D,CAAC;AAG3E,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC"}
|
package/build/index.js
CHANGED
|
@@ -25,6 +25,7 @@ tslib_1.__exportStar(require("./_collections/utils/string-case.util"), exports);
|
|
|
25
25
|
tslib_1.__exportStar(require("./_collections/utils/time.util"), exports);
|
|
26
26
|
tslib_1.__exportStar(require("./_collections/utils/type-cloning-facility.util"), exports);
|
|
27
27
|
tslib_1.__exportStar(require("./_collections/utils/utilities.util"), exports);
|
|
28
|
+
tslib_1.__exportStar(require("./_collections/utils/operation-authz.util"), exports);
|
|
28
29
|
tslib_1.__exportStar(require("./_collections/utils/uuid.util"), exports);
|
|
29
30
|
// collections/utils/MATH
|
|
30
31
|
tslib_1.__exportStar(require("./_collections/utils/math/box-bounds.util"), exports);
|
|
@@ -74,6 +75,8 @@ tslib_1.__exportStar(require("./_models/data-models/metadata.data-model"), expor
|
|
|
74
75
|
// models/INTERFACES
|
|
75
76
|
tslib_1.__exportStar(require("./_models/interfaces/box-bounds.interface"), exports);
|
|
76
77
|
tslib_1.__exportStar(require("./_models/interfaces/error-defaults.interface"), exports);
|
|
78
|
+
tslib_1.__exportStar(require("./_models/interfaces/operation-authz-result.interface"), exports);
|
|
79
|
+
tslib_1.__exportStar(require("./_models/interfaces/operation-authz.interface"), exports);
|
|
77
80
|
tslib_1.__exportStar(require("./_models/interfaces/operation-exposure.interface"), exports);
|
|
78
81
|
tslib_1.__exportStar(require("./_models/interfaces/operation-input-settings.interface"), exports);
|
|
79
82
|
tslib_1.__exportStar(require("./_models/interfaces/paged.interface"), exports);
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,cAAc;AACd,wBAAwB;AACxB,oFAA0D;AAC1D,wFAA8D;AAC9D,yFAA+D;AAC/D,iFAAuD;AACvD,+EAAqD;AAErD,oBAAoB;AACpB,0EAAgD;AAChD,0EAAgD;AAChD,yEAA+C;AAC/C,0FAAgE;AAChE,sFAA4D;AAC5D,wEAA8C;AAC9C,+EAAqD;AACrD,gFAAsD;AACtD,2EAAiD;AACjD,gFAAsD;AACtD,0EAAgD;AAChD,2EAAiD;AACjD,gFAAsD;AACtD,yEAA+C;AAC/C,0FAAgE;AAChE,8EAAoD;AACpD,yEAA+C;AAE/C,yBAAyB;AACzB,oFAA0D;AAC1D,8EAAoD;AACpD,gFAAsD;AACtD,sFAA4D;AAC5D,iFA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.59",
|
|
4
4
|
"description": "Full Stack Model Collection for Dynamic (NodeJS-Typescript) Framework called Dynamo, by Future Development Ltd.",
|
|
5
5
|
"DyBu_settings": {
|
|
6
6
|
"packageType": "full-stack-package",
|