Keep the update token on the release host across redirects #148
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "update-token-redirects"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What this PR does
Makes the in-place update engine's redirect handling explicit, so the update token stays on the configured release host.
update-apply.py:http_fetchnow opens requests through_OPENER, built with a_Redirectshandler that:https://address, refusing anything else with a clearRefusedmessage;MAX_REDIRECTS);Authorizationheader once a redirect leaves the host and port the request was made to. A release file served from other storage still downloads, without the token.kestrel.sh: when a token is set, the release clone also getshttp.followRedirects=false, through the sameGIT_CONFIG_*environment that carries the token header (GIT_CONFIG_COUNT=2). Releases are cloned from the host's own git endpoint, which doesn't redirect. The anonymous clone is unchanged.Checklist
make lint(ansible--syntax-check,yamllint,shellcheck --severity=error, and the real-data check). The Lint workflow runs this on the PR.make test(thekestrel_pipytest suite and the real-data check's tests). The Test workflow runs this on the PR..envfiles, real names, personal emails, device serials, and no real captured or device data: SSIDs, MAC addresses, GPS coordinates, capture files, diagnostics bundles, logs, or screenshots of a real device — placeholders only. The real-data check catches MACs, emails, keys and capture files; real SSIDs, coordinates and screenshots are on you.docs/, and the on-device operator guide (GUIDE_MDinkestrel_pi/userguide.py) where it applies.Release impact
kestrel_pipackage,plugins/*.py, systemd units, the journald drop-in, a lib script already in the engine'sLIB_SCRIPTS, or the CLI.config.txt/cmdline, kernel modules, the base image or partition size,builder/config.json,builder/config.yml, theMakefile, the Release workflow (.forgejo/workflows/main.yml), a shipped config default (config.toml/default.conf), or a brand-new lib script.Notes for review
updatesplugin's own checks are unchanged: they userequests, which already dropsAuthorizationon a change of host or a move from https to http.http_fetchgoes through the opener.kestrel.sh.docs/developer/updates-setup.md.🤖 Generated with Claude Code