code for 3 machines demoing how to use the chrome card.
Go to file
Morten V. Christiansen 920d702dea Refactor k_phone (v2) and add component3 Go binary
k_phone:
- filter_proxy.dart: extract _writeProxyHeaders/_forwardHttpRequest helpers,
  removing ~30 lines of duplication; simplify _handleDirectHttp signature
- proxy_service.dart: import portal_html, merge _serveHtml/_serveEnrollHtml →
  _serveHtmlBytes, extract _parseUsername/_parseUsernameAndDisplay helpers,
  remove dead _loadTlsContext stub, use SessionManager.ttlSeconds (872→455 lines)
- portal_html.dart (new): kPortalHtml/kEnrollHtml/kPortalHtmlBytes/kEnrollHtmlBytes
- session_manager.dart: expose ttlSeconds as public constant
- filter_proxy_test.dart: rewritten for v2 — gated HTTP tests now verify Bearer
  token injection to endpoint directly; 24/24 pass
- k_server_client.dart: deleted (dead code)

component3 (Go proxy — first commit of entire directory):
- gated.go: fix IsGated(host,port) — was silently missing host:port entries
- proxy.go: pass port to IsGated in both handleHTTP and handleConnect
- phone.go: add getToken() calling /auth/get-token to avoid unnecessary FIDO2
  card interactions; fix login() JSON field expires_in→ttl_seconds

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-05 21:04:19 +02:00
component3 Refactor k_phone (v2) and add component3 Go binary 2026-05-05 21:04:19 +02:00
k_phone Refactor k_phone (v2) and add component3 Go binary 2026-05-05 21:04:19 +02:00
tests Initial commit: chromecard workspace snapshot 2026-04-29 22:06:14 +02:00
.gitignore Initial commit: chromecard workspace snapshot 2026-04-29 22:06:14 +02:00
CLAUDE.md Refactor k_phone (v2) and add component3 Go binary 2026-05-05 21:04:19 +02:00
PHASE5_RUNBOOK.md Initial commit: chromecard workspace snapshot 2026-04-29 22:06:14 +02:00
Setup.md Initial commit: chromecard workspace snapshot 2026-04-29 22:06:14 +02:00
Workplan.md Refactor k_phone (v2) and add component3 Go binary 2026-05-05 21:04:19 +02:00
ctaphid_init_probe.py Initial commit: chromecard workspace snapshot 2026-04-29 22:06:14 +02:00
fido2_probe.py Initial commit: chromecard workspace snapshot 2026-04-29 22:06:14 +02:00
generate_phase2_certs.py Initial commit: chromecard workspace snapshot 2026-04-29 22:06:14 +02:00
k_client_portal.py Initial commit: chromecard workspace snapshot 2026-04-29 22:06:14 +02:00
k_proxy_app.py Initial commit: chromecard workspace snapshot 2026-04-29 22:06:14 +02:00
k_server_app.py Initial commit: chromecard workspace snapshot 2026-04-29 22:06:14 +02:00
package-lock.json Initial commit: chromecard workspace snapshot 2026-04-29 22:06:14 +02:00
package.json Initial commit: chromecard workspace snapshot 2026-04-29 22:06:14 +02:00
phase5_chain_regression.sh Initial commit: chromecard workspace snapshot 2026-04-29 22:06:14 +02:00
phase65_concurrency_probe.py Initial commit: chromecard workspace snapshot 2026-04-29 22:06:14 +02:00
playwright.config.js Initial commit: chromecard workspace snapshot 2026-04-29 22:06:14 +02:00
raw_ctap_probe.py Initial commit: chromecard workspace snapshot 2026-04-29 22:06:14 +02:00
webauthn_local_demo.py Initial commit: chromecard workspace snapshot 2026-04-29 22:06:14 +02:00