Skip to content

supabase start: Kong email-template bind mounts unreadable on SELinux-enforcing hosts #6537

Closed

Description

@breken-ai

Affected area: Local development
Supabase CLI version: v2.117.0 (still present on current develop)
Operating system: Fedora / RHEL-family Linux with SELinux in enforcing mode (also affects rootless Podman hosts with SELinux)

Command: supabase start (also supabase db reset / anything that recreates the Kong container)

What happens:
On a host with SELinux enforcing, the Kong container cannot read the bind-mounted email template directory, so auth emails (magic link, signup confirmation, recovery) are served without the project's custom templates. The container logs permission-denied errors on the template path. This was first reported by a user against the auth repo at supabase/auth#2783, but the mount is created here in the CLI: the Kong email-template bind mounts in internal/start/start.go (and the corresponding db reset path) are created without an SELinux relabel option (:z or :Z), unlike some other mounts in the same file that already get one.

Expected behavior:
Kong should be able to read the mounted templates on SELinux hosts, so custom email templates render in auth emails. Adding the :z relabel flag to those bind mounts (matching how the CLI already handles other SELinux-sensitive mounts) fixes it without affecting non-SELinux hosts.

Reproduction:

  1. On an SELinux-enforcing host (e.g. Fedora 40+), add a custom template under supabase/templates/.
  2. supabase start.
  3. Trigger a magic-link email; the default template is served and Kong logs EACCES on the template path.

I have a fix ready (branch with the relabel flags plus unit coverage, 219/219 start-package tests green locally) and can open a PR once this is triaged. Note: I have not been able to run an end-to-end supabase start on an actual SELinux host - the fix is verified at the unit level only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions