bodik / soft-webauthn

Python software webauthn token
MIT License
46 stars 18 forks source link
authentication fido2 python webauthn

Python software webauthn token

Build Status

Package is used for testing webauthn enabled web applications. The use-case is authenticator and browser emulation during web application development continuous integration.

SoftWebauthnDevice class interface exports basic navigator interface used for webauthn features:

To support authentication tests without prior registration/attestation, the class exports additional functions:

There is no standard/specification for Client (browser) to Relying party (web application) communication. Therefore the class should be be used in a web application test suite along with other code handling webapp specific tasks such as conveying CredentialCreationOptions from webapp and PublicKeyCredential back to the webapp.

The example usage can be found in tests/test_interop.py (Token/Client vs RP API) and tests/test_example.py (Token/Client vs RP HTTP). Despite internal usage of yubico/python-fido2 package, the project should be usable againts other RP implementations as well.

References

Development

git clone https://github.com/bodik/soft-webauthn
cd soft-webauthn
ln -s ../../git_hookprecommit.sh .git/hooks/pre-commit

# OPTIONAL, create and activate virtualenv
make venv
. venv/bin/activate

# install dependencies
make install-deps

# profit
make lint
make test
make coverage