Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Demonstration of writing data to a FIDO2 authenticator using WebAuthn and the CTAP 2.1 largeBlob extension. 🖥️

License

NotificationsYou must be signed in to change notification settings

All-Your-Locks-Are-Belong-To-Us/webauthn-updater

Repository files navigation

This project provides a demonstration of writing data to a FIDO authenticator using WebAuthn and the CTAP 2.1 largeBlob extension. The data is loaded from a Keycloak instance via OIDC.

Browser Preview

Setup

This project assumes Python 3.9. Make sure to have Pip and Pipenv installed.

The dependencies of the app can be installed usingpipenv install. (Note: thepy_webauthn package needed to be extended to support the largeBlob and credProtect extension. Therefore, the package is installed from thepy_webauthn submodule pointing to our own extension of the project. Also, at the point of writing, there is a small bug breaking thepython-keycloak package for our use case, so we use our own fixed version for that one as well.)

For the app to work properly, some environment variables need to be set:

NameDefault valueLocal valueDeployment Value
WAU_HOST_URLunsethttp://localhost:5000https://wau.felixgohla.de
WAU_SERVER_PORT80025000not required
WAU_KEYCLOAK_HOST_NAMEunsetkc.felixgohla.dekc.felixgohla.de
WAU_KEYCLOAK_CLIENT_IDunsetwebauthn-updaterdeployed-webauthn-updater
WAU_KEYCLOAK_CLIENT_SECRETunsetretrieve from Keycloakretrieve from Keycloak
WAU_SIGNING_KEY_PATHunsetnot requiredpath to PEM file of the ECDSA signing key

Generate the OIDC config file using the environment variables by runningenvsubst < client_secrets.tmpl.json > client_secrets.json

Generate the signing key by runningopenssl ecparam -name prime192v1 -genkey -out sk.pemYou can export the verifying key for the locks by runningopenssl ec -in sk.pem -pubout -out vk.pem

Running in current shell session

Start the app viapipenv run python app.py

Running as a system service

Alternatively, if you want to run the app as a system service, first copywebauthn-updater.service to the/etc/systemd/system directory.

Enable the service by runningsystemctl enable webauthn-updater.service.

As the app requires an environment variable to be set, runsystemctl edit webauthn-updater.service and enter the following to the resulting text input prompt:

[Service]Environment="WAU_HOST_URL=<your url value here>"Environment="WAU_KEYCLOAK_HOST_NAME=<your hostname here>"Environment="WAU_KEYCLOAK_CLIENT_ID=<your client id here>"Environment="WAU_KEYCLOAK_CLIENT_SECRET=<your secret here>"Environment="WAU_SIGNING_KEY_PATH=<your absolute path here>"

Finally, start the service withsystemctl start webauthn-updater.service.

Acknowledgements

TheWebAuthn Javascript serialization helper is taken fromour miniscule extension of the @github/webauthn-json project. The license of the project can be foundhere.

Additionally, this project makes some small adjustments to thepy-webauthn andpython-keycloak projects. Please find the licenses of those projects in the respective repositories.

About

Demonstration of writing data to a FIDO2 authenticator using WebAuthn and the CTAP 2.1 largeBlob extension. 🖥️

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors4

  •  
  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp