Skip to content

Feat/add biometric gating - #54

Open
sbycrosz wants to merge 5 commits into
pagopa:mainfrom
pavebank:feat/add-biometric-gating
Open

Feat/add biometric gating#54
sbycrosz wants to merge 5 commits into
pagopa:mainfrom
pavebank:feat/add-biometric-gating

Conversation

@sbycrosz

Copy link
Copy Markdown

Short description

Add options to add biometric gate before generating signature so that authentication is cryptographically tied to the key use rather than being an application level check

This follows the OWASP best practices regarding local authentication

The tester should be aware that local authentication should always be enforced at a remote endpoint or based on a cryptographic primitive. Attackers can easily bypass local authentication if no data returns from the authentication process.

Changes

  • New requireAuthentication option. When set, signing only works after a successful biometric prompt
  • New invalidateOnEnrollmentChange option. Invalidate the key when new fingerprint/face is added

How to test

Needs a real iOS/Android device, probably won't work on simulator.

  1. Run the example app
  2. Old keys should keep working, nothing changes for them
  3. Keys made with requireAuthentication: false should sign without any prompt
  4. Keys made with requireAuthentication: true should only sign after the biometric prompt passes

@sbycrosz
sbycrosz requested a review from a team as a code owner July 20, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant