Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Merge remote-tracking branch 'origin/main' into saif/ai-6-add-support-for-filtering-personally-identifiable
Saif52919111164c
diff --cc backend/src/ee/services/ai-mcp-endpoint/ai-mcp-endpoint-service.tsindex 522d76b221,4ed3089c53..b4ebb8ac01--- a/backend/src/ee/services/ai-mcp-endpoint/ai-mcp-endpoint-service.ts+++ b/backend/src/ee/services/ai-mcp-endpoint/ai-mcp-endpoint-service.ts@@@ -12,10 -12,10 +12,11 @@@ import { ActionProjectType, TAiMcpEndpoimport { KeyStorePrefixes, TKeyStoreFactory } from "@app/keystore/keystore";import { getConfig } from "@app/lib/config/env";import { crypto as cryptoModule } from "@app/lib/crypto";- import { BadRequestError, NotFoundError, UnauthorizedError } from "@app/lib/errors";+ import { DatabaseErrorCode } from "@app/lib/error-codes";+ import { BadRequestError, DatabaseError, NotFoundError, UnauthorizedError } from "@app/lib/errors";import { logger } from "@app/lib/logger";import { ms } from "@app/lib/ms";+import { PiiEntityType, redactPiiFromObject } from "@app/lib/pii";import { ActorType, AuthMethod, AuthTokenType } from "@app/services/auth/auth-type";import { TAuthTokenServiceFactory } from "@app/services/auth-token/auth-token-service";import { TKmsServiceFactory } from "@app/services/kms/kms-service";@@@ -545,21 -545,13 +559,21 @@@ export const aiMcpEndpointServiceFactorForbiddenError.from(permission).throwUnlessCan(ProjectPermissionMcpEndpointActions.Edit,- ProjectPermissionSub.McpEndpoints+ subject(ProjectPermissionSub.McpEndpoints, { name: endpoint.name }));- const updateData: { name?: string; description?: string; piiFiltering?: boolean } = {};+ const updateData: {+ name?: string;+ description?: string;+ piiRequestFiltering?: boolean;+ piiResponseFiltering?: boolean;+ piiEntityTypes?: string[];+ } = {};if (name !== undefined) updateData.name = name;if (description !== undefined) updateData.description = description;- if (piiFiltering !== undefined) updateData.piiFiltering = piiFiltering;+ if (piiRequestFiltering !== undefined) updateData.piiRequestFiltering = piiRequestFiltering;+ if (piiResponseFiltering !== undefined) updateData.piiResponseFiltering = piiResponseFiltering;+ if (piiEntityTypes !== undefined) updateData.piiEntityTypes = piiEntityTypes;let updatedEndpoint = endpoint;if (Object.keys(updateData).length > 0) {diff --cc docs/documentation/platform/agent-sentinel/mcp-endpoints.mdxindex 2e4ef27a28,db77cc2d6b..1db0473ddb--- a/docs/documentation/platform/agent-sentinel/mcp-endpoints.mdx+++ b/docs/documentation/platform/agent-sentinel/mcp-endpoints.mdx@@@ -138,49 -132,35 +138,78 @@@ When a user connects to an endpoint wit+ ## Access Control with Permission Conditions++ MCP endpoints support granular role-based access control through permission conditions. This allows you to restrict access to specific endpoints based on their name.++ ### Example Use Cases++ - **Team-specific endpoints**: Create a role that only allows access to endpoints matching `engineering-*`+ - **Environment separation**: Restrict production endpoints (`prod-*`) to senior team members++ ### Configuring Permission Conditions++ When creating or editing a project role, you can add conditions to MCP endpoint permissions:++ 1. Navigate to **Access Control** > **Roles**+ 2. Edit or create a role+ 3. Under **MCP Endpoints** permissions, click **Add Condition**+ 4. Select the **Endpoint Name** property+ 5. Choose an operator (`equal`, `not equal`, `glob match`, or `in`)+ 6. Enter the value(s) to match++ ### Supported Operators++ | Operator | Description | Example |+ | ------------ | ------------------- | ------------------------------ |+ | `equal` | Exact match | `engineering-tools` |+ | `not equal` | Does not match | `prod-endpoint` |+ | `glob match` | Pattern matching | `prod-*`, `*-internal` |+ | `in` | Matches any in list | `["endpoint-1", "endpoint-2"]` |++## PII Filtering++MCP Endpoints support automatic PII (Personally Identifiable Information) filtering to redact sensitive data from requests sent to MCP servers and responses returned to AI clients. This helps maintain compliance and prevent accidental exposure of sensitive information through AI tool interactions.++### Supported PII Types++| Type | Description | Redacted As |+|------|-------------|-------------|+| Email | Email addresses | `[REDACTED_EMAIL]` |+| Phone | Phone numbers (US format) | `[REDACTED_PHONE]` |+| SSN | Social Security Numbers | `[REDACTED_SSN]` |+| Credit Card | Credit card numbers | `[REDACTED_CREDIT_CARD]` |+| IP Address | IPv4 and IPv6 addresses | `[REDACTED_IP]` |++### Configuring PII Filters++<Tabs>- <Tab title="Infisical UI">- <Steps>- <Step title="Navigate to Endpoint Details">- Open your MCP endpoint and locate the **Filters** section in the left column.-- - </Step>- <Step title="Open Filter Configuration">- Click the edit icon to open the PII filter configuration modal.-- - </Step>- <Step title="Configure Filtering Options">- Configure the following options:-- - **Filter Requests**: Enable to redact PII from requests sent to MCP servers- - **Filter Responses**: Enable to redact PII from responses returned to AI clients- - **PII Detection**: Select which types of PII to detect and redact- </Step>- <Step title="Save Configuration">- Click **Save** to apply your PII filter settings. Changes take effect immediately for new tool invocations.- </Step>- </Steps>- </Tab>++ <Tab title="Infisical UI">++ <Steps>++ <Step title="Navigate to Endpoint Details">++ Open your MCP endpoint and locate the **Filters** section in the left column.++++ ++ </Step>++ <Step title="Open Filter Configuration">++ Click the edit icon to open the PII filter configuration modal.++++ ++ </Step>++ <Step title="Configure Filtering Options">++ Configure the following options:++++ - **Filter Requests**: Enable to redact PII from requests sent to MCP servers++ - **Filter Responses**: Enable to redact PII from responses returned to AI clients++ - **PII Detection**: Select which types of PII to detect and redact++ </Step>++ <Step title="Save Configuration">++ Click **Save** to apply your PII filter settings. Changes take effect immediately for new tool invocations.++ </Step>++ </Steps>++ </Tab>+</Tabs>+## FAQ<AccordionGroup>