@naylence/advanced-security 0.4.5 → 0.4.7
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/dist/browser/index.cjs +503 -16
- package/dist/browser/index.mjs +504 -17
- package/dist/cjs/advanced-security-isomorphic.js +1 -1
- package/dist/cjs/advanced-security-isomorphic.js.map +1 -1
- package/dist/cjs/naylence/fame/factory-manifest.js +2 -0
- package/dist/cjs/naylence/fame/factory-manifest.js.map +1 -1
- package/dist/cjs/naylence/fame/security/auth/index.js +2 -0
- package/dist/cjs/naylence/fame/security/auth/index.js.map +1 -1
- package/dist/cjs/naylence/fame/security/auth/policy/auth-policy-server-cli.js +47 -0
- package/dist/cjs/naylence/fame/security/auth/policy/auth-policy-server-cli.js.map +1 -0
- package/dist/cjs/naylence/fame/security/auth/policy/auth-policy-server.js +562 -0
- package/dist/cjs/naylence/fame/security/auth/policy/auth-policy-server.js.map +1 -0
- package/dist/cjs/naylence/fame/security/auth/policy/http-authorization-policy-source-factory.js +108 -0
- package/dist/cjs/naylence/fame/security/auth/policy/http-authorization-policy-source-factory.js.map +1 -0
- package/dist/cjs/naylence/fame/security/auth/policy/http-authorization-policy-source.js +367 -0
- package/dist/cjs/naylence/fame/security/auth/policy/http-authorization-policy-source.js.map +1 -0
- package/dist/cjs/naylence/fame/security/auth/policy/index.js +4 -2
- package/dist/cjs/naylence/fame/security/auth/policy/index.js.map +1 -1
- package/dist/cjs/naylence/fame/security/auth/policy-http-authorization-profile.js +78 -0
- package/dist/cjs/naylence/fame/security/auth/policy-http-authorization-profile.js.map +1 -0
- package/dist/cjs/naylence/fame/security/register-advanced-security-factories.js +2 -0
- package/dist/cjs/naylence/fame/security/register-advanced-security-factories.js.map +1 -1
- package/dist/cjs/version.js +2 -2
- package/dist/esm/advanced-security-isomorphic.js +1 -1
- package/dist/esm/advanced-security-isomorphic.js.map +1 -1
- package/dist/esm/naylence/fame/factory-manifest.js +2 -0
- package/dist/esm/naylence/fame/factory-manifest.js.map +1 -1
- package/dist/esm/naylence/fame/security/auth/index.js +2 -0
- package/dist/esm/naylence/fame/security/auth/index.js.map +1 -1
- package/dist/esm/naylence/fame/security/auth/policy/auth-policy-server-cli.js +47 -0
- package/dist/esm/naylence/fame/security/auth/policy/auth-policy-server-cli.js.map +1 -0
- package/dist/esm/naylence/fame/security/auth/policy/auth-policy-server.js +562 -0
- package/dist/esm/naylence/fame/security/auth/policy/auth-policy-server.js.map +1 -0
- package/dist/esm/naylence/fame/security/auth/policy/http-authorization-policy-source-factory.js +108 -0
- package/dist/esm/naylence/fame/security/auth/policy/http-authorization-policy-source-factory.js.map +1 -0
- package/dist/esm/naylence/fame/security/auth/policy/http-authorization-policy-source.js +367 -0
- package/dist/esm/naylence/fame/security/auth/policy/http-authorization-policy-source.js.map +1 -0
- package/dist/esm/naylence/fame/security/auth/policy/index.js +4 -2
- package/dist/esm/naylence/fame/security/auth/policy/index.js.map +1 -1
- package/dist/esm/naylence/fame/security/auth/policy-http-authorization-profile.js +78 -0
- package/dist/esm/naylence/fame/security/auth/policy-http-authorization-profile.js.map +1 -0
- package/dist/esm/naylence/fame/security/register-advanced-security-factories.js +2 -0
- package/dist/esm/naylence/fame/security/register-advanced-security-factories.js.map +1 -1
- package/dist/esm/version.js +2 -2
- package/dist/node/index.cjs +578 -125
- package/dist/node/index.mjs +572 -94
- package/dist/node/node.cjs +589 -51
- package/dist/node/node.mjs +582 -19
- package/dist/types/advanced-security-isomorphic.d.ts +0 -1
- package/dist/types/advanced-security-isomorphic.d.ts.map +1 -1
- package/dist/types/naylence/fame/factory-manifest.d.ts +1 -1
- package/dist/types/naylence/fame/factory-manifest.d.ts.map +1 -1
- package/dist/types/naylence/fame/security/auth/index.d.ts +1 -0
- package/dist/types/naylence/fame/security/auth/index.d.ts.map +1 -1
- package/dist/types/naylence/fame/security/auth/policy/auth-policy-server-cli.d.ts +20 -0
- package/dist/types/naylence/fame/security/auth/policy/auth-policy-server-cli.d.ts.map +1 -0
- package/dist/types/naylence/fame/security/auth/policy/auth-policy-server.d.ts +75 -0
- package/dist/types/naylence/fame/security/auth/policy/auth-policy-server.d.ts.map +1 -0
- package/dist/types/naylence/fame/security/auth/policy/http-authorization-policy-source-factory.d.ts +81 -0
- package/dist/types/naylence/fame/security/auth/policy/http-authorization-policy-source-factory.d.ts.map +1 -0
- package/dist/types/naylence/fame/security/auth/policy/http-authorization-policy-source.d.ts +150 -0
- package/dist/types/naylence/fame/security/auth/policy/http-authorization-policy-source.d.ts.map +1 -0
- package/dist/types/naylence/fame/security/auth/policy/index.d.ts +2 -1
- package/dist/types/naylence/fame/security/auth/policy/index.d.ts.map +1 -1
- package/dist/types/naylence/fame/security/auth/policy-http-authorization-profile.d.ts +17 -0
- package/dist/types/naylence/fame/security/auth/policy-http-authorization-profile.d.ts.map +1 -0
- package/dist/types/naylence/fame/security/register-advanced-security-factories.d.ts +1 -0
- package/dist/types/naylence/fame/security/register-advanced-security-factories.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +3 -2
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* installing the shared dynamic importer shim used by Naylence plugins.
|
|
6
6
|
*/
|
|
7
7
|
export { VERSION } from "./version.js";
|
|
8
|
-
export * from "./naylence/fame/expr/index.js";
|
|
9
8
|
export * from "./naylence/fame/security/auth/index.js";
|
|
10
9
|
export { validateJwkX5cCertificate, type ValidateJwkX5cCertificateOptions, type ValidateJwkX5cCertificateResult, publicKeyFromX5c, type PublicKeyFromX5cOptions, } from "./naylence/fame/security/cert/util.js";
|
|
11
10
|
export { GRANT_PURPOSE_CA_SIGN } from "./naylence/fame/security/cert/grants.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advanced-security-isomorphic.d.ts","sourceRoot":"","sources":["../../src/advanced-security-isomorphic.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"advanced-security-isomorphic.d.ts","sourceRoot":"","sources":["../../src/advanced-security-isomorphic.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAMvC,cAAc,wCAAwC,CAAC;AAEvD,OAAO,EACL,yBAAyB,EACzB,KAAK,gCAAgC,EACrC,KAAK,+BAA+B,EACpC,gBAAgB,EAChB,KAAK,uBAAuB,GAC7B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EACL,gBAAgB,EAChB,KAAK,uBAAuB,GAC7B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AACpF,OAAO,EACL,eAAe,EACf,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,2BAA2B,EAC3B,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,oDAAoD,CAAC;AAE5D,cAAc,8CAA8C,CAAC;AAE7D,OAAO,EACL,kCAAkC,EAClC,YAAY,IAAI,2CAA2C,EAC3D,KAAK,yBAAyB,GAC/B,MAAM,mEAAmE,CAAC;AAC3E,OAAO,EACL,oCAAoC,EACpC,YAAY,IAAI,6CAA6C,EAC7D,KAAK,2BAA2B,GACjC,MAAM,qEAAqE,CAAC;AAC7E,OAAO,EACL,qBAAqB,EACrB,KAAK,4BAA4B,EACjC,KAAK,qBAAqB,GAC3B,MAAM,6DAA6D,CAAC;AAErE,cAAc,wCAAwC,CAAC;AAEvD,cAAc,qCAAqC,CAAC;AACpD,cAAc,kCAAkC,CAAC;AAEjD,OAAO,EACL,iCAAiC,EACjC,KAAK,wCAAwC,GAC9C,MAAM,kEAAkE,CAAC;AAE1E,KAAK,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC5C,KAAK,kBAAkB,GAAG,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;AA2FvE,eAAO,MAAM,8BAA8B,oBACL,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Provides the list of advanced security factory modules for registration.
|
|
6
6
|
*/
|
|
7
|
-
export declare const MODULES: readonly ["./security/auth/policy/advanced-authorization-policy-factory.js", "./security/cert/default-ca-service-factory.js", "./security/cert/default-certificate-manager-factory.js", "./security/cert/trust-store/browser-trust-store-provider-factory.js", "./security/cert/trust-store/node-trust-store-provider-factory.js", "./security/encryption/channel/channel-encryption-manager-factory.js", "./security/encryption/composite-encryption-manager-factory.js", "./security/encryption/default-secure-channel-manager-factory.js", "./security/encryption/sealed/x25519-encryption-manager-factory.js", "./security/keys/x5c-key-manager-factory.js", "./security/signing/eddsa-envelope-signer-factory.js", "./security/signing/eddsa-envelope-verifier-factory.js", "./stickiness/aft-load-balancer-stickiness-manager-factory.js", "./stickiness/aft-replica-stickiness-manager-factory.js", "./welcome/advanced-welcome-service-factory.js"];
|
|
7
|
+
export declare const MODULES: readonly ["./security/auth/policy/advanced-authorization-policy-factory.js", "./security/auth/policy/http-authorization-policy-source-factory.js", "./security/cert/default-ca-service-factory.js", "./security/cert/default-certificate-manager-factory.js", "./security/cert/trust-store/browser-trust-store-provider-factory.js", "./security/cert/trust-store/node-trust-store-provider-factory.js", "./security/encryption/channel/channel-encryption-manager-factory.js", "./security/encryption/composite-encryption-manager-factory.js", "./security/encryption/default-secure-channel-manager-factory.js", "./security/encryption/sealed/x25519-encryption-manager-factory.js", "./security/keys/x5c-key-manager-factory.js", "./security/signing/eddsa-envelope-signer-factory.js", "./security/signing/eddsa-envelope-verifier-factory.js", "./stickiness/aft-load-balancer-stickiness-manager-factory.js", "./stickiness/aft-replica-stickiness-manager-factory.js", "./welcome/advanced-welcome-service-factory.js"];
|
|
8
8
|
export type FactoryModuleSpec = (typeof MODULES)[number];
|
|
9
9
|
export type FactoryModuleLoader = () => Promise<Record<string, unknown>>;
|
|
10
10
|
export declare const MODULE_LOADERS: Record<FactoryModuleSpec, FactoryModuleLoader>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory-manifest.d.ts","sourceRoot":"","sources":["../../../../src/naylence/fame/factory-manifest.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"factory-manifest.d.ts","sourceRoot":"","sources":["../../../../src/naylence/fame/factory-manifest.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,m+BAiBV,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AACzD,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAEzE,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,iBAAiB,EAAE,mBAAmB,CAiBzE,CAAC"}
|
|
@@ -4,4 +4,5 @@
|
|
|
4
4
|
* @packageDocumentation
|
|
5
5
|
*/
|
|
6
6
|
export * from "./policy/index.js";
|
|
7
|
+
export { PROFILE_NAME_POLICY_HTTP, ENV_VAR_AUTH_POLICY_URL, ENV_VAR_AUTH_POLICY_TIMEOUT_MS, ENV_VAR_AUTH_POLICY_CACHE_TTL_MS, ENV_VAR_AUTH_POLICY_BEARER_TOKEN, } from "./policy-http-authorization-profile.js";
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/naylence/fame/security/auth/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/naylence/fame/security/auth/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,mBAAmB,CAAC;AAGlC,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,8BAA8B,EAC9B,gCAAgC,EAChC,gCAAgC,GACjC,MAAM,wCAAwC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Auth Policy Server CLI Entry Point
|
|
4
|
+
*
|
|
5
|
+
* Development server for serving authorization policies over HTTP.
|
|
6
|
+
* Useful for testing HttpAuthorizationPolicySource.
|
|
7
|
+
*
|
|
8
|
+
* Environment variables:
|
|
9
|
+
* FAME_APP_HOST - Host to bind to (default: 0.0.0.0)
|
|
10
|
+
* FAME_APP_PORT - Port to listen on (default: 8099)
|
|
11
|
+
* FAME_POLICY_FILE - Path to policy file (YAML or JSON)
|
|
12
|
+
* FAME_POLICY_BEARER_TOKEN - Bearer token for authentication
|
|
13
|
+
* FAME_LOG_LEVEL - Log level (debug, info, warning, error)
|
|
14
|
+
*
|
|
15
|
+
* Usage:
|
|
16
|
+
* npx naylence-policy-server
|
|
17
|
+
* FAME_POLICY_FILE=./policy.yaml FAME_POLICY_BEARER_TOKEN=secret npx naylence-policy-server
|
|
18
|
+
*/
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=auth-policy-server-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-policy-server-cli.d.ts","sourceRoot":"","sources":["../../../../../../../src/naylence/fame/security/auth/policy/auth-policy-server-cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;GAgBG"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auth Policy Server - Authorization Policy HTTP endpoint
|
|
3
|
+
*
|
|
4
|
+
* Provides authorization policies via HTTP using Fastify.
|
|
5
|
+
* Supports OAuth2 JWT authentication and ETag-based caching.
|
|
6
|
+
* Serves multiple policies by ID from a configurable directory.
|
|
7
|
+
* This is a development server for testing HTTP policy source functionality.
|
|
8
|
+
*
|
|
9
|
+
* Policy files should be named: policy-{policy_id}.yaml or policy-{policy_id}.json
|
|
10
|
+
* Example: policy-production.yaml, policy-dev.json
|
|
11
|
+
*
|
|
12
|
+
* Authentication:
|
|
13
|
+
* - Set FAME_OAUTH2_ISSUER to enable OAuth2 JWT validation
|
|
14
|
+
* - Optionally set FAME_OAUTH2_AUDIENCE, FAME_OAUTH2_JWKS_URL
|
|
15
|
+
* - Set FAME_OAUTH2_ALGORITHMS to customize JWT algorithms (default: RS256,ES256,EdDSA)
|
|
16
|
+
* - If no OAuth2 config provided, authentication is disabled (dev mode)
|
|
17
|
+
*/
|
|
18
|
+
import type { FastifyInstance } from "fastify";
|
|
19
|
+
/**
|
|
20
|
+
* Default authorization policy for development.
|
|
21
|
+
* Allows all operations - suitable for testing only.
|
|
22
|
+
*/
|
|
23
|
+
declare const DEFAULT_POLICY: {
|
|
24
|
+
version: string;
|
|
25
|
+
type: string;
|
|
26
|
+
default_effect: string;
|
|
27
|
+
rules: {
|
|
28
|
+
id: string;
|
|
29
|
+
effect: string;
|
|
30
|
+
comment: string;
|
|
31
|
+
}[];
|
|
32
|
+
};
|
|
33
|
+
interface PolicyEntry {
|
|
34
|
+
id: string;
|
|
35
|
+
policy: Record<string, unknown>;
|
|
36
|
+
policyContent: string;
|
|
37
|
+
etag: string;
|
|
38
|
+
lastModified: Date;
|
|
39
|
+
filePath: string;
|
|
40
|
+
format: "yaml" | "json";
|
|
41
|
+
}
|
|
42
|
+
interface PolicyServerState {
|
|
43
|
+
policyDir?: string;
|
|
44
|
+
policies: Map<string, PolicyEntry>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Compute ETag from content using SHA-256.
|
|
48
|
+
*/
|
|
49
|
+
declare function computeEtag(content: string): string;
|
|
50
|
+
/**
|
|
51
|
+
* Extract policy ID from filename.
|
|
52
|
+
* Expected format: policy-{id}.yaml or policy-{id}.json
|
|
53
|
+
*/
|
|
54
|
+
declare function extractPolicyId(filename: string): {
|
|
55
|
+
id: string;
|
|
56
|
+
format: "yaml" | "json";
|
|
57
|
+
} | null;
|
|
58
|
+
/**
|
|
59
|
+
* Load a single policy from file.
|
|
60
|
+
*/
|
|
61
|
+
declare function loadPolicyFile(filePath: string): Omit<PolicyEntry, "id"> | null;
|
|
62
|
+
/**
|
|
63
|
+
* Load all policies from a directory.
|
|
64
|
+
*/
|
|
65
|
+
declare function loadPoliciesFromDir(dirPath: string): Map<string, PolicyEntry>;
|
|
66
|
+
/**
|
|
67
|
+
* Create Fastify application with policy server.
|
|
68
|
+
*/
|
|
69
|
+
declare function createApp(): Promise<{
|
|
70
|
+
app: FastifyInstance;
|
|
71
|
+
state: PolicyServerState;
|
|
72
|
+
}>;
|
|
73
|
+
declare function main(): Promise<void>;
|
|
74
|
+
export { createApp, main, loadPoliciesFromDir, loadPolicyFile, extractPolicyId, computeEtag, DEFAULT_POLICY, type PolicyEntry, type PolicyServerState, };
|
|
75
|
+
//# sourceMappingURL=auth-policy-server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-policy-server.d.ts","sourceRoot":"","sources":["../../../../../../../src/naylence/fame/security/auth/policy/auth-policy-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAaH,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,SAAS,CAAC;AAuC/D;;;GAGG;AACH,QAAA,MAAM,cAAc;;;;;;;;;CAWnB,CAAC;AAEF,UAAU,WAAW;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,IAAI,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,UAAU,iBAAiB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,iBAAS,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAI5C;AAED;;;GAGG;AACH,iBAAS,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAAG,IAAI,CASzF;AAED;;GAEG;AACH,iBAAS,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG,IAAI,CA8BxE;AAED;;GAEG;AACH,iBAAS,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CA4BtE;AA8UD;;GAEG;AACH,iBAAe,SAAS,IAAI,OAAO,CAAC;IAClC,GAAG,EAAE,eAAe,CAAC;IACrB,KAAK,EAAE,iBAAiB,CAAC;CAC1B,CAAC,CA2ED;AAED,iBAAe,IAAI,kBAuClB;AAED,OAAO,EACL,SAAS,EACT,IAAI,EACJ,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,WAAW,EACX,cAAc,EACd,KAAK,WAAW,EAChB,KAAK,iBAAiB,GACvB,CAAC"}
|
package/dist/types/naylence/fame/security/auth/policy/http-authorization-policy-source-factory.d.ts
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Factory for creating HttpAuthorizationPolicySource instances.
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
import type { AuthorizationPolicySource } from "@naylence/runtime";
|
|
7
|
+
import { AuthorizationPolicySourceFactory, type AuthorizationPolicySourceConfig, type AuthorizationPolicyConfig, type TokenProviderConfig } from "@naylence/runtime";
|
|
8
|
+
import type { HttpMethod } from "./http-authorization-policy-source.js";
|
|
9
|
+
/**
|
|
10
|
+
* Configuration for HttpAuthorizationPolicySource.
|
|
11
|
+
*
|
|
12
|
+
* Supports both camelCase and snake_case property names for flexibility.
|
|
13
|
+
*/
|
|
14
|
+
export interface HttpAuthorizationPolicySourceConfig extends AuthorizationPolicySourceConfig {
|
|
15
|
+
type: "HttpAuthorizationPolicySource";
|
|
16
|
+
/**
|
|
17
|
+
* The URL to fetch the policy from (required).
|
|
18
|
+
*/
|
|
19
|
+
url: string;
|
|
20
|
+
/**
|
|
21
|
+
* HTTP method to use.
|
|
22
|
+
* @default "GET"
|
|
23
|
+
*/
|
|
24
|
+
method?: HttpMethod;
|
|
25
|
+
/**
|
|
26
|
+
* Request timeout in milliseconds.
|
|
27
|
+
* @default 30000
|
|
28
|
+
*/
|
|
29
|
+
timeout_ms?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Additional headers to include in the request.
|
|
32
|
+
*/
|
|
33
|
+
headers?: Record<string, string>;
|
|
34
|
+
/**
|
|
35
|
+
* Token provider configuration for bearer authentication.
|
|
36
|
+
*/
|
|
37
|
+
token_provider?: TokenProviderConfig | Record<string, unknown>;
|
|
38
|
+
/**
|
|
39
|
+
* Prefix for the Authorization header.
|
|
40
|
+
* @default "Bearer "
|
|
41
|
+
*/
|
|
42
|
+
bearer_prefix?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Configuration for the policy factory to use when parsing the loaded data.
|
|
45
|
+
*/
|
|
46
|
+
policy_factory?: AuthorizationPolicyConfig | Record<string, unknown>;
|
|
47
|
+
/**
|
|
48
|
+
* Polling interval in milliseconds (reserved for future use).
|
|
49
|
+
*/
|
|
50
|
+
poll_interval_ms?: number;
|
|
51
|
+
/**
|
|
52
|
+
* Fallback cache TTL in milliseconds when server provides no caching headers.
|
|
53
|
+
* @default 300000 (5 minutes)
|
|
54
|
+
*/
|
|
55
|
+
cache_ttl_ms?: number;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Factory metadata for registration.
|
|
59
|
+
*/
|
|
60
|
+
export declare const FACTORY_META: {
|
|
61
|
+
readonly base: "AuthorizationPolicySourceFactory";
|
|
62
|
+
readonly key: "HttpAuthorizationPolicySource";
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Factory for creating HttpAuthorizationPolicySource instances.
|
|
66
|
+
*
|
|
67
|
+
* This factory uses lazy loading to avoid pulling in Node.js-specific
|
|
68
|
+
* code (fetch operations) in browser environments where it may not work.
|
|
69
|
+
*/
|
|
70
|
+
export declare class HttpAuthorizationPolicySourceFactory extends AuthorizationPolicySourceFactory<HttpAuthorizationPolicySourceConfig> {
|
|
71
|
+
readonly type = "HttpAuthorizationPolicySource";
|
|
72
|
+
/**
|
|
73
|
+
* Creates an HttpAuthorizationPolicySource from the given configuration.
|
|
74
|
+
*
|
|
75
|
+
* @param config - Configuration specifying the policy URL and options
|
|
76
|
+
* @returns The created policy source
|
|
77
|
+
*/
|
|
78
|
+
create(config?: HttpAuthorizationPolicySourceConfig | Record<string, unknown> | null): Promise<AuthorizationPolicySource>;
|
|
79
|
+
}
|
|
80
|
+
export default HttpAuthorizationPolicySourceFactory;
|
|
81
|
+
//# sourceMappingURL=http-authorization-policy-source-factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-authorization-policy-source-factory.d.ts","sourceRoot":"","sources":["../../../../../../../src/naylence/fame/security/auth/policy/http-authorization-policy-source-factory.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,yBAAyB,EAAiB,MAAM,mBAAmB,CAAC;AAClF,OAAO,EAEL,gCAAgC,EAChC,KAAK,+BAA+B,EACpC,KAAK,yBAAyB,EAE9B,KAAK,mBAAmB,EACzB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAEV,UAAU,EACX,MAAM,uCAAuC,CAAC;AAE/C;;;;GAIG;AACH,MAAM,WAAW,mCACf,SAAQ,+BAA+B;IACvC,IAAI,EAAE,+BAA+B,CAAC;IAEtC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IAEpB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC;;OAEG;IACH,cAAc,CAAC,EAAE,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE/D;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,cAAc,CAAC,EAAE,yBAAyB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAErE;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAgGD;;GAEG;AACH,eAAO,MAAM,YAAY;;;CAGf,CAAC;AAEX;;;;;GAKG;AACH,qBAAa,oCAAqC,SAAQ,gCAAgC,CAAC,mCAAmC,CAAC;IAC7H,SAAgB,IAAI,mCAAmC;IAEvD;;;;;OAKG;IACU,MAAM,CACjB,MAAM,CAAC,EACH,mCAAmC,GACnC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACvB,IAAI,GACP,OAAO,CAAC,yBAAyB,CAAC;CA0BtC;AAED,eAAe,oCAAoC,CAAC"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTP-based authorization policy source.
|
|
3
|
+
*
|
|
4
|
+
* Loads authorization policies from an HTTP endpoint supporting JSON or YAML.
|
|
5
|
+
* Supports bearer authentication via TokenProvider and HTTP caching via ETag.
|
|
6
|
+
*
|
|
7
|
+
* This is a Node.js-only implementation.
|
|
8
|
+
*
|
|
9
|
+
* @packageDocumentation
|
|
10
|
+
*/
|
|
11
|
+
import type { AuthorizationPolicy, AuthorizationPolicySource, AuthorizationPolicyConfig, TokenProvider } from "@naylence/runtime";
|
|
12
|
+
/**
|
|
13
|
+
* HTTP method for the policy request.
|
|
14
|
+
*/
|
|
15
|
+
export type HttpMethod = "GET" | "POST" | "PUT";
|
|
16
|
+
/**
|
|
17
|
+
* Metadata about the last fetch operation.
|
|
18
|
+
*
|
|
19
|
+
* Useful for verification, debugging, and monitoring.
|
|
20
|
+
*/
|
|
21
|
+
export interface HttpPolicySourceMetadata {
|
|
22
|
+
/**
|
|
23
|
+
* The URL from which the policy was fetched.
|
|
24
|
+
*/
|
|
25
|
+
url: string;
|
|
26
|
+
/**
|
|
27
|
+
* HTTP status code of the last successful fetch.
|
|
28
|
+
*/
|
|
29
|
+
status: number;
|
|
30
|
+
/**
|
|
31
|
+
* ETag from the last successful response.
|
|
32
|
+
*/
|
|
33
|
+
etag?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Timestamp when the policy was last fetched.
|
|
36
|
+
*/
|
|
37
|
+
fetchedAt: number;
|
|
38
|
+
/**
|
|
39
|
+
* Cache-Control max-age value in seconds, if present.
|
|
40
|
+
*/
|
|
41
|
+
maxAgeSeconds?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Computed expiration time based on max-age.
|
|
44
|
+
*/
|
|
45
|
+
expiresAt?: number;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Configuration options for HttpAuthorizationPolicySource.
|
|
49
|
+
*/
|
|
50
|
+
export interface HttpAuthorizationPolicySourceOptions {
|
|
51
|
+
/**
|
|
52
|
+
* The URL to fetch the policy from.
|
|
53
|
+
*/
|
|
54
|
+
url: string;
|
|
55
|
+
/**
|
|
56
|
+
* HTTP method to use.
|
|
57
|
+
* @default "GET"
|
|
58
|
+
*/
|
|
59
|
+
method?: HttpMethod;
|
|
60
|
+
/**
|
|
61
|
+
* Request timeout in milliseconds.
|
|
62
|
+
* @default 30000
|
|
63
|
+
*/
|
|
64
|
+
timeoutMs?: number;
|
|
65
|
+
/**
|
|
66
|
+
* Additional headers to include in the request.
|
|
67
|
+
*/
|
|
68
|
+
headers?: Record<string, string>;
|
|
69
|
+
/**
|
|
70
|
+
* Token provider for bearer authentication.
|
|
71
|
+
*/
|
|
72
|
+
tokenProvider?: TokenProvider;
|
|
73
|
+
/**
|
|
74
|
+
* Prefix for the Authorization header.
|
|
75
|
+
* @default "Bearer "
|
|
76
|
+
*/
|
|
77
|
+
bearerPrefix?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Configuration for the policy factory to use when parsing the loaded data.
|
|
80
|
+
* Determines which AuthorizationPolicy implementation is created.
|
|
81
|
+
*
|
|
82
|
+
* If not specified, the policy definition from the response is used directly
|
|
83
|
+
* as the factory configuration (must include a 'type' field).
|
|
84
|
+
*/
|
|
85
|
+
policyFactory?: AuthorizationPolicyConfig | Record<string, unknown>;
|
|
86
|
+
/**
|
|
87
|
+
* Fallback cache TTL in milliseconds when server provides no caching headers.
|
|
88
|
+
* @default 300000 (5 minutes)
|
|
89
|
+
*/
|
|
90
|
+
cacheTtlMs?: number;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* An authorization policy source that loads policy definitions from an HTTP endpoint.
|
|
94
|
+
*
|
|
95
|
+
* Supports JSON and YAML formats, bearer authentication via TokenProvider,
|
|
96
|
+
* and HTTP caching via ETag and Cache-Control headers.
|
|
97
|
+
*
|
|
98
|
+
* This is a Node.js-only implementation that uses fetch.
|
|
99
|
+
*/
|
|
100
|
+
export declare class HttpAuthorizationPolicySource implements AuthorizationPolicySource {
|
|
101
|
+
private readonly url;
|
|
102
|
+
private readonly method;
|
|
103
|
+
private readonly timeoutMs;
|
|
104
|
+
private readonly headers;
|
|
105
|
+
private readonly tokenProvider;
|
|
106
|
+
private readonly bearerPrefix;
|
|
107
|
+
private readonly policyFactoryConfig;
|
|
108
|
+
private readonly cacheTtlMs;
|
|
109
|
+
private cachedState;
|
|
110
|
+
private inflightFetch;
|
|
111
|
+
constructor(options: HttpAuthorizationPolicySourceOptions);
|
|
112
|
+
/**
|
|
113
|
+
* Loads the authorization policy from the configured HTTP endpoint.
|
|
114
|
+
*
|
|
115
|
+
* Returns a cached policy if still fresh (based on TTL or cache headers).
|
|
116
|
+
* Multiple concurrent calls are de-duplicated (single-flight pattern).
|
|
117
|
+
*
|
|
118
|
+
* @returns The loaded authorization policy
|
|
119
|
+
*/
|
|
120
|
+
loadPolicy(): Promise<AuthorizationPolicy>;
|
|
121
|
+
/**
|
|
122
|
+
* Forces a reload of the policy from the HTTP endpoint.
|
|
123
|
+
*
|
|
124
|
+
* Bypasses cache freshness checks and always fetches from the server.
|
|
125
|
+
* If the fetch fails, the existing cached policy is preserved and the error is thrown.
|
|
126
|
+
*
|
|
127
|
+
* @returns The reloaded authorization policy
|
|
128
|
+
*/
|
|
129
|
+
reloadPolicy(): Promise<AuthorizationPolicy>;
|
|
130
|
+
/**
|
|
131
|
+
* Clears the cached policy, forcing a fresh fetch on the next loadPolicy() call.
|
|
132
|
+
*/
|
|
133
|
+
clearCache(): void;
|
|
134
|
+
/**
|
|
135
|
+
* Returns metadata about the last successful fetch.
|
|
136
|
+
*
|
|
137
|
+
* Useful for verification, monitoring, or debugging.
|
|
138
|
+
*/
|
|
139
|
+
getMetadata(): HttpPolicySourceMetadata | undefined;
|
|
140
|
+
/**
|
|
141
|
+
* Returns the raw policy definition from the last successful fetch.
|
|
142
|
+
*
|
|
143
|
+
* Useful for verification or reprocessing.
|
|
144
|
+
*/
|
|
145
|
+
getRawDefinition(): Record<string, unknown> | undefined;
|
|
146
|
+
private isCacheFresh;
|
|
147
|
+
private fetchPolicy;
|
|
148
|
+
private buildPolicy;
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=http-authorization-policy-source.d.ts.map
|
package/dist/types/naylence/fame/security/auth/policy/http-authorization-policy-source.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-authorization-policy-source.d.ts","sourceRoot":"","sources":["../../../../../../../src/naylence/fame/security/auth/policy/http-authorization-policy-source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EACV,mBAAmB,EACnB,yBAAyB,EACzB,yBAAyB,EACzB,aAAa,EACd,MAAM,mBAAmB,CAAC;AAU3B;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,CAAC;AAEhD;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,oCAAoC;IACnD;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IAEpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC;;OAEG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,yBAAyB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEpE;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAyFD;;;;;;;GAOG;AACH,qBAAa,6BAA8B,YAAW,yBAAyB;IAC7E,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAa;IACpC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;IACjD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA4B;IAC1D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IACtC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAGtB;IACd,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IAEpC,OAAO,CAAC,WAAW,CAAkC;IACrD,OAAO,CAAC,aAAa,CAA6C;gBAEtD,OAAO,EAAE,oCAAoC;IAiBzD;;;;;;;OAOG;IACG,UAAU,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAyBhD;;;;;;;OAOG;IACG,YAAY,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAOlD;;OAEG;IACH,UAAU,IAAI,IAAI;IAKlB;;;;OAIG;IACH,WAAW,IAAI,wBAAwB,GAAG,SAAS;IAInD;;;;OAIG;IACH,gBAAgB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;IAIvD,OAAO,CAAC,YAAY;YAiBN,WAAW;YAgMX,WAAW;CAwC1B"}
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @packageDocumentation
|
|
8
8
|
*/
|
|
9
|
-
export { createAuthFunctionRegistry, createSecurityBindings, normalizeEncryptionLevelFromAlg, type AuthFunctionRegistryOptions, type EncryptionLevel, type SecurityBindings, } from "./expr-builtins.js";
|
|
10
9
|
export { AdvancedAuthorizationPolicy, type AdvancedAuthorizationPolicyOptions, } from "./advanced-authorization-policy.js";
|
|
11
10
|
export { AdvancedAuthorizationPolicyFactory, FACTORY_META as ADVANCED_AUTHORIZATION_POLICY_FACTORY_META, type AdvancedAuthorizationPolicyConfig, } from "./advanced-authorization-policy-factory.js";
|
|
11
|
+
export { HttpAuthorizationPolicySource, type HttpAuthorizationPolicySourceOptions, type HttpPolicySourceMetadata, type HttpMethod, } from "./http-authorization-policy-source.js";
|
|
12
|
+
export { HttpAuthorizationPolicySourceFactory, FACTORY_META as HTTP_AUTHORIZATION_POLICY_SOURCE_FACTORY_META, type HttpAuthorizationPolicySourceConfig, } from "./http-authorization-policy-source-factory.js";
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/naylence/fame/security/auth/policy/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/naylence/fame/security/auth/policy/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EACL,2BAA2B,EAC3B,KAAK,kCAAkC,GACxC,MAAM,oCAAoC,CAAC;AAG5C,OAAO,EACL,kCAAkC,EAClC,YAAY,IAAI,0CAA0C,EAC1D,KAAK,iCAAiC,GACvC,MAAM,4CAA4C,CAAC;AAGpD,OAAO,EACL,6BAA6B,EAC7B,KAAK,oCAAoC,EACzC,KAAK,wBAAwB,EAC7B,KAAK,UAAU,GAChB,MAAM,uCAAuC,CAAC;AAG/C,OAAO,EACL,oCAAoC,EACpC,YAAY,IAAI,6CAA6C,EAC7D,KAAK,mCAAmC,GACzC,MAAM,+CAA+C,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTP Policy Authorization Profile
|
|
3
|
+
*
|
|
4
|
+
* Provides the 'policy-http' authorization profile for loading policies over HTTP(S).
|
|
5
|
+
* This profile is similar to 'policy-localfile' from the runtime package but uses
|
|
6
|
+
* the HttpAuthorizationPolicySource instead of LocalFileAuthorizationPolicySource.
|
|
7
|
+
*/
|
|
8
|
+
export declare const ENV_VAR_AUTH_POLICY_URL = "FAME_AUTH_POLICY_URL";
|
|
9
|
+
export declare const ENV_VAR_AUTH_POLICY_TIMEOUT_MS = "FAME_AUTH_POLICY_TIMEOUT_MS";
|
|
10
|
+
export declare const ENV_VAR_AUTH_POLICY_CACHE_TTL_MS = "FAME_AUTH_POLICY_CACHE_TTL_MS";
|
|
11
|
+
export declare const ENV_VAR_AUTH_POLICY_TOKEN_URL = "FAME_AUTH_POLICY_TOKEN_URL";
|
|
12
|
+
export declare const ENV_VAR_AUTH_POLICY_CLIENT_ID = "FAME_AUTH_POLICY_CLIENT_ID";
|
|
13
|
+
export declare const ENV_VAR_AUTH_POLICY_CLIENT_SECRET = "FAME_AUTH_POLICY_CLIENT_SECRET";
|
|
14
|
+
export declare const ENV_VAR_AUTH_POLICY_AUDIENCE = "FAME_AUTH_POLICY_AUDIENCE";
|
|
15
|
+
export declare const ENV_VAR_AUTH_POLICY_BEARER_TOKEN = "FAME_AUTH_POLICY_BEARER_TOKEN";
|
|
16
|
+
export declare const PROFILE_NAME_POLICY_HTTP = "policy-http";
|
|
17
|
+
//# sourceMappingURL=policy-http-authorization-profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policy-http-authorization-profile.d.ts","sourceRoot":"","sources":["../../../../../../src/naylence/fame/security/auth/policy-http-authorization-profile.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAYH,eAAO,MAAM,uBAAuB,yBAAyB,CAAC;AAC9D,eAAO,MAAM,8BAA8B,gCAAgC,CAAC;AAC5E,eAAO,MAAM,gCAAgC,kCAAkC,CAAC;AAChF,eAAO,MAAM,6BAA6B,+BAA+B,CAAC;AAC1E,eAAO,MAAM,6BAA6B,+BAA+B,CAAC;AAC1E,eAAO,MAAM,iCAAiC,mCAAmC,CAAC;AAClF,eAAO,MAAM,4BAA4B,8BAA8B,CAAC;AAGxE,eAAO,MAAM,gCAAgC,kCAAkC,CAAC;AAGhF,eAAO,MAAM,wBAAwB,gBAAgB,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Registry } from "@naylence/factory";
|
|
2
2
|
import "./strict-overlay-security-profile.js";
|
|
3
|
+
import "./auth/policy-http-authorization-profile.js";
|
|
3
4
|
type FactoryRegistrar = Pick<typeof Registry, "registerFactory">;
|
|
4
5
|
export interface RegisterAdvancedSecurityFactoriesOptions {
|
|
5
6
|
readonly includeExtras?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-advanced-security-factories.d.ts","sourceRoot":"","sources":["../../../../../src/naylence/fame/security/register-advanced-security-factories.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAU7C,OAAO,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"register-advanced-security-factories.d.ts","sourceRoot":"","sources":["../../../../../src/naylence/fame/security/register-advanced-security-factories.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAU7C,OAAO,sCAAsC,CAAC;AAC9C,OAAO,6CAA6C,CAAC;AAErD,KAAK,gBAAgB,GAAG,IAAI,CAAC,OAAO,QAAQ,EAAE,iBAAiB,CAAC,CAAC;AA2YjE,MAAM,WAAW,wCAAwC;IACvD,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,wBAAsB,iCAAiC,CACrD,SAAS,GAAE,gBAA2B,EACtC,OAAO,CAAC,EAAE,wCAAwC,GACjD,OAAO,CAAC,IAAI,CAAC,CAaf"}
|
package/dist/types/version.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naylence/advanced-security",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Advanced security utilities for the Naylence Fame runtime implemented in TypeScript.",
|
|
6
6
|
"author": "Naylence Dev <naylencedev@gmail.com>",
|
|
@@ -112,7 +112,8 @@
|
|
|
112
112
|
"dist/browser/index.cjs"
|
|
113
113
|
],
|
|
114
114
|
"bin": {
|
|
115
|
-
"naylence-ca-server": "./dist/esm/naylence/fame/security/cert/ca-server-cli.js"
|
|
115
|
+
"naylence-ca-server": "./dist/esm/naylence/fame/security/cert/ca-server-cli.js",
|
|
116
|
+
"naylence-policy-server": "./dist/esm/naylence/fame/security/auth/policy/auth-policy-server-cli.js"
|
|
116
117
|
},
|
|
117
118
|
"files": [
|
|
118
119
|
"dist",
|