GeezerVison is showing github.com — [Bug] Security config save throws 403 error · Issue #30 · runcycles/cycles-dashboard
[Bug] Security config save throws 403 error #30DescriptionDescription
When attempting to save the Security Config in the Webhooks tab, the UI returns a 403 Forbidden error. Notably, the admin-server produces zero logs during this action, suggesting the request is being intercepted or rejected before reaching the application logic.
Steps to Reproduce
-
Open Cycles Dashboard (v0.1.25.18).
-
Navigate to Webhooks > Security Config.
-
Click Save Config.
-
Observe the 403 error in the browser.
Expected Behavior
The configuration should save successfully, and the admin-server should log the incoming POST/PUT request.
Actual Behavior
UI: Displays 403 Forbidden.
Server Logs: No output generated; the request does not appear to hit the admin-server container.
Environment Details
Dashboard Version: v0.1.25.18
Admin-Server Version: v0.1.25.12
Deployment: Docker Activityamavashev commented on Apr 13, 2026 Diagnosed and fix in flight: this is a server-side CORS bug, not a dashboard bug.
Root cause
WebConfig.addCorsMappings in cycles-server-admin listed allowedMethods("GET", "POST", "PATCH", "DELETE", "OPTIONS") — PUT is missing. The browser CORS preflight for PUT /v1/admin/config/webhook-security is rejected by Spring's CorsFilter before the AuthInterceptor runs, which is exactly why you saw a 403 with zero application logs — the rejection happens in the filter layer, never reaching app code.
webhook-security is the only admin endpoint using PUT, so no other operation regressed.
Fix
runcycles/cycles-server-admin#90 — adds PUT to allowedMethods, plus a regression test so this can't drift back. Released as admin-server v0.1.25.13 once merged.
Workaround until released
If your dashboard is reaching the admin server same-origin through the dashboard's nginx proxy (the standard prod docker-compose stack), CORS doesn't apply and the bug doesn't reproduce. The 403 only occurs on cross-origin layouts — typically:
- Dashboard running via Vite dev server (
localhost:5173) hitting admin server on a different port.
- Any deployment where the dashboard origin ≠ admin-server origin.
If that matches your setup, you can point the dashboard at http://cycles-admin:7979/v1/... via the proxied /v1/ route in the dashboard container's nginx.conf — that bypasses CORS entirely.
Confirmation needed
Could you confirm whether your dashboard is hitting the admin server same-origin (via nginx proxy) or cross-origin (direct)? If same-origin, there's something else going on and I'll dig further. amavashev commented on Apr 13, 2026 Updated diagnosis — CORS is unlikely to be your specific cause. Re-checked the server code more carefully:
When a CORS preflight fails, the browser surfaces a network error / TypeError: Failed to fetch to the JS — your dashboard's client.ts would never see HTTP 403 status. You report seeing 403, which means a real HTTP response came back from somewhere.
I also re-read AuthInterceptor.java and confirmed: for /v1/admin/config/*, validateAdminKey returns only 401 or 500, never 403. So no application code in cycles-server-admin produces a 403 for this endpoint either.
That means the 403 is being injected by something in front of the admin-server container, not by the app. Most likely candidates:
- A reverse proxy with method or path restrictions — Caddy/Traefik/nginx in front of the admin server, an API gateway, or a corporate WAF (Cloudflare, AWS WAF) blocking
PUT /admin/* by default.
- Browser/local proxy — Burp, ZAP, Charles, or an MITM extension synthesizing the 403.
Could you grab a few diagnostics from your deployment and share them?
- DevTools → Network → the failed PUT → Response headers. Share
Server:, X-Powered-By:, Via:, etc. — the Server header tells us which layer answered.
- DevTools → Response body. Our
ErrorResponse JSON always has error, message, request_id. A 403 with an HTML body or empty body means a non-Spring layer answered.
docker logs cycles-admin --since 5m filtered around the time of the click. If there's no entry at all matching a /v1/admin/config/webhook-security request line, the container never received the request.
- Deployment topology: anything between the browser and the admin-server container? Caddy? Traefik? Cloudflare?
(Server PR runcycles/cycles-server-admin#90 still ships — PUT should have been in the CORS allowlist regardless — but it's almost certainly not what's causing your symptom.) amavashev commented on Apr 13, 2026 Confirmed fixed by the user. Released as admin-server v0.1.25.13 (image `ghcr.io/runcycles/cycles-server-admin:0.1.25.13`).
To pick up the fix, bump the admin-server image tag in your docker-compose:
```yaml
cycles-admin:
image: ghcr.io/runcycles/cycles-server-admin:0.1.25.13
```
Then `docker compose pull cycles-admin && docker compose up -d cycles-admin`. Webhook Security Config save will now work end-to-end on cross-origin layouts.
Lesson noted: I initially walked back the CORS theory because I assumed CORS preflight failures wouldn't surface as visible 403s in the browser. That was wrong — the failed OPTIONS preflight DOES return 403 (from Spring's `CorsFilter`) and shows up in DevTools Network as a 403. The JS sees a TypeError, but the Network tab shows the real status. Your report was accurate; my walked-back framing was off. Sorry for the confusion.
Regression guard added in `WebConfigTest.addCorsMappings_includesPutForWebhookSecurityConfigEndpoint` so any future refactor that drops PUT will fail the build.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|