Fork of tale/headplane (Heady). Web UI for the supported.systems headscale tailnet.
Find a file
Ryan Malloy 4c82487e0e auth: middleware gates all pages + APIs behind session check
Ship an Astro middleware (src/middleware.ts) that runs on every request
and requires a valid Heady session for anything other than the login
flow itself. Previously any anonymous visitor could load /machines,
/users, /acls, /dns, /settings and the mock /api/users endpoint over
plaintext -- the SSR templates rendered as public shells and only the
front-end auth guard blocked interaction. That's a defense-in-depth
gap now that data endpoints are being wired up.

- src/middleware.ts: onRequest handler validates the heady_session
  cookie via HeadySessionManager.validateSession(). Public allowlist:
  /api/auth/*, /login, static assets. Unauthenticated /api/* returns
  401 JSON; unauthenticated pages redirect to /api/auth/login with a
  return_to query param so the OIDC round-trip lands back on the
  original URL. Authenticated requests get context.locals.user set so
  downstream pages can read Astro.locals.user without a second lookup.
- src/env.d.ts: type App.Locals.user as SessionUser so pages / APIs get
  IDE feedback on typos.
- src/pages/{index,machines,acls,dns,users}.astro: 'export const
  prerender = false' -- these pages render per-user data, they must
  hit middleware on every request rather than being served as a
  static file baked at build time. Without this, middleware runs
  once during prerender (with no cookie) and writes a redirect as
  the static HTML for the route.
- src/pages/api/{acls,users,dns/magic,dns/tailnet,settings/auth-keys}.ts:
  same reason. API endpoints must be SSR so the middleware can gate
  them at request time.
2026-08-20 10:27:30 -06:00
.github chore: remove github pages workflow 2025-08-19 17:53:34 -04:00
.zed style: format go code on precommit 2025-06-16 11:45:24 -04:00
authentik-blueprints auth: stateless PKCE state, simplify OIDC handlers 2026-06-06 14:11:51 -06:00
cmd feat: handle logging from the agent 2025-08-20 14:07:08 -04:00
docs Complete the Astro rewrite 2026-06-06 13:05:35 -06:00
drizzle 🍴 ENTERPRISE SECURITY FORK: Complete OIDC overhaul + architecture realignment 2025-09-17 02:23:56 -06:00
examples Complete the Astro rewrite 2026-06-06 13:05:35 -06:00
internal feat: handle logging from the agent 2025-08-20 14:07:08 -04:00
nix Complete the Astro rewrite 2026-06-06 13:05:35 -06:00
patches feat: update to rolldown-vite and typescript-go 2025-08-18 16:42:29 -04:00
public feat: add logo and favicon (#238) 2025-06-09 10:30:03 -04:00
remote-access Complete the Astro rewrite 2026-06-06 13:05:35 -06:00
src auth: middleware gates all pages + APIs behind session check 2026-08-20 10:27:30 -06:00
tests Complete the Astro rewrite 2026-06-06 13:05:35 -06:00
.dockerignore feat: add docker build 2024-03-26 10:10:34 -04:00
.gitignore Complete the Astro rewrite 2026-06-06 13:05:35 -06:00
.npmrc feat: switch away from websocket to stdout messaging for agent 2025-05-25 11:02:19 -04:00
.tool-versions fix: bump pnpm 10.4.0 -> 10.34.1 (10.4.0 release deleted from github) 2026-06-06 11:39:45 -06:00
agent.Dockerfile feat: containerize agent 2025-01-15 10:17:30 +05:30
ALPINE_ASTRO_TRANSFORMATION.md Complete the Astro rewrite 2026-06-06 13:05:35 -06:00
astro.config.mjs acls: refactor editor into React components 2026-06-06 15:08:51 -06:00
AUTHENTIK_HEADY_ARCHITECTURE.md Complete the Astro rewrite 2026-06-06 13:05:35 -06:00
AUTHENTIK_SETUP_GUIDE.md Complete the Astro rewrite 2026-06-06 13:05:35 -06:00
BETTER_ROLE_MAPPING_CONFIG.yaml Complete the Astro rewrite 2026-06-06 13:05:35 -06:00
biome.json Complete the Astro rewrite 2026-06-06 13:05:35 -06:00
Caddyfile chore: add tooling for go wasm 2025-06-16 11:45:23 -04:00
CHANGELOG.md feat: overhaul oidc work 2025-08-28 22:55:26 -04:00
compose.yaml chore: add tooling for go wasm 2025-06-16 11:45:23 -04:00
config.example.yaml 🍴 ENTERPRISE SECURITY FORK: Complete OIDC overhaul + architecture realignment 2025-09-17 02:23:56 -06:00
CONFIGURABLE_ROLE_MAPPING_SOLUTION.md Complete the Astro rewrite 2026-06-06 13:05:35 -06:00
DEBUGGING_ANALYSIS_REPORT.md Complete the Astro rewrite 2026-06-06 13:05:35 -06:00
docker-compose.local.yml ui: shadcn-ui + React island shells for pages, Redis session store 2026-08-20 10:25:35 -06:00
Dockerfile chore: walk back on nonroot, its too much of a breaking change 2025-06-24 12:23:05 -04:00
Dockerfile.dev Complete the Astro rewrite 2026-06-06 13:05:35 -06:00
drizzle.config.ts feat: cleanup removal of old ssh plexer and logic 2025-06-20 00:14:00 -04:00
flake.lock flake.lock: Update 2025-08-18 13:09:51 -04:00
flake.nix feat: nix: add a new mise task and nix flake output to generate NixOS docs 2025-08-18 13:10:38 -04:00
go.mod feat: handle logging from the agent 2025-08-20 14:07:08 -04:00
go.sum feat: handle logging from the agent 2025-08-20 14:07:08 -04:00
GUACAMOLE_REMOTE_ACCESS_DESIGN.md Complete the Astro rewrite 2026-06-06 13:05:35 -06:00
headplane-security-assessment.md Complete the Astro rewrite 2026-06-06 13:05:35 -06:00
HEADY_MANIFESTO.md Complete the Astro rewrite 2026-06-06 13:05:35 -06:00
IMPROVEMENTS_DEMO.md Complete the Astro rewrite 2026-06-06 13:05:35 -06:00
lefthook.yml style: format go code on precommit 2025-06-16 11:45:24 -04:00
LICENSE chore: add license and readme again 2024-03-26 10:24:28 -04:00
mise.toml fix: bump pnpm 10.4.0 -> 10.34.1 (10.4.0 release deleted from github) 2026-06-06 11:39:45 -06:00
OIDC_IMPROVEMENTS_SUMMARY.md Complete the Astro rewrite 2026-06-06 13:05:35 -06:00
package.json ui: shadcn-ui + React island shells for pages, Redis session store 2026-08-20 10:25:35 -06:00
pnpm-lock.yaml ui: shadcn-ui + React island shells for pages, Redis session store 2026-08-20 10:25:35 -06:00
PR_DRAFT_OIDC_ROLE_MAPPING.md Complete the Astro rewrite 2026-06-06 13:05:35 -06:00
README.md Complete the Astro rewrite 2026-06-06 13:05:35 -06:00
role-mapping-examples.yaml Complete the Astro rewrite 2026-06-06 13:05:35 -06:00
SMART_IMPROVEMENTS.md Complete the Astro rewrite 2026-06-06 13:05:35 -06:00
tailwind.config.mjs ui: shadcn-ui + React island shells for pages, Redis session store 2026-08-20 10:25:35 -06:00
TESTING_PLAN.md Complete the Astro rewrite 2026-06-06 13:05:35 -06:00
tsconfig.json ui: shadcn-ui + React island shells for pages, Redis session store 2026-08-20 10:25:35 -06:00
vitest.config.ts Complete the Astro rewrite 2026-06-06 13:05:35 -06:00
WASM_SSH_REMOVAL.md 🍴 ENTERPRISE SECURITY FORK: Complete OIDC overhaul + architecture realignment 2025-09-17 02:23:56 -06:00
wrangler.toml chore: add wrangler.toml 2025-08-18 13:37:53 -04:00

🤠 Heady

Strategic VPN management for Headscale that's actually awesome to use!

Preview

Headscale is the de-facto self-hosted version of Tailscale, a popular Wireguard based VPN service. By default, it does not ship with a web UI, which is where Heady comes in.

Heady is strategic VPN management that prioritizes security, thoughtful design, and awesome user experience. Unlike feature-heavy alternatives, Heady focuses on doing the important things incredibly well.

🎯 What Makes Heady Different

Security-First Design: Every feature is evaluated for security impact first Convention Over Configuration: Smart defaults that just work for 90% of setups
Quality Over Quantity: Fewer features, done awesomely well Community-Driven: Built for real users, not corporate feature checklists

Awesome Features

  • Smart Machine Management: Intuitive node administration with clear status and controls
  • Intelligent ACL Configuration: Visual access control with tagging support
  • Revolutionary OIDC Integration: Zero-config role mapping that just works with any identity provider
  • DNS Made Simple: Easy MagicDNS setup and custom record management
  • Thoughtful Configuration: Headscale settings that make sense

🚀 Getting Started

Heady runs as a web application alongside your Headscale server. Quick setup with smart defaults gets you running fast.

# Coming soon - simplified Docker deployment

🔧 Zero-Config OIDC Setup

Heady's revolutionary OIDC system works with any identity provider out of the box:

oidc:
  issuer: "https://your-provider.com"
  client_id: "your-client-id" 
  client_secret: "your-secret"
  # That's it! Role mapping, scopes, and redirect URIs are auto-configured

Want custom roles? Easy:

HEADPLANE_ADMIN_GROUPS="admin,managers"
HEADPLANE_OWNER_GROUPS="ceo,founders"

📖 Documentation & Community

🎯 Deployment Options

Heady v1.0 features a unified architecture with all awesome features available in every deployment:

  • Standard Deployment

    Quick deployment with smart defaults. All features available, with optional integrations configured as needed.

  • Advanced Integration

    Enable Docker, Kubernetes, or native process integration for automatic DNS management and configuration updates.

Versioning

Headplane uses semantic versioning for its releases (since v0.6.0). Pre-release builds are available under the next tag and get updated when a new release PR is opened and actively in testing.

Contributing

Headplane is an open-source project and contributions are welcome! If you have any suggestions, bug reports, or feature requests, please open an issue. Also refer to the contributor guidelines for more info.


ACLs Machine Management

Copyright (c) 2025 Aarnav Tale