Repository navigation
MyOwnPKI v0.3.0
The Linux agent: trusted enrollment, ACME issuance, atomic deployment with rollback, scheduled
renewals and operator-requested renewal through the web UI and REST API. Linux packages and a
hardened systemd installation complete the release.
Added
-
ACME in the agent with lego v4.35.2 as a library: a local account key registered by
thumbprint over mTLS, host-generated certificate keys and http-01 in standalone/webroot mode.
Its own HTTP client ignores environment proxy and lego trust settings. Linked accounts are
restricted to the active agent's allowed names at order creation, finalization and issuance,
including after an unseal; ordinary ACME clients keep their normal domain policy. Account key
rotation preserves the binding. Existing accounts cannot be captured by a new thumbprint
reservation; denials are audited. Re-enrollment with a new agent ID and the old ACME key stops
with an operator-action message. pki.db migration 0012 enforces unique reservations and links. -
nginx and file deployment profiles: contained, atomic PEM writes with owner/group/mode,
shared test/reload hooks and a local TLS fingerprint check. Failed activations roll back the
whole reload group; first-install failures remove the new files. Mixed groups test the restored
configuration and reload existing deployments back to their old leaf when safe. A durable journal recovers an
interrupted pass before new work, and local status shows deployment results. A failed rollback
reports both errors without a retry loop. -
Agent listener (
agent.base_url,agent.listendefault:8444,agent.tls_issuer,
agent.ca): Connect-RPC over TLS 1.3. Its certificate comes fromagent.tls_issuerlike the admin
and ACME listeners'. Client certificates are accepted from the agent CA only – an intermediate with
the EKU limit clientAuth only, checked bymyownpki config checkand at the start. Without a
certificate only the enrollment answers; everything else is checked per request (a revoked or
disabled agent is cut off at its next call). -
Enrollment with proof of control (ADR-18): the agent makes its key and CSR on the host; the
server fetches a check file bound to that key fromhttp://<host>/.well-known/acme-challenge/
(the agent's own port 80, or the webroot of the web server already there – written only through
anos.Root, so a symlink can't redirect it) with the rules of the ACME validator. Modes per
tenant (auto,verified– the default –,manual; Tenant settings,agent_enrollmentin
PUT /api/v1/settings, system.db migration 0011). Join tokens: single-use, expiring, for name
patterns, stored hashed, shown once. The queue holds at most 100 enrollments without a valid
token – one with a token is never refused – and junk expires after 24 hours. -
Agent certificates: 7 days, renewed by the agent at 2/3 with a new key (at most 6 renewals per
agent and hour); an agent whose certificate expired enrolls again with the key of its last one.
Revoking an agent puts its agent certificates on the CRL. pki.db migration 0011. -
myownpki-agentenroll [--token-file FILE],run,status,config checkwith
/etc/myownpki-agent/agent.yaml. It ignoresHTTPS_PROXY/HTTP_PROXY; a proxy only when
agent.yaml names one. -
REST API
/agents,/agent-enrollments,/agent-join-tokens(permissionagent.manage,
admin with step-up), and the pages Agents, Enrollment requests, Join tokens. -
Reports and renewal scheduling: a heartbeat every five minutes with jitter and one combined
report after each deployment pass; 2/3-lifetime scheduling with ARI support, persistent failure
backoff and a silent-agent indicator after three missed reports. -
Renew now and Withdraw: operator/admin actions in the UI and REST API wake the agent through
a bounded long-poll. Versioned acknowledgements prevent stale reports from clearing newer requests;
CSRF, role checks and audit entries cover both actions. Agent pages show deployments, disallowed
names and removed configurations. The certificate filter hides agent identity certificates by
default, while deployment certificates stay visible. -
Linux packaging:
install-agent.sh, a hardened root systemd unit with explicit writable-path
drop-ins, and reproducible Linux amd64/arm64 agent archives. The script verifies the downloaded
archive against the signed checksum file, never overwrites agent.yaml and updates without
self-update magic. Theagent end-to-endCI job runs real ACME/agent flows and nginx rollback,
measuressystemd-analyze security, and checks protobuf compatibility withbuf breaking. -
New modules (owner 2026-10-24):
connectrpc.com/connectv1.21.0,google.golang.org/protobuf
v1.36.12; buf v1.73.0 as a pinned development tool (THIRD_PARTY.md).
Changed
- Reports and desired-state watches have per-agent rate limits (60 and 120 per 10 minutes) to
protect the SQLite writer and audit log from a compromised agent. The dashboard excludes agent
identity certificates from ordinary 30-day expiry views and warns per active agent when its
current certificate has less than 48 hours left. - pki.db migration 0013 stores reported deployments and renewal requests. The release now has 18
assets, including the two agent archives andinstall-agent.sh.
Fixed
- Enrollment without a matching domain stores a clear failed check instead of panicking; the
service and Connect-RPC both return the pending enrollment with that explanation. - Handler panics are logged at error level with the RPC procedure and stack on the agent listener;
HTTP server panics are also logged at error level on the admin and ACME listeners. Panic messages
remain visible when the configured log level is info, while TLS handshake noise stays at debug. - Domain creation and editing require a signing CA whose EKU limit allows serverAuth, in the form
and in the service and REST API. New forms start with "Please select" instead of the first CA. install-agent.shno longer claims that a token file was kept when enrollment ran without one.- nginx test and reload hooks need
20-low-ports.conffor listeners below 1024, including webroot
mode.install-agent.sh --low-portsinstalls that capability explicitly. - Failed hooks include sanitized, bounded stderr in the agent log and deployment
last_error:
valid UTF-8 at every boundary, the final diagnostic lines preserved, Unicode format characters
removed and the complete error within the server limit, including rollback failures. - Renewal requests appear as status badges with a separate Withdraw action, deployment tables wrap
without horizontal overflow, and removable agent names have a per-row Remove action instead of a
separate form. - The Windows trust-page text requires comparing the root fingerprint with an independently obtained
value from the admin UI or an administrator, not with the file that carries the root itself. - Agent end-to-end CI runs
nginx -ton port 443 under the real systemd unit, first proving the
failure without the low-port drop-in and then success with it. The exported nginx rootfs has the
package's temporary directories, and the negative-control log is written withtee.