@frontmcp/auth 1.7.2 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cimd/cimd.validator.d.ts.map +1 -1
- package/detection/auth-provider-detection.d.ts +2 -0
- package/detection/auth-provider-detection.d.ts.map +1 -1
- package/errors/auth-internal.errors.d.ts +12 -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 +291 -177
- package/esm/package.json +5 -5
- package/index.d.ts +1 -1
- package/index.d.ts.map +1 -1
- package/index.js +295 -177
- package/options/index.d.ts +4 -2
- package/options/index.d.ts.map +1 -1
- package/options/interfaces.d.ts +20 -2
- package/options/interfaces.d.ts.map +1 -1
- package/options/schema.d.ts +13 -1
- package/options/schema.d.ts.map +1 -1
- package/options/static.schema.d.ts +27 -0
- package/options/static.schema.d.ts.map +1 -0
- package/options/typecheck.d.ts.map +1 -1
- package/options/utils.d.ts +7 -2
- package/options/utils.d.ts.map +1 -1
- package/package.json +5 -5
package/index.js
CHANGED
|
@@ -285,6 +285,8 @@ __export(index_exports, {
|
|
|
285
285
|
InMemoryStoreRequiredError: () => InMemoryStoreRequiredError,
|
|
286
286
|
InvalidClientIdUrlError: () => InvalidClientIdUrlError,
|
|
287
287
|
JwksService: () => JwksService,
|
|
288
|
+
JwtSecretRequiredError: () => JwtSecretRequiredError,
|
|
289
|
+
JwtSecretWeakError: () => JwtSecretWeakError,
|
|
288
290
|
LazyCredentialLoader: () => LazyCredentialLoader,
|
|
289
291
|
NoProviderIdError: () => NoProviderIdError,
|
|
290
292
|
NullOrchestratedAuthAccessor: () => NullOrchestratedAuthAccessor,
|
|
@@ -455,6 +457,7 @@ __export(index_exports, {
|
|
|
455
457
|
isSoonExpiring: () => isSoonExpiring,
|
|
456
458
|
isSoonExpiringProvider: () => isSoonExpiringProvider,
|
|
457
459
|
isSqliteTokenStorage: () => isSqliteTokenStorage,
|
|
460
|
+
isStaticMode: () => isStaticMode,
|
|
458
461
|
isTransparentMode: () => isTransparentMode,
|
|
459
462
|
jsonWebKeySetSchema: () => jsonWebKeySetSchema,
|
|
460
463
|
jwkParametersSchema: () => jwkParametersSchema,
|
|
@@ -514,6 +517,7 @@ __export(index_exports, {
|
|
|
514
517
|
startNextProvider: () => startNextProvider,
|
|
515
518
|
statefulHttpTransportStateSchema: () => statefulHttpTransportStateSchema,
|
|
516
519
|
statelessHttpTransportStateSchema: () => statelessHttpTransportStateSchema,
|
|
520
|
+
staticAuthOptionsSchema: () => staticAuthOptionsSchema,
|
|
517
521
|
storedSessionSchema: () => storedSessionSchema,
|
|
518
522
|
streamableHttpTransportStateSchema: () => streamableHttpTransportStateSchema,
|
|
519
523
|
toEpochSeconds: () => toEpochSeconds,
|
|
@@ -855,26 +859,78 @@ function checkIpv4(ip) {
|
|
|
855
859
|
}
|
|
856
860
|
return { allowed: true, reason: "" };
|
|
857
861
|
}
|
|
862
|
+
function expandIpv6(ip) {
|
|
863
|
+
let text = ip.toLowerCase();
|
|
864
|
+
if (text.includes("%")) {
|
|
865
|
+
text = text.slice(0, text.indexOf("%"));
|
|
866
|
+
}
|
|
867
|
+
const dottedQuad = text.match(/^(.*:)(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/);
|
|
868
|
+
if (dottedQuad) {
|
|
869
|
+
const octets = dottedQuad[2].split(".").map(Number);
|
|
870
|
+
if (octets.some((octet) => !Number.isInteger(octet) || octet < 0 || octet > 255)) return null;
|
|
871
|
+
const high = (octets[0] << 8 | octets[1]).toString(16);
|
|
872
|
+
const low = (octets[2] << 8 | octets[3]).toString(16);
|
|
873
|
+
text = `${dottedQuad[1]}${high}:${low}`;
|
|
874
|
+
}
|
|
875
|
+
const halves = text.split("::");
|
|
876
|
+
if (halves.length > 2) return null;
|
|
877
|
+
const parseGroups = (part) => {
|
|
878
|
+
if (part === "") return [];
|
|
879
|
+
const groups = [];
|
|
880
|
+
for (const group of part.split(":")) {
|
|
881
|
+
if (!/^[0-9a-f]{1,4}$/.test(group)) return null;
|
|
882
|
+
groups.push(parseInt(group, 16));
|
|
883
|
+
}
|
|
884
|
+
return groups;
|
|
885
|
+
};
|
|
886
|
+
const head = parseGroups(halves[0]);
|
|
887
|
+
if (head === null) return null;
|
|
888
|
+
if (halves.length === 1) {
|
|
889
|
+
return head.length === 8 ? head : null;
|
|
890
|
+
}
|
|
891
|
+
const tail = parseGroups(halves[1]);
|
|
892
|
+
if (tail === null) return null;
|
|
893
|
+
if (head.length + tail.length > 7) return null;
|
|
894
|
+
return [...head, ...new Array(8 - head.length - tail.length).fill(0), ...tail];
|
|
895
|
+
}
|
|
858
896
|
function checkIpv6(ip) {
|
|
859
|
-
const
|
|
860
|
-
if (
|
|
897
|
+
const groups = expandIpv6(ip);
|
|
898
|
+
if (!groups) {
|
|
899
|
+
return { allowed: false, reason: `Malformed IPv6 address: ${ip}` };
|
|
900
|
+
}
|
|
901
|
+
const isZeroPrefix = groups.slice(0, 7).every((group) => group === 0);
|
|
902
|
+
if (isZeroPrefix && groups[7] === 1) {
|
|
861
903
|
return { allowed: false, reason: "IPv6 loopback address (::1) is not allowed" };
|
|
862
904
|
}
|
|
863
|
-
if (
|
|
905
|
+
if (isZeroPrefix && groups[7] === 0) {
|
|
864
906
|
return { allowed: false, reason: "IPv6 unspecified address (::) is not allowed" };
|
|
865
907
|
}
|
|
866
|
-
if (
|
|
908
|
+
if ((groups[0] & 65472) === 65152) {
|
|
867
909
|
return { allowed: false, reason: "IPv6 link-local addresses (fe80::/10) are not allowed" };
|
|
868
910
|
}
|
|
869
|
-
if (
|
|
911
|
+
if ((groups[0] & 65024) === 64512) {
|
|
870
912
|
return { allowed: false, reason: "IPv6 unique local addresses (fc00::/7) are not allowed" };
|
|
871
913
|
}
|
|
872
|
-
const
|
|
873
|
-
if (
|
|
874
|
-
return checkIpv4(
|
|
914
|
+
const embedded = extractEmbeddedIpv4(groups);
|
|
915
|
+
if (embedded) {
|
|
916
|
+
return checkIpv4(embedded);
|
|
875
917
|
}
|
|
876
918
|
return { allowed: true, reason: "" };
|
|
877
919
|
}
|
|
920
|
+
function extractEmbeddedIpv4(groups) {
|
|
921
|
+
const toDotted = () => {
|
|
922
|
+
const high = groups[6];
|
|
923
|
+
const low = groups[7];
|
|
924
|
+
return `${high >> 8}.${high & 255}.${low >> 8}.${low & 255}`;
|
|
925
|
+
};
|
|
926
|
+
const firstFive = groups.slice(0, 5).every((group) => group === 0);
|
|
927
|
+
if (firstFive && groups[5] === 65535) return toDotted();
|
|
928
|
+
if (firstFive && groups[5] === 0) return toDotted();
|
|
929
|
+
if (groups[0] === 100 && groups[1] === 65435 && groups.slice(2, 6).every((group) => group === 0)) {
|
|
930
|
+
return toDotted();
|
|
931
|
+
}
|
|
932
|
+
return null;
|
|
933
|
+
}
|
|
878
934
|
function isDomainInList(hostname, domainList) {
|
|
879
935
|
const lowerHostname = hostname.toLowerCase();
|
|
880
936
|
for (const domain of domainList) {
|
|
@@ -3842,6 +3898,22 @@ var SessionSecretRequiredError = class extends AuthInternalError {
|
|
|
3842
3898
|
super(`Session secret is required for ${component}`, "SESSION_SECRET_REQUIRED");
|
|
3843
3899
|
}
|
|
3844
3900
|
};
|
|
3901
|
+
var JwtSecretRequiredError = class extends AuthInternalError {
|
|
3902
|
+
constructor(mode) {
|
|
3903
|
+
super(
|
|
3904
|
+
`JWT_SECRET is required in production for auth.mode "${mode}". Without it the server signs tokens with a random per-process secret, so every restart invalidates outstanding tokens and any second instance or isolate rejects tokens the first one minted.`,
|
|
3905
|
+
"JWT_SECRET_REQUIRED"
|
|
3906
|
+
);
|
|
3907
|
+
}
|
|
3908
|
+
};
|
|
3909
|
+
var JwtSecretWeakError = class extends AuthInternalError {
|
|
3910
|
+
constructor(byteLength) {
|
|
3911
|
+
super(
|
|
3912
|
+
`JWT_SECRET is ${byteLength} bytes; HS256 requires at least 32 (RFC 7518 \xA73.2). A shorter secret is guessable, and whoever guesses it can forge tokens for this server. Generate one with \`openssl rand -hex 32\`.`,
|
|
3913
|
+
"JWT_SECRET_INVALID"
|
|
3914
|
+
);
|
|
3915
|
+
}
|
|
3916
|
+
};
|
|
3845
3917
|
var CredentialProviderAlreadyRegisteredError = class extends AuthInternalError {
|
|
3846
3918
|
constructor(name) {
|
|
3847
3919
|
super(`Credential provider "${name}" is already registered`, "CREDENTIAL_PROVIDER_ALREADY_REGISTERED");
|
|
@@ -8508,10 +8580,48 @@ var publicAuthOptionsSchema = import_lazy_zod11.z.object({
|
|
|
8508
8580
|
signKey: jwkSchema.or(import_lazy_zod11.z.instanceof(Uint8Array)).optional()
|
|
8509
8581
|
});
|
|
8510
8582
|
|
|
8511
|
-
// libs/auth/src/options/
|
|
8583
|
+
// libs/auth/src/options/static.schema.ts
|
|
8512
8584
|
var import_lazy_zod12 = require("@frontmcp/lazy-zod");
|
|
8513
|
-
var
|
|
8514
|
-
mode: import_lazy_zod12.z.literal("
|
|
8585
|
+
var staticAuthOptionsSchema = import_lazy_zod12.z.object({
|
|
8586
|
+
mode: import_lazy_zod12.z.literal("static"),
|
|
8587
|
+
/**
|
|
8588
|
+
* Accepted credentials. Compared against the presented one in constant time,
|
|
8589
|
+
* over SHA-256 digests so neither the value nor its length leaks by timing.
|
|
8590
|
+
*
|
|
8591
|
+
* Read these from the environment — never commit them.
|
|
8592
|
+
*/
|
|
8593
|
+
tokens: import_lazy_zod12.z.array(import_lazy_zod12.z.string().min(1)).min(1),
|
|
8594
|
+
/**
|
|
8595
|
+
* Request header carrying the credential.
|
|
8596
|
+
* @default 'authorization'
|
|
8597
|
+
*/
|
|
8598
|
+
header: import_lazy_zod12.z.string().min(1).default("authorization"),
|
|
8599
|
+
/**
|
|
8600
|
+
* Scheme prefix to strip before comparing, matched case-insensitively. Set to
|
|
8601
|
+
* an empty string for headers that carry a bare token (e.g. `x-api-key`).
|
|
8602
|
+
* @default 'Bearer'
|
|
8603
|
+
*/
|
|
8604
|
+
scheme: import_lazy_zod12.z.string().default("Bearer"),
|
|
8605
|
+
/**
|
|
8606
|
+
* Scopes granted to a request that presents a valid token.
|
|
8607
|
+
* @default ['static']
|
|
8608
|
+
*/
|
|
8609
|
+
scopes: import_lazy_zod12.z.array(import_lazy_zod12.z.string()).default(["static"]),
|
|
8610
|
+
/**
|
|
8611
|
+
* Realm reported in the `WWW-Authenticate` challenge on failure.
|
|
8612
|
+
* @default 'mcp'
|
|
8613
|
+
*/
|
|
8614
|
+
realm: import_lazy_zod12.z.string().default("mcp"),
|
|
8615
|
+
/**
|
|
8616
|
+
* Tool/prompt access configuration, same shape the other modes accept.
|
|
8617
|
+
*/
|
|
8618
|
+
publicAccess: publicAccessConfigSchema.optional()
|
|
8619
|
+
});
|
|
8620
|
+
|
|
8621
|
+
// libs/auth/src/options/transparent.schema.ts
|
|
8622
|
+
var import_lazy_zod13 = require("@frontmcp/lazy-zod");
|
|
8623
|
+
var transparentAuthOptionsSchema = import_lazy_zod13.z.object({
|
|
8624
|
+
mode: import_lazy_zod13.z.literal("transparent"),
|
|
8515
8625
|
/**
|
|
8516
8626
|
* Flattened remote provider fields (provider, clientId, clientSecret, scopes, providerConfig)
|
|
8517
8627
|
*/
|
|
@@ -8520,28 +8630,28 @@ var transparentAuthOptionsSchema = import_lazy_zod12.z.object({
|
|
|
8520
8630
|
* Expected token audience
|
|
8521
8631
|
* If not set, defaults to the resource URL
|
|
8522
8632
|
*/
|
|
8523
|
-
expectedAudience:
|
|
8633
|
+
expectedAudience: import_lazy_zod13.z.union([import_lazy_zod13.z.string(), import_lazy_zod13.z.array(import_lazy_zod13.z.string())]).optional(),
|
|
8524
8634
|
/**
|
|
8525
8635
|
* Require an `aud` claim (reject audience-less tokens). Defaults to `false`
|
|
8526
8636
|
* for IdP compatibility; set `true` to reject tokens with no audience.
|
|
8527
8637
|
*/
|
|
8528
|
-
requireAudience:
|
|
8638
|
+
requireAudience: import_lazy_zod13.z.boolean().optional(),
|
|
8529
8639
|
/**
|
|
8530
8640
|
* Required scopes for access
|
|
8531
8641
|
* Empty array means any valid token is accepted
|
|
8532
8642
|
* @default []
|
|
8533
8643
|
*/
|
|
8534
|
-
requiredScopes:
|
|
8644
|
+
requiredScopes: import_lazy_zod13.z.array(import_lazy_zod13.z.string()).default([]),
|
|
8535
8645
|
/**
|
|
8536
8646
|
* Allow anonymous fallback when no token is provided
|
|
8537
8647
|
* @default false
|
|
8538
8648
|
*/
|
|
8539
|
-
allowAnonymous:
|
|
8649
|
+
allowAnonymous: import_lazy_zod13.z.boolean().default(false),
|
|
8540
8650
|
/**
|
|
8541
8651
|
* Scopes granted to anonymous sessions (when allowAnonymous=true)
|
|
8542
8652
|
* @default ['anonymous']
|
|
8543
8653
|
*/
|
|
8544
|
-
anonymousScopes:
|
|
8654
|
+
anonymousScopes: import_lazy_zod13.z.array(import_lazy_zod13.z.string()).default(["anonymous"]),
|
|
8545
8655
|
/**
|
|
8546
8656
|
* Public access config for anonymous users (when allowAnonymous=true)
|
|
8547
8657
|
*/
|
|
@@ -8549,13 +8659,13 @@ var transparentAuthOptionsSchema = import_lazy_zod12.z.object({
|
|
|
8549
8659
|
});
|
|
8550
8660
|
|
|
8551
8661
|
// libs/auth/src/options/orchestrated.schema.ts
|
|
8552
|
-
var
|
|
8553
|
-
var authSlotSchema =
|
|
8554
|
-
var authUiMapSchema =
|
|
8555
|
-
var authExtraHandlerSchema =
|
|
8662
|
+
var import_lazy_zod14 = require("@frontmcp/lazy-zod");
|
|
8663
|
+
var authSlotSchema = import_lazy_zod14.z.enum(["login", "consent", "incremental", "federated", "error"]);
|
|
8664
|
+
var authUiMapSchema = import_lazy_zod14.z.partialRecord(authSlotSchema, import_lazy_zod14.z.string().min(1));
|
|
8665
|
+
var authExtraHandlerSchema = import_lazy_zod14.z.custom((v) => typeof v === "function", {
|
|
8556
8666
|
message: "auth.extras entries must be handler functions (input, ctx) => AuthExtraResult."
|
|
8557
8667
|
});
|
|
8558
|
-
var authExtrasMapSchema =
|
|
8668
|
+
var authExtrasMapSchema = import_lazy_zod14.z.record(import_lazy_zod14.z.string().min(1), authExtraHandlerSchema);
|
|
8559
8669
|
var sharedAuthFields = {
|
|
8560
8670
|
local: localSigningConfigSchema.optional(),
|
|
8561
8671
|
tokenStorage: tokenStorageConfigSchema.default("memory"),
|
|
@@ -8563,13 +8673,13 @@ var sharedAuthFields = {
|
|
|
8563
8673
|
// Optional (no default) so an unset value resolves to the in-memory encrypted
|
|
8564
8674
|
// default at runtime; existing configs are unaffected.
|
|
8565
8675
|
secureStore: secureStoreConfigSchema.optional(),
|
|
8566
|
-
allowDefaultPublic:
|
|
8567
|
-
anonymousScopes:
|
|
8676
|
+
allowDefaultPublic: import_lazy_zod14.z.boolean().default(false),
|
|
8677
|
+
anonymousScopes: import_lazy_zod14.z.array(import_lazy_zod14.z.string()).default(["anonymous"]),
|
|
8568
8678
|
publicAccess: publicAccessConfigSchema.optional(),
|
|
8569
8679
|
consent: consentConfigSchema.optional(),
|
|
8570
8680
|
federatedAuth: federatedAuthConfigSchema.optional(),
|
|
8571
8681
|
refresh: tokenRefreshConfigSchema.optional(),
|
|
8572
|
-
expectedAudience:
|
|
8682
|
+
expectedAudience: import_lazy_zod14.z.union([import_lazy_zod14.z.string(), import_lazy_zod14.z.array(import_lazy_zod14.z.string())]).optional(),
|
|
8573
8683
|
incrementalAuth: incrementalAuthConfigSchema.optional(),
|
|
8574
8684
|
/**
|
|
8575
8685
|
* Require the OAuth client to be KNOWN (registered via DCR / pre-registered,
|
|
@@ -8585,46 +8695,46 @@ var sharedAuthFields = {
|
|
|
8585
8695
|
* matching for every client. Clients on a configured
|
|
8586
8696
|
* `dcr.allowedRedirectUris` allowlist still pass.
|
|
8587
8697
|
*/
|
|
8588
|
-
requireRegisteredClients:
|
|
8698
|
+
requireRegisteredClients: import_lazy_zod14.z.boolean().default(false),
|
|
8589
8699
|
cimd: cimdConfigSchema.optional(),
|
|
8590
8700
|
// #469 — custom auth UI as a slot→file map + extras name→handler map (per-app
|
|
8591
8701
|
// under splitByApp). Both optional; omitting them serves the built-in pages.
|
|
8592
8702
|
ui: authUiMapSchema.optional(),
|
|
8593
8703
|
extras: authExtrasMapSchema.optional()
|
|
8594
8704
|
};
|
|
8595
|
-
var loginFieldSchema =
|
|
8596
|
-
type:
|
|
8597
|
-
label:
|
|
8598
|
-
required:
|
|
8599
|
-
placeholder:
|
|
8600
|
-
options:
|
|
8705
|
+
var loginFieldSchema = import_lazy_zod14.z.object({
|
|
8706
|
+
type: import_lazy_zod14.z.enum(["text", "password", "email", "select", "hidden"]),
|
|
8707
|
+
label: import_lazy_zod14.z.string().optional(),
|
|
8708
|
+
required: import_lazy_zod14.z.boolean().optional(),
|
|
8709
|
+
placeholder: import_lazy_zod14.z.string().optional(),
|
|
8710
|
+
options: import_lazy_zod14.z.array(import_lazy_zod14.z.object({ value: import_lazy_zod14.z.string(), label: import_lazy_zod14.z.string() })).optional()
|
|
8601
8711
|
});
|
|
8602
|
-
var loginConfigSchema =
|
|
8603
|
-
title:
|
|
8604
|
-
subtitle:
|
|
8605
|
-
logoUri:
|
|
8606
|
-
fields:
|
|
8712
|
+
var loginConfigSchema = import_lazy_zod14.z.object({
|
|
8713
|
+
title: import_lazy_zod14.z.string().optional(),
|
|
8714
|
+
subtitle: import_lazy_zod14.z.string().optional(),
|
|
8715
|
+
logoUri: import_lazy_zod14.z.string().optional(),
|
|
8716
|
+
fields: import_lazy_zod14.z.record(import_lazy_zod14.z.string(), loginFieldSchema).optional(),
|
|
8607
8717
|
// Full HTML override — a function, validated structurally like other callbacks
|
|
8608
8718
|
// in the codebase (see http/cors handlers using z.custom<…>).
|
|
8609
|
-
render:
|
|
8719
|
+
render: import_lazy_zod14.z.custom((v) => typeof v === "function", {
|
|
8610
8720
|
message: "login.render must be a function"
|
|
8611
8721
|
}).optional(),
|
|
8612
|
-
subject:
|
|
8613
|
-
fromField:
|
|
8614
|
-
strategy:
|
|
8722
|
+
subject: import_lazy_zod14.z.object({
|
|
8723
|
+
fromField: import_lazy_zod14.z.string().optional(),
|
|
8724
|
+
strategy: import_lazy_zod14.z.enum(["per-session", "per-account"]).optional()
|
|
8615
8725
|
}).optional()
|
|
8616
8726
|
});
|
|
8617
|
-
var authenticateFnSchema =
|
|
8727
|
+
var authenticateFnSchema = import_lazy_zod14.z.custom((v) => typeof v === "function", {
|
|
8618
8728
|
message: "authenticate must be a function"
|
|
8619
8729
|
});
|
|
8620
|
-
var localAuthSchema =
|
|
8621
|
-
mode:
|
|
8730
|
+
var localAuthSchema = import_lazy_zod14.z.object({
|
|
8731
|
+
mode: import_lazy_zod14.z.literal("local"),
|
|
8622
8732
|
...sharedAuthFields,
|
|
8623
8733
|
// #468 — opt-out of the email requirement at /oauth/callback for
|
|
8624
8734
|
// single-operator local setups. Defaults preserve the historical behavior
|
|
8625
8735
|
// (email required) so existing configs are unaffected.
|
|
8626
|
-
requireEmail:
|
|
8627
|
-
anonymousSubject:
|
|
8736
|
+
requireEmail: import_lazy_zod14.z.boolean().default(true),
|
|
8737
|
+
anonymousSubject: import_lazy_zod14.z.string().min(1).default("local-operator"),
|
|
8628
8738
|
// Checkpoint 3a — declarative login customization + custom verification.
|
|
8629
8739
|
// Both optional; omitting them preserves the default login path exactly.
|
|
8630
8740
|
login: loginConfigSchema.optional(),
|
|
@@ -8632,7 +8742,7 @@ var localAuthSchema = import_lazy_zod13.z.object({
|
|
|
8632
8742
|
// Multi-OAuth-provider orchestration — declare upstream providers (GitHub,
|
|
8633
8743
|
// Slack, Jira, …) to federate at /oauth/authorize. Optional; omitting it
|
|
8634
8744
|
// preserves the default single-operator local login exactly.
|
|
8635
|
-
providers:
|
|
8745
|
+
providers: import_lazy_zod14.z.array(upstreamProviderSchema).optional(),
|
|
8636
8746
|
// Local-AS Dynamic Client Registration control surface (#462) — gate
|
|
8637
8747
|
// `POST /oauth/register`, allowlist redirect_uris/client_ids, require an
|
|
8638
8748
|
// initial access token, and seed pre-registered trusted clients. Optional;
|
|
@@ -8640,8 +8750,8 @@ var localAuthSchema = import_lazy_zod13.z.object({
|
|
|
8640
8750
|
// no allowlist; no initial access token).
|
|
8641
8751
|
dcr: localDcrConfigSchema.optional()
|
|
8642
8752
|
});
|
|
8643
|
-
var remoteAuthSchema =
|
|
8644
|
-
mode:
|
|
8753
|
+
var remoteAuthSchema = import_lazy_zod14.z.object({
|
|
8754
|
+
mode: import_lazy_zod14.z.literal("remote"),
|
|
8645
8755
|
...flatRemoteProviderFields,
|
|
8646
8756
|
...sharedAuthFields
|
|
8647
8757
|
});
|
|
@@ -8649,21 +8759,22 @@ var orchestratedLocalSchema = localAuthSchema;
|
|
|
8649
8759
|
var orchestratedRemoteSchema = remoteAuthSchema;
|
|
8650
8760
|
|
|
8651
8761
|
// libs/auth/src/options/schema.ts
|
|
8652
|
-
var
|
|
8653
|
-
var authOptionsSchema =
|
|
8762
|
+
var import_lazy_zod15 = require("@frontmcp/lazy-zod");
|
|
8763
|
+
var authOptionsSchema = import_lazy_zod15.z.union([
|
|
8654
8764
|
publicAuthOptionsSchema,
|
|
8765
|
+
staticAuthOptionsSchema,
|
|
8655
8766
|
transparentAuthOptionsSchema,
|
|
8656
8767
|
localAuthSchema,
|
|
8657
8768
|
remoteAuthSchema
|
|
8658
8769
|
]);
|
|
8659
8770
|
|
|
8660
8771
|
// libs/auth/src/options/app-auth.schema.ts
|
|
8661
|
-
var
|
|
8772
|
+
var import_lazy_zod16 = require("@frontmcp/lazy-zod");
|
|
8662
8773
|
var standaloneOptionSchema = {
|
|
8663
|
-
standalone:
|
|
8664
|
-
excludeFromParent:
|
|
8774
|
+
standalone: import_lazy_zod16.z.boolean().optional(),
|
|
8775
|
+
excludeFromParent: import_lazy_zod16.z.boolean().optional()
|
|
8665
8776
|
};
|
|
8666
|
-
var appAuthOptionsSchema =
|
|
8777
|
+
var appAuthOptionsSchema = import_lazy_zod16.z.union([
|
|
8667
8778
|
publicAuthOptionsSchema.extend(standaloneOptionSchema),
|
|
8668
8779
|
transparentAuthOptionsSchema.extend(standaloneOptionSchema),
|
|
8669
8780
|
localAuthSchema.extend(standaloneOptionSchema),
|
|
@@ -8677,6 +8788,9 @@ function parseAuthOptions(input) {
|
|
|
8677
8788
|
function isPublicMode(options) {
|
|
8678
8789
|
return options.mode === "public";
|
|
8679
8790
|
}
|
|
8791
|
+
function isStaticMode(options) {
|
|
8792
|
+
return options.mode === "static";
|
|
8793
|
+
}
|
|
8680
8794
|
function isTransparentMode(options) {
|
|
8681
8795
|
return options.mode === "transparent";
|
|
8682
8796
|
}
|
|
@@ -8703,108 +8817,108 @@ function allowsPublicAccess(options) {
|
|
|
8703
8817
|
}
|
|
8704
8818
|
|
|
8705
8819
|
// libs/auth/src/consent/consent.types.ts
|
|
8706
|
-
var
|
|
8707
|
-
var consentToolItemSchema =
|
|
8820
|
+
var import_lazy_zod17 = require("@frontmcp/lazy-zod");
|
|
8821
|
+
var consentToolItemSchema = import_lazy_zod17.z.object({
|
|
8708
8822
|
/** Tool ID (e.g., 'slack:send_message') */
|
|
8709
|
-
id:
|
|
8823
|
+
id: import_lazy_zod17.z.string().min(1),
|
|
8710
8824
|
/** Tool name for display */
|
|
8711
|
-
name:
|
|
8825
|
+
name: import_lazy_zod17.z.string().min(1),
|
|
8712
8826
|
/** Tool description */
|
|
8713
|
-
description:
|
|
8827
|
+
description: import_lazy_zod17.z.string().optional(),
|
|
8714
8828
|
/** App ID this tool belongs to */
|
|
8715
|
-
appId:
|
|
8829
|
+
appId: import_lazy_zod17.z.string().min(1),
|
|
8716
8830
|
/** App name for display */
|
|
8717
|
-
appName:
|
|
8831
|
+
appName: import_lazy_zod17.z.string().min(1),
|
|
8718
8832
|
/** Whether the tool is selected by default */
|
|
8719
|
-
defaultSelected:
|
|
8833
|
+
defaultSelected: import_lazy_zod17.z.boolean().default(true),
|
|
8720
8834
|
/** Whether this tool requires specific scopes */
|
|
8721
|
-
requiredScopes:
|
|
8835
|
+
requiredScopes: import_lazy_zod17.z.array(import_lazy_zod17.z.string()).optional(),
|
|
8722
8836
|
/** Category for grouping (e.g., 'read', 'write', 'admin') */
|
|
8723
|
-
category:
|
|
8837
|
+
category: import_lazy_zod17.z.string().optional()
|
|
8724
8838
|
});
|
|
8725
|
-
var consentSelectionSchema =
|
|
8839
|
+
var consentSelectionSchema = import_lazy_zod17.z.object({
|
|
8726
8840
|
/** Selected tool IDs */
|
|
8727
|
-
selectedTools:
|
|
8841
|
+
selectedTools: import_lazy_zod17.z.array(import_lazy_zod17.z.string()),
|
|
8728
8842
|
/** Whether all tools were selected */
|
|
8729
|
-
allSelected:
|
|
8843
|
+
allSelected: import_lazy_zod17.z.boolean(),
|
|
8730
8844
|
/** Timestamp when consent was given */
|
|
8731
|
-
consentedAt:
|
|
8845
|
+
consentedAt: import_lazy_zod17.z.string().datetime(),
|
|
8732
8846
|
/** Consent version for tracking changes */
|
|
8733
|
-
consentVersion:
|
|
8847
|
+
consentVersion: import_lazy_zod17.z.string().default("1.0")
|
|
8734
8848
|
});
|
|
8735
|
-
var consentStateSchema =
|
|
8849
|
+
var consentStateSchema = import_lazy_zod17.z.object({
|
|
8736
8850
|
/** Whether consent flow is enabled */
|
|
8737
|
-
enabled:
|
|
8851
|
+
enabled: import_lazy_zod17.z.boolean(),
|
|
8738
8852
|
/** Available tools for consent */
|
|
8739
|
-
availableTools:
|
|
8853
|
+
availableTools: import_lazy_zod17.z.array(consentToolItemSchema),
|
|
8740
8854
|
/** Pre-selected tools (from previous consent or defaults) */
|
|
8741
|
-
preselectedTools:
|
|
8855
|
+
preselectedTools: import_lazy_zod17.z.array(import_lazy_zod17.z.string()).optional(),
|
|
8742
8856
|
/** Whether to show all tools or group by app */
|
|
8743
|
-
groupByApp:
|
|
8857
|
+
groupByApp: import_lazy_zod17.z.boolean().default(true),
|
|
8744
8858
|
/** Custom consent message */
|
|
8745
|
-
customMessage:
|
|
8859
|
+
customMessage: import_lazy_zod17.z.string().optional()
|
|
8746
8860
|
});
|
|
8747
|
-
var federatedProviderItemSchema =
|
|
8861
|
+
var federatedProviderItemSchema = import_lazy_zod17.z.object({
|
|
8748
8862
|
/** Provider ID (derived or explicit) */
|
|
8749
|
-
id:
|
|
8863
|
+
id: import_lazy_zod17.z.string().min(1),
|
|
8750
8864
|
/** Provider display name */
|
|
8751
|
-
name:
|
|
8865
|
+
name: import_lazy_zod17.z.string().min(1),
|
|
8752
8866
|
/** Provider description */
|
|
8753
|
-
description:
|
|
8867
|
+
description: import_lazy_zod17.z.string().optional(),
|
|
8754
8868
|
/** Provider icon URL or emoji */
|
|
8755
|
-
icon:
|
|
8869
|
+
icon: import_lazy_zod17.z.string().optional(),
|
|
8756
8870
|
/** Provider type */
|
|
8757
|
-
type:
|
|
8871
|
+
type: import_lazy_zod17.z.enum(["local", "remote", "transparent"]),
|
|
8758
8872
|
/** OAuth provider URL (for remote providers) */
|
|
8759
|
-
providerUrl:
|
|
8873
|
+
providerUrl: import_lazy_zod17.z.string().url().optional(),
|
|
8760
8874
|
/** Apps using this provider */
|
|
8761
|
-
appIds:
|
|
8875
|
+
appIds: import_lazy_zod17.z.array(import_lazy_zod17.z.string()),
|
|
8762
8876
|
/** App names using this provider */
|
|
8763
|
-
appNames:
|
|
8877
|
+
appNames: import_lazy_zod17.z.array(import_lazy_zod17.z.string()),
|
|
8764
8878
|
/** Scopes required by this provider */
|
|
8765
|
-
scopes:
|
|
8879
|
+
scopes: import_lazy_zod17.z.array(import_lazy_zod17.z.string()),
|
|
8766
8880
|
/** Whether this is the primary/parent provider */
|
|
8767
|
-
isPrimary:
|
|
8881
|
+
isPrimary: import_lazy_zod17.z.boolean(),
|
|
8768
8882
|
/** Whether this provider is optional (can be skipped) */
|
|
8769
|
-
isOptional:
|
|
8883
|
+
isOptional: import_lazy_zod17.z.boolean().default(false)
|
|
8770
8884
|
});
|
|
8771
|
-
var federatedLoginStateSchema =
|
|
8885
|
+
var federatedLoginStateSchema = import_lazy_zod17.z.object({
|
|
8772
8886
|
/** All available providers */
|
|
8773
|
-
providers:
|
|
8887
|
+
providers: import_lazy_zod17.z.array(federatedProviderItemSchema),
|
|
8774
8888
|
/** Primary provider ID (if any) */
|
|
8775
|
-
primaryProviderId:
|
|
8889
|
+
primaryProviderId: import_lazy_zod17.z.string().optional(),
|
|
8776
8890
|
/** Whether user can skip optional providers */
|
|
8777
|
-
allowSkip:
|
|
8891
|
+
allowSkip: import_lazy_zod17.z.boolean().default(true),
|
|
8778
8892
|
/** Pre-selected provider IDs (from previous session) */
|
|
8779
|
-
preselectedProviders:
|
|
8893
|
+
preselectedProviders: import_lazy_zod17.z.array(import_lazy_zod17.z.string()).optional()
|
|
8780
8894
|
});
|
|
8781
|
-
var federatedSelectionSchema =
|
|
8895
|
+
var federatedSelectionSchema = import_lazy_zod17.z.object({
|
|
8782
8896
|
/** Selected provider IDs */
|
|
8783
|
-
selectedProviders:
|
|
8897
|
+
selectedProviders: import_lazy_zod17.z.array(import_lazy_zod17.z.string()),
|
|
8784
8898
|
/** Skipped provider IDs */
|
|
8785
|
-
skippedProviders:
|
|
8899
|
+
skippedProviders: import_lazy_zod17.z.array(import_lazy_zod17.z.string()),
|
|
8786
8900
|
/** Provider-specific metadata */
|
|
8787
|
-
providerMetadata:
|
|
8901
|
+
providerMetadata: import_lazy_zod17.z.record(import_lazy_zod17.z.string(), import_lazy_zod17.z.unknown()).optional()
|
|
8788
8902
|
});
|
|
8789
8903
|
|
|
8790
8904
|
// libs/auth/src/detection/auth-provider-detection.ts
|
|
8791
|
-
var
|
|
8792
|
-
var detectedAuthProviderSchema =
|
|
8793
|
-
id:
|
|
8794
|
-
providerUrl:
|
|
8795
|
-
mode:
|
|
8796
|
-
appIds:
|
|
8797
|
-
scopes:
|
|
8798
|
-
isParentProvider:
|
|
8905
|
+
var import_lazy_zod18 = require("@frontmcp/lazy-zod");
|
|
8906
|
+
var detectedAuthProviderSchema = import_lazy_zod18.z.object({
|
|
8907
|
+
id: import_lazy_zod18.z.string(),
|
|
8908
|
+
providerUrl: import_lazy_zod18.z.string().optional(),
|
|
8909
|
+
mode: import_lazy_zod18.z.enum(["public", "static", "transparent", "local", "remote"]),
|
|
8910
|
+
appIds: import_lazy_zod18.z.array(import_lazy_zod18.z.string()),
|
|
8911
|
+
scopes: import_lazy_zod18.z.array(import_lazy_zod18.z.string()),
|
|
8912
|
+
isParentProvider: import_lazy_zod18.z.boolean()
|
|
8799
8913
|
});
|
|
8800
|
-
var authProviderDetectionResultSchema =
|
|
8801
|
-
providers:
|
|
8802
|
-
requiresOrchestration:
|
|
8803
|
-
parentProviderId:
|
|
8804
|
-
childProviderIds:
|
|
8805
|
-
uniqueProviderCount:
|
|
8806
|
-
validationErrors:
|
|
8807
|
-
warnings:
|
|
8914
|
+
var authProviderDetectionResultSchema = import_lazy_zod18.z.object({
|
|
8915
|
+
providers: import_lazy_zod18.z.map(import_lazy_zod18.z.string(), detectedAuthProviderSchema),
|
|
8916
|
+
requiresOrchestration: import_lazy_zod18.z.boolean(),
|
|
8917
|
+
parentProviderId: import_lazy_zod18.z.string().optional(),
|
|
8918
|
+
childProviderIds: import_lazy_zod18.z.array(import_lazy_zod18.z.string()),
|
|
8919
|
+
uniqueProviderCount: import_lazy_zod18.z.number(),
|
|
8920
|
+
validationErrors: import_lazy_zod18.z.array(import_lazy_zod18.z.string()),
|
|
8921
|
+
warnings: import_lazy_zod18.z.array(import_lazy_zod18.z.string())
|
|
8808
8922
|
});
|
|
8809
8923
|
function deriveProviderId(options) {
|
|
8810
8924
|
if (isPublicMode(options)) {
|
|
@@ -9193,43 +9307,43 @@ var AudienceValidator = class _AudienceValidator {
|
|
|
9193
9307
|
};
|
|
9194
9308
|
|
|
9195
9309
|
// libs/auth/src/vault/auth-providers.types.ts
|
|
9196
|
-
var
|
|
9197
|
-
var credentialScopeSchema =
|
|
9198
|
-
var loadingStrategySchema =
|
|
9199
|
-
var getCredentialOptionsSchema =
|
|
9200
|
-
forceRefresh:
|
|
9201
|
-
scopes:
|
|
9202
|
-
timeout:
|
|
9310
|
+
var import_lazy_zod19 = require("@frontmcp/lazy-zod");
|
|
9311
|
+
var credentialScopeSchema = import_lazy_zod19.z.enum(["global", "user", "session"]);
|
|
9312
|
+
var loadingStrategySchema = import_lazy_zod19.z.enum(["eager", "lazy"]);
|
|
9313
|
+
var getCredentialOptionsSchema = import_lazy_zod19.z.object({
|
|
9314
|
+
forceRefresh: import_lazy_zod19.z.boolean().optional(),
|
|
9315
|
+
scopes: import_lazy_zod19.z.array(import_lazy_zod19.z.string()).optional(),
|
|
9316
|
+
timeout: import_lazy_zod19.z.number().positive().optional()
|
|
9203
9317
|
}).strict();
|
|
9204
|
-
var credentialProviderConfigSchema =
|
|
9205
|
-
name:
|
|
9206
|
-
description:
|
|
9318
|
+
var credentialProviderConfigSchema = import_lazy_zod19.z.object({
|
|
9319
|
+
name: import_lazy_zod19.z.string().min(1),
|
|
9320
|
+
description: import_lazy_zod19.z.string().optional(),
|
|
9207
9321
|
scope: credentialScopeSchema,
|
|
9208
9322
|
loading: loadingStrategySchema,
|
|
9209
|
-
cacheTtl:
|
|
9323
|
+
cacheTtl: import_lazy_zod19.z.number().nonnegative().optional(),
|
|
9210
9324
|
// Functions validated at runtime, not via Zod (Zod 4 compatibility)
|
|
9211
|
-
factory:
|
|
9212
|
-
refresh:
|
|
9213
|
-
toHeaders:
|
|
9214
|
-
metadata:
|
|
9215
|
-
required:
|
|
9325
|
+
factory: import_lazy_zod19.z.any(),
|
|
9326
|
+
refresh: import_lazy_zod19.z.any().optional(),
|
|
9327
|
+
toHeaders: import_lazy_zod19.z.any().optional(),
|
|
9328
|
+
metadata: import_lazy_zod19.z.record(import_lazy_zod19.z.string(), import_lazy_zod19.z.unknown()).optional(),
|
|
9329
|
+
required: import_lazy_zod19.z.boolean().optional()
|
|
9216
9330
|
}).strict();
|
|
9217
|
-
var authProviderMappingSchema =
|
|
9218
|
-
|
|
9219
|
-
|
|
9220
|
-
name:
|
|
9221
|
-
required:
|
|
9222
|
-
scopes:
|
|
9223
|
-
alias:
|
|
9331
|
+
var authProviderMappingSchema = import_lazy_zod19.z.union([
|
|
9332
|
+
import_lazy_zod19.z.string(),
|
|
9333
|
+
import_lazy_zod19.z.object({
|
|
9334
|
+
name: import_lazy_zod19.z.string().min(1),
|
|
9335
|
+
required: import_lazy_zod19.z.boolean().optional().default(true),
|
|
9336
|
+
scopes: import_lazy_zod19.z.array(import_lazy_zod19.z.string()).optional(),
|
|
9337
|
+
alias: import_lazy_zod19.z.string().optional()
|
|
9224
9338
|
}).strict()
|
|
9225
9339
|
]);
|
|
9226
|
-
var authProvidersVaultOptionsSchema =
|
|
9227
|
-
enabled:
|
|
9228
|
-
useSharedStorage:
|
|
9229
|
-
namespace:
|
|
9230
|
-
defaultCacheTtl:
|
|
9231
|
-
maxCredentialsPerSession:
|
|
9232
|
-
providers:
|
|
9340
|
+
var authProvidersVaultOptionsSchema = import_lazy_zod19.z.object({
|
|
9341
|
+
enabled: import_lazy_zod19.z.boolean().optional(),
|
|
9342
|
+
useSharedStorage: import_lazy_zod19.z.boolean().optional().default(true),
|
|
9343
|
+
namespace: import_lazy_zod19.z.string().optional().default("authproviders:"),
|
|
9344
|
+
defaultCacheTtl: import_lazy_zod19.z.number().nonnegative().optional().default(36e5),
|
|
9345
|
+
maxCredentialsPerSession: import_lazy_zod19.z.number().positive().optional().default(100),
|
|
9346
|
+
providers: import_lazy_zod19.z.array(credentialProviderConfigSchema).optional()
|
|
9233
9347
|
}).strict();
|
|
9234
9348
|
|
|
9235
9349
|
// libs/auth/src/vault/credential-helpers.ts
|
|
@@ -10451,20 +10565,20 @@ function resolveRequiredScopes(denial, mapping, authorities) {
|
|
|
10451
10565
|
}
|
|
10452
10566
|
|
|
10453
10567
|
// libs/auth/src/authorities/authorities.schema.ts
|
|
10454
|
-
var
|
|
10455
|
-
var rbacRolesPolicySchema =
|
|
10456
|
-
all:
|
|
10457
|
-
any:
|
|
10568
|
+
var import_lazy_zod20 = require("@frontmcp/lazy-zod");
|
|
10569
|
+
var rbacRolesPolicySchema = import_lazy_zod20.z.object({
|
|
10570
|
+
all: import_lazy_zod20.z.array(import_lazy_zod20.z.string().min(1)).optional(),
|
|
10571
|
+
any: import_lazy_zod20.z.array(import_lazy_zod20.z.string().min(1)).optional()
|
|
10458
10572
|
}).refine((data) => data.all !== void 0 || data.any !== void 0, {
|
|
10459
10573
|
message: 'Roles policy must have at least "all" or "any"'
|
|
10460
10574
|
});
|
|
10461
|
-
var rbacPermissionsPolicySchema =
|
|
10462
|
-
all:
|
|
10463
|
-
any:
|
|
10575
|
+
var rbacPermissionsPolicySchema = import_lazy_zod20.z.object({
|
|
10576
|
+
all: import_lazy_zod20.z.array(import_lazy_zod20.z.string().min(1)).optional(),
|
|
10577
|
+
any: import_lazy_zod20.z.array(import_lazy_zod20.z.string().min(1)).optional()
|
|
10464
10578
|
}).refine((data) => data.all !== void 0 || data.any !== void 0, {
|
|
10465
10579
|
message: 'Permissions policy must have at least "all" or "any"'
|
|
10466
10580
|
});
|
|
10467
|
-
var abacOperatorSchema =
|
|
10581
|
+
var abacOperatorSchema = import_lazy_zod20.z.enum([
|
|
10468
10582
|
"eq",
|
|
10469
10583
|
"neq",
|
|
10470
10584
|
"in",
|
|
@@ -10479,55 +10593,55 @@ var abacOperatorSchema = import_lazy_zod19.z.enum([
|
|
|
10479
10593
|
"exists",
|
|
10480
10594
|
"matches"
|
|
10481
10595
|
]);
|
|
10482
|
-
var abacConditionSchema =
|
|
10483
|
-
path:
|
|
10596
|
+
var abacConditionSchema = import_lazy_zod20.z.object({
|
|
10597
|
+
path: import_lazy_zod20.z.string().min(1),
|
|
10484
10598
|
op: abacOperatorSchema,
|
|
10485
|
-
value:
|
|
10599
|
+
value: import_lazy_zod20.z.unknown()
|
|
10486
10600
|
});
|
|
10487
|
-
var abacPolicySchema =
|
|
10488
|
-
match:
|
|
10489
|
-
conditions:
|
|
10601
|
+
var abacPolicySchema = import_lazy_zod20.z.object({
|
|
10602
|
+
match: import_lazy_zod20.z.record(import_lazy_zod20.z.string(), import_lazy_zod20.z.unknown()).optional(),
|
|
10603
|
+
conditions: import_lazy_zod20.z.array(abacConditionSchema).optional()
|
|
10490
10604
|
}).refine((data) => data.match !== void 0 || data.conditions !== void 0, {
|
|
10491
10605
|
message: 'Attributes policy must have at least "match" or "conditions"'
|
|
10492
10606
|
});
|
|
10493
|
-
var resourceIdRefSchema =
|
|
10494
|
-
|
|
10495
|
-
|
|
10496
|
-
|
|
10607
|
+
var resourceIdRefSchema = import_lazy_zod20.z.union([
|
|
10608
|
+
import_lazy_zod20.z.string().min(1),
|
|
10609
|
+
import_lazy_zod20.z.object({ fromInput: import_lazy_zod20.z.string().min(1) }).strict(),
|
|
10610
|
+
import_lazy_zod20.z.object({ fromClaims: import_lazy_zod20.z.string().min(1) }).strict()
|
|
10497
10611
|
]);
|
|
10498
|
-
var rebacPolicySchema =
|
|
10499
|
-
type:
|
|
10500
|
-
resource:
|
|
10612
|
+
var rebacPolicySchema = import_lazy_zod20.z.object({
|
|
10613
|
+
type: import_lazy_zod20.z.string().min(1),
|
|
10614
|
+
resource: import_lazy_zod20.z.string().min(1),
|
|
10501
10615
|
resourceId: resourceIdRefSchema
|
|
10502
10616
|
});
|
|
10503
10617
|
var basePolicyShape = {
|
|
10504
10618
|
roles: rbacRolesPolicySchema.optional(),
|
|
10505
10619
|
permissions: rbacPermissionsPolicySchema.optional(),
|
|
10506
10620
|
attributes: abacPolicySchema.optional(),
|
|
10507
|
-
relationships:
|
|
10508
|
-
custom:
|
|
10509
|
-
guards:
|
|
10510
|
-
operator:
|
|
10621
|
+
relationships: import_lazy_zod20.z.union([rebacPolicySchema, import_lazy_zod20.z.array(rebacPolicySchema)]).optional(),
|
|
10622
|
+
custom: import_lazy_zod20.z.record(import_lazy_zod20.z.string(), import_lazy_zod20.z.unknown()).optional(),
|
|
10623
|
+
guards: import_lazy_zod20.z.array(import_lazy_zod20.z.instanceof(Function)).optional(),
|
|
10624
|
+
operator: import_lazy_zod20.z.enum(["AND", "OR"]).optional()
|
|
10511
10625
|
};
|
|
10512
|
-
var authoritiesPolicySchema =
|
|
10513
|
-
() =>
|
|
10626
|
+
var authoritiesPolicySchema = import_lazy_zod20.z.lazy(
|
|
10627
|
+
() => import_lazy_zod20.z.object({
|
|
10514
10628
|
...basePolicyShape,
|
|
10515
10629
|
not: authoritiesPolicySchema.optional(),
|
|
10516
|
-
anyOf:
|
|
10517
|
-
allOf:
|
|
10630
|
+
anyOf: import_lazy_zod20.z.array(authoritiesPolicySchema).optional(),
|
|
10631
|
+
allOf: import_lazy_zod20.z.array(authoritiesPolicySchema).optional()
|
|
10518
10632
|
})
|
|
10519
10633
|
);
|
|
10520
|
-
var authoritiesMetadataSchema =
|
|
10521
|
-
|
|
10522
|
-
|
|
10634
|
+
var authoritiesMetadataSchema = import_lazy_zod20.z.union([
|
|
10635
|
+
import_lazy_zod20.z.string().min(1),
|
|
10636
|
+
import_lazy_zod20.z.array(import_lazy_zod20.z.string().min(1)).min(1),
|
|
10523
10637
|
authoritiesPolicySchema
|
|
10524
10638
|
]);
|
|
10525
|
-
var authoritiesClaimsMappingSchema =
|
|
10639
|
+
var authoritiesClaimsMappingSchema = import_lazy_zod20.z.record(import_lazy_zod20.z.string(), import_lazy_zod20.z.string().optional()).refine((data) => Object.values(data).some((v) => v !== void 0), {
|
|
10526
10640
|
message: "Claims mapping must have at least one mapping"
|
|
10527
10641
|
});
|
|
10528
|
-
var authoritiesConfigSchema =
|
|
10642
|
+
var authoritiesConfigSchema = import_lazy_zod20.z.object({
|
|
10529
10643
|
claimsMapping: authoritiesClaimsMappingSchema.optional(),
|
|
10530
|
-
profiles:
|
|
10644
|
+
profiles: import_lazy_zod20.z.record(import_lazy_zod20.z.string().min(1), authoritiesPolicySchema).optional()
|
|
10531
10645
|
});
|
|
10532
10646
|
|
|
10533
10647
|
// libs/auth/src/authorities/authorities.evaluator.ts
|
|
@@ -11231,6 +11345,8 @@ var FetchCredentialMiddleware = class {
|
|
|
11231
11345
|
InMemoryStoreRequiredError,
|
|
11232
11346
|
InvalidClientIdUrlError,
|
|
11233
11347
|
JwksService,
|
|
11348
|
+
JwtSecretRequiredError,
|
|
11349
|
+
JwtSecretWeakError,
|
|
11234
11350
|
LazyCredentialLoader,
|
|
11235
11351
|
NoProviderIdError,
|
|
11236
11352
|
NullOrchestratedAuthAccessor,
|
|
@@ -11401,6 +11517,7 @@ var FetchCredentialMiddleware = class {
|
|
|
11401
11517
|
isSoonExpiring,
|
|
11402
11518
|
isSoonExpiringProvider,
|
|
11403
11519
|
isSqliteTokenStorage,
|
|
11520
|
+
isStaticMode,
|
|
11404
11521
|
isTransparentMode,
|
|
11405
11522
|
jsonWebKeySetSchema,
|
|
11406
11523
|
jwkParametersSchema,
|
|
@@ -11460,6 +11577,7 @@ var FetchCredentialMiddleware = class {
|
|
|
11460
11577
|
startNextProvider,
|
|
11461
11578
|
statefulHttpTransportStateSchema,
|
|
11462
11579
|
statelessHttpTransportStateSchema,
|
|
11580
|
+
staticAuthOptionsSchema,
|
|
11463
11581
|
storedSessionSchema,
|
|
11464
11582
|
streamableHttpTransportStateSchema,
|
|
11465
11583
|
toEpochSeconds,
|