Skip to content

Security: /policy/reload endpoint has no authentication #26

@Kaspre

Description

@Kaspre

Summary

The POST /policy/reload endpoint accepts unauthenticated requests from any local process. This allows a complete policy replacement without any bearer token, API key, or other credential check.

Impact

For a security-critical authorization sidecar, this is a significant attack surface. A compromised or malicious local process can:

  1. POST a permissive policy (e.g., allow-all) to /policy/reload
  2. Immediately gain authorization for any action
  3. If delegation is enabled, obtain a mandate and execute arbitrary commands

This is especially concerning in shared-host or container environments where multiple processes share localhost.

Suggested Mitigations

  • Require a bearer token or shared secret for /policy/reload (consistent with how /v1/authorize can require one in local_idp mode)
  • Alternatively, provide a config flag to disable hot-reload entirely (some deployments prefer restart-only policy changes)
  • At minimum, document the risk so operators can make an informed decision

Our Workaround

We removed the route entirely from src/http/mod.rs before building. Policy changes require a sidecar restart, which is acceptable for our use case and eliminates the attack surface.

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