Summary
Build the core HTTP client that all tools use. Single get() chokepoint that enforces safety invariants. Support optional token for rate-limit relief.
Safety invariants
- GET-only — only
http.MethodGet, hardcoded
- Pinned hosts — requests only go to hosts listed in config
- No credentials by default — no auth headers unless a token is explicitly configured
- Rate-limit awareness — detect HTTP 429, parse
Retry-After and RateLimit-Remaining headers, surface clear errors
Optional token
- Loaded from env var specified in config (e.g.
REPO1_TOKEN)
- Sent as
Private-Token header when present
- Does NOT change the public-only enforcement — visibility check still runs regardless
- The token may have broader access than intended (GitLab tokens inherit the user's permissions). The tool is the policy layer, not the token. Document this clearly.
Config
Multi-host config file at ~/.config/gitlab-kiosk/config.yml:
hosts:
- hostname: repo1.dso.mil
token_env: REPO1_TOKEN
- hostname: gitlab.com
Related issues
Summary
Build the core HTTP client that all tools use. Single
get()chokepoint that enforces safety invariants. Support optional token for rate-limit relief.Safety invariants
http.MethodGet, hardcodedRetry-AfterandRateLimit-Remainingheaders, surface clear errorsOptional token
REPO1_TOKEN)Private-Tokenheader when presentConfig
Multi-host config file at
~/.config/gitlab-kiosk/config.yml:Related issues