You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Automatically generate and manage HMAC secrets when SessionManagementV2
is enabled in VirtualMCPServer resources, eliminating manual secret
creation.
Also add e2e and integration tests to validate the functionality
Related-to: #3867
Copy file name to clipboardExpand all lines: cmd/vmcp/README.md
+29-1Lines changed: 29 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -237,7 +237,35 @@ spec:
237
237
key: hmac-secret
238
238
```
239
239
240
-
**Note**: Kubernetes deployments **require** `VMCP_SESSION_HMAC_SECRET` to be set (the server will fail to start without it). For non-Kubernetes environments (local development/testing), a default insecure secret is used as a fallback, but this is **NOT recommended for production**.
240
+
**Note**: When **Session Management V2 is enabled**, Kubernetes deployments **require** `VMCP_SESSION_HMAC_SECRET` to be set (the server will fail to start without it). For non-Kubernetes environments (local development/testing), a default insecure secret is used as a fallback, but this is **NOT recommended for production**. If Session Management V2 is disabled, this environment variable is not required.
When deploying vMCP via the **ToolHive operator** with Session Management V2 enabled, the HMAC secret is **automatically generated and managed** for you:
- ✅ Automatically generate a cryptographically secure 32-byte HMAC secret
261
+
- ✅ Store it in a Kubernetes Secret named `{vmcp-name}-hmac-secret`
262
+
- ✅ Inject it into the vMCP deployment as `VMCP_SESSION_HMAC_SECRET`
263
+
- ✅ Validate existing secrets (ownership, structure, and content)
264
+
- ✅ Automatically delete the secret when the VirtualMCPServer is removed
265
+
266
+
**No manual secret generation or management required!** The operator handles all of this automatically when you enable Session Management V2.
267
+
268
+
> **Note**: The secret is generated once at creation time and persists for the lifetime of the VirtualMCPServer. Secret rotation is not currently supported but may be added in a future release.
0 commit comments