Skip to content

Repository files navigation

GatePass

GatePass is a single Go executable for granting expiring, code-protected access to a private HTTP service through Caddy. It stores service/share state in SQLite, runs its authorization endpoint on localhost, and owns only per-share Caddy snippets.

Quick start

go build ./cmd/gatepass
./gatepass init --config ./gatepass.yaml
./gatepass --config ./gatepass.yaml services add --name "Development UI" --url http://10.0.0.22:3000
./gatepass --config ./gatepass.yaml services list
./gatepass --config ./gatepass.yaml shares create --service SERVICE_ID --hostname dev.example.com --expires 4h --maximum-devices 2 --approve
./gatepass --config ./gatepass.yaml daemon

Configure Caddy to import the configured managed directory:

import /etc/caddy/gatepass/*.caddy

GatePass validates then gracefully reloads Caddy before activating a share. The creation command shows the access code once; its Argon2id hash is stored instead of plaintext.

Security model

The temporary Caddy route is protected by GatePass forward authentication. GatePass strips identity headers supplied by clients, enforces expiry, access-code rate limits, CIDR allow lists, maximum redemptions, and concurrent-device limits. Sessions are random, server-side revocable, and delivered in HttpOnly/SameSite cookies.

GatePass does not remove unrelated LAN access, configure router forwarding or UPnP, or establish verified hardware identity. Device labels are user-agent descriptions attached to random session tokens. A public URL increases attack surface; do not share administrative or sensitive infrastructure.

Commands

gatepass services add|list, gatepass discover, gatepass shares create|list|show|extend|revoke|rotate-code|sessions|revoke-session, gatepass daemon, gatepass status, and gatepass database verify are implemented. Running gatepass opens the Bubble Tea dashboard.

For automation use --non-interactive --approve --json. --dry-run plans share creation without modifying Caddy or SQLite.

Operational notes

The Caddy binary must be installed on the host and its configured Caddyfile must import GatePass’s managed snippet directory. Run the daemon under a native service manager so expiry cleanup continues after logout. Back up the configuration directory, including gatepass.db, before host changes.

See architecture, security model, and threat model.

About

Secure temporary access for private homelab services

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages