Add passkeys project: WebAuthn ceremonies, a software authenticator and the one-time-token fallback
Fourth Maven project in the repository. Registration and authentication run end to end with no browser and no hardware key: VirtualAuthenticator emits real CBOR attestation objects and real ES256 assertion signatures, and tools/PasskeyCeremony.java drives the live HTTP endpoints with them. Profiles cover userVerification REQUIRED, DIRECT attestation, a disallowed origin and JDBC persistence. Eleven doc chapters and twelve captured transcripts under docs/passkeys and docs/output/pk-*.txt, all regenerated by passkeys/scripts/run-all.sh.
This commit is contained in:
39
docs/output/pk-origin.txt
Normal file
39
docs/output/pk-origin.txt
Normal file
@@ -0,0 +1,39 @@
|
||||
==============================================================================
|
||||
Registration from a disallowed origin
|
||||
==============================================================================
|
||||
|
||||
=== Client data from an origin the relying party did not allow ===
|
||||
POST /login (password) -> HTTP 302, Location: http://localhost:8080/
|
||||
origin sent by the client: http://evil.localhost:8080
|
||||
origin allowed by the relying party: http://localhost:8080
|
||||
|
||||
$ POST /webauthn/register
|
||||
HTTP 500
|
||||
{"timestamp":"2026-08-25T17:19:51.884Z","status":500,"error":"Internal Server Error","path":"/webauthn/register"}
|
||||
|
||||
--- what the server logged ---
|
||||
com.webauthn4j.verifier.exception.BadOriginException: The collectedClientData origin 'http://evil.localhost:8080' doesn't match expected: http://localhost:8080
|
||||
at com.webauthn4j.verifier.OriginVerifierImpl.verify(OriginVerifierImpl.java:72) ~[webauthn4j-core-0.31.9.RELEASE.jar:na]
|
||||
at com.webauthn4j.verifier.OriginVerifierImpl.verify(OriginVerifierImpl.java:48) ~[webauthn4j-core-0.31.9.RELEASE.jar:na]
|
||||
at com.webauthn4j.verifier.RegistrationDataVerifier.verify(RegistrationDataVerifier.java:171) ~[webauthn4j-core-0.31.9.RELEASE.jar:na]
|
||||
at com.webauthn4j.WebAuthnRegistrationManager.verify(WebAuthnRegistrationManager.java:337) ~[webauthn4j-core-0.31.9.RELEASE.jar:na]
|
||||
==============================================================================
|
||||
Assertion from a disallowed origin
|
||||
==============================================================================
|
||||
|
||||
=== An assertion from a disallowed origin - the same mistake, one ceremony later ===
|
||||
POST /login (password) -> HTTP 302, Location: http://localhost:8080/
|
||||
|
||||
$ POST /webauthn/register/options
|
||||
HTTP 200
|
||||
{"attestation":"none","authenticatorSelection":{"residentKey":"required","userVerification":"preferred"},"challenge":"IOcuyb_uTuoFxh1RYNr7H--vx1dVRNoM4CyXTdFK9cc","excludeCredentials":[],"extensions":{"credProps":true},"pubKeyCredParams":[{"alg":-8,"type":"public-key"},{"alg":-7,"type":"public-key"},{"alg":-257,"type":"public-key"}],"rp":{"id":"localhost","name":"ankurm passkeys demo"},"timeout":300000,"user":{"name":"user","id":"aXe2d8pDxUar9cTAC93qmunRjRSnQolJcJaYQvFpoGk","displayName":"user"}}
|
||||
authenticator produced credentialId IrIGbWFcDF7yRWZGkYJowQ and a 178-byte CBOR attestation object
|
||||
|
||||
$ POST /webauthn/register
|
||||
HTTP 200
|
||||
{"success":true}
|
||||
logged out, cookie jar emptied
|
||||
|
||||
$ POST /login/webauthn (origin http://evil.localhost:8080)
|
||||
HTTP 401
|
||||
(empty body)
|
||||
Reference in New Issue
Block a user