Files
felhom.eu/documentation/audits/night-2026-10-22/P6-repos-private/01-readers.md
T

12 KiB
Raw Blame History

P6 — Can the repositories be private? (R-925, read only)

Night session 2026-10-22, helper. Measured 2026-10-22 ~15:50–16:10 CEST from DooPlex and from demo-hp. Nothing was changed. No repository setting, no Secret, no file outside this folder. No secret value is in this folder. Credentials are reported as names, byte counts, or SET/EMPTY.

Raw outputs: 02-registry-anon.txt, 03-packages-anon.txt, 04-box-git-config.txt, 05-anon-measurements.txt, 06-argocd.txt.

1. Which repositories are public today

Command: curl -s https://gitea.dooplex.hu/api/v1/repos/admin/<repo> (no login), field private.

Repository Anonymous API private Anonymous git ls-remote
admin/felhom.eu 200 false rc=0 (HEAD 1b442bcc2e)
admin/felhom-controller 200 false rc=0 (HEAD cbc944c3c0c9)
admin/felhom-agent 200 false rc=0 (HEAD 2d5840ba112f)
admin/app-catalog-felhom.eu 200 false rc=0 (HEAD 13f9c9cb139f)
admin/homelab-manifests 404 (hidden) rc=128 "could not read Username"

Control: a nonsense repo admin/no-such-repo-p6 gives the same 404 / rc=128 as homelab-manifests. So homelab-manifests is private (or absent to anonymous). ArgoCD reads it with a credential (section 3, row R12). The four Felhom repositories are public. The user admin is visibility: public.

2. Package visibility (images, agent binary, golden)

Gitea docs (docs.gitea.com/usage/packages/overview, "Access restrictions"): a package belongs to its OWNER, not to a repository. Read access for a user-owned package is "public, if user is public too". Linking a package to a repository only lists it on the repository page.

Measured agreement (anonymous, 05-anon-measurements.txt section G): the images felhom-hub, felhom-samba, jarr, wan-probe, sparkyfitness-export have NO public repository (anonymous repo API = 404), and an anonymous token dance still lists their tags (HTTP 200).

Result: making a REPOSITORY private does not change who can pull its images or download its packages. Those stay public while the user admin is public.

3. The readers — each measured with no login

