ANDREW/
MenuWriting
← Back to writing

SYSTEMS / TLS / CHANGE ACCEPTANCE

Reloaded. Did a New Connection Verify It?

Updating, restoring, and reopening require different evidence of completion.

A company announces that its access-control upgrade is complete. New cards have been issued, the settings have loaded, and the report says Success. Then someone asks whether a new card actually opens the door. Nobody has tried.

TLS certificate changes have a similar acceptance boundary. A successful reload is one result. Establishing what certificate a new connection receives, and whether the service responds over that connection, takes another check.

I built Certweft, a small experimental service for updating the TLS certificate of one fixed local Nginx target. The question extends beyond a successful update: if execution stops with an uncertain outcome, what must remain closed, and what evidence permits another change?

Define what a successful update establishes

Certweft validates the candidate certificate against the designated trust root, hostname, purpose, validity policy, and key. It persists the operation’s intent, then reloads its fixed Nginx target.

Before committing, it requires three fresh TLS connections. Each must pass trust and hostname verification, present the expected leaf certificate, and return HTTP 200 from the health endpoint over that same connection.

These checks answer different questions. Trust verification checks the configured trust requirements. Matching the leaf identifies the intended certificate version. The HTTP response connects that verification to a response from the designated service.

An existing connection cannot supply the same evidence. Someone who entered the office before the lock changed has not tested the new access card merely by remaining inside.

Three successful connections are not a reliability guarantee. They test a fixed local IPv4 listener, one expected identity and trust root, and a limited health endpoint. They do not cover external network paths, every client’s trust configuration, or the application’s full behavior.

An absent result does not mean nothing happened

When the controller disappears during an update, treating the operation as unexecuted can make a second operation unsafe. The old executor may still be running. Nginx may already be serving the candidate while the final result has not been recorded.

Certweft makes executors inherit a lifetime file lock. A replacement writer cannot take ownership while an old executor still holds that lock. Root recovery must not bypass it by deleting the lock file.

This is a boundary for a trusted single-host environment, not a general distributed coordination protocol. Host root and systemd remain trusted. The purpose is to prevent a replacement controller from assuming that an earlier executor has stopped simply because its result is unavailable.

Closed admission is not certificate restoration

Uncertain execution closes admission to new updates and requires an explicit root recovery workflow. Nginx may continue serving the candidate certificate while admission is closed.

That makes three completion conditions worth separating.

ConditionEvidence neededWhat it does not establish
New updates are refusedCurrent admission conditions and an actual refusal.The previously committed certificate is being served.
The committed certificate is restoredThe expected committed leaf and fresh TLS and HTTP checks at the target.The journals are reconciled or another update is authorized.
Updates are reopenedStorage checks, journal reconciliation, and matching, valid reopening records.All external clients work, or a later restart will preserve open admission.

Recovery checks storage, restores the committed certificate, reconciles the journal, then prepares and completes reopening. The journals and execution gate do not share one atomic transaction. Partial completion must remain visible; it cannot be reported as success for the whole workflow.

A later service restart closes a recovered session again under the current design. This conservative choice adds operator work and limits the service’s unattended-operation claims.

A recovery procedure also needs capacity

The MVP permits 64 normal request-history rows, 16 root-operation rows, and 16 immutable certificate-generation directories. These are independent limits. There is no automatic cleanup or rollover.

A complete new recovery needs five available root-history rows, but the service does not reserve all five before starting. Failed operations can consume allowance too.

Controlled tests exercised zero through five remaining rows. With zero to four, recovery could make no progress or complete only part of the workflow; admission remained closed. With five, the tested workflow reopened admission and a genuine subsequent update succeeded.

Preserving recovery capability therefore includes budgeting for it. Monitoring only normal request capacity can leave an operator discovering during recovery that the repair workflow has reached a different limit.

This version has no qualified history-reset or production-store migration procedure. Knowing the limit does not supply a complete exhaustion remedy. Before reaching it, someone must decide when to stop using the service, how to retain the evidence, and who will arrange the next step.

What the retained evidence shows

The following results come from retained Linux reports. They were not rerun while preparing this article.

Separate reports cover orderly VM shutdown/start and selected storage-fault reboot cases. They retain their own stage-specific source manifests; they have not been relabeled as reruns of the latest closeout source.

A twenty-minute control-plane observation does not establish long-term freedom from resource accumulation. It is not continuous rotation or a saturation test. Sudden power loss, protection from the first moments of boot, and arbitrary storage-media or I/O failures remain unqualified.

Accept the recovery path, not just the reload

For deployment, I would first agree on what the update must preserve. Serving the intended certificate at the fixed target is within this tool’s checks. External paths and client requirements need their own tests and owners.

I would then rehearse an uncertain outcome: verify that new updates are refused, inspect the certificate currently served, and complete the authorized restoration and reopening workflow. An earlier success record cannot substitute for current state.

Finally, establish who has root access, who authorizes reopening, and who can intervene through a usable local path if recovery fails or capacity runs out. “Manual recovery if needed” is incomplete without the necessary access, time, and responsibility.

Certweft remains a single-host evaluation MVP with one fixed local Nginx target and one Smallstep CA. It provides no automatic renewal scheduler, key or trust-root rotation, or management of arbitrary existing Nginx deployments.

The useful acceptance questions are specific: What did the new connections verify? What is the service actually serving after uncertainty? What permits the next change?

Each step can have its own successful outcome. Before combining them into one Success, check whether the evidence still leaves a gap between them.

Code, methodology, and scope

This article uses the implementation and retained reports in Certweft v0.0.2 at commit 81c2c83. Report manifests bind runtime, test, and tool files; the later MIT licensing change to packaging metadata is documented separately. The deployment-acceptance approach is my proposal, not a production-reliability guarantee.

Share this article

Related: credential rotation and the next certificate renewal →