@frontmcp/auth 1.10.16 → 1.11.0-rc.1
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/browser/authorities/authorities.context.mjs +115 -0
- package/browser/authorities/authorities.engine.mjs +272 -0
- package/browser/authorities/authorities.errors.mjs +59 -0
- package/browser/authorities/authorities.evaluator.mjs +225 -0
- package/browser/authorities/authorities.metadata-augment.mjs +18 -0
- package/browser/authorities/authorities.registry.mjs +112 -0
- package/browser/authorities/authorities.schema.mjs +92 -0
- package/browser/authorities/authorities.scope-mapping.mjs +30 -0
- package/browser/authorities/authorities.validation.mjs +208 -0
- package/browser/authorities/index.mjs +43 -0
- package/browser/authorization/authorization.class.mjs +252 -0
- package/browser/authorization/authorization.types.mjs +64 -0
- package/browser/authorization/dcr-client.registry.mjs +222 -0
- package/browser/authorization/index.mjs +41 -0
- package/browser/authorization/orchestrated.accessor.mjs +86 -0
- package/browser/authorization/orchestrated.authorization.mjs +289 -0
- package/browser/authorization/public.authorization.mjs +124 -0
- package/browser/authorization/transparent.authorization.mjs +130 -0
- package/browser/cimd/cimd-redis.cache.mjs +231 -0
- package/browser/cimd/cimd.cache.mjs +215 -0
- package/browser/cimd/cimd.errors.mjs +142 -0
- package/browser/cimd/cimd.logger.mjs +15 -0
- package/browser/cimd/cimd.service.mjs +376 -0
- package/browser/cimd/cimd.types.mjs +228 -0
- package/browser/cimd/cimd.validator.mjs +217 -0
- package/browser/cimd/index.mjs +63 -0
- package/browser/common/auth-logger.interface.mjs +14 -0
- package/browser/common/index.mjs +6 -0
- package/browser/common/jwt.types.mjs +38 -0
- package/browser/common/session-user.types.mjs +0 -0
- package/browser/common/session.types.mjs +58 -0
- package/browser/common/zod-utils.mjs +0 -0
- package/browser/consent/consent.types.mjs +94 -0
- package/browser/consent/index.mjs +17 -0
- package/browser/context/frontmcp-auth-context.factory.mjs +29 -0
- package/browser/context/frontmcp-auth-context.impl.mjs +112 -0
- package/browser/context/index.mjs +7 -0
- package/browser/detection/auth-provider-detection.mjs +176 -0
- package/browser/detection/index.mjs +19 -0
- package/browser/errors/auth-internal.error.mjs +42 -0
- package/browser/errors/auth-internal.errors.mjs +150 -0
- package/browser/errors/index.mjs +53 -0
- package/browser/fetch/fetch-credential-middleware.mjs +91 -0
- package/browser/fetch/index.mjs +19 -0
- package/browser/index.mjs +573 -0
- package/browser/jwks/index.mjs +9 -0
- package/browser/jwks/jose.loader.mjs +28 -0
- package/browser/jwks/jwks.service.mjs +521 -0
- package/browser/jwks/jwks.utils.mjs +33 -0
- package/browser/options/app-auth.schema.mjs +18 -0
- package/browser/options/index.mjs +89 -0
- package/browser/options/orchestrated.schema.mjs +128 -0
- package/browser/options/public.schema.mjs +39 -0
- package/browser/options/schema.mjs +16 -0
- package/browser/options/shared.schemas.mjs +506 -0
- package/browser/options/static.schema.mjs +41 -0
- package/browser/options/transparent.schema.mjs +43 -0
- package/browser/options/utils.mjs +47 -0
- package/browser/people/index.mjs +15 -0
- package/browser/people/loopback-token.auth.mjs +115 -0
- package/browser/people/people-auth.options.mjs +37 -0
- package/browser/session/authorization-vault.mjs +279 -0
- package/browser/session/authorization.store.mjs +336 -0
- package/browser/session/consent.store.mjs +34 -0
- package/browser/session/credential-resume-link.mjs +43 -0
- package/browser/session/credentials-accessor.impl.mjs +54 -0
- package/browser/session/credentials-accessor.mjs +5 -0
- package/browser/session/encrypted-authorization-vault.mjs +405 -0
- package/browser/session/federated-auth.session.mjs +176 -0
- package/browser/session/incremental-auth-ticket.mjs +42 -0
- package/browser/session/index.mjs +266 -0
- package/browser/session/orchestrated-token.crypto.mjs +47 -0
- package/browser/session/orchestrated-token.store.mjs +286 -0
- package/browser/session/pending-login.mjs +37 -0
- package/browser/session/redis-session.store.mjs +255 -0
- package/browser/session/secure-store-accessor.impl.mjs +78 -0
- package/browser/session/secure-store-accessor.mjs +5 -0
- package/browser/session/secure-store-backends.mjs +111 -0
- package/browser/session/secure-store.factory.mjs +77 -0
- package/browser/session/session-credential-vault.factory.mjs +18 -0
- package/browser/session/session-credential-vault.mjs +243 -0
- package/browser/session/session-crypto.mjs +39 -0
- package/browser/session/session-rate-limiter.mjs +126 -0
- package/browser/session/session.transport.mjs +16 -0
- package/browser/session/signin-binding.mjs +30 -0
- package/browser/session/storage/in-memory-authorization-vault.mjs +28 -0
- package/browser/session/storage/index.mjs +14 -0
- package/browser/session/storage/storage-authorization-vault.mjs +301 -0
- package/browser/session/storage/storage-token-store.mjs +83 -0
- package/browser/session/storage-authorization.store.mjs +134 -0
- package/browser/session/storage-consent.store.mjs +33 -0
- package/browser/session/storage-federated-auth.session.mjs +55 -0
- package/browser/session/storage-orchestrated-token.store.mjs +197 -0
- package/browser/session/token-storage.factory.mjs +58 -0
- package/browser/session/token.refresh.mjs +36 -0
- package/browser/session/token.vault.mjs +61 -0
- package/browser/session/transport-session.types.mjs +108 -0
- package/browser/session/utils/auth-token.utils.mjs +58 -0
- package/browser/session/utils/index.mjs +23 -0
- package/browser/session/utils/session-crypto.utils.mjs +49 -0
- package/browser/session/utils/tiny-ttl-cache.mjs +46 -0
- package/browser/session/vault-encryption.mjs +187 -0
- package/browser/session/vercel-kv-session.store.mjs +230 -0
- package/browser/shared-server/index.mjs +17 -0
- package/browser/shared-server/shared-server-identity.mjs +55 -0
- package/browser/ui/base-layout.mjs +184 -0
- package/browser/ui/index.mjs +51 -0
- package/browser/ui/local-login.helper.mjs +46 -0
- package/browser/ui/templates.mjs +482 -0
- package/browser/utils/audience.validator.mjs +110 -0
- package/browser/utils/authorization-id.utils.mjs +10 -0
- package/browser/utils/index.mjs +45 -0
- package/browser/utils/redirect-uri.utils.mjs +22 -0
- package/browser/utils/scope-grant.utils.mjs +36 -0
- package/browser/utils/token-scopes.utils.mjs +12 -0
- package/browser/utils/www-authenticate.utils.mjs +164 -0
- package/browser/vault/auth-providers.accessor.impl.mjs +236 -0
- package/browser/vault/auth-providers.accessor.mjs +5 -0
- package/browser/vault/auth-providers.registry.mjs +140 -0
- package/browser/vault/auth-providers.types.mjs +47 -0
- package/browser/vault/auth-providers.vault.mjs +206 -0
- package/browser/vault/credential-cache.mjs +187 -0
- package/browser/vault/credential-helpers.mjs +15 -0
- package/browser/vault/credential-loaders/eager-loader.mjs +91 -0
- package/browser/vault/credential-loaders/lazy-loader.mjs +120 -0
- package/browser/vault/index.mjs +35 -0
- package/cimd/cimd.types.d.ts +1 -1
- package/cimd/cimd.types.d.ts.map +1 -1
- package/common/jwt.types.d.ts +1 -1
- package/common/jwt.types.d.ts.map +1 -1
- package/common/session.types.d.ts +9 -1
- package/common/session.types.d.ts.map +1 -1
- package/consent/consent.types.d.ts +1 -1
- package/consent/consent.types.d.ts.map +1 -1
- package/detection/auth-provider-detection.d.ts +1 -1
- package/detection/auth-provider-detection.d.ts.map +1 -1
- package/errors/auth-internal.errors.d.ts +6 -0
- package/errors/auth-internal.errors.d.ts.map +1 -1
- package/errors/index.d.ts +1 -1
- package/errors/index.d.ts.map +1 -1
- package/esm/index.mjs +2 -2
- package/esm/package.json +21 -5
- package/index.d.ts +5 -1
- package/index.d.ts.map +1 -1
- package/index.js +2 -2
- package/options/app-auth.schema.d.ts +19 -1
- package/options/app-auth.schema.d.ts.map +1 -1
- package/options/orchestrated.schema.d.ts +37 -1
- package/options/orchestrated.schema.d.ts.map +1 -1
- package/options/public.schema.d.ts +1 -1
- package/options/public.schema.d.ts.map +1 -1
- package/options/schema.d.ts +19 -1
- package/options/schema.d.ts.map +1 -1
- package/options/shared.schemas.d.ts +10 -14
- package/options/shared.schemas.d.ts.map +1 -1
- package/options/static.schema.d.ts +1 -1
- package/options/static.schema.d.ts.map +1 -1
- package/options/transparent.schema.d.ts +1 -1
- package/options/transparent.schema.d.ts.map +1 -1
- package/package.json +21 -5
- package/people/index.d.ts +3 -0
- package/people/index.d.ts.map +1 -0
- package/people/loopback-token.auth.d.ts +75 -0
- package/people/loopback-token.auth.d.ts.map +1 -0
- package/people/people-auth.options.d.ts +36 -0
- package/people/people-auth.options.d.ts.map +1 -0
- package/session/authorization-vault.d.ts +1 -1
- package/session/authorization-vault.d.ts.map +1 -1
- package/session/encrypted-authorization-vault.d.ts +1 -1
- package/session/encrypted-authorization-vault.d.ts.map +1 -1
- package/session/secure-store.factory.d.ts.map +1 -1
- package/shared-server/index.d.ts +3 -0
- package/shared-server/index.d.ts.map +1 -0
- package/shared-server/shared-server-identity.d.ts +26 -0
- package/shared-server/shared-server-identity.d.ts.map +1 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
// libs/auth/src/authorities/authorities.context.ts
|
|
2
|
+
import { getEnv } from "@frontmcp/utils";
|
|
3
|
+
function resolveDotPath(obj, path) {
|
|
4
|
+
if (path in obj) {
|
|
5
|
+
return obj[path];
|
|
6
|
+
}
|
|
7
|
+
const segments = path.split(".");
|
|
8
|
+
let current = obj;
|
|
9
|
+
for (const segment of segments) {
|
|
10
|
+
if (current === null || current === void 0 || typeof current !== "object") {
|
|
11
|
+
return void 0;
|
|
12
|
+
}
|
|
13
|
+
current = current[segment];
|
|
14
|
+
}
|
|
15
|
+
return current;
|
|
16
|
+
}
|
|
17
|
+
function toStringArray(value) {
|
|
18
|
+
if (Array.isArray(value)) {
|
|
19
|
+
return value.filter((v) => typeof v === "string");
|
|
20
|
+
}
|
|
21
|
+
if (typeof value === "string") {
|
|
22
|
+
return value.split(/\s+/).filter(Boolean);
|
|
23
|
+
}
|
|
24
|
+
return [];
|
|
25
|
+
}
|
|
26
|
+
var noopRelationshipResolver = {
|
|
27
|
+
async check() {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
function resolveAuthUser(authInfo) {
|
|
32
|
+
const extraUser = authInfo?.extra?.["user"];
|
|
33
|
+
if (authInfo?.user) return authInfo.user;
|
|
34
|
+
return typeof extraUser === "object" && extraUser !== null ? extraUser : {};
|
|
35
|
+
}
|
|
36
|
+
function isAnonymousSubject(sub) {
|
|
37
|
+
return typeof sub !== "string" || sub === "" || sub.startsWith("anon:");
|
|
38
|
+
}
|
|
39
|
+
function signedInSubject(rawSub, mappedSub) {
|
|
40
|
+
if (rawSub !== void 0 && isAnonymousSubject(rawSub)) return void 0;
|
|
41
|
+
return [mappedSub, rawSub].find((candidate) => !isAnonymousSubject(candidate));
|
|
42
|
+
}
|
|
43
|
+
var runtimeEnv = new Proxy(
|
|
44
|
+
{},
|
|
45
|
+
{ get: (_target, name) => typeof name === "string" ? getEnv(name) : void 0 }
|
|
46
|
+
);
|
|
47
|
+
var AuthoritiesContextBuilder = class {
|
|
48
|
+
claimsMapping;
|
|
49
|
+
claimsResolver;
|
|
50
|
+
relationshipResolver;
|
|
51
|
+
constructor(options = {}) {
|
|
52
|
+
this.claimsMapping = options.claimsMapping;
|
|
53
|
+
this.claimsResolver = options.claimsResolver;
|
|
54
|
+
this.relationshipResolver = options.relationshipResolver ?? noopRelationshipResolver;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Build an evaluation context from AuthInfo and tool input.
|
|
58
|
+
*/
|
|
59
|
+
build(authInfo, input = {}, env = runtimeEnv) {
|
|
60
|
+
if (this.claimsResolver) {
|
|
61
|
+
const resolved = this.claimsResolver(authInfo);
|
|
62
|
+
return {
|
|
63
|
+
user: {
|
|
64
|
+
sub: signedInSubject(resolveAuthUser(authInfo).sub),
|
|
65
|
+
roles: resolved.roles,
|
|
66
|
+
permissions: resolved.permissions,
|
|
67
|
+
claims: resolved.claims
|
|
68
|
+
},
|
|
69
|
+
input,
|
|
70
|
+
env,
|
|
71
|
+
relationships: this.relationshipResolver
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
const user = resolveAuthUser(authInfo);
|
|
75
|
+
const authorization = authInfo?.extra?.["authorization"];
|
|
76
|
+
const authorizationClaims = authorization?.["claims"] ?? {};
|
|
77
|
+
const rawClaims = {
|
|
78
|
+
...authorizationClaims,
|
|
79
|
+
...user
|
|
80
|
+
};
|
|
81
|
+
let roles;
|
|
82
|
+
if (this.claimsMapping?.roles) {
|
|
83
|
+
roles = toStringArray(resolveDotPath(rawClaims, this.claimsMapping.roles));
|
|
84
|
+
} else {
|
|
85
|
+
roles = toStringArray(
|
|
86
|
+
user["roles"] ?? authorization?.["scopes"] ?? []
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
let permissions;
|
|
90
|
+
if (this.claimsMapping?.permissions) {
|
|
91
|
+
permissions = toStringArray(resolveDotPath(rawClaims, this.claimsMapping.permissions));
|
|
92
|
+
} else {
|
|
93
|
+
permissions = toStringArray(user["permissions"] ?? []);
|
|
94
|
+
}
|
|
95
|
+
const mappedSub = this.claimsMapping?.userId ? resolveDotPath(rawClaims, this.claimsMapping.userId) : void 0;
|
|
96
|
+
return {
|
|
97
|
+
user: {
|
|
98
|
+
sub: signedInSubject(user.sub, mappedSub),
|
|
99
|
+
roles,
|
|
100
|
+
permissions,
|
|
101
|
+
claims: rawClaims
|
|
102
|
+
},
|
|
103
|
+
input,
|
|
104
|
+
env,
|
|
105
|
+
relationships: this.relationshipResolver
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
export {
|
|
110
|
+
AuthoritiesContextBuilder,
|
|
111
|
+
isAnonymousSubject,
|
|
112
|
+
resolveAuthUser,
|
|
113
|
+
resolveDotPath,
|
|
114
|
+
signedInSubject
|
|
115
|
+
};
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
// libs/auth/src/authorities/authorities.engine.ts
|
|
2
|
+
import { evaluateAbac, evaluateRbacPermissions, evaluateRbacRoles, evaluateRebac } from "./authorities.evaluator.mjs";
|
|
3
|
+
import { findAuthoritiesProfileProblems, findAuthoritiesRuleProblems } from "./authorities.validation.mjs";
|
|
4
|
+
function mergeResult(base, ...others) {
|
|
5
|
+
const evaluatedPolicies = [...base.evaluatedPolicies];
|
|
6
|
+
for (const other of others) {
|
|
7
|
+
evaluatedPolicies.push(...other.evaluatedPolicies);
|
|
8
|
+
}
|
|
9
|
+
return { ...base, evaluatedPolicies };
|
|
10
|
+
}
|
|
11
|
+
function invalidRule(problems, policies = []) {
|
|
12
|
+
return {
|
|
13
|
+
granted: false,
|
|
14
|
+
deniedBy: `invalid authorities rule: ${problems.join("; ")}`,
|
|
15
|
+
evaluatedPolicies: policies
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
var AuthoritiesEngine = class {
|
|
19
|
+
constructor(profiles, evaluators) {
|
|
20
|
+
this.profiles = profiles;
|
|
21
|
+
this.evaluators = evaluators;
|
|
22
|
+
}
|
|
23
|
+
profiles;
|
|
24
|
+
evaluators;
|
|
25
|
+
/** Problems found per rule object, so a rule is validated once however often it is evaluated. */
|
|
26
|
+
ruleProblems = /* @__PURE__ */ new WeakMap();
|
|
27
|
+
/**
|
|
28
|
+
* Problems with an `authorities` value declared on an entry (see {@link findAuthoritiesRuleProblems}),
|
|
29
|
+
* and each profile name it uses that no registered profile has. The server reports them when it
|
|
30
|
+
* starts; {@link evaluate} denies such a value (an unknown profile as `profile '\u2026' is not registered`).
|
|
31
|
+
*/
|
|
32
|
+
findRuleProblems(authorities) {
|
|
33
|
+
const problems = findAuthoritiesRuleProblems(authorities);
|
|
34
|
+
if (problems.length > 0) return problems;
|
|
35
|
+
const names = typeof authorities === "string" ? [authorities] : Array.isArray(authorities) ? authorities : [];
|
|
36
|
+
return names.filter((name) => typeof name === "string" && !this.profiles.has(name)).map((name) => `names an unknown profile "${name}"`);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Problems with every registered profile's rule (see {@link findAuthoritiesRuleProblems}).
|
|
40
|
+
* The server reports them when it starts.
|
|
41
|
+
*/
|
|
42
|
+
findProfileProblems() {
|
|
43
|
+
return Object.entries(this.profiles.getAll()).flatMap(
|
|
44
|
+
([name, policy]) => findAuthoritiesProfileProblems(name, policy)
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Evaluate an AuthoritiesMetadata value (string, string[], or policy object).
|
|
49
|
+
*
|
|
50
|
+
* A value that is malformed or checks nothing (see {@link findAuthoritiesRuleProblems}) is denied.
|
|
51
|
+
*/
|
|
52
|
+
async evaluate(authorities, ctx) {
|
|
53
|
+
const problems = this.problemsOf(authorities, findAuthoritiesRuleProblems);
|
|
54
|
+
if (problems.length > 0) return invalidRule(problems);
|
|
55
|
+
if (typeof authorities === "string") {
|
|
56
|
+
return this.evaluateProfile(authorities, ctx);
|
|
57
|
+
}
|
|
58
|
+
if (Array.isArray(authorities)) {
|
|
59
|
+
return this.evaluateProfileArray(authorities, ctx);
|
|
60
|
+
}
|
|
61
|
+
return this.evaluatePolicy(authorities, ctx);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Resolve and evaluate a single named profile.
|
|
65
|
+
*/
|
|
66
|
+
async evaluateProfile(name, ctx) {
|
|
67
|
+
const policy = this.profiles.resolve(name);
|
|
68
|
+
if (!policy) {
|
|
69
|
+
return {
|
|
70
|
+
granted: false,
|
|
71
|
+
deniedBy: `profile '${name}' is not registered`,
|
|
72
|
+
evaluatedPolicies: [`profile:${name}`]
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
const problems = this.problemsOf(policy, (rule) => findAuthoritiesProfileProblems(name, rule));
|
|
76
|
+
if (problems.length > 0) return invalidRule(problems, [`profile:${name}`]);
|
|
77
|
+
const result = await this.evaluatePolicy(policy, ctx);
|
|
78
|
+
if (!result.granted) {
|
|
79
|
+
return {
|
|
80
|
+
...result,
|
|
81
|
+
deniedBy: `profile:${name}: ${result.deniedBy}`,
|
|
82
|
+
evaluatedPolicies: [`profile:${name}`, ...result.evaluatedPolicies]
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
return mergeResult(result, { granted: true, evaluatedPolicies: [`profile:${name}`] });
|
|
86
|
+
}
|
|
87
|
+
/** Validate a rule, reusing the result for a rule object seen before. */
|
|
88
|
+
problemsOf(rule, find) {
|
|
89
|
+
if (typeof rule !== "object" || rule === null) return find(rule);
|
|
90
|
+
let problems = this.ruleProblems.get(rule);
|
|
91
|
+
if (!problems) {
|
|
92
|
+
problems = find(rule);
|
|
93
|
+
this.ruleProblems.set(rule, problems);
|
|
94
|
+
}
|
|
95
|
+
return problems;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Evaluate an array of profile names (AND semantics).
|
|
99
|
+
*/
|
|
100
|
+
async evaluateProfileArray(names, ctx) {
|
|
101
|
+
const allPolicies = [];
|
|
102
|
+
for (const name of names) {
|
|
103
|
+
const result = await this.evaluateProfile(name, ctx);
|
|
104
|
+
allPolicies.push(...result.evaluatedPolicies);
|
|
105
|
+
if (!result.granted) {
|
|
106
|
+
return { ...result, evaluatedPolicies: allPolicies };
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return { granted: true, evaluatedPolicies: allPolicies };
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Evaluate an inline policy object.
|
|
113
|
+
*/
|
|
114
|
+
async evaluatePolicy(policy, ctx) {
|
|
115
|
+
const operator = policy.operator ?? "AND";
|
|
116
|
+
const results = [];
|
|
117
|
+
if (policy.roles) {
|
|
118
|
+
results.push(evaluateRbacRoles(policy.roles, ctx));
|
|
119
|
+
}
|
|
120
|
+
if (policy.permissions) {
|
|
121
|
+
results.push(evaluateRbacPermissions(policy.permissions, ctx));
|
|
122
|
+
}
|
|
123
|
+
if (policy.attributes) {
|
|
124
|
+
results.push(evaluateAbac(policy.attributes, ctx));
|
|
125
|
+
}
|
|
126
|
+
if (policy.relationships) {
|
|
127
|
+
results.push(await evaluateRebac(policy.relationships, ctx));
|
|
128
|
+
}
|
|
129
|
+
if (policy.custom) {
|
|
130
|
+
results.push(await this.evaluateCustom(policy.custom, ctx));
|
|
131
|
+
}
|
|
132
|
+
if (policy.guards && policy.guards.length > 0) {
|
|
133
|
+
results.push(await this.evaluateGuards(policy.guards, ctx));
|
|
134
|
+
}
|
|
135
|
+
if (policy.allOf) {
|
|
136
|
+
results.push(await this.evaluateAllOf(policy.allOf, ctx));
|
|
137
|
+
}
|
|
138
|
+
if (policy.anyOf) {
|
|
139
|
+
results.push(await this.evaluateAnyOf(policy.anyOf, ctx));
|
|
140
|
+
}
|
|
141
|
+
if (policy.not) {
|
|
142
|
+
results.push(await this.evaluateNot(policy.not, ctx));
|
|
143
|
+
}
|
|
144
|
+
if (results.length === 0) {
|
|
145
|
+
return invalidRule(["checks nothing"]);
|
|
146
|
+
}
|
|
147
|
+
return this.combineResults(results, operator);
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Combine results with AND or OR semantics.
|
|
151
|
+
*/
|
|
152
|
+
combineResults(results, operator) {
|
|
153
|
+
const allPolicies = results.flatMap((r) => r.evaluatedPolicies);
|
|
154
|
+
if (operator === "AND") {
|
|
155
|
+
const denied = results.find((r) => !r.granted);
|
|
156
|
+
if (denied) {
|
|
157
|
+
return { ...denied, evaluatedPolicies: allPolicies };
|
|
158
|
+
}
|
|
159
|
+
return { granted: true, evaluatedPolicies: allPolicies };
|
|
160
|
+
}
|
|
161
|
+
const anyGranted = results.some((r) => r.granted);
|
|
162
|
+
if (anyGranted) {
|
|
163
|
+
return { granted: true, evaluatedPolicies: allPolicies };
|
|
164
|
+
}
|
|
165
|
+
const firstDenied = results.find((r) => !r.granted);
|
|
166
|
+
return {
|
|
167
|
+
granted: false,
|
|
168
|
+
deniedBy: firstDenied?.deniedBy ?? "all policies denied (OR)",
|
|
169
|
+
evaluatedPolicies: allPolicies
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Evaluate custom evaluators.
|
|
174
|
+
*/
|
|
175
|
+
async evaluateCustom(custom, ctx) {
|
|
176
|
+
const allPolicies = [];
|
|
177
|
+
for (const [name, config] of Object.entries(custom)) {
|
|
178
|
+
const evaluator = this.evaluators.get(name);
|
|
179
|
+
if (!evaluator) {
|
|
180
|
+
return {
|
|
181
|
+
granted: false,
|
|
182
|
+
deniedBy: `custom evaluator '${name}' is not registered`,
|
|
183
|
+
evaluatedPolicies: [...allPolicies, `custom.${name}`]
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
const result = await evaluator.evaluate(config, ctx);
|
|
187
|
+
allPolicies.push(`custom.${name}`, ...result.evaluatedPolicies);
|
|
188
|
+
if (!result.granted) {
|
|
189
|
+
return { ...result, evaluatedPolicies: allPolicies };
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return { granted: true, evaluatedPolicies: allPolicies };
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Evaluate async guard functions in sequence.
|
|
196
|
+
* Only `true` grants. A string is the denial message; anything else (`false`, but also
|
|
197
|
+
* `undefined` from a guard that forgot to return, `null`, `0` or an object) denies.
|
|
198
|
+
*/
|
|
199
|
+
async evaluateGuards(guards, ctx) {
|
|
200
|
+
for (let i = 0; i < guards.length; i++) {
|
|
201
|
+
const guard = guards[i];
|
|
202
|
+
const result = await guard(ctx);
|
|
203
|
+
if (result !== true) {
|
|
204
|
+
const denialMessage = typeof result === "string" ? result : result === false ? `guard[${i}] denied` : `guard[${i}] did not return true (returned ${result === null ? "null" : typeof result})`;
|
|
205
|
+
return {
|
|
206
|
+
granted: false,
|
|
207
|
+
deniedBy: `guards[${i}]: ${denialMessage}`,
|
|
208
|
+
denial: { kind: "custom", path: `guards[${i}]` },
|
|
209
|
+
evaluatedPolicies: ["guards"]
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
return { granted: true, evaluatedPolicies: ["guards"] };
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* allOf combinator \u2014 all nested policies must pass.
|
|
217
|
+
*/
|
|
218
|
+
async evaluateAllOf(policies, ctx) {
|
|
219
|
+
const allPolicies = ["allOf"];
|
|
220
|
+
for (const policy of policies) {
|
|
221
|
+
const result = await this.evaluatePolicy(policy, ctx);
|
|
222
|
+
allPolicies.push(...result.evaluatedPolicies);
|
|
223
|
+
if (!result.granted) {
|
|
224
|
+
return { ...result, evaluatedPolicies: allPolicies };
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return { granted: true, evaluatedPolicies: allPolicies };
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* anyOf combinator \u2014 at least one nested policy must pass.
|
|
231
|
+
*/
|
|
232
|
+
async evaluateAnyOf(policies, ctx) {
|
|
233
|
+
const allPolicies = ["anyOf"];
|
|
234
|
+
let lastDenied;
|
|
235
|
+
for (const policy of policies) {
|
|
236
|
+
const result = await this.evaluatePolicy(policy, ctx);
|
|
237
|
+
allPolicies.push(...result.evaluatedPolicies);
|
|
238
|
+
if (result.granted) {
|
|
239
|
+
return { granted: true, evaluatedPolicies: allPolicies };
|
|
240
|
+
}
|
|
241
|
+
lastDenied = result;
|
|
242
|
+
}
|
|
243
|
+
return {
|
|
244
|
+
granted: false,
|
|
245
|
+
deniedBy: lastDenied?.deniedBy ?? "no policies in anyOf",
|
|
246
|
+
denial: lastDenied?.denial ?? { kind: "anyOf", path: "anyOf" },
|
|
247
|
+
evaluatedPolicies: allPolicies
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* not combinator \u2014 inverts the nested policy result.
|
|
252
|
+
*/
|
|
253
|
+
async evaluateNot(policy, ctx) {
|
|
254
|
+
const result = await this.evaluatePolicy(policy, ctx);
|
|
255
|
+
return {
|
|
256
|
+
granted: !result.granted,
|
|
257
|
+
deniedBy: result.granted ? "not: inner policy was granted (negated to denied)" : void 0,
|
|
258
|
+
denial: result.granted ? { kind: "not", path: "not" } : void 0,
|
|
259
|
+
evaluatedPolicies: ["not", ...result.evaluatedPolicies]
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* The policy a profile name stands for when `evaluate()` is given that name, or `undefined`
|
|
264
|
+
* when no such profile is registered. Lets callers inspect a named rule without evaluating it.
|
|
265
|
+
*/
|
|
266
|
+
resolveProfile(name) {
|
|
267
|
+
return this.profiles.resolve(name);
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
export {
|
|
271
|
+
AuthoritiesEngine
|
|
272
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// libs/auth/src/authorities/authorities.errors.ts
|
|
2
|
+
import { brandClass, isBrandedInstance } from "@frontmcp/utils";
|
|
3
|
+
var FORBIDDEN_CODE = -32003;
|
|
4
|
+
var AuthorityDeniedError = class extends Error {
|
|
5
|
+
/**
|
|
6
|
+
* `instanceof AuthorityDeniedError` also recognises a denial from another copy of this package in the
|
|
7
|
+
* process, so every copy of `@frontmcp/sdk` answers it as a FORBIDDEN error (#802).
|
|
8
|
+
*/
|
|
9
|
+
static [Symbol.hasInstance](value) {
|
|
10
|
+
return isBrandedInstance(this, value);
|
|
11
|
+
}
|
|
12
|
+
/** MCP error code for JSON-RPC responses */
|
|
13
|
+
mcpErrorCode = FORBIDDEN_CODE;
|
|
14
|
+
/** HTTP status code equivalent */
|
|
15
|
+
statusCode = 403;
|
|
16
|
+
/** Error classification code */
|
|
17
|
+
code = "AUTHORITY_DENIED";
|
|
18
|
+
/** Entry type that was denied */
|
|
19
|
+
entryType;
|
|
20
|
+
/** Entry name that was denied */
|
|
21
|
+
entryName;
|
|
22
|
+
/** Policy that caused the denial */
|
|
23
|
+
deniedBy;
|
|
24
|
+
/** Structured denial data (machine-parsable) */
|
|
25
|
+
denial;
|
|
26
|
+
/** Required scopes for scope challenges */
|
|
27
|
+
requiredScopes;
|
|
28
|
+
constructor(params) {
|
|
29
|
+
const msg = params.message ?? `Access denied to ${params.entryType} "${params.entryName}": ${params.deniedBy}`;
|
|
30
|
+
super(msg);
|
|
31
|
+
this.name = "AuthorityDeniedError";
|
|
32
|
+
this.entryType = params.entryType;
|
|
33
|
+
this.entryName = params.entryName;
|
|
34
|
+
this.deniedBy = params.deniedBy;
|
|
35
|
+
this.denial = params.denial;
|
|
36
|
+
this.requiredScopes = params.requiredScopes;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Convert to JSON-RPC error format.
|
|
40
|
+
*/
|
|
41
|
+
toJsonRpcError() {
|
|
42
|
+
const data = {
|
|
43
|
+
entryType: this.entryType,
|
|
44
|
+
entryName: this.entryName,
|
|
45
|
+
deniedBy: this.deniedBy
|
|
46
|
+
};
|
|
47
|
+
if (this.denial !== void 0) data["denial"] = this.denial;
|
|
48
|
+
if (this.requiredScopes !== void 0) data["requiredScopes"] = this.requiredScopes;
|
|
49
|
+
return {
|
|
50
|
+
code: this.mcpErrorCode,
|
|
51
|
+
message: this.message,
|
|
52
|
+
data
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
brandClass(AuthorityDeniedError, "@frontmcp/auth:AuthorityDeniedError");
|
|
57
|
+
export {
|
|
58
|
+
AuthorityDeniedError
|
|
59
|
+
};
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
// libs/auth/src/authorities/authorities.evaluator.ts
|
|
2
|
+
import { isAnonymousSubject, resolveDotPath } from "./authorities.context.mjs";
|
|
3
|
+
function evaluateRbacRoles(policy, ctx) {
|
|
4
|
+
const userRoles = ctx.user.roles;
|
|
5
|
+
if (policy.all) {
|
|
6
|
+
const missing = policy.all.filter((r) => !userRoles.includes(r));
|
|
7
|
+
if (missing.length > 0) {
|
|
8
|
+
return {
|
|
9
|
+
granted: false,
|
|
10
|
+
deniedBy: `roles.all: missing ${missing.map((r) => `'${r}'`).join(", ")}`,
|
|
11
|
+
denial: { kind: "roles", path: "roles.all", missing },
|
|
12
|
+
evaluatedPolicies: ["roles.all"]
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
if (policy.any) {
|
|
17
|
+
const hasAny = policy.any.some((r) => userRoles.includes(r));
|
|
18
|
+
if (!hasAny) {
|
|
19
|
+
return {
|
|
20
|
+
granted: false,
|
|
21
|
+
deniedBy: `roles.any: user has none of ${policy.any.map((r) => `'${r}'`).join(", ")}`,
|
|
22
|
+
denial: { kind: "roles", path: "roles.any", missing: policy.any },
|
|
23
|
+
evaluatedPolicies: ["roles.any"]
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return { granted: true, evaluatedPolicies: ["roles"] };
|
|
28
|
+
}
|
|
29
|
+
function evaluateRbacPermissions(policy, ctx) {
|
|
30
|
+
const userPerms = ctx.user.permissions;
|
|
31
|
+
if (policy.all) {
|
|
32
|
+
const missing = policy.all.filter((p) => !userPerms.includes(p));
|
|
33
|
+
if (missing.length > 0) {
|
|
34
|
+
return {
|
|
35
|
+
granted: false,
|
|
36
|
+
deniedBy: `permissions.all: missing ${missing.map((p) => `'${p}'`).join(", ")}`,
|
|
37
|
+
denial: { kind: "permissions", path: "permissions.all", missing },
|
|
38
|
+
evaluatedPolicies: ["permissions.all"]
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (policy.any) {
|
|
43
|
+
const hasAny = policy.any.some((p) => userPerms.includes(p));
|
|
44
|
+
if (!hasAny) {
|
|
45
|
+
return {
|
|
46
|
+
granted: false,
|
|
47
|
+
deniedBy: `permissions.any: user has none of ${policy.any.map((p) => `'${p}'`).join(", ")}`,
|
|
48
|
+
denial: { kind: "permissions", path: "permissions.any", missing: policy.any },
|
|
49
|
+
evaluatedPolicies: ["permissions.any"]
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return { granted: true, evaluatedPolicies: ["permissions"] };
|
|
54
|
+
}
|
|
55
|
+
function buildContextEnvelope(ctx) {
|
|
56
|
+
return {
|
|
57
|
+
user: ctx.user,
|
|
58
|
+
claims: ctx.user.claims,
|
|
59
|
+
input: ctx.input,
|
|
60
|
+
env: ctx.env
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
function resolveValue(value, ctx) {
|
|
64
|
+
if (value !== null && typeof value === "object" && !Array.isArray(value)) {
|
|
65
|
+
const obj = value;
|
|
66
|
+
if ("fromInput" in obj && typeof obj["fromInput"] === "string") {
|
|
67
|
+
return ctx.input[obj["fromInput"]];
|
|
68
|
+
}
|
|
69
|
+
if ("fromClaims" in obj && typeof obj["fromClaims"] === "string") {
|
|
70
|
+
return resolveDotPath(ctx.user.claims, obj["fromClaims"]);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return value;
|
|
74
|
+
}
|
|
75
|
+
function applyOperator(actual, op, expected) {
|
|
76
|
+
switch (op) {
|
|
77
|
+
// A missing expected value (e.g. an absent fromInput) never matches, even an absent actual value
|
|
78
|
+
case "eq":
|
|
79
|
+
return expected !== void 0 && actual === expected;
|
|
80
|
+
case "neq":
|
|
81
|
+
return actual !== expected;
|
|
82
|
+
case "in":
|
|
83
|
+
return Array.isArray(expected) && expected.includes(actual);
|
|
84
|
+
case "notIn":
|
|
85
|
+
return Array.isArray(expected) && !expected.includes(actual);
|
|
86
|
+
case "gt":
|
|
87
|
+
return typeof actual === "number" && typeof expected === "number" && actual > expected;
|
|
88
|
+
case "gte":
|
|
89
|
+
return typeof actual === "number" && typeof expected === "number" && actual >= expected;
|
|
90
|
+
case "lt":
|
|
91
|
+
return typeof actual === "number" && typeof expected === "number" && actual < expected;
|
|
92
|
+
case "lte":
|
|
93
|
+
return typeof actual === "number" && typeof expected === "number" && actual <= expected;
|
|
94
|
+
case "contains":
|
|
95
|
+
if (typeof actual === "string" && typeof expected === "string") return actual.includes(expected);
|
|
96
|
+
if (Array.isArray(actual)) return actual.includes(expected);
|
|
97
|
+
return false;
|
|
98
|
+
case "startsWith":
|
|
99
|
+
return typeof actual === "string" && typeof expected === "string" && actual.startsWith(expected);
|
|
100
|
+
case "endsWith":
|
|
101
|
+
return typeof actual === "string" && typeof expected === "string" && actual.endsWith(expected);
|
|
102
|
+
case "exists":
|
|
103
|
+
return expected ? actual !== void 0 && actual !== null : actual === void 0 || actual === null;
|
|
104
|
+
case "matches":
|
|
105
|
+
if (typeof actual !== "string" || typeof expected !== "string") return false;
|
|
106
|
+
if (expected.length > 256) return false;
|
|
107
|
+
if (/(\+\+|\*\*|\{\d+,\d*\}\{)/.test(expected)) return false;
|
|
108
|
+
try {
|
|
109
|
+
return new RegExp(expected).test(actual);
|
|
110
|
+
} catch {
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
default:
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
function evaluateCondition(condition, envelope, ctx) {
|
|
118
|
+
const actual = resolveDotPath(envelope, condition.path);
|
|
119
|
+
const expected = resolveValue(condition.value, ctx);
|
|
120
|
+
return applyOperator(actual, condition.op, expected);
|
|
121
|
+
}
|
|
122
|
+
var REDACTED_ENV_VALUE = "[redacted]";
|
|
123
|
+
function reportableActual(path, actual) {
|
|
124
|
+
return path === "env" || path.startsWith("env.") ? REDACTED_ENV_VALUE : actual;
|
|
125
|
+
}
|
|
126
|
+
function evaluateAbac(policy, ctx) {
|
|
127
|
+
const envelope = buildContextEnvelope(ctx);
|
|
128
|
+
if (policy.match) {
|
|
129
|
+
for (const [path, expectedRaw] of Object.entries(policy.match)) {
|
|
130
|
+
const actual = resolveDotPath(envelope, path);
|
|
131
|
+
const expected = resolveValue(expectedRaw, ctx);
|
|
132
|
+
if (expected === void 0 || actual !== expected) {
|
|
133
|
+
const reported = reportableActual(path, actual);
|
|
134
|
+
return {
|
|
135
|
+
granted: false,
|
|
136
|
+
deniedBy: `attributes.match: '${path}' expected '${String(expected)}' but got '${String(reported)}'`,
|
|
137
|
+
denial: { kind: "attributes", path: "attributes.match", expected, actual: reported },
|
|
138
|
+
evaluatedPolicies: ["attributes.match"]
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
if (policy.conditions) {
|
|
144
|
+
for (let i = 0; i < policy.conditions.length; i++) {
|
|
145
|
+
const condition = policy.conditions[i];
|
|
146
|
+
if (!evaluateCondition(condition, envelope, ctx)) {
|
|
147
|
+
const expected = resolveValue(condition.value, ctx);
|
|
148
|
+
const actual = reportableActual(condition.path, resolveDotPath(envelope, condition.path));
|
|
149
|
+
return {
|
|
150
|
+
granted: false,
|
|
151
|
+
deniedBy: `attributes.conditions: '${condition.path}' failed '${condition.op}' check against '${String(expected)}'`,
|
|
152
|
+
denial: { kind: "attributes", path: `attributes.conditions[${i}]`, expected, actual },
|
|
153
|
+
evaluatedPolicies: ["attributes.conditions"]
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return { granted: true, evaluatedPolicies: ["attributes"] };
|
|
159
|
+
}
|
|
160
|
+
function resolveResourceId(ref, ctx) {
|
|
161
|
+
if (typeof ref === "string") return ref;
|
|
162
|
+
if ("fromInput" in ref) {
|
|
163
|
+
const val = ctx.input[ref.fromInput];
|
|
164
|
+
return typeof val === "string" ? val : void 0;
|
|
165
|
+
}
|
|
166
|
+
if ("fromClaims" in ref) {
|
|
167
|
+
const val = resolveDotPath(ctx.user.claims, ref.fromClaims);
|
|
168
|
+
return typeof val === "string" ? val : void 0;
|
|
169
|
+
}
|
|
170
|
+
return void 0;
|
|
171
|
+
}
|
|
172
|
+
async function evaluateSingleRebac(policy, ctx) {
|
|
173
|
+
const userSub = ctx.user.sub;
|
|
174
|
+
if (userSub === void 0 || isAnonymousSubject(userSub)) {
|
|
175
|
+
return {
|
|
176
|
+
granted: false,
|
|
177
|
+
deniedBy: `relationships: an anonymous caller cannot be '${policy.type}' of ${policy.resource}`,
|
|
178
|
+
denial: { kind: "relationships", path: "user.sub", expected: "a signed-in caller", actual: void 0 },
|
|
179
|
+
evaluatedPolicies: ["relationships"]
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
const resourceId = resolveResourceId(policy.resourceId, ctx);
|
|
183
|
+
if (resourceId === void 0) {
|
|
184
|
+
return {
|
|
185
|
+
granted: false,
|
|
186
|
+
deniedBy: `relationships: could not resolve resourceId for ${policy.resource}`,
|
|
187
|
+
denial: {
|
|
188
|
+
kind: "relationships",
|
|
189
|
+
path: "relationships",
|
|
190
|
+
expected: `${policy.resource}:resourceId`,
|
|
191
|
+
actual: void 0
|
|
192
|
+
},
|
|
193
|
+
evaluatedPolicies: ["relationships"]
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
const hasRelationship = await ctx.relationships.check(policy.type, policy.resource, resourceId, userSub, ctx);
|
|
197
|
+
if (!hasRelationship) {
|
|
198
|
+
return {
|
|
199
|
+
granted: false,
|
|
200
|
+
deniedBy: `relationships: user '${userSub}' is not '${policy.type}' of ${policy.resource}:${resourceId}`,
|
|
201
|
+
denial: {
|
|
202
|
+
kind: "relationships",
|
|
203
|
+
path: "relationships",
|
|
204
|
+
expected: `${policy.type}:${policy.resource}:${resourceId}`
|
|
205
|
+
},
|
|
206
|
+
evaluatedPolicies: ["relationships"]
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
return { granted: true, evaluatedPolicies: ["relationships"] };
|
|
210
|
+
}
|
|
211
|
+
async function evaluateRebac(policy, ctx) {
|
|
212
|
+
const policies = Array.isArray(policy) ? policy : [policy];
|
|
213
|
+
for (const p of policies) {
|
|
214
|
+
const result = await evaluateSingleRebac(p, ctx);
|
|
215
|
+
if (!result.granted) return result;
|
|
216
|
+
}
|
|
217
|
+
return { granted: true, evaluatedPolicies: ["relationships"] };
|
|
218
|
+
}
|
|
219
|
+
export {
|
|
220
|
+
evaluateAbac,
|
|
221
|
+
evaluateRbacPermissions,
|
|
222
|
+
evaluateRbacRoles,
|
|
223
|
+
evaluateRebac,
|
|
224
|
+
resolveResourceId
|
|
225
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
var __frontmcpModule = typeof process !== "undefined" && typeof process.getBuiltinModule === "function" ? process.getBuiltinModule("module") : undefined;
|
|
2
|
+
const require = __frontmcpModule ? __frontmcpModule.createRequire(import.meta.url || 'file:///') : undefined;
|
|
3
|
+
// __frontmcpCreateRequire
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
6
|
+
try {
|
|
7
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
8
|
+
} catch (e) {
|
|
9
|
+
throw mod = 0, e;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
// libs/auth/src/authorities/authorities.metadata-augment.ts
|
|
14
|
+
var require_authorities_metadata_augment = __commonJS({
|
|
15
|
+
"libs/auth/src/authorities/authorities.metadata-augment.ts"() {
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
export default require_authorities_metadata_augment();
|