# Reader Repo What it reads Credential configured? Command (no login) Answer
R1 Website git-sync, 4 containers in Deployment felhom-system/felhom-webpage (git-sync, git-sync-scripts, init git-sync-init, init git-sync-scripts-init) felhom.eu --repo=http://gitea.gitea-system.svc.cluster.local:3000/admin/felhom.eu.git, ref main (sparse /website/) and ref installer-v1.35.0 (sparse /scripts/) NO — no env, no envFrom, no secret volume, no password/askpass arg (sudo kubectl get deploy -A -o yaml, parsed) git ls-remote http://10.43.8.106:3000/admin/felhom.eu.git HEAD rc=0, 1b442bcc2e
R2 ISO first boot (scripts/iso/felhom-bootstrap.sh:168) felhom.eu (via the website, R1) https://felhom.eu/scripts/felhom-host-install.sh n/a — website, not Gitea curl https://felhom.eu/scripts/felhom-host-install.sh (DooPlex and demo-hp) 200 / 200
R3 Installer, agent config files (felhom-host-install.sh:567, :2920, :2943) felhom-agent raw/tag/v<agent ver>/configs/<16 files> Only if the hub-served controller.yaml has git.token. All 4 measured boxes: EMPTY (R5). So anonymous. The script says so: "fetching artifacts ANONYMOUSLY" curl …/admin/felhom-agent/raw/tag/v0.162.0/configs/felhom-agent.service (DooPlex and demo-hp host) 200 / 200. Control nonsense path: 404
R4 Installer + agent self-update + bundle bootstrap: agent binary, config bundle, golden (generic packages) (package, owner admin) /api/packages/admin/generic/felhom-agent/<v>/felhom-agent, …/felhom-config-bundle.json, …/felhom-golden/<v>/golden.tar.zst Optional; agent.json has no selfupdate key on felhom-pve, Tester 1, demo-hp (defaults = anonymous) curl -r 0-0 …/felhom-agent/0.162.0/felhom-agent; same for bundle; golden 0.331.0 206 / 206 / 206. Control nonsense version: 404
R5 Controller catalog sync on every box (controller/internal/sync/sync.go, git.username/git.token optional) app-catalog-felhom.eu https://gitea.dooplex.hu/admin/app-catalog-felhom.eu.git, branch main, every 15m NO — git.username and git.token EMPTY on demo-hp 9201, demo-hp 9202, N100 9201, Tester 1 9201 (04-box-git-config.txt) pct exec 9201 -- docker exec -e GIT_TERMINAL_PROMPT=0 felhom-controller git ls-remote …app-catalog-felhom.eu.git HEAD (demo-hp) 13f9c9cb139f. Positive control: controller log [sync] Catalog sync complete 13:57:47 UTC
R6 Controller self-update image pull (internal/selfupdate/updater.go: anonymous token dance when no creds) (package felhom-controller) gitea.dooplex.hu/v2/admin/felhom-controller/tags/list NO (same empty git block) anonymous /v2/token?…:pull then tags/list token issued; 200 with tag list. Without token: 401 (normal registry challenge)
R7 k3s image pulls (hub, act-runner, wan-probe, jarr, …) (packages) gitea.dooplex.hu/admin/felhom-hub:0.165.0 etc. NO — no imagePullSecrets on pods or service accounts; no /etc/rancher/k3s/registries.yaml anonymous token dance for felhom-hub, felhom-act-runner 200 / 200
R8 Hub template fetcher (hub/internal/web/templatefetcher.go:13) felhom-controller raw/branch/main/controller/configs/controller.yaml.example YES — Basic auth from env REGISTRY_USERNAME/REGISTRY_TOKEN (Secret gitea-creds, scoped read:package + read:repository per R-925). R-925 records a 403 when read:repository was missing, so the token IS sent anonymous curl of the same URL 200 (anonymous also works today). Hub log: [DEBUG] Template fetched (5881 bytes) hourly, last 15:54
R9 Hub Gitea client: tag/package probes (hub/internal/gitea/gitea.go), version checker (version.go) felhom-agent tags, packages raw/tag/…, /api/v1/packages/admin…, /v2/…/tags/list YES — same gitea-creds (SetBasicAuth) /api/v1/packages/admin anonymous 401 "token is required" — this API already needs the token, so the hub already has one
R10 CI (Gitea Actions, .gitea/workflows/gates.yml in all 4 repos) — own checkout each repo git remote add origin http://gitea.gitea-system.svc.cluster.local:3000/admin/<repo>.git + fetch NO — plain git, no token in the URL or env (only secrets.RESEND_API_KEY is used) git ls-remote http://10.43.8.106:3000/admin/<repo>.git HEAD for all 4 rc=0 for all 4. Control nonsense repo: rc=128
R11 CI — sibling clones: felhom.eu cloned by controller, agent, catalog CI; felhom.eu CI clones agent, controller, catalog; agent CI check-published-versions.py reads /api/v1/repos/admin/felhom-agent/tags + raw/tag in-cluster all 4 as R10 NO as R10 rc=0
R12 ArgoCD app felhom (repoURL https://gitea.dooplex.hu/admin/felhom.eu.git, path manifests) felhom.eu git YES — repo-creds Secret argocd/gitea-repo-creds (keys url 24 bytes, username 5, password 40); its url is https://gitea.dooplex.hu (homelab-manifests argocd-system/argocd-config.yaml:73), a prefix that matches every repo on the host. Also homelab-manifests-repo for 47 homelab apps n/a (credentialed) not affected
R13 Public readers of the website's <!-- source --> comments and of README links felhom.eu (+ controller, agent) repo-relative paths in served HTML; 3 docs link to Gitea source pages n/a curl https://felhom.eu/<page> | grep -c '<!-- source' adatkezeles 33, feltetelek 15, teszteles 7, en/testing 6 (served live)

Not a reader: the website has no link to gitea.dooplex.hu (grep: 0). build-golden.sh fetches from Docker/Debian, not Gitea.

4. Verdict per repository

Repository Verdict
homelab-manifests Already private. Its only reader (ArgoCD) has a credential. Nothing to do.
felhom-controller Can be private after one named change: CI clones with a read token (R10). Hub reader R8 is credentialed. Boxes pull the IMAGE, which is a package and stays public (R6, section 2). Precondition to check first: the gitea-creds token user can read a private repo of admin.
felhom.eu Must stay public now, because of the website git-sync (R1). It has no credential. Can be private after: (a) git-sync gets a read token (a Secret + --password-file / GITSYNC_PASSWORD_FILE in manifests/webpage.yaml), (b) CI clones with a read token (R10/R11 — three other repos clone felhom.eu as a sibling), (c) the served <!-- source --> comments are stripped (operator ruling 2026-10-09 in R-925). ArgoCD (R12) is already credentialed.
felhom-agent Must stay public, because every new box and every reinstall fetches 16 config files from raw/tag/v<ver>/configs/ with no login (R3). Can be private after: the installer takes those files from the generic package (public by owner visibility) instead of raw/tag, plus the CI token (R10/R11). Giving boxes a token is not a real fix: a token on a customer box is readable by the customer.
app-catalog-felhom.eu Must stay public, because every box clones it every 15 minutes with no login (R5). A private catalog needs a read credential on every customer box, and the customer has root on that box, so the token is effectively public. Keep public.

5. Decide-row text for the operator

Make felhom-controller private now? (felhom.eu, felhom-agent and the catalog cannot go private tonight — see section 4.)

  • Yes, after one change: CI clones with a read token. Cost: one CI secret and an edit to the clone step in each gates.yml. Gain: the controller source is no longer readable anonymously. The controller IMAGE stays anonymously pullable (packages follow the user admin, not the repo), so the compiled code stays public.
  • No: nothing changes. The rule "no secret may enter a public repo" (manifest_bearer_gate.py) stays the control.

What breaks if the setting is wrong. felhom.eu private: the website keeps its last checkout while the git-sync sidecars run (--max-failures=-1), so it LOOKS fine. At the next pod restart the init containers (--one-time) fail and the pod does not start. Then felhom.eu is down, and the ISO first boot cannot fetch the installer (R2). felhom-agent private: the next fresh install or reinstall stops at the config fetch. Catalog private: every box's catalog sync fails every 15 minutes. Any repo private before the CI change: its CI job fails and mails the gate alarm.

How to undo. One setting: Gitea → repository → Settings → "Make repository private" → clear the box → Save. Effect is immediate; git-sync retries every 30 s.

6. <!-- source --> comments that must change if the repos go private

Served on the live website (measured with curl + grep -c):

Page Count What they cite
website/adatkezeles.html (/adatkezeles) 33 hub/ (12), documentation/ (11), manifests/ (5), website/ (2), scripts/ (1), felhom-controller (1), plus operator rulings and measurements
website/feltetelek.html (/feltetelek) 15 documentation/ (12)
website/teszteles.html (/teszteles) 7 documentation/ (3), website/ (3)
website/en/testing.html (/en/testing) 6 documentation/ (3), website/ (2)

Total served: 61. R-925 names "32 on /adatkezeles"; today it is 33, and three more pages carry 28. The comments cite repo-relative paths, not Gitea URLs.

Not served (in the repo only; they become private together with the repo; no change needed): documentation/legal/* (DRAFT-adatkezelesi-tajekoztato 54, adatkezelesi-tajekoztato-1.0 32 / -1.1 33, feltetelek-1.0 14 / -1.1 15, DRAFT-aszf 15, DRAFT-kapcsolat-hozzajarulas 4, DRAFT-impresszum 2, README 1), documentation/runbooks/secrets.md 1, OPEN-ITEMS.md 1.

Links to Gitea source pages that stop working for anonymous readers: felhom-agent/README.md, felhom-controller/scripts/README.md, felhom.eu/documentation/pilot/RUNBOOK-peti-pbsdr-2026-07-11.md. All are operator documents.