code for 3 machines demoing how to use the chrome card.
Go to file
Morten V. Christiansen 56132528fe Add CardEmulator and fix fido2-direct id= constructor bugs
tests/card_emulator.py: software emulator of the ChromeCard FIDO2
authenticator. Implements make_credential and get_assertion with real P-256
cryptography and an in-memory credential store. Both methods accept
user_confirms=True/False to simulate the card's Yes/No confirmation dialog;
False raises CtapError(OPERATION_DENIED). refusing() returns a wrapper that
forces user_confirms=False for integration tests that route through
_with_direct_ctap2. forget_user() simulates card-side credential removal.
Module docstring serves as the usage guide.

tests/test_k_proxy.py: 22 new tests across TestCardEmulatorUnit (direct
emulator calls) and TestCardEmulatorIntegration (full ProxyState flows
covering register, authenticate, user-says-no, forget, two-user isolation,
and sign-count monotonicity).

k_proxy_app.py: fix two bugs where RegistrationResponse and
AuthenticationResponse were constructed with id= instead of raw_id=. Both
calls raised TypeError at runtime, silently caught by the surrounding except
block, making all fido2-direct register and authenticate calls fail.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 16:31:07 +02:00
tests Add CardEmulator and fix fido2-direct id= constructor bugs 2026-04-27 16:31:07 +02:00
.gitignore Add Playwright portal regression and harden direct auth 2026-04-25 21:06:08 +02:00
PHASE5_RUNBOOK.md inconsistancies resolved 2026-04-26 07:14:19 +02:00
Setup.md Update Setup.md and Workplan.md for 2026-04-27 session 2026-04-27 11:29:26 +02:00
Workplan.md Update Workplan current status: phases 6.5/7/9 all externally gated 2026-04-27 13:17:58 +02:00
ctaphid_init_probe.py Harden direct auth path and regression helper 2026-04-25 15:49:52 +02:00
fido2_probe.py Initialize workspace tracking repo 2026-04-24 05:38:00 +02:00
generate_phase2_certs.py Add Phase 2 HTTPS prototype and runbook updates 2026-04-25 01:29:37 +02:00
k_client_portal.py Refactor all three service files and fix enroll-clears-session bug 2026-04-27 11:27:57 +02:00
k_proxy_app.py Add CardEmulator and fix fido2-direct id= constructor bugs 2026-04-27 16:31:07 +02:00
k_server_app.py Refactor all three service files and fix enroll-clears-session bug 2026-04-27 11:27:57 +02:00
package-lock.json Add Playwright portal regression and harden direct auth 2026-04-25 21:06:08 +02:00
package.json Add Playwright portal regression and harden direct auth 2026-04-25 21:06:08 +02:00
phase5_chain_regression.sh Harden direct auth path and regression helper 2026-04-25 15:49:52 +02:00
phase65_concurrency_probe.py Add CTAP probe and update phase docs 2026-04-25 10:25:40 +02:00
playwright.config.js Add Playwright portal regression and harden direct auth 2026-04-25 21:06:08 +02:00
raw_ctap_probe.py Harden direct auth path and regression helper 2026-04-25 15:49:52 +02:00
webauthn_local_demo.py Initialize workspace tracking repo 2026-04-24 05:38:00 +02:00