Shorter TTL for cached CertStatus::Invalid entries produced by check
failures (e.g. unresolvable cert path). Error entries use this backoff
instead of the 5-minute re-check TTL so transient errors recover quickly
without hammering the background check thread on every poll tick.
TTL (in seconds) for the in-memory cert status cache before we re-run
ssh-keygen -L against an on-disk certificate. Distinct from
RENEWAL_THRESHOLD_SECS: this controls how often we re-check a cert’s
validity, while RENEWAL_THRESHOLD_SECS is the minimum lifetime below which
we actually request a new signature from Vault.
Normalize a vault address so bare IPs and hostnames work.
Prepends https:// when no scheme is present and appends a default
port when none is specified: :80 for http://, :443 for
https://, :8200 for bare hostnames (Vault’s default). The
default scheme is https:// because production Vault always uses
TLS. Dev-mode users can set http:// explicitly.
Resolve the public key path for signing.
Priority: host IdentityFile + “.pub” > ~/.ssh/id_ed25519.pub fallback.
Returns an error when the user’s home directory cannot be determined. Any
IdentityFile pointing outside $HOME is rejected and falls back to the
default ~/.ssh/id_ed25519.pub to prevent reading arbitrary filesystem
locations via a crafted IdentityFile directive.
Scrub a raw Vault CLI stderr for display. Drops lines containing credential-like
tokens (token, secret, x-vault-, cookie, authorization), joins the rest with spaces
and truncates to 200 chars.
Sign an SSH public key via Vault SSH secrets engine.
Runs: vault write -field=signed_key <role> public_key=@<pubkey_path>
Writes the signed certificate to ~/.purple/certs/<alias>-cert.pub.