Skip to content

Feature request: Per-user page access restrictions for internal pages #725

Description

@Plattenspatz

Use Case

We're running a single Kener instance that serves status pages for multiple customers (multi-tenant). Each customer should only see their own status pages — for example, a user from "Customer A" should be able to access /customer-a-monitoring but not /customer-b-monitoring.

Right now, all pages in Kener are public and visible to everyone. PR #714 introduces the concept of internal pages (public vs. internal toggle), which is a great foundation. Our use case would build on top of that by adding per-user filtering for internal pages.

Proposed Behavior

  • Pages can be marked as internal (as proposed in Implement internal pages #714)
  • Each user gets an optional page access pattern (e.g. customer-a*)
  • When an internal page is accessed, Kener checks:
    1. Is the user logged in? If not → redirect to sign-in (same as Implement internal pages #714)
    2. Does the user's access pattern match the page path? If not → return 404 (not 403, to avoid revealing that the page exists)
  • The page switcher only shows pages the user is allowed to see
  • Users without an access pattern (empty/wildcard) can see all internal pages (backward compatible, works for admins)

Rough Technical Idea

  • Add a page_access_pattern text field to the users table
  • Extend the access check in dashboardController.ts (where Implement internal pages #714 adds the internal check)
  • Filter the page switcher API response (pages/get.ts) by the user's pattern
  • Add a field in the user management UI for admins to set the pattern

Why This Matters

This is a common scenario for MSPs (Managed Service Providers) and hosting companies that want to give customers visibility into the health of their services without exposing other customers' infrastructure. A reverse proxy solution works but is fragile and hard to maintain compared to native support in Kener.

Willingness to Contribute

We'd be happy to implement this and submit a PR. Before we start, we'd like to know:

  1. Is this something you'd consider merging into Kener?
  2. Do you have a preferred approach for the access model (pattern-based as described, explicit page-to-user assignments, or something else)?
  3. Should we wait for Implement internal pages #714 to be merged first, or base our work on that branch?
    Any feedback on the direction would be appreciated — we'd rather align early than submit something that doesn't fit the project's vision.

Related: #714, #697

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions