@zuplo/cli 6.72.2 → 6.72.3

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.
Files changed (22) hide show
  1. package/node_modules/@zuplo/core/package.json +1 -1
  2. package/node_modules/@zuplo/graphql/package.json +1 -1
  3. package/node_modules/@zuplo/openapi-tools/package.json +1 -1
  4. package/node_modules/@zuplo/otel/package.json +1 -1
  5. package/node_modules/@zuplo/runtime/out/esm/chunk-423FXHUV.js +399 -0
  6. package/node_modules/@zuplo/runtime/out/esm/chunk-423FXHUV.js.map +1 -0
  7. package/node_modules/@zuplo/runtime/out/esm/chunk-GBIUQ4JJ.js +30 -0
  8. package/node_modules/@zuplo/runtime/out/esm/chunk-GBIUQ4JJ.js.map +1 -0
  9. package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
  10. package/node_modules/@zuplo/runtime/out/esm/index.js.map +1 -1
  11. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
  12. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js.map +1 -1
  13. package/node_modules/@zuplo/runtime/out/esm/sdks/aws/index.js +26 -0
  14. package/node_modules/@zuplo/runtime/out/esm/sdks/aws/index.js.map +1 -0
  15. package/node_modules/@zuplo/runtime/out/types/index.d.ts +1421 -129
  16. package/node_modules/@zuplo/runtime/out/types/mcp-gateway/index.d.ts +1370 -152
  17. package/node_modules/@zuplo/runtime/out/types/sdks/aws/index.d.ts +2281 -0
  18. package/node_modules/@zuplo/runtime/package.json +5 -1
  19. package/package.json +6 -6
  20. package/node_modules/@zuplo/runtime/out/esm/chunk-IC7XGD5C.js +0 -403
  21. package/node_modules/@zuplo/runtime/out/esm/chunk-IC7XGD5C.js.map +0 -1
  22. /package/node_modules/@zuplo/runtime/out/esm/{chunk-IC7XGD5C.js.LEGAL.txt → chunk-423FXHUV.js.LEGAL.txt} +0 -0
@@ -575,6 +575,52 @@ declare type HttpStatusCodeRangeDefinition =
575
575
  | "4XX"
576
576
  | "5XX";
577
577
 
578
+ /**
579
+ * Client authentication used at the token endpoint.
580
+ * @public
581
+ */
582
+ declare type IdJagClientAuth =
583
+ | {
584
+ method: "client_secret_post";
585
+ clientId: string;
586
+ /**
587
+ * OAuth client secret. Use `$env(VAR_NAME)` to source from an environment variable.
588
+ */
589
+ clientSecret: string;
590
+ }
591
+ | {
592
+ method: "client_secret_basic";
593
+ clientId: string;
594
+ /**
595
+ * OAuth client secret. Use `$env(VAR_NAME)` to source from an environment variable.
596
+ */
597
+ clientSecret: string;
598
+ }
599
+ | {
600
+ method: "private_key_jwt";
601
+ clientId: string;
602
+ /**
603
+ * PEM-encoded private key used to sign the client assertion. Use `$env(VAR_NAME)` to source from an environment variable.
604
+ */
605
+ privateKeyPem: string;
606
+ /**
607
+ * JWS algorithm used to sign the client assertion.
608
+ */
609
+ algorithm?: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512";
610
+ /**
611
+ * Optional `kid` header set on the client assertion, for providers that select the verification key by key id.
612
+ */
613
+ keyId?: string;
614
+ /**
615
+ * Optional override for the client assertion `aud` claim. Defaults to the token endpoint URL.
616
+ */
617
+ audience?: string;
618
+ /**
619
+ * Client assertion lifetime in seconds.
620
+ */
621
+ expiresInSeconds?: number;
622
+ };
623
+
578
624
  /**
579
625
  * A policy that can modify the incoming HTTP request before it is sent to
580
626
  * the handler. If a response is returned, the request is short-circuited and
@@ -1107,20 +1153,20 @@ export declare interface McpAuth0OAuthInboundPolicyOptions {
1107
1153
  */
1108
1154
  enabled: true;
1109
1155
  /**
1110
- * Trusted ID-JAG issuers. These values are never published in OAuth metadata.
1156
+ * Trusted ID-JAG issuers. These values are never published in OAuth metadata. Omit to trust this policy's browser-login IdP.
1111
1157
  *
1112
1158
  * @minItems 1
1113
1159
  */
