Help us shape the future of Go! Take the 2026 Go Developer Survey

epithet

module
v0.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2026 License: Apache-2.0, Apache-2.0

README

Epithet makes SSH certificates easy

Epithet is an SSH certificate authority that replaces static authorized_keys with short-lived certificates (2-10 minutes) and authentication over OIDC. It creates on-demand SSH agents for each outbound connection, enabling real-time policy enforcement without touching your target hosts.

Quick start

1. Build epithet:

git clone https://github.com/epithet-ssh/epithet.git
cd epithet
make build

2. Start the agent:

epithet agent --ca-url https://your-ca.example.com

The agent discovers its OIDC issuer and client ID from the CA's Link header on the root response — nothing to configure locally.

3. Tag the hosts this profile should handle, then include the generated config (~/.ssh/config):

Host *.example.com
    Tag epithet

Include ~/.epithet/run/*/ssh-config.conf   # must come after Tag lines

4. SSH as normal:

ssh server.example.com

First connection opens your browser for authentication (~2-5 seconds). Subsequent connections reuse the refreshed token.

How it works

When you run ssh server.example.com, OpenSSH's Match tagged triggers epithet match for hosts you've tagged in your own ssh config. epithet match asks the broker for a certificate. The broker authenticates in-process via OIDC, requests a signed certificate from the CA (which checks policy in real time), and spins up a per-connection SSH agent with the short-lived certificate. See architecture for detailed sequence diagrams.

Components:

  • Broker (epithet agent): Daemon managing OIDC authentication state and certificate lifecycle. Creates per-connection SSH agents.
  • CA Server (epithet ca): Signs SSH certificates after passing the caller's token through to a policy server for validation.
  • Policy Server (epithet policy): Validates tokens and makes authorization decisions - who can access what hosts as which users.
  • Per-connection Agents: In-process SSH agents, one per unique connection, serving a certificate minted for that connection alone.

Commands

Command Description
epithet agent Start the broker daemon that manages certificates and agents
epithet agent inspect Query a running broker's state
epithet server Run the CA and policy server as supervised subprocesses behind one port
epithet match Called by SSH Match tagged ... exec to trigger certificate flow
epithet ca Run the certificate authority server
epithet policy Run the policy server with OIDC-based authorization

Documentation

Development

make build    # Build all binaries
make test     # Run tests
make clean    # Clean build artifacts

Requirements: Go 1.25+ Requires OpenSSH 9.4+ on the client (for Tag/Match tagged; see below).

License

Apache 2.0

Directories

Path Synopsis
cmd
epithet command
pkg
auth/oidc
Package oidc performs OIDC/OAuth2 authentication and returns an ID token.
Package oidc performs OIDC/OAuth2 authentication and returns an ID token.
breakerpool
Package breakerpool provides a generic circuit breaker pool with priority-based failover.
Package breakerpool provides a generic circuit breaker pool with priority-based failover.
ca
oidctest
Package oidctest provides a minimal in-process OIDC provider for tests.
Package oidctest provides a minimal in-process OIDC provider for tests.
policyserver/inventory
Package inventory resolves the entities a writ policy matches against: users (SCIM-shaped, RFC 7643) and hosts (name + labels + optional account list).
Package inventory resolves the entities a writ policy matches against: users (SCIM-shaped, RFC 7643) and hosts (name + labels + optional account list).
policyserver/writpolicy
Package writpolicy implements the policy server's PolicyEvaluator over a compiled writ policy, an inventory, and registries of requirement handlers, flag sources, and notify targets.
Package writpolicy implements the policy server's PolicyEvaluator over a compiled writ policy, an inventory, and registries of requirement handlers, flag sources, and notify targets.
serviceauth
Package serviceauth mints and verifies short-lived, request-bound JWTs that authenticate CA -> policy-server requests.
Package serviceauth mints and verifies short-lived, request-bound JWTs that authenticate CA -> policy-server requests.
tlsconfig
Package tlsconfig provides shared TLS configuration for HTTP clients.
Package tlsconfig provides shared TLS configuration for HTTP clients.
wire
Package wire holds every type that crosses a process boundary (CA, policy server, CA client).
Package wire holds every type that crosses a process boundary (CA, policy server, CA client).
writ
Package writ is the facade over the writ policy language frontend: parse, check, and lower to the IL in one call.
Package writ is the facade over the writ policy language frontend: parse, check, and lower to the IL in one call.
writ/ast
Package ast is the parsed form of a writ policy file, a direct port of the retired Rust spike's ast.rs (the porting reference named by SPEC §12.11).
Package ast is the parsed form of a writ policy file, a direct port of the retired Rust spike's ast.rs (the porting reference named by SPEC §12.11).
writ/compile
Package compile checks a parsed writ file for well-formedness and lowers it to the IL.
Package compile checks a parsed writ file for well-formedness and lowers it to the IL.
writ/diag
Package diag holds source positions and diagnostics for the writ policy language.
Package diag holds source positions and diagnostics for the writ policy language.
writ/eval
Package eval is SPEC §8 as a pure function: order-independent evaluation of a compiled policy against one (user, host, account) request.
Package eval is SPEC §8 as a pure function: order-independent evaluation of a compiled policy against one (user, host, account) request.
writ/il
Package il is writ's intermediate language: the compiled rule format per SPEC §10–11.
Package il is writ's intermediate language: the compiled rule format per SPEC §10–11.
writ/parser
Package parser turns writ policy source into the AST.
Package parser turns writ policy source into the AST.
test

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL