GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [Bug] Security config save throws 403 error · Issue #30 · runcycles/cycles-dashboard

[Bug] Security config save throws 403 error #30

New issue
Copy link
New issue
Copy link
Closed
Closed
[Bug] Security config save throws 403 error#30
Copy link

Description

@Prikis
Prikis
opened on Apr 13, 2026
Issue body actions

Description
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

  1. Open Cycles Dashboard (v0.1.25.18).

  2. Navigate to Webhooks > Security Config.

  3. Click Save Config.

  4. 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

Activity

  1. amavashev
    added a commit that references this issue on Apr 13, 2026

    fix: v0.1.25.13 — CORS allowedMethods missing PUT (dashboard issue #30)

    d84a667
  2. amavashev commented on Apr 13, 2026

    @amavashev
    amavashev
    on Apr 13, 2026
    Contributor
    More actions

    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.

  3. amavashev commented on Apr 13, 2026

    @amavashev
    amavashev
    on Apr 13, 2026
    Contributor
    More actions

    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:

    1. 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.
    2. 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?

    1. DevTools → Network → the failed PUT → Response headers. Share Server:, X-Powered-By:, Via:, etc. — the Server header tells us which layer answered.
    2. 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.
    3. 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.
    4. 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.)

  4. amavashev commented on Apr 13, 2026

    @amavashev
    amavashev
    on Apr 13, 2026
    Contributor
    More actions

    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.

  5. amavashev
    closed this as completedon Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.