feat(tls): add certificate readiness checks - #40
Draft
bymoye wants to merge 1 commit into
Draft
Conversation
This was referenced Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #31. Depends on #39, #37, and #34. Related server capability work: nazozero/NazoAuth#130
Outcome
Adds a read-only
tls certificate checkcommand for external monitoring and early renewal alerting. A successful check proves the deployment declaration, provider authority, committed receipt, active generation files, certificate source, remaining validity, and real public TLS/HTTP endpoint in one bounded snapshot, then emits a short-lived readiness document.Safety and ownership boundary
proxy_tlsauthority, and takes the provider shared lock so certificate apply, ACME issue, permission changes, and readiness evidence cannot cross one another;currentsymlink and current provider config/trust/public URL to match the authoritative certificate receipt;minimum_validity_secondsand optional--warning-window-seconds(3600 through 7776000);certificate_not_after - warning_window, plus deployment/declaration/tenant/hostname/revision/source/provider/material/public bindings.The command creates no scheduler, journal, certificate, reload, or deployment mutation. Operators run it from their existing monitoring scheduler; ctl remains absent from the authentication request path and may be stopped between checks.
Responsibility choice
Readiness composes existing owners instead of duplicating them: provider loading and activation receipts remain in the certificate module, offline PKI remains in
material, ACME authority remains inacme, and public black-box verification remains inpublic_endpoint. No NazoAuth version, Direct TLS capability, proxy configuration, tenant runtime selection, or protocol-key behavior is inferred.Verification
Local Windows, exact commit
b5224c02f0ae457b3b21dce9bbd50c67aef4fb68:cargo fmt --all -- --checkgit diff --checkand staged patch checkcargo check --workspace --all-targets --all-features --lockedcargo clippy --workspace --all-targets --all-features --locked -- -D warnings— no issuescargo test --workspace --all-targets --all-features --locked— 366 passedcargo build --locked --workspace --all-targets --all-features --release— 0 errors; three informational MSVC import-library linker messagestls --helpsmoke shows the read-only external-monitoring contractFocused verification: 24 TLS tests and 2 TLS CLI parser tests passed. The new cases cover warning-window default/max behavior, exact boundary failure, active material/source drift, unique/typed CLI inputs, and retained existing public TLS identity/health tests.
Remote GitHub CI passed 13/13 checks on exact head
b5224c02f0ae457b3b21dce9bbd50c67aef4fb68, including Linux, macOS, Windows, signed-server compatibility, and real Docker/Podman/systemd discovery.Not yet verified / not claimed