Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Merge branch 'main' of https://github.com/Infisical/infisical into sheensantoscapadngan/sheen-age2-133-mcp-proxy-add-tools-filtering

Sheen Capadngan49225c52f71e
diff --cc backend/src/ee/routes/v1/agent-vault-routers/agent-vault-access-bundle-router.ts
index ef61516ebd,c9f80cbc48..b27dae8e75
--- a/backend/src/ee/routes/v1/agent-vault-routers/agent-vault-access-bundle-router.ts
+++ b/backend/src/ee/routes/v1/agent-vault-routers/agent-vault-access-bundle-router.ts
@@@ -21,9 -16,10 +17,11 @@@ import { PostHogEventTypes } from "@app
import { actorContext } from "./agent-vault-router-fns";
import {
AgentVaultActorRefSchema,
+ AgentVaultBundleSkillSchema,
AgentVaultCreatedMemberSchema,
AgentVaultCreateServiceBodySchema,
+ AgentVaultDescriptionSchema,
+ AgentVaultListMcpToolsBodySchema,
agentVaultListQuery,
AgentVaultMemberIdsSchema,
AgentVaultMemberRevokeIdsSchema,
diff --cc backend/src/ee/services/agent-vault-access-bundle/agent-vault-access-bundle-service.ts
index 13d28412d3,853936cb9c..ef7a6efc58
--- a/backend/src/ee/services/agent-vault-access-bundle/agent-vault-access-bundle-service.ts
+++ b/backend/src/ee/services/agent-vault-access-bundle/agent-vault-access-bundle-service.ts
@@@ -156,9 -151,12 +165,12 @@@ type TAgentVaultAccessBundleServiceFact
agentVaultMemberDAL: Pick<TAgentVaultMemberDALFactory, "findProductMembers">;
userGroupMembershipDAL: Pick<TUserGroupMembershipDALFactory, "find">;
identityGroupMembershipDAL: Pick<TIdentityGroupMembershipDALFactory, "find">;
+ agentVaultDelegationDAL: TOnBehalfOfDeps["agentVaultDelegationDAL"];
+ orgDAL: TOnBehalfOfDeps["orgDAL"];
+ userDAL: TOnBehalfOfDeps["userDAL"];
agentVaultOauthService: Pick<
TAgentVaultOauthServiceFactory,
- "claimAuthorization" | "buildCredentialFromAuthorization"
+ "claimAuthorization" | "buildCredentialFromAuthorization" | "readAuthorizationAccessToken" | "refreshServiceToken"
>;
} & TAgentVaultActorNameDALs;
diff --cc backend/src/ee/services/agent-vault-oauth/agent-vault-oauth-discovery-fns.ts
index 7c937dfadb,978be41232..248682c8da
--- a/backend/src/ee/services/agent-vault-oauth/agent-vault-oauth-discovery-fns.ts
+++ b/backend/src/ee/services/agent-vault-oauth/agent-vault-oauth-discovery-fns.ts
@@@ -8,16 -7,10 +8,16 @@@ import { PRIVATE_ADDRESS_REFUSED_MESSAG
import { TOauthHttpClient, TOauthHttpResponse } from "./agent-vault-oauth-http-fns";
import { AgentVaultOauthCompatibility } from "./agent-vault-oauth-types";
+// Infisical Cloud never reaches private networks, so only a self-hosted instance is told how to allow them.
+export const privateNetworkHint = () =>
+ getConfig().isCloud
+ ? ""
+ : " If you're self-hosting Infisical, set the 'ALLOW_INTERNAL_IP_CONNECTIONS' environment variable to 'true' on your instance to allow it.";
+
export const OFFLINE_ACCESS_SCOPE = "offline_access";
- // The spec sets no limit. Slack, the largest real server found, lists 30; this only stops a buggy or hostile
+ // The spec sets no limit. PostHog, the largest real server found, lists 153; this only stops a buggy or hostile
// server from making every authorization store and send an enormous scope list.
- export const MAX_OAUTH_SCOPES = 100;
+ export const MAX_OAUTH_SCOPES = 200;
// Each request has its own 10 second timeout, so without an overall budget a server that hangs could hold the
// request past a 60 second gateway.
const DISCOVERY_BUDGET_MS = 25_000;
diff --cc docs/documentation/platform/agent-vault/proxies.mdx
index ebd4626ea0,42fd0c67ed..332ef9cd71
--- a/docs/documentation/platform/agent-vault/proxies.mdx
+++ b/docs/documentation/platform/agent-vault/proxies.mdx
@@@ -185,14 -190,8 +190,14 @@@ The proxy also returns a 403 for
- A request to a port the service's [host pattern](/documentation/platform/agent-vault/http-apis#host-patterns) doesn't name, such as `example.com:8443` for a service on `example.com`, which only covers port `443`
- A request that breaks the service's [method or path rules](/documentation/platform/agent-vault/http-apis#methods-and-paths), under either traffic policy
- - A request to a service that needs the session owner's [personal values](/documentation/platform/agent-vault/access-bundles#set-up-your-personal-values), before they set them up
+ - A request to a service whose [personal values](/documentation/platform/agent-vault/access-bundles#set-up-your-personal-values) aren't set up yet for the session's owner, or, for a session [on behalf of a user](/documentation/platform/agent-vault/sessions-on-behalf-of-users), for that user
+For an [MCP service that allows only some tools](/documentation/platform/agent-vault/mcp-servers#allowed-tools), the proxy also blocks:
+
+- A call to a tool the service doesn't allow. The agent gets an MCP error that names the tool
+- A request the proxy can't read to check which tools it calls, such as a compressed body, a body in a character set other than UTF-8, or JSON that isn't a valid MCP message or doesn't match its `Mcp-Method` and `Mcp-Name` headers. The proxy also blocks a request with a body that isn't a `POST`. The agent gets a 400
+- A request with a body larger than 32 MiB. The agent gets a 413
+
### Exceptions
Exceptions allow your agents to access hosts that aren't covered by any service in an access bundle, even when your proxy uses **Access bundle hosts only**. Use exceptions for hosts every agent needs, such as a package registry or a documentation site.
diff --cc frontend/src/hooks/api/agentVault/mutations.tsx
index fcfe997309,89fa743c5d..fad0aa9f9b
--- a/frontend/src/hooks/api/agentVault/mutations.tsx
+++ b/frontend/src/hooks/api/agentVault/mutations.tsx
@@@ -12,8 -12,10 +12,11 @@@ import
TAgentVaultAccessBundle,
TAgentVaultActorIdsDTO,
TAgentVaultActorRef,
+ TAgentVaultBundleSkill,
+ TAgentVaultDelegation,
+ TAgentVaultDelegationDetail,
TAgentVaultGrantedMember,
+ TAgentVaultMcpTool,
TAgentVaultMemberWriteResult,
TAgentVaultMintedSession,
TAgentVaultOauthAuthorization,
@@@ -30,11 -34,13 +35,14 @@@
TCreateAgentVaultAccessBundleDTO,
TCreateAgentVaultOauthAuthorizationDTO,
TCreateAgentVaultOauthAuthorizationResponse,
+ TCreateAgentVaultProxyDTO,
TCreateAgentVaultServiceDTO,
TCreateAgentVaultSessionDTO,
+ TCreateAgentVaultSkillDTO,
TCreateAgentVaultVariableDTO,
TDeleteAgentVaultPersonalValuesDTO,
+ TListAgentVaultMcpToolsDTO,
+ TSetAgentVaultDelegationDTO,
TSetAgentVaultPersonalValuesDTO,
TUpdateAgentVaultAccessBundleDTO,
TUpdateAgentVaultMemberRolesDTO,