Skip to content

Admin endpoints unprotected unless handler regex covers them #400

Closed

Description

@aram356

Summary

/admin/keys/rotate and /admin/keys/deactivate are always routed. The enforce_basic_auth gate only triggers for paths that match a configured handlers[].path regex. The default config (^/secure) does not cover /admin/*. An operator who doesn't add an explicit admin handler has publicly-accessible key rotation/deletion endpoints.

Refs

  • crates/fastly/src/main.rs lines 97-98 — admin route matching
  • crates/common/src/auth.rs line 10 — enforce_basic_auth checks handlers list
  • crates/common/src/settings.rs line 381 — handlers parsing
  • trusted-server.toml line 1 — default handler only covers ^/secure

Recommendation

Either hard-require auth for /admin/* paths regardless of handler config, or validate at startup that an admin handler exists.

Context

Production readiness audit — see #396

Activity

  1. added theissue type on Mar 4, 2026
  2. added a commit that references this issue on Mar 16, 2026
    6bfccee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions