hello-server

command
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command hello-server serves one mutually authenticated JSON endpoint and reports who called it.

It is the same binary under both mTLS profiles: -profile pki reads callers from a standard CA's client certificates, -profile spiffe from X509-SVIDs. Everything below the flag parsing is profile-blind, which is the point — purser hands back a *tls.Config and an authenticator, and a server does not need to know which idiom verified the peer.

Two listeners, deliberately:

  • -addr serves the mutually authenticated API. A peer that cannot present an acceptable certificate never reaches a handler.
  • -admin-addr serves /healthz in plaintext, on a separate port, for Kubernetes probes. A kubelet has no client certificate, so a probe against the mTLS port could only ever fail — and lowering the mTLS port's requirements to let it through would open the API to anyone who can reach the port. Bind it to the pod, not the network.

Jump to

Keyboard shortcuts

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