[1.0.1] - 2026-05-12 - Security Hardening, UI Improvements, and Bug Fixes
Overview
Release 1.0.1 consolidates 59 PRs focused on security hardening, UI/UX improvements, authentication enhancements, and bug fixes. This release addresses pentesting findings, improves OAuth flows, enhances the Admin UI rewrite, and strengthens RBAC enforcement:
- ๐ Security & Auth - CSRF token validation, comprehensive password policy, nonce-based CSP, UAID cross-gateway auth forwarding, secrets generation CLI, environment-aware defaults, SIEM integration, HTTP Basic Auth for OAuth, configurable JWT headers, regex timeout detection, sanitized error messages, host allowlist validation.
- ๐ฅ๏ธ Admin UI - Gateways table, MCP server form with advanced settings, useMCPServerForm hook, OAuth redirect_uri hint improvements, A2A agent list refresh fix, team whitespace normalization, SSO admin team access fix, DOM detachment hardening.
- ๐งฉ Plugins - CPEX framework migration, rate-limiter config alignment, detailed violation information in OTEL spans, plugin logging respects LOG_LEVEL.
- ๐ API & Transport - gRPC methods as MCP tools, Generic OIDC group-to-team mapping, compliance report generator, OAuth endpoint discovery, PATCH endpoint for user updates, client disconnect middleware, migrate Gateways component to /servers endpoint.
- ๐ง Infrastructure - Alembic migration safety improvements, cargo-vet release workflow documentation, unified live-gateway test directories, Buildx cache scope unification, single-head Alembic chain enforcement.
- ๐ Bug Fixes - Playwright test suite fixes, pubsub close handling, tool validation hardening, A2A HTTP 500 prevention, SSO code length increase, OAuth scope claim type handling, tool reachability restoration, FK cascade constraints, UUID validation, mTLS preservation, JSON-RPC error codes, content pattern scan performance.
โ ๏ธ Breaking Changes
๐งฉ Plugin Framework Extracted to CPEX (#3754, #3753)
Action Required: The internal plugin framework (mcpgateway/plugins/framework/, mcpgateway/plugins/tools/, plugin_templates/) has been replaced by the external CPEX package (cpex>=0.1.0).
What breaks:
- All
from mcpgateway.plugins.framework import ...imports โfrom cpex.framework import ... - All
from mcpgateway.plugins.tools import ...imports โfrom cpex.tools import ... PromptPosthookPayload.nameโ.prompt_idToolPreInvokePayload.argumentsโ.args- Plugin mode vocabulary expanded:
enforceโsequential,permissiveโtransform,enforce_ignore_errorโsequential+on_error: ignore
What still works (backward compatible):
- Legacy mode names (
enforce,enforce_ignore_error,permissive,disabled) inplugins/config.yamland Redis overrides โ translated automatically at runtime. - The API accepts both legacy and native mode values for
PluginModeUpdateRequestandPluginPolicyItem.mode.
Migration:
- Update all plugin imports from
mcpgateway.plugins.frameworkโcpex.framework. - Rename
payload.nameโpayload.prompt_idin prompt posthook handlers,payload.argumentsโpayload.argsin tool pre-invoke handlers. - (Optional) Update config mode values:
enforceโsequential,permissiveโtransform. - (Optional) Replace
enforce_ignore_errorwithmode: sequential+on_error: ignore. - Run
pytest tests/acceptance/plugins/test_cpex_contract.pyto verify.
Full migration guide: docs/docs/using/plugins/migration-to-cpex.md
Rollback: Not possible without reverting the PR โ the internal framework is deleted. Pin to the pre-CPEX release if rollback is needed.
๐ Environment-Aware Security Defaults (#3197)
Action Required: REQUIRE_STRONG_SECRETS now defaults to true when ENVIRONMENT=production. Production deployments using default or weak secrets will now fail to start by default to ensure a "fail-safe" state.
Impact: Production deployments must use strong, randomly-generated secrets for JWT_SECRET_KEY, AUTH_ENCRYPTION_SECRET, and other security-sensitive configuration values. Deployments with weak secrets will fail startup validation.
Migration: Use the new secrets generation CLI (python -m mcpgateway.utils.generate_keys) to generate strong secrets, or set REQUIRE_STRONG_SECRETS=false temporarily (not recommended for production).
Added
๐ Security & Auth
- ๐ก๏ธ CSRF Token Validation (#3248) โ Comprehensive CSRF protection for all state-changing requests (POST, PUT, PATCH, DELETE). Tokens are generated per-session and validated via middleware. Addresses pentesting findings on session security.
- ๐ Comprehensive Password Policy (#4412) โ Enforces minimum length (12 chars), complexity requirements (uppercase, lowercase, digit, special char), password history (prevents reuse of last 5 passwords), and configurable expiration. New config:
PASSWORD_MIN_LENGTH,PASSWORD_REQUIRE_UPPERCASE,PASSWORD_REQUIRE_LOWERCASE,PASSWORD_REQUIRE_DIGIT,PASSWORD_REQUIRE_SPECIAL,PASSWORD_HISTORY_COUNT,PASSWORD_EXPIRY_DAYS. Addresses pentesting findings. - ๐ Nonce-Based CSP (#4424) โ Removes
unsafe-inlineandunsafe-evalfrom Content Security Policy by implementing nonce-based script execution. Each response generates a unique nonce for inline scripts and styles. Significantly hardens XSS defenses. - ๐ UAID Cross-Gateway Auth Forwarding (#4342, #4236) โ Implements fail-closed domain allowlist for cross-gateway routing with bearer token forwarding for RBAC enforcement. New config:
UAID_ALLOWED_DOMAINS,UAID_ALLOW_ALL_DOMAINS. Startup validation logs ERROR if A2A enabled but allowlist not configured. - ๐ Secrets Generation CLI (#3196) โ New CLI tool for generating cryptographically secure secrets for JWT, encryption, and other security-sensitive configuration values.
- ๐ก๏ธ Environment-Aware Defaults (#3197) โ Implements fail-closed secrets validation.
REQUIRE_STRONG_SECRETSdefaults totruein production environments. Production deployments with weak secrets fail to start by default. - ๐ SIEM Integration (#3171) โ Security event export for SIEM systems. Structured security events with severity levels, correlation IDs, and forensic context.
- ๐ HTTP Basic Auth for OAuth (#4407) โ Adds HTTP Basic Authentication support for OAuth token exchange endpoints, improving compatibility with OAuth providers that require client credentials in Authorization header.
- ๐ซ Configurable JWT Authentication Header (#4494) โ Allows customization of JWT authentication header name via
JWT_AUTH_HEADERconfig. Supports non-standard header requirements for enterprise SSO integrations. - โฑ๏ธ Regex Timeout Detection (#4641) โ Runtime detection of Python regex timeout support (Python 3.13+). Falls back to thread-based timeout on older versions. Improves ReDoS defense reliability.
- ๐ Sanitized Error Messages (#4368) โ API validation error messages sanitized to prevent information disclosure. Removes sensitive field values and internal paths from error responses.
- ๐ซ Host Allowlist Validation (#4329, #4489) โ Gateway test endpoint now validates outbound requests against approved host allowlist. Prevents SSRF attacks via test endpoint. New config:
GATEWAY_TEST_ALLOWED_HOSTS. - ๐ Admin-Delegated Token Creation (#4487) โ Admins can create tokens on behalf of other users via
user_emailparameter. Supports service account workflows and delegated access patterns. - ๐ซ Admin Bypass for Team Token Creation (#4488) โ Platform admins can create team-scoped tokens via
POST /tokens/teams/{team_id}without team membership. Supports service account provisioning workflows.
๐ฅ๏ธ Admin UI
- ๐ Gateways Table (#4537) โ New gateways management table in Admin UI with filtering, sorting, and bulk operations.
- ๐ MCP Server Form Advanced Settings (#4597) โ Complete advanced settings section in MCP server creation/edit form including OAuth configuration, rate limiting, and transport options.
- ๐ฃ useMCPServerForm Hook (#4561) โ Reusable React hook for MCP server form state management, validation, and submission. Supports both create and edit workflows.
- ๐ OAuth Redirect URI Hint (#4417) โ Improved OAuth redirect_uri hint for proxied/iframe deployments. Automatically detects and suggests correct redirect URI based on deployment context.
- ๐ A2A Agent List Refresh (#4260) โ A2A agent list now refreshes correctly after deletion. Fixes stale UI state issue.
- โ Team Whitespace Normalization (#4235) โ Normalizes team_id whitespace checks across all edit functions and server-side visibility guards. Prevents whitespace-related access control bypasses.
- ๐ฅ SSO Admin Team Access (#4080) โ SSO users with platform_admin role can now access teams in Admin UI. Fixes visibility issue for SSO-authenticated admins.
- ๐ DOM Detachment Hardening (#3937) โ Hardens
ensureNoResultsElement()against stale DOM IDs in Playwright tests. Improves test reliability. - ๐ญ Playwright Test Fixes (#4264) โ Resolves HTMX DOM detachment issues in Playwright tests. Improves E2E test stability.
- ๐ฅ Public Team Join Button (#4089) โ Admins now see join button for public teams in UI. Fixes admin UX inconsistency.
๐งฉ Plugins
- ๐ CPEX Framework Migration (#3754) โ Replaces internal plugin framework with external CPEX package. See breaking changes section for migration details.
- CPEX external plugin framework dependency (
cpex>=0.1.0rc1) replacing the in-tree implementation (#3754) - New plugin execution modes:
concurrent,audit,fire_and_forget(#3754) on_errorfield for tool plugin bindings:fail,ignore,disable(#3754)- Acceptance tests for CPEX API contract (
tests/acceptance/plugins/test_cpex_contract.py) (#3754) - Admin UI compatibility layer: unified mode labels, dynamic filter dropdown, deduplicated badges (#3754)
- Playwright E2E tests for plugins page (#3754)
- โ๏ธ Rate Limiter Config Alignment (#4582, #4596) โ Aligns rate-limiter plugin config with gateway conventions. Bumps cpex-rate-limiter to 0.0.6.
- ๐ Plugin Violation Details in OTEL (#4272) โ Adds detailed plugin violation information to OpenTelemetry spans. Improves observability for plugin enforcement.
- ๐ Plugin Logging Respects LOG_LEVEL (#4363) โ Plugin logging configuration now respects
LOG_LEVELenvironment variable. Fixes verbose plugin logging in production.
๐ API & Transport
- ๐ gRPC Methods as MCP Tools (#3202) โ Exposes gRPC methods as MCP tools. Enables MCP clients to invoke gRPC services through the gateway.
- ๐ Generic OIDC Group-to-Team Mapping (#3695, #2120) โ Implements generic OIDC group claim mapping to ContextForge teams for SSO. Supports custom group claim paths and mapping rules.
- ๐ Compliance Report Generator (#3671, #2224) โ Generates compliance reports for audit and regulatory requirements. Exports tool usage, access patterns, and security events.
- ๐ OAuth Endpoint Discovery (#3571, #1435) โ Wires OAuth endpoint discovery into gateway UI and service. Automatically discovers OAuth configuration from provider metadata.
- ๐ง PATCH Endpoint for User Updates (#3145) โ Adds
PATCH /users/{user_id}endpoint for partial user updates. Supports field-level updates without full resource replacement. - ๐ Client Disconnect Middleware (#3138) โ Adds middleware to detect and handle client disconnects. Prevents CLOSE_WAIT socket accumulation.
- ๐ Migrate Gateways Component (#4604) โ Migrates Gateways component from
/gatewaysto/serversendpoint. Unifies server management API surface. - ๐ Redis-Backed Rate Limiting (#4423) โ Implements Redis-backed rate limiting with tier-based limits. Supports distributed rate limiting across gateway instances.
๐ง Infrastructure & Development
- ๐๏ธ Alembic Migration Safety (#4479) โ Improves Alembic migration safety with idempotent patterns and validation checks. Prevents migration conflicts and data loss.
- ๐ฆ Cargo-Vet Release Workflow (#4600) โ Documents cargo-vet release workflow for Rust dependency auditing. Improves supply chain security.
- ๐งช Unified Live-Gateway Test Directories (#4448) โ Consolidates live-gateway test directories and uses
uv runfor test execution. Improves test organization and reliability. - ๐๏ธ Buildx Cache Scope Unification (#4634) โ Unifies Docker Buildx cache scope and enforces single-head Alembic chain in CI. Improves build performance and prevents migration conflicts.
- ๐ populate-tiny Makefile Target (#4563) โ Adds
make populate-tinytarget for minimal test data population. Speeds up local development setup. - ๐งน Remove RC3 References (#4567) โ Removes release candidate references from documentation and configuration. Cleanup for GA release.
Changed
๐ Security & Auth
- ๐ Inline Event Handler Removal (#4673) โ Removes inline event handlers for strict CSP compliance. All event handlers now use addEventListener pattern.
- ๐ Layer-1 Visibility Filter Centralization (#4669) โ Centralizes Layer-1 visibility filter in streamablehttp_transport.py and fixes SSO admin bypass. Ensures consistent token scoping across transports.
- ๐ A2A Service Admin Bypass Alignment (#4513) โ Aligns A2A service with post-#4341 admin-bypass private-deny rule. Ensures consistent RBAC enforcement.
- ๐ OAuth Scope Claim Type Handling (#4594) โ Handles OAuth scope claim as both string and list types. Improves OAuth provider compatibility.
- ๐ SSO Code Length Increase (#4633) โ Increases SSO authorization code max_length from 512 to 4096 characters. Supports OAuth providers with long authorization codes.
- ๐ mTLS Preservation for Token Requests (#4425) โ Preserves mTLS configuration for OAuth token requests. Ensures certificate-based authentication works end-to-end.
- ๐ Tailwind CSS Local Build (#3181) โ Moves Tailwind CSS from CDN to local compiled build. Eliminates external dependency and improves CSP compliance.
- Audit Logging โ Added explicit audit-friendly logging when
REQUIRE_STRONG_SECRETS=falseis used as an override in production environments (#3197). - Configuration Documentation โ Updated
.env.exampleto document the new environment-aware default behavior and security enforcement logic (#3197).
๐ API & Performance
- โก User Email Lookup Caching (#4595) โ Caches
get_user_by_emailat service level to reduce database hot-path queries. Improves authentication performance. - โก Content Pattern Scan Performance (#4470) โ Speeds up content pattern scans with optimized regex compilation and execution. Reduces scan latency.
- ๐ง FastAPI Query Validator Centralization (#4540) โ Centralizes FastAPI Query validators to prevent drift. Ensures consistent validation across all endpoints.
- ๐ง User Email Extraction Unification (#4539) โ Unifies user-email extraction with email-over-sub precedence. Ensures consistent identity resolution across codebase.
Removed
mcpgateway/plugins/framework/โ entire internal plugin framework (moved tocpexpackage) (#3754)mcpgateway/plugins/tools/โ CLI tools (moved tocpexpackage) (#3754)plugin_templates/โ bootstrap templates (now provided bymcpplugins bootstrapCLI fromcpex) (#3754)
Fixed
๐ Security & Auth
- ๐ Internal Exception Details Leakage (#4427) โ Prevents internal exception details from leaking in HTTP responses. Sanitizes error messages for security.
- ๐ RBAC Plugin Binding DELETE (#4405) โ Enforces team-membership check on plugin binding DELETE endpoints. Fixes RBAC bypass vulnerability.
- ๐ JSON-RPC Unknown Method Error Code (#4356) โ Returns -32601 for unknown JSON-RPC methods instead of -32000. Fixes protocol compliance issue.
- ๐ Rust Plugin Exception Format (#4137) โ Returns proper JSON-RPC format for plugin exceptions in Rust internal endpoints. Fixes error handling consistency.
๐ Bug Fixes
- ๐งช UI Test Suite Failures (#4701) โ Resolves UI test suite failures across auth, CSRF, and password policy tests. Improves test reliability.
- ๐งช Playwright Test Failures (#4691) โ Resolves Playwright test failures and container build improvements. Fixes E2E test stability issues.
- ๐ Pubsub Close Handling (#4661) โ Fixes pubsub connection close handling. Prevents resource leaks on connection termination.
- ๐ง Tool Validation Hardening (#4656) โ Adds tool name length limit and skipped-tool feedback. Prevents tool registration failures from invalid names.
- ๐ A2A HTTP 500 Prevention (#4637) โ Prevents HTTP 500 when user dict passed to SQL query in agent listing. Fixes type error in A2A service.
- ๐ง Tool Reachability Restoration (#4499) โ Restores tool reachability status during gateway refresh. Fixes tool availability tracking.
- ๐๏ธ FK Cascade Constraints (#4501) โ Adds
ondelete="CASCADE"to 6 FK constraints that prevented tool/resource/prompt deletion after invocation. Fixes orphaned record cleanup. - ๐ง UUID Format Validation (#4457) โ Validates UUID format in server association fields to prevent silent tool assignment failures. Improves error reporting.
Security
- CSRF token validation for state-changing requests (#3248)
- Comprehensive password policy implementation (#4412)
- Nonce-based CSP removing unsafe-inline and unsafe-eval (#4424)
- UAID cross-gateway auth forwarding with fail-closed allowlist (#4342)
- Environment-aware security defaults with fail-closed secrets (#3197)
- SIEM integration for security event export (#3171)
- Host allowlist validation for gateway test endpoint (#4329, #4489)
- Sanitized API validation error messages (#4368)
- Internal exception details leakage prevention (#4427)
- RBAC enforcement on plugin binding DELETE endpoints (#4405)
- Inline event handler removal for CSP compliance (#4673)
- Regex timeout detection for ReDoS defense (#4641)