The wizard's a2loft calls now authenticate with the session token and carry no OTP. Field pass in production: the lookup and both fingerprint saves succeeded with no OTP, so task 3.2 is done. Merged the fingerprint-wizard and tools-app deltas into the main specs and archived the change.
1.7 KiB
1.7 KiB
Proposal: fingerprint-token-auth
Why
The Fingerprint Agent wizard's two a2loft calls — staff lookup and fingerprint
save — prove the operator with a phone number and an OTP forwarded through
same-origin proxies. a2loft resolves that phone against the domain being
addressed, so an operator who holds the OpenFGA capture_biometric relation
but is not a super-user of that domain's uploader list is rejected. The cropper
already saves with the session's PocketBase token; the wizard's a2loft calls
should use the same token flow.
What Changes
- The
/api/:domain/staff/:referenceand/api/:domain/staff/:reference/fingerprintsproxies send the session's PocketBase token as anAuthorization: Bearerheader instead of forwardingphone+otpquery parameters. - The OTP validation is removed from the proxies; the session token is the credential.
- The wizard's lookup and save steps drop their OTP fields and OTP state.
- The Fingerprint Agent and tools-app specs, the README, and the Help page are updated.
- Requires the a2loft
fingerprint-token-authchange deployed first.
Capabilities
New Capabilities
(none)
Modified Capabilities
fingerprint-wizard: the two-finger enrollment flow and the per-call OTP requirement become token-authenticated.tools-app: the a2loft proxies requirement now injects the session token instead of forwardingphone+otp.
Impact
tools/server.js: the two a2loft proxy handlers andvalidateProxy.tools/public/assets/fp/index.html,tools/public/assets/fp/app.js: the OTP fields, state and request parameters removed.tools/test/server.test.js: proxy assertions.- Documentation: README and the Help page.