1114
- trustedIssuers: [
1160
+ trustedIssuers?: [
1115
1161
  {
1116
1162
  /**
1117
- * Exact issuer URL expected in the ID-JAG iss claim.
1163
+ * Exact issuer URL expected in the ID-JAG iss claim. Provide together with jwksUrl, or omit both to default to this policy's browser-login IdP.
1118
1164
  */
1119
- issuer: string;
1165
+ issuer?: string;
1120
1166
  /**
1121
- * JWKS URL used to verify ID-JAG signatures from this issuer.
1167
+ * JWKS URL used to verify ID-JAG signatures from this issuer. Provide together with issuer, or omit both to default to this policy's browser-login IdP.
1122
1168
  */
1123
- jwksUrl: string;
1169
+ jwksUrl?: string;
1124
1170
  /**
1125
1171
  * Optional allow-list of client IDs accepted from this issuer. The ID-JAG client_id must still match the authenticated token-endpoint client.
1126
1172
  */
@@ -1132,13 +1178,13 @@ export declare interface McpAuth0OAuthInboundPolicyOptions {
1132
1178
  },
1133
1179
  ...{
1134
1180
  /**
1135
- * Exact issuer URL expected in the ID-JAG iss claim.
1181
+ * Exact issuer URL expected in the ID-JAG iss claim. Provide together with jwksUrl, or omit both to default to this policy's browser-login IdP.
1136
1182
  */
1137
- issuer: string;
1183
+ issuer?: string;
1138
1184
  /**
1139
- * JWKS URL used to verify ID-JAG signatures from this issuer.
1185
+ * JWKS URL used to verify ID-JAG signatures from this issuer. Provide together with issuer, or omit both to default to this policy's browser-login IdP.
1140
1186
  */
1141
- jwksUrl: string;
1187
+ jwksUrl?: string;
1142
1188
  /**
1143
1189
  * Optional allow-list of client IDs accepted from this issuer. The ID-JAG client_id must still match the authenticated token-endpoint client.
1144
1190
  */
@@ -1404,7 +1450,7 @@ export declare type McpCapabilityResolver = (
1404
1450
  * @public
1405
1451
  * @product mcp-gateway
1406
1452
  */
1407
- export declare class McpClerkOAuthInboundPolicy extends InboundPolicy<McpClerkOAuthInboundPolicyOptions> {
1453
+ export declare class McpClerkOAuthInboundPolicy extends InboundPolicy<ValidatedClerkOAuthOptions> {
1408
1454
  #private;
1409
1455
  static readonly policyType = "mcp-clerk-oauth";
1410
1456
  constructor(rawOptions: unknown, policyName: string);
@@ -1452,6 +1498,69 @@ export declare interface McpClerkOAuthInboundPolicyOptions {
1452
1498
  */
1453
1499
  cimdEnabled?: boolean;
1454
1500
  };
1501
+ /**
1502
+ * Optional Identity Assertion JWT Authorization Grant (ID-JAG / XAA) support for the gateway token endpoint.
1503
+ */
1504
+ idJag?:
1505
+ | {
1506
+ /**
1507
+ * Disable ID-JAG support.
1508
+ */
1509
+ enabled: false;
1510
+ }
1511
+ | {
1512
+ /**
1513
+ * Enable ID-JAG support.
1514
+ */
1515
+ enabled: true;
1516
+ /**
1517
+ * Trusted ID-JAG issuers. These values are never published in OAuth metadata. Omit to trust this policy's browser-login IdP.
1518
+ *
1519
+ * @minItems 1
1520
+ */
1521
+ trustedIssuers?: [
1522
+ {
1523
+ /**
1524
+ * Exact issuer URL expected in the ID-JAG iss claim. Provide together with jwksUrl, or omit both to default to this policy's browser-login IdP.
1525
+ */
1526
+ issuer?: string;
1527
+ /**
1528
+ * JWKS URL used to verify ID-JAG signatures from this issuer. Provide together with issuer, or omit both to default to this policy's browser-login IdP.
1529
+ */
1530
+ jwksUrl?: string;
1531
+ /**
1532
+ * Optional allow-list of client IDs accepted from this issuer. The ID-JAG client_id must still match the authenticated token-endpoint client.
1533
+ */
1534
+ expectedClientIds?: string[];
1535
+ /**
1536
+ * How the ID-JAG subject is mapped into the gateway subject ID.
1537
+ */
1538
+ subjectMapping?: "iss_prefix" | "iss_tenant_prefix" | "sub_id_only";
1539
+ },
1540
+ ...{
1541
+ /**
1542
+ * Exact issuer URL expected in the ID-JAG iss claim. Provide together with jwksUrl, or omit both to default to this policy's browser-login IdP.
1543
+ */
1544
+ issuer?: string;
1545
+ /**
1546
+ * JWKS URL used to verify ID-JAG signatures from this issuer. Provide together with issuer, or omit both to default to this policy's browser-login IdP.
1547
+ */
1548
+ jwksUrl?: string;
1549
+ /**
1550
+ * Optional allow-list of client IDs accepted from this issuer. The ID-JAG client_id must still match the authenticated token-endpoint client.
1551
+ */
1552
+ expectedClientIds?: string[];
1553
+ /**
1554
+ * How the ID-JAG subject is mapped into the gateway subject ID.
1555
+ */
1556
+ subjectMapping?: "iss_prefix" | "iss_tenant_prefix" | "sub_id_only";
1557
+ }[],
1558
+ ];
1559
+ /**
1560
+ * Optional allow-list of RFC 9396 authorization_details type values accepted from ID-JAGs.
1561
+ */
1562
+ authorizationDetailsTypesAllowed?: string[];
1563
+ };
1455
1564
  /**
1456
1565
  * Optional overrides for the derived browser-login settings.
1457
1566
  */
@@ -1462,6 +1571,37 @@ export declare interface McpClerkOAuthInboundPolicyOptions {
1462
1571
  };
1463
1572
  }
1464
1573
 
1574
+ declare const mcpClerkOAuthOptionsSchema: z.ZodObject<
1575
+ {
1576
+ frontendApiUrl: z.ZodString;
1577
+ clientId: z.ZodString;
1578
+ clientSecret: z.ZodString;
1579
+ scope: z.ZodOptional<z.ZodString>;
1580
+ gateway: z.ZodOptional<
1581
+ z.ZodObject<
1582
+ {
1583
+ accessTokenTtlSeconds: z.ZodOptional<z.ZodNumber>;
1584
+ refreshTokenTtlSeconds: z.ZodOptional<z.ZodNumber>;
1585
+ cimdEnabled: z.ZodOptional<z.ZodBoolean>;
1586
+ },
1587
+ z.core.$strict
1588
+ >
1589
+ >;
1590
+ idJag: z.ZodOptional<z.ZodUnknown>;
1591
+ browserLoginOverrides: z.ZodOptional<
1592
+ z.ZodObject<
1593
+ {
1594
+ remoteTimeoutMs: z.ZodOptional<z.ZodNumber>;
1595
+ stateTtlSeconds: z.ZodOptional<z.ZodNumber>;
1596
+ sessionTtlSeconds: z.ZodOptional<z.ZodNumber>;
1597
+ },
1598
+ z.core.$strict
1599
+ >
1600
+ >;
1601
+ },
1602
+ z.core.$strict
1603
+ >;
1604
+
1465
1605
  /**
1466
1606
  * Authenticate MCP gateway requests using a gateway-issued OAuth access token,
1467
1607
  * with browser login delegated to Amazon Cognito.
@@ -1475,7 +1615,7 @@ export declare interface McpClerkOAuthInboundPolicyOptions {
1475
1615
  * @public
1476
1616
  * @product mcp-gateway
1477
1617
  */
1478
- export declare class McpCognitoOAuthInboundPolicy extends InboundPolicy<McpCognitoOAuthInboundPolicyOptions> {
1618
+ export declare class McpCognitoOAuthInboundPolicy extends InboundPolicy<ValidatedCognitoOAuthOptions> {
1479
1619
  #private;
1480
1620
  static readonly policyType = "mcp-cognito-oauth";
1481
1621
  constructor(rawOptions: unknown, policyName: string);
@@ -1531,6 +1671,69 @@ export declare interface McpCognitoOAuthInboundPolicyOptions {
1531
1671
  */
1532
1672
  cimdEnabled?: boolean;
1533
1673
  };
1674
+ /**
1675
+ * Optional Identity Assertion JWT Authorization Grant (ID-JAG / XAA) support for the gateway token endpoint.
1676
+ */
1677
+ idJag?:
1678
+ | {
1679
+ /**
1680
+ * Disable ID-JAG support.
1681
+ */
1682
+ enabled: false;
1683
+ }
1684
+ | {
1685
+ /**
1686
+ * Enable ID-JAG support.
1687
+ */
1688
+ enabled: true;
1689
+ /**
1690
+ * Trusted ID-JAG issuers. These values are never published in OAuth metadata. Omit to trust this policy's browser-login IdP.
1691
+ *
1692
+ * @minItems 1
1693
+ */
1694
+ trustedIssuers?: [
1695
+ {
1696
+ /**
1697
+ * Exact issuer URL expected in the ID-JAG iss claim. Provide together with jwksUrl, or omit both to default to this policy's browser-login IdP.
1698
+ */
1699
+ issuer?: string;
1700
+ /**
1701
+ * JWKS URL used to verify ID-JAG signatures from this issuer. Provide together with issuer, or omit both to default to this policy's browser-login IdP.
1702
+ */
1703
+ jwksUrl?: string;
1704
+ /**
1705
+ * Optional allow-list of client IDs accepted from this issuer. The ID-JAG client_id must still match the authenticated token-endpoint client.
1706
+ */
1707
+ expectedClientIds?: string[];
1708
+ /**
1709
+ * How the ID-JAG subject is mapped into the gateway subject ID.
1710
+ */
1711
+ subjectMapping?: "iss_prefix" | "iss_tenant_prefix" | "sub_id_only";
1712
+ },
1713
+ ...{
1714
+ /**
1715
+ * Exact issuer URL expected in the ID-JAG iss claim. Provide together with jwksUrl, or omit both to default to this policy's browser-login IdP.
1716
+ */
1717
+ issuer?: string;
1718
+ /**
1719
+ * JWKS URL used to verify ID-JAG signatures from this issuer. Provide together with issuer, or omit both to default to this policy's browser-login IdP.
1720
+ */
1721
+ jwksUrl?: string;
1722
+ /**
1723
+ * Optional allow-list of client IDs accepted from this issuer. The ID-JAG client_id must still match the authenticated token-endpoint client.
1724
+ */
1725
+ expectedClientIds?: string[];
1726
+ /**
1727
+ * How the ID-JAG subject is mapped into the gateway subject ID.
1728
+ */
1729
+ subjectMapping?: "iss_prefix" | "iss_tenant_prefix" | "sub_id_only";
1730
+ }[],
1731
+ ];
1732
+ /**
1733
+ * Optional allow-list of RFC 9396 authorization_details type values accepted from ID-JAGs.
1734
+ */
1735
+ authorizationDetailsTypesAllowed?: string[];
1736
+ };
1534
1737
  /**
1535
1738
  * Optional overrides for the derived browser-login settings.
1536
1739
  */
@@ -1545,6 +1748,45 @@ export declare interface McpCognitoOAuthInboundPolicyOptions {
1545
1748
  };
1546
1749
  }
1547
1750
 
1751
+ declare const mcpCognitoOAuthOptionsSchema: z.ZodObject<
1752
+ {
1753
+ awsRegion: z.ZodString;
1754
+ userPoolId: z.ZodString;
1755
+ userPoolDomain: z.ZodString;
1756
+ clientId: z.ZodString;
1757
+ clientSecret: z.ZodString;
1758
+ scope: z.ZodOptional<z.ZodString>;
1759
+ gateway: z.ZodOptional<
1760
+ z.ZodObject<
1761
+ {
1762
+ accessTokenTtlSeconds: z.ZodOptional<z.ZodNumber>;
1763
+ refreshTokenTtlSeconds: z.ZodOptional<z.ZodNumber>;
1764
+ cimdEnabled: z.ZodOptional<z.ZodBoolean>;
1765
+ },
1766
+ z.core.$strict
1767
+ >
1768
+ >;
1769
+ idJag: z.ZodOptional<z.ZodUnknown>;
1770
+ browserLoginOverrides: z.ZodOptional<
1771
+ z.ZodObject<
1772
+ {
1773
+ remoteTimeoutMs: z.ZodOptional<z.ZodNumber>;
1774
+ stateTtlSeconds: z.ZodOptional<z.ZodNumber>;
1775
+ sessionTtlSeconds: z.ZodOptional<z.ZodNumber>;
1776
+ pkce: z.ZodOptional<
1777
+ z.ZodEnum<{
1778
+ none: "none";
1779
+ S256: "S256";
1780
+ }>
1781
+ >;
1782
+ },
1783
+ z.core.$strict
1784
+ >
1785
+ >;
1786
+ },
1787
+ z.core.$strict
1788
+ >;
1789
+
1548
1790
  /**
1549
1791
  * Authenticate MCP gateway requests using a gateway-issued OAuth access token,
1550
1792
  * with browser login delegated to Microsoft Entra ID.
@@ -1557,7 +1799,7 @@ export declare interface McpCognitoOAuthInboundPolicyOptions {
1557
1799
  * @public
1558
1800
  * @product mcp-gateway
1559
1801
  */
1560
- export declare class McpEntraOAuthInboundPolicy extends InboundPolicy<McpEntraOAuthInboundPolicyOptions> {
1802
+ export declare class McpEntraOAuthInboundPolicy extends InboundPolicy<ValidatedEntraOAuthOptions> {
1561
1803
  #private;
1562
1804
  static readonly policyType = "mcp-entra-oauth";
1563
1805
  constructor(rawOptions: unknown, policyName: string);
@@ -1605,6 +1847,69 @@ export declare interface McpEntraOAuthInboundPolicyOptions {
1605
1847
  */
1606
1848
  cimdEnabled?: boolean;
1607
1849
  };
1850
+ /**
1851
+ * Optional Identity Assertion JWT Authorization Grant (ID-JAG / XAA) support for the gateway token endpoint.
1852
+ */
1853
+ idJag?:
1854
+ | {
1855
+ /**
1856
+ * Disable ID-JAG support.
1857
+ */
1858
+ enabled: false;
1859
+ }
1860
+ | {
1861
+ /**
1862
+ * Enable ID-JAG support.
1863
+ */
1864
+ enabled: true;
1865
+ /**
1866
+ * Trusted ID-JAG issuers. These values are never published in OAuth metadata. Omit to trust this policy's browser-login IdP.
1867
+ *
1868
+ * @minItems 1
1869
+ */
1870
+ trustedIssuers?: [
1871
+ {
1872
+ /**
1873
+ * Exact issuer URL expected in the ID-JAG iss claim. Provide together with jwksUrl, or omit both to default to this policy's browser-login IdP.
1874
+ */
1875
+ issuer?: string;
1876
+ /**
1877
+ * JWKS URL used to verify ID-JAG signatures from this issuer. Provide together with issuer, or omit both to default to this policy's browser-login IdP.
1878
+ */
1879
+ jwksUrl?: string;
1880
+ /**
1881
+ * Optional allow-list of client IDs accepted from this issuer. The ID-JAG client_id must still match the authenticated token-endpoint client.
1882
+ */
1883
+ expectedClientIds?: string[];
1884
+ /**
1885
+ * How the ID-JAG subject is mapped into the gateway subject ID.
1886
+ */
1887
+ subjectMapping?: "iss_prefix" | "iss_tenant_prefix" | "sub_id_only";
1888
+ },
1889
+ ...{
1890
+ /**
1891
+ * Exact issuer URL expected in the ID-JAG iss claim. Provide together with jwksUrl, or omit both to default to this policy's browser-login IdP.
1892
+ */
1893
+ issuer?: string;
1894
+ /**
1895
+ * JWKS URL used to verify ID-JAG signatures from this issuer. Provide together with issuer, or omit both to default to this policy's browser-login IdP.
1896
+ */
1897
+ jwksUrl?: string;
1898
+ /**
1899
+ * Optional allow-list of client IDs accepted from this issuer. The ID-JAG client_id must still match the authenticated token-endpoint client.
1900
+ */
1901
+ expectedClientIds?: string[];
1902
+ /**
1903
+ * How the ID-JAG subject is mapped into the gateway subject ID.
1904
+ */
1905
+ subjectMapping?: "iss_prefix" | "iss_tenant_prefix" | "sub_id_only";
1906
+ }[],
1907
+ ];
1908
+ /**
1909
+ * Optional allow-list of RFC 9396 authorization_details type values accepted from ID-JAGs.
1910
+ */
1911
+ authorizationDetailsTypesAllowed?: string[];
1912
+ };
1608
1913
  /**
1609
1914
  * Optional overrides for the derived browser-login settings.
1610
1915
  */
@@ -1619,32 +1924,69 @@ export declare interface McpEntraOAuthInboundPolicyOptions {
1619
1924
  };
1620
1925
  }
1621
1926
 
1622
- /**
1623
- * Activates the MCP Gateway internal routes (OAuth authorization server,
1624
- * upstream connection management, well-known metadata) on the runtime router.
1625
- * When no MCP-related policy is present the plugin registers no routes; it
1626
- * still records `plugin.mcp-gateway` feature usage on construction so gateway
1627
- * adoption is visible in telemetry regardless of route configuration.
1628
- *
1629
- * Importing from `@zuplo/runtime/mcp-gateway` is the opt-in: the runtime core
1630
- * does not statically reference any MCP gateway code, so unrelated projects
1631
- * pay no bundle cost.
1632
- *
1633
- * @beta
1634
- * @example
1635
- * ```ts
1636
- * import { McpGatewayPlugin } from "@zuplo/runtime/mcp-gateway";
1637
- *
1638
- * export default async function (runtime: RuntimeExtensions) {
1639
- * runtime.addPlugin(new McpGatewayPlugin());
1640
- * }
1641
- * ```
1642
- */
1643
- export declare class McpGatewayPlugin extends SystemRuntimePlugin {
1644
- #private;
1645
- constructor(options?: McpGatewayPluginOptions);
1646
- registerRoutes(options: {
1647
- router: Router;
1927
+ declare const mcpEntraOAuthOptionsSchema: z.ZodObject<
1928
+ {
1929
+ tenantId: z.ZodString;
1930
+ clientId: z.ZodString;
1931
+ clientSecret: z.ZodString;
1932
+ scope: z.ZodOptional<z.ZodString>;
1933
+ gateway: z.ZodOptional<
1934
+ z.ZodObject<
1935
+ {
1936
+ accessTokenTtlSeconds: z.ZodOptional<z.ZodNumber>;
1937
+ refreshTokenTtlSeconds: z.ZodOptional<z.ZodNumber>;
1938
+ cimdEnabled: z.ZodOptional<z.ZodBoolean>;
1939
+ },
1940
+ z.core.$strict
1941
+ >
1942
+ >;
1943
+ idJag: z.ZodOptional<z.ZodUnknown>;
1944
+ browserLoginOverrides: z.ZodOptional<
1945
+ z.ZodObject<
1946
+ {
1947
+ remoteTimeoutMs: z.ZodOptional<z.ZodNumber>;
1948
+ stateTtlSeconds: z.ZodOptional<z.ZodNumber>;
1949
+ sessionTtlSeconds: z.ZodOptional<z.ZodNumber>;
1950
+ pkce: z.ZodOptional<
1951
+ z.ZodEnum<{
1952
+ none: "none";
1953
+ S256: "S256";
1954
+ }>
1955
+ >;
1956
+ },
1957
+ z.core.$strict
1958
+ >
1959
+ >;
1960
+ },
1961
+ z.core.$strict
1962
+ >;
1963
+
1964
+ /**
1965
+ * Activates the MCP Gateway internal routes (OAuth authorization server,
1966
+ * upstream connection management, well-known metadata) on the runtime router.
1967
+ * When no MCP-related policy is present the plugin registers no routes; it
1968
+ * still records `plugin.mcp-gateway` feature usage on construction so gateway
1969
+ * adoption is visible in telemetry regardless of route configuration.
1970
+ *
1971
+ * Importing from `@zuplo/runtime/mcp-gateway` is the opt-in: the runtime core
1972
+ * does not statically reference any MCP gateway code, so unrelated projects
1973
+ * pay no bundle cost.
1974
+ *
1975
+ * @beta
1976
+ * @example
1977
+ * ```ts
1978
+ * import { McpGatewayPlugin } from "@zuplo/runtime/mcp-gateway";
1979
+ *
1980
+ * export default async function (runtime: RuntimeExtensions) {
1981
+ * runtime.addPlugin(new McpGatewayPlugin());
1982
+ * }
1983
+ * ```
1984
+ */
1985
+ export declare class McpGatewayPlugin extends SystemRuntimePlugin {
1986
+ #private;
1987
+ constructor(options?: McpGatewayPluginOptions);
1988
+ registerRoutes(options: {
1989
+ router: Router;
1648
1990
  runtimeSettings: RuntimeSettings;
1649
1991
  parsedRouteData?: ParsedRouteData;
1650
1992
  }): void;
@@ -1689,7 +2031,7 @@ export declare interface McpGatewayPluginOptions {
1689
2031
  * @public
1690
2032
  * @product mcp-gateway
1691
2033
  */
1692
- export declare class McpGoogleOAuthInboundPolicy extends InboundPolicy<McpGoogleOAuthInboundPolicyOptions> {
2034
+ export declare class McpGoogleOAuthInboundPolicy extends InboundPolicy<ValidatedGoogleOAuthOptions> {
1693
2035
  #private;
1694
2036
  static readonly policyType = "mcp-google-oauth";
1695
2037
  constructor(rawOptions: unknown, policyName: string);
@@ -1733,6 +2075,69 @@ export declare interface McpGoogleOAuthInboundPolicyOptions {
1733
2075
  */
1734
2076
  cimdEnabled?: boolean;
1735
2077
  };
2078
+ /**
2079
+ * Optional Identity Assertion JWT Authorization Grant (ID-JAG / XAA) support for the gateway token endpoint.
2080
+ */
2081
+ idJag?:
2082
+ | {
2083
+ /**
2084
+ * Disable ID-JAG support.
2085
+ */
2086
+ enabled: false;
2087
+ }
2088
+ | {
2089
+ /**
2090
+ * Enable ID-JAG support.
2091
+ */
2092
+ enabled: true;
2093
+ /**
2094
+ * Trusted ID-JAG issuers. These values are never published in OAuth metadata. Omit to trust this policy's browser-login IdP.
2095
+ *
2096
+ * @minItems 1
2097
+ */
2098
+ trustedIssuers?: [
2099
+ {
2100
+ /**
2101
+ * Exact issuer URL expected in the ID-JAG iss claim. Provide together with jwksUrl, or omit both to default to this policy's browser-login IdP.
2102
+ */
2103
+ issuer?: string;
2104
+ /**
2105
+ * JWKS URL used to verify ID-JAG signatures from this issuer. Provide together with issuer, or omit both to default to this policy's browser-login IdP.
2106
+ */
2107
+ jwksUrl?: string;
2108
+ /**
2109
+ * Optional allow-list of client IDs accepted from this issuer. The ID-JAG client_id must still match the authenticated token-endpoint client.
2110
+ */
2111
+ expectedClientIds?: string[];
2112
+ /**
2113
+ * How the ID-JAG subject is mapped into the gateway subject ID.
2114
+ */
2115
+ subjectMapping?: "iss_prefix" | "iss_tenant_prefix" | "sub_id_only";
2116
+ },
2117
+ ...{
2118
+ /**
2119
+ * Exact issuer URL expected in the ID-JAG iss claim. Provide together with jwksUrl, or omit both to default to this policy's browser-login IdP.
2120
+ */
2121
+ issuer?: string;
2122
+ /**
2123
+ * JWKS URL used to verify ID-JAG signatures from this issuer. Provide together with issuer, or omit both to default to this policy's browser-login IdP.
2124
+ */
2125
+ jwksUrl?: string;
2126
+ /**
2127
+ * Optional allow-list of client IDs accepted from this issuer. The ID-JAG client_id must still match the authenticated token-endpoint client.
2128
+ */
2129
+ expectedClientIds?: string[];
2130
+ /**
2131
+ * How the ID-JAG subject is mapped into the gateway subject ID.
2132
+ */
2133
+ subjectMapping?: "iss_prefix" | "iss_tenant_prefix" | "sub_id_only";
2134
+ }[],
2135
+ ];
2136
+ /**
2137
+ * Optional allow-list of RFC 9396 authorization_details type values accepted from ID-JAGs.
2138
+ */
2139
+ authorizationDetailsTypesAllowed?: string[];
2140
+ };
1736
2141
  /**
1737
2142
  * Optional overrides for the derived browser-login settings.
1738
2143
  */
@@ -1747,6 +2152,42 @@ export declare interface McpGoogleOAuthInboundPolicyOptions {
1747
2152
  };
1748
2153
  }
1749
2154
 
2155
+ declare const mcpGoogleOAuthOptionsSchema: z.ZodObject<
2156
+ {
2157
+ clientId: z.ZodString;
2158
+ clientSecret: z.ZodString;
2159
+ scope: z.ZodOptional<z.ZodString>;
2160
+ gateway: z.ZodOptional<
2161
+ z.ZodObject<
2162
+ {
2163
+ accessTokenTtlSeconds: z.ZodOptional<z.ZodNumber>;
2164
+ refreshTokenTtlSeconds: z.ZodOptional<z.ZodNumber>;
2165
+ cimdEnabled: z.ZodOptional<z.ZodBoolean>;
2166
+ },
2167
+ z.core.$strict
2168
+ >
2169
+ >;
2170
+ idJag: z.ZodOptional<z.ZodUnknown>;
2171
+ browserLoginOverrides: z.ZodOptional<
2172
+ z.ZodObject<
2173
+ {
2174
+ remoteTimeoutMs: z.ZodOptional<z.ZodNumber>;
2175
+ stateTtlSeconds: z.ZodOptional<z.ZodNumber>;
2176
+ sessionTtlSeconds: z.ZodOptional<z.ZodNumber>;
2177
+ pkce: z.ZodOptional<
2178
+ z.ZodEnum<{
2179
+ none: "none";
2180
+ S256: "S256";
2181
+ }>
2182
+ >;
2183
+ },
2184
+ z.core.$strict
2185
+ >
2186
+ >;
2187
+ },
2188
+ z.core.$strict
2189
+ >;
2190
+
1750
2191
  /**
1751
2192
  * Authenticate MCP gateway requests using a gateway-issued OAuth access token,
1752
2193
  * with browser login delegated to Keycloak.
@@ -1760,7 +2201,7 @@ export declare interface McpGoogleOAuthInboundPolicyOptions {
1760
2201
  * @public
1761
2202
  * @product mcp-gateway
1762
2203
  */
1763
- export declare class McpKeycloakOAuthInboundPolicy extends InboundPolicy<McpKeycloakOAuthInboundPolicyOptions> {
2204
+ export declare class McpKeycloakOAuthInboundPolicy extends InboundPolicy<ValidatedKeycloakOAuthOptions> {
1764
2205
  #private;
1765
2206
  static readonly policyType = "mcp-keycloak-oauth";
1766
2207
  constructor(rawOptions: unknown, policyName: string);
@@ -1812,6 +2253,69 @@ export declare interface McpKeycloakOAuthInboundPolicyOptions {
1812
2253
  */
1813
2254
  cimdEnabled?: boolean;
1814
2255
  };
2256
+ /**
2257
+ * Optional Identity Assertion JWT Authorization Grant (ID-JAG / XAA) support for the gateway token endpoint.
2258
+ */
2259
+ idJag?:
2260
+ | {
2261
+ /**
2262
+ * Disable ID-JAG support.
2263
+ */
2264
+ enabled: false;
2265
+ }
2266
+ | {
2267
+ /**
2268
+ * Enable ID-JAG support.
2269
+ */
2270
+ enabled: true;
2271
+ /**
2272
+ * Trusted ID-JAG issuers. These values are never published in OAuth metadata. Omit to trust this policy's browser-login IdP.
2273
+ *
2274
+ * @minItems 1
2275
+ */
2276
+ trustedIssuers?: [
2277
+ {
2278
+ /**
2279
+ * Exact issuer URL expected in the ID-JAG iss claim. Provide together with jwksUrl, or omit both to default to this policy's browser-login IdP.
2280
+ */
2281
+ issuer?: string;
2282
+ /**
2283
+ * JWKS URL used to verify ID-JAG signatures from this issuer. Provide together with issuer, or omit both to default to this policy's browser-login IdP.
2284
+ */
2285
+ jwksUrl?: string;
2286
+ /**
2287
+ * Optional allow-list of client IDs accepted from this issuer. The ID-JAG client_id must still match the authenticated token-endpoint client.
2288
+ */
2289
+ expectedClientIds?: string[];
2290
+ /**
2291
+ * How the ID-JAG subject is mapped into the gateway subject ID.
2292
+ */
2293
+ subjectMapping?: "iss_prefix" | "iss_tenant_prefix" | "sub_id_only";
2294
+ },
2295
+ ...{
2296
+ /**
2297
+ * Exact issuer URL expected in the ID-JAG iss claim. Provide together with jwksUrl, or omit both to default to this policy's browser-login IdP.
2298
+ */
2299
+ issuer?: string;
2300
+ /**
2301
+ * JWKS URL used to verify ID-JAG signatures from this issuer. Provide together with issuer, or omit both to default to this policy's browser-login IdP.
2302
+ */
2303
+ jwksUrl?: string;
2304
+ /**
2305
+ * Optional allow-list of client IDs accepted from this issuer. The ID-JAG client_id must still match the authenticated token-endpoint client.
2306
+ */
2307
+ expectedClientIds?: string[];
2308
+ /**
2309
+ * How the ID-JAG subject is mapped into the gateway subject ID.
2310
+ */
2311
+ subjectMapping?: "iss_prefix" | "iss_tenant_prefix" | "sub_id_only";
2312
+ }[],
2313
+ ];
2314
+ /**
2315
+ * Optional allow-list of RFC 9396 authorization_details type values accepted from ID-JAGs.
2316
+ */
2317
+ authorizationDetailsTypesAllowed?: string[];
2318
+ };
1815
2319
  /**
1816
2320
  * Optional overrides for the derived browser-login settings.
1817
2321
  */
@@ -1826,6 +2330,44 @@ export declare interface McpKeycloakOAuthInboundPolicyOptions {
1826
2330
  };
1827
2331
  }
1828
2332
 
2333
+ declare const mcpKeycloakOAuthOptionsSchema: z.ZodObject<
2334
+ {
2335
+ keycloakBaseUrl: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
2336
+ realm: z.ZodString;
2337
+ clientId: z.ZodString;
2338
+ clientSecret: z.ZodString;
2339
+ scope: z.ZodOptional<z.ZodString>;
2340
+ gateway: z.ZodOptional<
2341
+ z.ZodObject<
2342
+ {
2343
+ accessTokenTtlSeconds: z.ZodOptional<z.ZodNumber>;
2344
+ refreshTokenTtlSeconds: z.ZodOptional<z.ZodNumber>;
2345
+ cimdEnabled: z.ZodOptional<z.ZodBoolean>;
2346
+ },
2347
+ z.core.$strict
2348
+ >
2349
+ >;
2350
+ idJag: z.ZodOptional<z.ZodUnknown>;
2351
+ browserLoginOverrides: z.ZodOptional<
2352
+ z.ZodObject<
2353
+ {
2354
+ remoteTimeoutMs: z.ZodOptional<z.ZodNumber>;
2355
+ stateTtlSeconds: z.ZodOptional<z.ZodNumber>;
2356
+ sessionTtlSeconds: z.ZodOptional<z.ZodNumber>;
2357
+ pkce: z.ZodOptional<
2358
+ z.ZodEnum<{
2359
+ none: "none";
2360
+ S256: "S256";
2361
+ }>
2362
+ >;
2363
+ },
2364
+ z.core.$strict
2365
+ >
2366
+ >;
2367
+ },
2368
+ z.core.$strict
2369
+ >;
2370
+
1829
2371
  /**
1830
2372
  * Authenticate MCP gateway requests using a gateway-issued OAuth access token,
1831
2373
  * with browser login delegated to Logto.
@@ -1838,7 +2380,7 @@ export declare interface McpKeycloakOAuthInboundPolicyOptions {
1838
2380
  * @public
1839
2381
  * @product mcp-gateway
1840
2382
  */
1841
- export declare class McpLogtoOAuthInboundPolicy extends InboundPolicy<McpLogtoOAuthInboundPolicyOptions> {
2383
+ export declare class McpLogtoOAuthInboundPolicy extends InboundPolicy<ValidatedLogtoOAuthOptions> {
1842
2384
  #private;
1843
2385
  static readonly policyType = "mcp-logto-oauth";
1844
2386
  constructor(rawOptions: unknown, policyName: string);
@@ -1886,6 +2428,69 @@ export declare interface McpLogtoOAuthInboundPolicyOptions {
1886
2428
  */
1887
2429
  cimdEnabled?: boolean;
1888
2430
  };
2431
+ /**
2432
+ * Optional Identity Assertion JWT Authorization Grant (ID-JAG / XAA) support for the gateway token endpoint.
2433
+ */
2434
+ idJag?:
2435
+ | {
2436
+ /**
2437
+ * Disable ID-JAG support.
2438
+ */
2439
+ enabled: false;
2440
+ }
2441
+ | {
2442
+ /**
2443
+ * Enable ID-JAG support.
2444
+ */
2445
+ enabled: true;
2446
+ /**
2447
+ * Trusted ID-JAG issuers. These values are never published in OAuth metadata. Omit to trust this policy's browser-login IdP.
2448
+ *
2449
+ * @minItems 1
2450
+ */
2451
+ trustedIssuers?: [
2452
+ {
2453
+ /**
2454
+ * Exact issuer URL expected in the ID-JAG iss claim. Provide together with jwksUrl, or omit both to default to this policy's browser-login IdP.
2455
+ */
2456
+ issuer?: string;
2457
+ /**
2458
+ * JWKS URL used to verify ID-JAG signatures from this issuer. Provide together with issuer, or omit both to default to this policy's browser-login IdP.
2459
+ */
2460
+ jwksUrl?: string;
2461
+ /**
2462
+ * Optional allow-list of client IDs accepted from this issuer. The ID-JAG client_id must still match the authenticated token-endpoint client.
2463
+ */
2464
+ expectedClientIds?: string[];
2465
+ /**
2466
+ * How the ID-JAG subject is mapped into the gateway subject ID.
2467
+ */
2468
+ subjectMapping?: "iss_prefix" | "iss_tenant_prefix" | "sub_id_only";
2469
+ },
2470
+ ...{
2471
+ /**
2472
+ * Exact issuer URL expected in the ID-JAG iss claim. Provide together with jwksUrl, or omit both to default to this policy's browser-login IdP.
2473
+ */
2474
+ issuer?: string;
2475
+ /**
2476
+ * JWKS URL used to verify ID-JAG signatures from this issuer. Provide together with issuer, or omit both to default to this policy's browser-login IdP.
2477
+ */
2478
+ jwksUrl?: string;
2479
+ /**
2480
+ * Optional allow-list of client IDs accepted from this issuer. The ID-JAG client_id must still match the authenticated token-endpoint client.
2481
+ */
2482
+ expectedClientIds?: string[];
2483
+ /**
2484
+ * How the ID-JAG subject is mapped into the gateway subject ID.
2485
+ */
2486
+ subjectMapping?: "iss_prefix" | "iss_tenant_prefix" | "sub_id_only";
2487
+ }[],
2488
+ ];
2489
+ /**
2490
+ * Optional allow-list of RFC 9396 authorization_details type values accepted from ID-JAGs.
2491
+ */
2492
+ authorizationDetailsTypesAllowed?: string[];
2493
+ };
1889
2494
  /**
1890
2495
  * Optional overrides for the derived browser-login settings.
1891
2496
  */
@@ -1900,6 +2505,43 @@ export declare interface McpLogtoOAuthInboundPolicyOptions {
1900
2505
  };
1901
2506
  }
1902
2507
 
2508
+ declare const mcpLogtoOAuthOptionsSchema: z.ZodObject<
2509
+ {
2510
+ logtoEndpoint: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
2511
+ clientId: z.ZodString;
2512
+ clientSecret: z.ZodString;
2513
+ scope: z.ZodOptional<z.ZodString>;
2514
+ gateway: z.ZodOptional<
2515
+ z.ZodObject<
2516
+ {
2517
+ accessTokenTtlSeconds: z.ZodOptional<z.ZodNumber>;
2518
+ refreshTokenTtlSeconds: z.ZodOptional<z.ZodNumber>;
2519
+ cimdEnabled: z.ZodOptional<z.ZodBoolean>;
2520
+ },
2521
+ z.core.$strict
2522
+ >
2523
+ >;
2524
+ idJag: z.ZodOptional<z.ZodUnknown>;
2525
+ browserLoginOverrides: z.ZodOptional<
2526
+ z.ZodObject<
2527
+ {
2528
+ remoteTimeoutMs: z.ZodOptional<z.ZodNumber>;
2529
+ stateTtlSeconds: z.ZodOptional<z.ZodNumber>;
2530
+ sessionTtlSeconds: z.ZodOptional<z.ZodNumber>;
2531
+ pkce: z.ZodOptional<
2532
+ z.ZodEnum<{
2533
+ none: "none";
2534
+ S256: "S256";
2535
+ }>
2536
+ >;
2537
+ },
2538
+ z.core.$strict
2539
+ >
2540
+ >;
2541
+ },
2542
+ z.core.$strict
2543
+ >;
2544
+
1903
2545
  /**
1904
2546
  * Authenticate MCP gateway requests using a gateway-issued OAuth access token.
1905
2547
  *
@@ -2027,20 +2669,20 @@ export declare interface McpOAuthInboundPolicyOptions {
2027
2669
  */
2028
2670
  enabled: true;
2029
2671
  /**
2030
- * Trusted ID-JAG issuers. These values are never published in OAuth metadata.
2672
+ * Trusted ID-JAG issuers. These values are never published in OAuth metadata. Omit to trust this policy's browser-login IdP.
2031
2673
  *
2032
2674
  * @minItems 1
2033
2675
  */
2034
- trustedIssuers: [
2676
+ trustedIssuers?: [
2035
2677
  {
2036
2678
  /**
2037
- * Exact issuer URL expected in the ID-JAG iss claim.
2679
+ * Exact issuer URL expected in the ID-JAG iss claim. Provide together with jwksUrl, or omit both to default to this policy's browser-login IdP.
2038
2680
  */
2039
- issuer: string;
2681
+ issuer?: string;
2040
2682
  /**
2041
- * JWKS URL used to verify ID-JAG signatures from this issuer.
2683
+ * JWKS URL used to verify ID-JAG signatures from this issuer. Provide together with issuer, or omit both to default to this policy's browser-login IdP.
2042
2684
  */
2043
- jwksUrl: string;
2685
+ jwksUrl?: string;
2044
2686
  /**
2045
2687
  * Optional allow-list of client IDs accepted from this issuer. The ID-JAG client_id must still match the authenticated token-endpoint client.
2046
2688
  */
@@ -2052,13 +2694,13 @@ export declare interface McpOAuthInboundPolicyOptions {
2052
2694
  },
2053
2695
  ...{
2054
2696
  /**
2055
- * Exact issuer URL expected in the ID-JAG iss claim.
2697
+ * Exact issuer URL expected in the ID-JAG iss claim. Provide together with jwksUrl, or omit both to default to this policy's browser-login IdP.
2056
2698
  */
2057
- issuer: string;
2699
+ issuer?: string;
2058
2700
  /**
2059
- * JWKS URL used to verify ID-JAG signatures from this issuer.
2701
+ * JWKS URL used to verify ID-JAG signatures from this issuer. Provide together with issuer, or omit both to default to this policy's browser-login IdP.
2060
2702
  */
2061
- jwksUrl: string;
2703
+ jwksUrl?: string;
2062
2704
  /**
2063
2705
  * Optional allow-list of client IDs accepted from this issuer. The ID-JAG client_id must still match the authenticated token-endpoint client.
2064
2706
  */
@@ -2080,106 +2722,196 @@ declare type McpOAuthRuntimeConfig = z.infer<
2080
2722
  typeof mcpOAuthRuntimeConfigSchema
2081
2723
  >;
2082
2724
 
2083
- declare const mcpOAuthRuntimeConfigSchema: z.ZodObject<
2084
- {
2085
- oidc: z.ZodObject<
2086
- {
2087
- issuer: z.ZodURL;
2088
- jwksUrl: z.ZodURL;
2089
- audience: z.ZodOptional<z.ZodString>;
2090
- },
2091
- z.core.$strip
2092
- >;
2093
- browserLogin: z.ZodObject<
2094
- {
2095
- url: z.ZodURL;
2096
- tokenUrl: z.ZodOptional<z.ZodURL>;
2097
- clientId: z.ZodOptional<z.ZodString>;
2098
- clientSecret: z.ZodOptional<z.ZodString>;
2099
- scope: z.ZodDefault<z.ZodString>;
2100
- audience: z.ZodOptional<z.ZodString>;
2101
- pkce: z.ZodDefault<
2102
- z.ZodEnum<{
2103
- none: "none";
2104
- S256: "S256";
2105
- }>
2106
- >;
2107
- remoteTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
2108
- stateTtlSeconds: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
2109
- sessionTtlSeconds: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
2110
- },
2111
- z.core.$strict
2112
- >;
2113
- gateway: z.ZodPipe<
2114
- z.ZodDefault<
2115
- z.ZodObject<
2116
- {
2117
- accessTokenTtlSeconds: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
2118
- refreshTokenTtlSeconds: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
2119
- cimdEnabled: z.ZodDefault<z.ZodBoolean>;
2120
- },
2121
- z.core.$strict
2122
- >
2123
- >,
2124
- z.ZodTransform<
2725
+ declare const mcpOAuthRuntimeConfigSchema: z.ZodPipe<
2726
+ z.ZodObject<
2727
+ {
2728
+ oidc: z.ZodObject<
2125
2729
  {
2126
- accessTokenTtlSeconds: number;
2127
- refreshTokenTtlSeconds: number;
2128
- downstreamCimdEnabled: boolean;
2730
+ issuer: z.ZodURL;
2731
+ jwksUrl: z.ZodURL;
2732
+ audience: z.ZodOptional<z.ZodString>;
2129
2733
  },
2734
+ z.core.$strip
2735
+ >;
2736
+ browserLogin: z.ZodObject<
2130
2737
  {
2131
- accessTokenTtlSeconds: number;
2132
- refreshTokenTtlSeconds: number;
2133
- cimdEnabled: boolean;
2134
- }
2135
- >
2136
- >;
2137
- idJag: z.ZodDefault<
2138
- z.ZodOptional<
2738
+ url: z.ZodURL;
2739
+ tokenUrl: z.ZodOptional<z.ZodURL>;
2740
+ clientId: z.ZodOptional<z.ZodString>;
2741
+ clientSecret: z.ZodOptional<z.ZodString>;
2742
+ scope: z.ZodDefault<z.ZodString>;
2743
+ audience: z.ZodOptional<z.ZodString>;
2744
+ pkce: z.ZodDefault<
2745
+ z.ZodEnum<{
2746
+ none: "none";
2747
+ S256: "S256";
2748
+ }>
2749
+ >;
2750
+ remoteTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
2751
+ stateTtlSeconds: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
2752
+ sessionTtlSeconds: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
2753
+ },
2754
+ z.core.$strict
2755
+ >;
2756
+ gateway: z.ZodPipe<
2139
2757
  z.ZodDefault<
2140
- z.ZodDiscriminatedUnion<
2141
- [
2142
- z.ZodObject<
2143
- {
2144
- enabled: z.ZodLiteral<false>;
2145
- },
2146
- z.core.$strict
2147
- >,
2148
- z.ZodObject<
2149
- {
2150
- enabled: z.ZodLiteral<true>;
2151
- trustedIssuers: z.ZodArray<
2152
- z.ZodObject<
2153
- {
2154
- issuer: z.ZodURL;
2155
- jwksUrl: z.ZodURL;
2156
- expectedClientIds: z.ZodOptional<
2157
- z.ZodArray<z.ZodString>
2158
- >;
2159
- subjectMapping: z.ZodDefault<
2160
- z.ZodEnum<{
2161
- iss_prefix: "iss_prefix";
2162
- iss_tenant_prefix: "iss_tenant_prefix";
2163
- sub_id_only: "sub_id_only";
2164
- }>
2165
- >;
2166
- },
2167
- z.core.$strict
2168
- >
2169
- >;
2170
- authorizationDetailsTypesAllowed: z.ZodOptional<
2171
- z.ZodArray<z.ZodString>
2172
- >;
2173
- },
2174
- z.core.$strict
2175
- >,
2176
- ]
2758
+ z.ZodObject<
2759
+ {
2760
+ accessTokenTtlSeconds: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
2761
+ refreshTokenTtlSeconds: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
2762
+ cimdEnabled: z.ZodDefault<z.ZodBoolean>;
2763
+ },
2764
+ z.core.$strict
2765
+ >
2766
+ >,
2767
+ z.ZodTransform<
2768
+ {
2769
+ accessTokenTtlSeconds: number;
2770
+ refreshTokenTtlSeconds: number;
2771
+ downstreamCimdEnabled: boolean;
2772
+ },
2773
+ {
2774
+ accessTokenTtlSeconds: number;
2775
+ refreshTokenTtlSeconds: number;
2776
+ cimdEnabled: boolean;
2777
+ }
2778
+ >
2779
+ >;
2780
+ idJag: z.ZodDefault<
2781
+ z.ZodOptional<
2782
+ z.ZodDefault<
2783
+ z.ZodDiscriminatedUnion<
2784
+ [
2785
+ z.ZodObject<
2786
+ {
2787
+ enabled: z.ZodLiteral<false>;
2788
+ },
2789
+ z.core.$strict
2790
+ >,
2791
+ z.ZodObject<
2792
+ {
2793
+ enabled: z.ZodLiteral<true>;
2794
+ trustedIssuers: z.ZodOptional<
2795
+ z.ZodArray<
2796
+ z.ZodObject<
2797
+ {
2798
+ issuer: z.ZodOptional<z.ZodURL>;
2799
+ jwksUrl: z.ZodOptional<z.ZodURL>;
2800
+ expectedClientIds: z.ZodOptional<
2801
+ z.ZodArray<z.ZodString>
2802
+ >;
2803
+ subjectMapping: z.ZodDefault<
2804
+ z.ZodEnum<{
2805
+ iss_prefix: "iss_prefix";
2806
+ iss_tenant_prefix: "iss_tenant_prefix";
2807
+ sub_id_only: "sub_id_only";
2808
+ }>
2809
+ >;
2810
+ },
2811
+ z.core.$strict
2812
+ >
2813
+ >
2814
+ >;
2815
+ authorizationDetailsTypesAllowed: z.ZodOptional<
2816
+ z.ZodArray<z.ZodString>
2817
+ >;
2818
+ },
2819
+ z.core.$strict
2820
+ >,
2821
+ ]
2822
+ >
2177
2823
  >
2178
2824
  >
2179
- >
2180
- >;
2181
- },
2182
- z.core.$strict
2825
+ >;
2826
+ },
2827
+ z.core.$strict
2828
+ >,
2829
+ z.ZodTransform<
2830
+ {
2831
+ idJag:
2832
+ | {
2833
+ enabled: false;
2834
+ }
2835
+ | {
2836
+ enabled: true;
2837
+ trustedIssuers: {
2838
+ issuer: string;
2839
+ jwksUrl: string;
2840
+ subjectMapping:
2841
+ | "iss_prefix"
2842
+ | "iss_tenant_prefix"
2843
+ | "sub_id_only";
2844
+ expectedClientIds?: string[] | undefined;
2845
+ }[];
2846
+ authorizationDetailsTypesAllowed?: string[] | undefined;
2847
+ };
2848
+ oidc: {
2849
+ issuer: string;
2850
+ jwksUrl: string;
2851
+ audience?: string | undefined;
2852
+ };
2853
+ browserLogin: {
2854
+ url: string;
2855
+ scope: string;
2856
+ pkce: "none" | "S256";
2857
+ remoteTimeoutMs: number;
2858
+ stateTtlSeconds: number;
2859
+ sessionTtlSeconds: number;
2860
+ tokenUrl?: string | undefined;
2861
+ clientId?: string | undefined;
2862
+ clientSecret?: string | undefined;
2863
+ audience?: string | undefined;
2864
+ };
2865
+ gateway: {
2866
+ accessTokenTtlSeconds: number;
2867
+ refreshTokenTtlSeconds: number;
2868
+ downstreamCimdEnabled: boolean;
2869
+ };
2870
+ },
2871
+ {
2872
+ oidc: {
2873
+ issuer: string;
2874
+ jwksUrl: string;
2875
+ audience?: string | undefined;
2876
+ };
2877
+ browserLogin: {
2878
+ url: string;
2879
+ scope: string;
2880
+ pkce: "none" | "S256";
2881
+ remoteTimeoutMs: number;
2882
+ stateTtlSeconds: number;
2883
+ sessionTtlSeconds: number;
2884
+ tokenUrl?: string | undefined;
2885
+ clientId?: string | undefined;
2886
+ clientSecret?: string | undefined;
2887
+ audience?: string | undefined;
2888
+ };
2889
+ gateway: {
2890
+ accessTokenTtlSeconds: number;
2891
+ refreshTokenTtlSeconds: number;
2892
+ downstreamCimdEnabled: boolean;
2893
+ };
2894
+ idJag:
2895
+ | {
2896
+ enabled: false;
2897
+ }
2898
+ | {
2899
+ enabled: true;
2900
+ trustedIssuers?:
2901
+ | {
2902
+ subjectMapping:
2903
+ | "iss_prefix"
2904
+ | "iss_tenant_prefix"
2905
+ | "sub_id_only";
2906
+ issuer?: string | undefined;
2907
+ jwksUrl?: string | undefined;
2908
+ expectedClientIds?: string[] | undefined;
2909
+ }[]
2910
+ | undefined;
2911
+ authorizationDetailsTypesAllowed?: string[] | undefined;
2912
+ };
2913
+ }
2914
+ >
2183
2915
  >;
2184
2916
 
2185
2917
  /**
@@ -2194,7 +2926,7 @@ declare const mcpOAuthRuntimeConfigSchema: z.ZodObject<
2194
2926
  * @public
2195
2927
  * @product mcp-gateway
2196
2928
  */
2197
- export declare class McpOktaOAuthInboundPolicy extends InboundPolicy<McpOktaOAuthInboundPolicyOptions> {
2929
+ export declare class McpOktaOAuthInboundPolicy extends InboundPolicy<ValidatedOktaOAuthOptions> {
2198
2930
  #private;
2199
2931
  static readonly policyType = "mcp-okta-oauth";
2200
2932
  constructor(rawOptions: unknown, policyName: string);
@@ -2246,6 +2978,69 @@ export declare interface McpOktaOAuthInboundPolicyOptions {
2246
2978
  */
2247
2979
  cimdEnabled?: boolean;
2248
2980
  };
2981
+ /**
2982
+ * Optional Identity Assertion JWT Authorization Grant (ID-JAG / XAA) support for the gateway token endpoint.
2983
+ */
2984
+ idJag?:
2985
+ | {
2986
+ /**
2987
+ * Disable ID-JAG support.
2988
+ */
2989
+ enabled: false;
2990
+ }
2991
+ | {
2992
+ /**
2993
+ * Enable ID-JAG support.
2994
+ */
2995
+ enabled: true;
2996
+ /**
2997
+ * Trusted ID-JAG issuers. These values are never published in OAuth metadata. Omit to trust this policy's browser-login IdP.
2998
+ *
2999
+ * @minItems 1
3000
+ */
3001
+ trustedIssuers?: [
3002
+ {
3003
+ /**
3004
+ * Exact issuer URL expected in the ID-JAG iss claim. Provide together with jwksUrl, or omit both to default to this policy's browser-login IdP.
3005
+ */
3006
+ issuer?: string;
3007
+ /**
3008
+ * JWKS URL used to verify ID-JAG signatures from this issuer. Provide together with issuer, or omit both to default to this policy's browser-login IdP.
3009
+ */
3010
+ jwksUrl?: string;
3011
+ /**
3012
+ * Optional allow-list of client IDs accepted from this issuer. The ID-JAG client_id must still match the authenticated token-endpoint client.
3013
+ */
3014
+ expectedClientIds?: string[];
3015
+ /**
3016
+ * How the ID-JAG subject is mapped into the gateway subject ID.
3017
+ */
3018
+ subjectMapping?: "iss_prefix" | "iss_tenant_prefix" | "sub_id_only";
3019
+ },
3020
+ ...{
3021
+ /**
3022
+ * Exact issuer URL expected in the ID-JAG iss claim. Provide together with jwksUrl, or omit both to default to this policy's browser-login IdP.
3023
+ */
3024
+ issuer?: string;
3025
+ /**
3026
+ * JWKS URL used to verify ID-JAG signatures from this issuer. Provide together with issuer, or omit both to default to this policy's browser-login IdP.
3027
+ */
3028
+ jwksUrl?: string;
3029
+ /**
3030
+ * Optional allow-list of client IDs accepted from this issuer. The ID-JAG client_id must still match the authenticated token-endpoint client.
3031
+ */
3032
+ expectedClientIds?: string[];
3033
+ /**
3034
+ * How the ID-JAG subject is mapped into the gateway subject ID.
3035
+ */
3036
+ subjectMapping?: "iss_prefix" | "iss_tenant_prefix" | "sub_id_only";
3037
+ }[],
3038
+ ];
3039
+ /**
3040
+ * Optional allow-list of RFC 9396 authorization_details type values accepted from ID-JAGs.
3041
+ */
3042
+ authorizationDetailsTypesAllowed?: string[];
3043
+ };
2249
3044
  /**
2250
3045
  * Optional overrides for the derived browser-login settings.
2251
3046
  */
@@ -2260,6 +3055,44 @@ export declare interface McpOktaOAuthInboundPolicyOptions {
2260
3055
  };
2261
3056
  }
2262
3057
 
3058
+ declare const mcpOktaOAuthOptionsSchema: z.ZodObject<
3059
+ {
3060
+ oktaDomain: z.ZodString;
3061
+ authorizationServerId: z.ZodOptional<z.ZodString>;
3062
+ clientId: z.ZodString;
3063
+ clientSecret: z.ZodString;
3064
+ scope: z.ZodOptional<z.ZodString>;
3065
+ gateway: z.ZodOptional<
3066
+ z.ZodObject<
3067
+ {
3068
+ accessTokenTtlSeconds: z.ZodOptional<z.ZodNumber>;
3069
+ refreshTokenTtlSeconds: z.ZodOptional<z.ZodNumber>;
3070
+ cimdEnabled: z.ZodOptional<z.ZodBoolean>;
3071
+ },
3072
+ z.core.$strict
3073
+ >
3074
+ >;
3075
+ idJag: z.ZodOptional<z.ZodUnknown>;
3076
+ browserLoginOverrides: z.ZodOptional<
3077
+ z.ZodObject<
3078
+ {
3079
+ remoteTimeoutMs: z.ZodOptional<z.ZodNumber>;
3080
+ stateTtlSeconds: z.ZodOptional<z.ZodNumber>;
3081
+ sessionTtlSeconds: z.ZodOptional<z.ZodNumber>;
3082
+ pkce: z.ZodOptional<
3083
+ z.ZodEnum<{
3084
+ none: "none";
3085
+ S256: "S256";
3086
+ }>
3087
+ >;
3088
+ },
3089
+ z.core.$strict
3090
+ >
3091
+ >;
3092
+ },
3093
+ z.core.$strict
3094
+ >;
3095
+
2263
3096
  /**
2264
3097
  * Authenticate MCP gateway requests using a gateway-issued OAuth access token,
2265
3098
  * with browser login delegated to OneLogin.
@@ -2272,7 +3105,7 @@ export declare interface McpOktaOAuthInboundPolicyOptions {
2272
3105
  * @public
2273
3106
  * @product mcp-gateway
2274
3107
  */
2275
- export declare class McpOneLoginOAuthInboundPolicy extends InboundPolicy<McpOneLoginOAuthInboundPolicyOptions> {
3108
+ export declare class McpOneLoginOAuthInboundPolicy extends InboundPolicy<ValidatedOneLoginOAuthOptions> {
2276
3109
  #private;
2277
3110
  static readonly policyType = "mcp-onelogin-oauth";
2278
3111
  constructor(rawOptions: unknown, policyName: string);
@@ -2320,6 +3153,69 @@ export declare interface McpOneLoginOAuthInboundPolicyOptions {
2320
3153
  */
2321
3154
  cimdEnabled?: boolean;
2322
3155
  };
3156
+ /**
3157
+ * Optional Identity Assertion JWT Authorization Grant (ID-JAG / XAA) support for the gateway token endpoint.
3158
+ */
3159
+ idJag?:
3160
+ | {
3161
+ /**
3162
+ * Disable ID-JAG support.
3163
+ */
3164
+ enabled: false;
3165
+ }
3166
+ | {
3167
+ /**
3168
+ * Enable ID-JAG support.
3169
+ */
3170
+ enabled: true;
3171
+ /**
3172
+ * Trusted ID-JAG issuers. These values are never published in OAuth metadata. Omit to trust this policy's browser-login IdP.
3173
+ *
3174
+ * @minItems 1
3175
+ */
3176
+ trustedIssuers?: [
3177
+ {
3178
+ /**
3179
+ * Exact issuer URL expected in the ID-JAG iss claim. Provide together with jwksUrl, or omit both to default to this policy's browser-login IdP.
3180
+ */
3181
+ issuer?: string;
3182
+ /**
3183
+ * JWKS URL used to verify ID-JAG signatures from this issuer. Provide together with issuer, or omit both to default to this policy's browser-login IdP.
3184
+ */
3185
+ jwksUrl?: string;
3186
+ /**
3187
+ * Optional allow-list of client IDs accepted from this issuer. The ID-JAG client_id must still match the authenticated token-endpoint client.
3188
+ */
3189
+ expectedClientIds?: string[];
3190
+ /**
3191
+ * How the ID-JAG subject is mapped into the gateway subject ID.
3192
+ */
3193
+ subjectMapping?: "iss_prefix" | "iss_tenant_prefix" | "sub_id_only";
3194
+ },
3195
+ ...{
3196
+ /**
3197
+ * Exact issuer URL expected in the ID-JAG iss claim. Provide together with jwksUrl, or omit both to default to this policy's browser-login IdP.
3198
+ */
3199
+ issuer?: string;
3200
+ /**
3201
+ * JWKS URL used to verify ID-JAG signatures from this issuer. Provide together with issuer, or omit both to default to this policy's browser-login IdP.
3202
+ */
3203
+ jwksUrl?: string;
3204
+ /**
3205
+ * Optional allow-list of client IDs accepted from this issuer. The ID-JAG client_id must still match the authenticated token-endpoint client.
3206
+ */
3207
+ expectedClientIds?: string[];
3208
+ /**
3209
+ * How the ID-JAG subject is mapped into the gateway subject ID.
3210
+ */
3211
+ subjectMapping?: "iss_prefix" | "iss_tenant_prefix" | "sub_id_only";
3212
+ }[],
3213
+ ];
3214
+ /**
3215
+ * Optional allow-list of RFC 9396 authorization_details type values accepted from ID-JAGs.
3216
+ */
3217
+ authorizationDetailsTypesAllowed?: string[];
3218
+ };
2323
3219
  /**
2324
3220
  * Optional overrides for the derived browser-login settings.
2325
3221
  */
@@ -2330,6 +3226,37 @@ export declare interface McpOneLoginOAuthInboundPolicyOptions {
2330
3226
  };
2331
3227
  }
2332
3228
 
3229
+ declare const mcpOneLoginOAuthOptionsSchema: z.ZodObject<
3230
+ {
3231
+ oneLoginSubdomain: z.ZodString;
3232
+ clientId: z.ZodString;
3233
+ clientSecret: z.ZodString;
3234
+ scope: z.ZodOptional<z.ZodString>;
3235
+ gateway: z.ZodOptional<
3236
+ z.ZodObject<
3237
+ {
3238
+ accessTokenTtlSeconds: z.ZodOptional<z.ZodNumber>;
3239
+ refreshTokenTtlSeconds: z.ZodOptional<z.ZodNumber>;
3240
+ cimdEnabled: z.ZodOptional<z.ZodBoolean>;
3241
+ },
3242
+ z.core.$strict
3243
+ >
3244
+ >;
3245
+ idJag: z.ZodOptional<z.ZodUnknown>;
3246
+ browserLoginOverrides: z.ZodOptional<
3247
+ z.ZodObject<
3248
+ {
3249
+ remoteTimeoutMs: z.ZodOptional<z.ZodNumber>;
3250
+ stateTtlSeconds: z.ZodOptional<z.ZodNumber>;
3251
+ sessionTtlSeconds: z.ZodOptional<z.ZodNumber>;
3252
+ },
3253
+ z.core.$strict
3254
+ >
3255
+ >;
3256
+ },
3257
+ z.core.$strict
3258
+ >;
3259
+
2333
3260
  /**
2334
3261
  * Authenticate MCP gateway requests using a gateway-issued OAuth access token,
2335
3262
  * with browser login delegated to PingOne.
@@ -2343,7 +3270,7 @@ export declare interface McpOneLoginOAuthInboundPolicyOptions {
2343
3270
  * @public
2344
3271
  * @product mcp-gateway
2345
3272
  */
2346
- export declare class McpPingOAuthInboundPolicy extends InboundPolicy<McpPingOAuthInboundPolicyOptions> {
3273
+ export declare class McpPingOAuthInboundPolicy extends InboundPolicy<ValidatedPingOAuthOptions> {
2347
3274
  #private;
2348
3275
  static readonly policyType = "mcp-ping-oauth";
2349
3276
  constructor(rawOptions: unknown, policyName: string);
@@ -2405,6 +3332,69 @@ export declare interface McpPingOAuthInboundPolicyOptions {
2405
3332
  */
2406
3333
  cimdEnabled?: boolean;
2407
3334
  };
3335
+ /**
3336
+ * Optional Identity Assertion JWT Authorization Grant (ID-JAG / XAA) support for the gateway token endpoint.
3337
+ */
3338
+ idJag?:
3339
+ | {
3340
+ /**
3341
+ * Disable ID-JAG support.
3342
+ */
3343
+ enabled: false;
3344
+ }
3345
+ | {
3346
+ /**
3347
+ * Enable ID-JAG support.
3348
+ */
3349
+ enabled: true;
3350
+ /**
3351
+ * Trusted ID-JAG issuers. These values are never published in OAuth metadata. Omit to trust this policy's browser-login IdP.
3352
+ *
3353
+ * @minItems 1
3354
+ */
3355
+ trustedIssuers?: [
3356
+ {
3357
+ /**
3358
+ * Exact issuer URL expected in the ID-JAG iss claim. Provide together with jwksUrl, or omit both to default to this policy's browser-login IdP.
3359
+ */
3360
+ issuer?: string;
3361
+ /**
3362
+ * JWKS URL used to verify ID-JAG signatures from this issuer. Provide together with issuer, or omit both to default to this policy's browser-login IdP.
3363
+ */
3364
+ jwksUrl?: string;
3365
+ /**
3366
+ * Optional allow-list of client IDs accepted from this issuer. The ID-JAG client_id must still match the authenticated token-endpoint client.
3367
+ */
3368
+ expectedClientIds?: string[];
3369
+ /**
3370
+ * How the ID-JAG subject is mapped into the gateway subject ID.
3371
+ */
3372
+ subjectMapping?: "iss_prefix" | "iss_tenant_prefix" | "sub_id_only";
3373
+ },
3374
+ ...{
3375
+ /**
3376
+ * Exact issuer URL expected in the ID-JAG iss claim. Provide together with jwksUrl, or omit both to default to this policy's browser-login IdP.
3377
+ */
3378
+ issuer?: string;
3379
+ /**
3380
+ * JWKS URL used to verify ID-JAG signatures from this issuer. Provide together with issuer, or omit both to default to this policy's browser-login IdP.
3381
+ */
3382
+ jwksUrl?: string;
3383
+ /**
3384
+ * Optional allow-list of client IDs accepted from this issuer. The ID-JAG client_id must still match the authenticated token-endpoint client.
3385
+ */
3386
+ expectedClientIds?: string[];
3387
+ /**
3388
+ * How the ID-JAG subject is mapped into the gateway subject ID.
3389
+ */
3390
+ subjectMapping?: "iss_prefix" | "iss_tenant_prefix" | "sub_id_only";
3391
+ }[],
3392
+ ];
3393
+ /**
3394
+ * Optional allow-list of RFC 9396 authorization_details type values accepted from ID-JAGs.
3395
+ */
3396
+ authorizationDetailsTypesAllowed?: string[];
3397
+ };
2408
3398
  /**
2409
3399
  * Optional overrides for the derived browser-login settings.
2410
3400
  */
@@ -2419,6 +3409,54 @@ export declare interface McpPingOAuthInboundPolicyOptions {
2419
3409
  };
2420
3410
  }
2421
3411
 
3412
+ declare const mcpPingOAuthOptionsSchema: z.ZodObject<
3413
+ {
3414
+ environmentId: z.ZodOptional<z.ZodString>;
3415
+ region: z.ZodOptional<
3416
+ z.ZodEnum<{
3417
+ "north-america": "north-america";
3418
+ canada: "canada";
3419
+ europe: "europe";
3420
+ singapore: "singapore";
3421
+ australia: "australia";
3422
+ "asia-pacific": "asia-pacific";
3423
+ }>
3424
+ >;
3425
+ customDomain: z.ZodOptional<z.ZodString>;
3426
+ clientId: z.ZodString;
3427
+ clientSecret: z.ZodString;
3428
+ scope: z.ZodOptional<z.ZodString>;
3429
+ gateway: z.ZodOptional<
3430
+ z.ZodObject<
3431
+ {
3432
+ accessTokenTtlSeconds: z.ZodOptional<z.ZodNumber>;
3433
+ refreshTokenTtlSeconds: z.ZodOptional<z.ZodNumber>;
3434
+ cimdEnabled: z.ZodOptional<z.ZodBoolean>;
3435
+ },
3436
+ z.core.$strict
3437
+ >
3438
+ >;
3439
+ idJag: z.ZodOptional<z.ZodUnknown>;
3440
+ browserLoginOverrides: z.ZodOptional<
3441
+ z.ZodObject<
3442
+ {
3443
+ remoteTimeoutMs: z.ZodOptional<z.ZodNumber>;
3444
+ stateTtlSeconds: z.ZodOptional<z.ZodNumber>;
3445
+ sessionTtlSeconds: z.ZodOptional<z.ZodNumber>;
3446
+ pkce: z.ZodOptional<
3447
+ z.ZodEnum<{
3448
+ none: "none";
3449
+ S256: "S256";
3450
+ }>
3451
+ >;
3452
+ },
3453
+ z.core.$strict
3454
+ >
3455
+ >;
3456
+ },
3457
+ z.core.$strict
3458
+ >;
3459
+
2422
3460
  export declare function McpProxyHandler(
2423
3461
  request: ZuploRequest,
2424
3462
  context: ZuploContext
@@ -2468,9 +3506,9 @@ export declare interface McpTokenExchangeInboundPolicyOptions {
2468
3506
  */
2469
3507
  protectedResourceMetadataUrl?: string;
2470
3508
  /**
2471
- * Authentication mode. `user-oauth` performs per-user OAuth federation; `shared-oauth` uses a gateway-wide OAuth grant.
3509
+ * Authentication mode. `user-oauth` performs per-user OAuth federation; `shared-oauth` uses a gateway-wide OAuth grant; `id-jag` exchanges the caller's identity assertion at the configured IdP for an ID-JAG (Identity Assertion JWT Authorization Grant, also known as Cross-App Access / XAA), then redeems it at the upstream Resource Authorization Server for an upstream access token.
2472
3510
  */
2473
- authMode: "user-oauth" | "shared-oauth";
3511
+ authMode: "user-oauth" | "shared-oauth" | "id-jag";
2474
3512
  /**
2475
3513
  * OAuth scopes to request from the upstream (for OAuth modes).
2476
3514
  */
@@ -2502,6 +3540,47 @@ export declare interface McpTokenExchangeInboundPolicyOptions {
2502
3540
  | "client_secret_post"
2503
3541
  | "none";
2504
3542
  };
3543
+ /**
3544
+ * ID-JAG (Cross-App Access / XAA) token-exchange configuration. Required when `authMode` is `id-jag`; not used by the OAuth modes.
3545
+ */
3546
+ idJag?: {
3547
+ /**
3548
+ * Scopes to request on the ID-JAG token exchange at the IdP.
3549
+ */
3550
+ scopes?: string[];
3551
+ /**
3552
+ * Delimiter used to join scopes in the token-exchange request. Defaults to a single space.
3553
+ */
3554
+ scopeDelimiter?: string;
3555
+ /**
3556
+ * The identity provider that exchanges the caller's identity assertion for an ID-JAG.
3557
+ */
3558
+ idp: {
3559
+ /**
3560
+ * The IdP token endpoint used for the ID-JAG token exchange.
3561
+ */
3562
+ tokenUrl: string;
3563
+ clientAuth: IdJagClientAuth;
3564
+ };
3565
+ /**
3566
+ * The upstream Resource Authorization Server that redeems the ID-JAG for an upstream access token.
3567
+ */
3568
+ resourceAs: {
3569
+ /**
3570
+ * The Resource Authorization Server token endpoint where the gateway redeems the ID-JAG via the jwt-bearer grant.
3571
+ */
3572
+ tokenUrl: string;
3573
+ /**
3574
+ * The `audience` value sent on the ID-JAG token exchange, identifying the Resource Authorization Server (typically its issuer).
3575
+ */
3576
+ audience: string;
3577
+ /**
3578
+ * Optional `resource` indicator sent on the token exchange, identifying the upstream MCP resource. Defaults to the upstream MCP server URL from the route handler's rewritePattern.
3579
+ */
3580
+ resource?: string;
3581
+ clientAuth: IdJagClientAuth;
3582
+ };
3583
+ };
2505
3584
  }
2506
3585
 
2507
3586
  /**
@@ -2517,7 +3596,7 @@ export declare interface McpTokenExchangeInboundPolicyOptions {
2517
3596
  * @public
2518
3597
  * @product mcp-gateway
2519
3598
  */
2520
- export declare class McpWorkosOAuthInboundPolicy extends InboundPolicy<McpWorkosOAuthInboundPolicyOptions> {
3599
+ export declare class McpWorkosOAuthInboundPolicy extends InboundPolicy<ValidatedWorkosOAuthOptions> {
2521
3600
  #private;
2522
3601
  static readonly policyType = "mcp-workos-oauth";
2523
3602
  constructor(rawOptions: unknown, policyName: string);
@@ -2561,6 +3640,69 @@ export declare interface McpWorkosOAuthInboundPolicyOptions {
2561
3640
  */
2562
3641
  cimdEnabled?: boolean;
2563
3642
  };
3643
+ /**
3644
+ * Optional Identity Assertion JWT Authorization Grant (ID-JAG / XAA) support for the gateway token endpoint.
3645
+ */
3646
+ idJag?:
3647
+ | {
3648
+ /**
3649
+ * Disable ID-JAG support.
3650
+ */
3651
+ enabled: false;
3652
+ }
3653
+ | {
3654
+ /**
3655
+ * Enable ID-JAG support.
3656
+ */
3657
+ enabled: true;
3658
+ /**
3659
+ * Trusted ID-JAG issuers. These values are never published in OAuth metadata. Omit to trust this policy's browser-login IdP.
3660
+ *
3661
+ * @minItems 1
3662
+ */
3663
+ trustedIssuers?: [
3664
+ {
3665
+ /**
3666
+ * Exact issuer URL expected in the ID-JAG iss claim. Provide together with jwksUrl, or omit both to default to this policy's browser-login IdP.
3667
+ */
3668
+ issuer?: string;
3669
+ /**
3670
+ * JWKS URL used to verify ID-JAG signatures from this issuer. Provide together with issuer, or omit both to default to this policy's browser-login IdP.
3671
+ */
3672
+ jwksUrl?: string;
3673
+ /**
3674
+ * Optional allow-list of client IDs accepted from this issuer. The ID-JAG client_id must still match the authenticated token-endpoint client.
3675
+ */
3676
+ expectedClientIds?: string[];
3677
+ /**
3678
+ * How the ID-JAG subject is mapped into the gateway subject ID.
3679
+ */
3680
+ subjectMapping?: "iss_prefix" | "iss_tenant_prefix" | "sub_id_only";
3681
+ },
3682
+ ...{
3683
+ /**
3684
+ * Exact issuer URL expected in the ID-JAG iss claim. Provide together with jwksUrl, or omit both to default to this policy's browser-login IdP.
3685
+ */
3686
+ issuer?: string;
3687
+ /**
3688
+ * JWKS URL used to verify ID-JAG signatures from this issuer. Provide together with issuer, or omit both to default to this policy's browser-login IdP.
3689
+ */
3690
+ jwksUrl?: string;
3691
+ /**
3692
+ * Optional allow-list of client IDs accepted from this issuer. The ID-JAG client_id must still match the authenticated token-endpoint client.
3693
+ */
3694
+ expectedClientIds?: string[];
3695
+ /**
3696
+ * How the ID-JAG subject is mapped into the gateway subject ID.
3697
+ */
3698
+ subjectMapping?: "iss_prefix" | "iss_tenant_prefix" | "sub_id_only";
3699
+ }[],
3700
+ ];
3701
+ /**
3702
+ * Optional allow-list of RFC 9396 authorization_details type values accepted from ID-JAGs.
3703
+ */
3704
+ authorizationDetailsTypesAllowed?: string[];
3705
+ };
2564
3706
  /**
2565
3707
  * Optional overrides for the derived browser-login settings.
2566
3708
  */
@@ -2575,6 +3717,42 @@ export declare interface McpWorkosOAuthInboundPolicyOptions {
2575
3717
  };
2576
3718
  }
2577
3719
 
3720
+ declare const mcpWorkosOAuthOptionsSchema: z.ZodObject<
3721
+ {
3722
+ clientId: z.ZodString;
3723
+ clientSecret: z.ZodString;
3724
+ scope: z.ZodOptional<z.ZodString>;
3725
+ gateway: z.ZodOptional<
3726
+ z.ZodObject<
3727
+ {
3728
+ accessTokenTtlSeconds: z.ZodOptional<z.ZodNumber>;
3729
+ refreshTokenTtlSeconds: z.ZodOptional<z.ZodNumber>;
3730
+ cimdEnabled: z.ZodOptional<z.ZodBoolean>;
3731
+ },
3732
+ z.core.$strict
3733
+ >
3734
+ >;
3735
+ idJag: z.ZodOptional<z.ZodUnknown>;
3736
+ browserLoginOverrides: z.ZodOptional<
3737
+ z.ZodObject<
3738
+ {
3739
+ remoteTimeoutMs: z.ZodOptional<z.ZodNumber>;
3740
+ stateTtlSeconds: z.ZodOptional<z.ZodNumber>;
3741
+ sessionTtlSeconds: z.ZodOptional<z.ZodNumber>;
3742
+ pkce: z.ZodOptional<
3743
+ z.ZodEnum<{
3744
+ none: "none";
3745
+ S256: "S256";
3746
+ }>
3747
+ >;
3748
+ },
3749
+ z.core.$strict
3750
+ >
3751
+ >;
3752
+ },
3753
+ z.core.$strict
3754
+ >;
3755
+
2578
3756
  /**
2579
3757
  * Arbitrary MCP _meta fields to expose downstream.
2580
3758
  * @public
@@ -3902,10 +5080,50 @@ declare type ValidatedAuth0OAuthOptions = z.infer<
3902
5080
  typeof mcpAuth0OAuthOptionsSchema
3903
5081
  >;
3904
5082
 
5083
+ declare type ValidatedClerkOAuthOptions = z.infer<
5084
+ typeof mcpClerkOAuthOptionsSchema
5085
+ >;
5086
+
5087
+ declare type ValidatedCognitoOAuthOptions = z.infer<
5088
+ typeof mcpCognitoOAuthOptionsSchema
5089
+ >;
5090
+
5091
+ declare type ValidatedEntraOAuthOptions = z.infer<
5092
+ typeof mcpEntraOAuthOptionsSchema
5093
+ >;
5094
+
5095
+ declare type ValidatedGoogleOAuthOptions = z.infer<
5096
+ typeof mcpGoogleOAuthOptionsSchema
5097
+ >;
5098
+
5099
+ declare type ValidatedKeycloakOAuthOptions = z.infer<
5100
+ typeof mcpKeycloakOAuthOptionsSchema
5101
+ >;
5102
+
5103
+ declare type ValidatedLogtoOAuthOptions = z.infer<
5104
+ typeof mcpLogtoOAuthOptionsSchema
5105
+ >;
5106
+
5107
+ declare type ValidatedOktaOAuthOptions = z.infer<
5108
+ typeof mcpOktaOAuthOptionsSchema
5109
+ >;
5110
+
5111
+ declare type ValidatedOneLoginOAuthOptions = z.infer<
5112
+ typeof mcpOneLoginOAuthOptionsSchema
5113
+ >;
5114
+
3905
5115
  declare type ValidatedOptions = z.infer<
3906
5116
  typeof mcpCapabilityFilterOptionsSchema
3907
5117
  >;
3908
5118
 
5119
+ declare type ValidatedPingOAuthOptions = z.infer<
5120
+ typeof mcpPingOAuthOptionsSchema
5121
+ >;
5122
+
5123
+ declare type ValidatedWorkosOAuthOptions = z.infer<
5124
+ typeof mcpWorkosOAuthOptionsSchema
5125
+ >;
5126
+
3909
5127
  /**
3910
5128
  * @public
3911
5129
  */