feat(core): revoking a share by itself (T76) - #64
Merged
Conversation
… would not start (T76)
…(T76)
`skip_install_trust` alone adapts to a configuration with no `pki` app in
it, so the certificate authority Caddy provisioned at run time was the
implicit one, with the installing default. Name the local CA so the
option has something to apply to.
Assert it against the real adapter rather than against the rendering: a
`contains("skip_install_trust")` passed throughout the version that did
nothing.
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.
Roadmap task T76 — a share that ends by itself, the manual path having landed with T74.
What it does
certs::renewal::start,[sharing] check_secondsdefaulting to 30. A finding must survive two consecutive passes beforeit revokes:
interfaces()returningErris no information, not evidence of a change. Therevoke calls
Sites::unsharerather than a second copy of it, so the automatic path and themanual one are the same road.
--for 2h, measured against theshared_sinceT74 already stores, kept as a property of theshare in a new
shared_untilcolumn. A deadline already past is refused rather than honoured.DaemonEvent::SiteSharingChangedcarrying aSharingChangeof
Requested,ExpiredorNetworkChanged { was, now }, so a client can surface it.and says plainly that it proves nothing about the firewall; and the rule-by-label test, which is
Windows-only because
ufwhas no comment field to name a rule of ours with.Allow writes an every-port TCP+UDP rule for
mixengined.exe— wider than "web ports only", notmade through
mixengine-elevate, and not removed bysite.unshare. Decided: bind the responderlate so the prompt is not pre-empted, refuse to answer it on the user's behalf, and report the
rule as a
Noteinmix doctorrather than pretend it is not there.What it also fixes
Caddy was installing a certificate authority of its own into the user's trust store, and
MixEngine was letting it.
auto_https offstops Caddy obtaining certificates and says nothingabout its own local CA, whose root it installs on first provisioning — five
CN=Caddy Local Authorityroots were found inCurrentUser\Rooton the machine this was written on, none askedfor. That is the design MixEngine spends T48 and T49a establishing, undone by a default.
It surfaced as this task's port-scan suite timing out on the Windows runner: both servers reach
server running, the install then blocks on a consent nobody is there to give, and the readinessprobe's one unbounded request never comes back.
The first fix was
skip_install_trustalone and it did nothing — the adapter applies the option tothe authorities a configuration names and names none on its own, so the CA provisioned at run time
was still the implicit, installing one. The fix is that line plus a
pki { ca local }for it toapply to, asserted against Caddy's own adapter rather than against the rendering.
Not done here: removing the five roots already on the development machine. Windows refuses without
interactive consent, and a tool deleting trust anchors on somebody's behalf is the other half of the
same mistake.
Testing
CI green on all three systems, including both real-server steps. Locally:
fmt,clippy -D warnings,rustdoc -D warnings,check --release, and 96 test suites.