Files
felhom.eu/documentation/audits/hub-tokens-2026-10-15/red-proof/11-api-token.txt
T
admin d62cc08b2e
gates / gates (push) Successful in 6m44s
hub v0.152.0: operator access tokens with scopes (09 §3 decision 251, operator 2026-10-15 11:38)
- Configuration → Access tokens: named, scoped (group read/write), expiring (≤365 d), shown once,
  stored SHA-256 only, every use logged by name. Bearer fhp_… on the web surface only; /api/v1 refuses it.
- Route table = the code's single source (web/routes.go), pinned to ServeHTTP's switch; session-only:
  secrets shown/minted, deletes/resets, password, tokens.
- R-952 closed: /api/v1 route table names each caller, pinned to the switch; no-credential refusal test.
- Fail-open fixed: an empty operator password served the UI open (main skipped RequireAuth). Live hub never open.
- 05 §17, 04 §6.2, 13, 09 §3 251; register 155→157 (+R-1054, R-1055, R-1056, −R-952); STATUS.
- website: prowlarr-logo.svg (byte copy from felhom.eu-media) — the site gate refused every push.
Not deployed — waits for the operator's yes.

Claude-Session: https://claude.ai/code/session_012qRErfCoiTkvDK9N5XHbzb
2026-10-15 12:20:35 +02:00

58 lines
5.1 KiB
Plaintext

=== RUN TestAPI_AccessTokenIsRefusedEverywhere
routes_test.go:174: POST /report with an access token: 401 "Unauthorized"
routes_test.go:174: GET /wait with an access token: 401 "Unauthorized"
routes_test.go:174: POST /appliance/register with an access token: 400 "uuid and at least one MAC are required"
routes_test.go:174: GET /appliance/poll with an access token: 404 "not found"
routes_test.go:174: POST /host-report with an access token: 401 "Unauthorized"
routes_test.go:174: POST /host-enroll with an access token: 400 "Invalid payload: customer_id required"
routes_test.go:174: POST /admin/hosts with an access token: 403 "Forbidden: global key required"
routes_test.go:174: PUT /hosts/h1/escrow with an access token: 401 "Unauthorized"
routes_test.go:174: GET /hosts/h1/escrow with an access token: 401 "Unauthorized"
routes_test.go:174: GET /hosts/h1/escrow/retained with an access token: 401 "Unauthorized"
routes_test.go:174: PUT /hosts/h1/recovery-credential with an access token: 401 "Unauthorized"
routes_test.go:174: GET /admin/hosts/h1/recovery-credential with an access token: 401 "Unauthorized"
routes_test.go:174: PUT /admin/hosts/h1/recovery-mode with an access token: 403 "Forbidden: global key required"
routes_test.go:174: DELETE /admin/hosts/h1/recovery-mode with an access token: 403 "Forbidden: global key required"
routes_test.go:174: POST /hosts/h1/re-enroll with an access token: 403 "Forbidden: host not in recovery mode (operator must arm it)"
routes_test.go:174: GET /hosts/h1/restore-directive with an access token: 401 "Unauthorized"
routes_test.go:174: POST /hosts/h1/wg with an access token: 401 "Unauthorized"
routes_test.go:174: POST /hosts/h1/pbs/consume-token with an access token: 401 "Unauthorized"
routes_test.go:174: POST /hosts/h1/os-report with an access token: 401 "Unauthorized"
routes_test.go:174: GET /hosts/h1/desired-state with an access token: 401 "Unauthorized"
routes_test.go:174: GET /hosts/h1/jobs with an access token: 401 "Unauthorized"
routes_test.go:174: DELETE /hosts/h1/jobs/j1 with an access token: 401 "Unauthorized"
routes_test.go:174: PUT /admin/hosts/h1/desired-state with an access token: 403 "Forbidden: global key required"
routes_test.go:174: POST /admin/hosts/h1/jobs with an access token: 403 "Forbidden: global key required"
routes_test.go:174: PUT /admin/wg/endpoint with an access token: 403 "Forbidden: global key required"
routes_test.go:174: GET /admin/wg/endpoint with an access token: 403 "Forbidden: global key required"
routes_test.go:174: POST /admin/wg/peers with an access token: 403 "Forbidden: global key required"
routes_test.go:174: DELETE /admin/wg/peers with an access token: 403 "Forbidden: global key required"
routes_test.go:174: GET /admin/wg/peers with an access token: 403 "Forbidden: global key required"
routes_test.go:174: PUT /admin/wg/operator-peer with an access token: 403 "Forbidden: global key required"
routes_test.go:174: GET /admin/wg/operator-peer with an access token: 403 "Forbidden: global key required"
routes_test.go:174: POST /claim/reset-request with an access token: 401 "Unauthorized"
routes_test.go:174: POST /event with an access token: 401 "Unauthorized"
routes_test.go:174: POST /mail with an access token: 401 "Unauthorized"
routes_test.go:174: POST /notify with an access token: 401 "Unauthorized"
routes_test.go:174: POST /preferences with an access token: 401 "Unauthorized"
routes_test.go:174: GET /customers with an access token: 403 "Forbidden: global key required"
routes_test.go:174: GET /customers/c1 with an access token: 403 "Forbidden: global key required"
routes_test.go:174: GET /recovery/c1 with an access token: 401 "Unauthorized: X-Retrieval-Password header required"
routes_test.go:174: GET /config/c1 with an access token: 401 "Unauthorized: X-Retrieval-Password header required"
routes_test.go:174: POST /offsite/consume-password/c1 with an access token: 401 "unauthorized"
routes_test.go:174: POST /offsite/register-key/c1 with an access token: 401 "unauthorized"
routes_test.go:174: POST /offsite/confirm-key/c1 with an access token: 401 "unauthorized"
routes_test.go:174: POST /offsite/move-aside/c1 with an access token: 401 "unauthorized"
routes_test.go:174: POST /offsite/window-open/c1 with an access token: 401 "unauthorized"
routes_test.go:174: POST /offsite/window-close/c1 with an access token: 401 "unauthorized"
routes_test.go:174: POST /offsite/abandon-request/c1 with an access token: 401 "unauthorized"
routes_test.go:174: POST /offsite/abandon-cancel/c1 with an access token: 401 "unauthorized"
routes_test.go:174: POST /offsite/abandon-status/c1 with an access token: 401 "unauthorized"
routes_test.go:174: GET /artifacts/c1 with an access token: 401 "Unauthorized: X-Retrieval-Password header required"
routes_test.go:174: GET /assets/manifest with an access token: 401 "Unauthorized"
routes_test.go:174: GET /assets/file/c1 with an access token: 401 "Unauthorized"
--- FAIL: TestAPI_AccessTokenIsRefusedEverywhere (0.04s)
FAIL
FAIL gitea.dooplex.hu/admin/felhom-hub/internal/api 0.064s
FAIL