Skip to content

corbado/xk6-passkeys

Repository files navigation

xk6-passkeys

A k6 extension for load-testing passkey backends ("WebAuthn servers"). With this extension, you can load-test your passkey registration and login flows.

For additional assistance and information, we strongly recommend reading our blog post about passkey performance testing.

Prerequisites

To build the extension and run the examples, you need the following tools:

Build

For your convenience, we provide a Makefile to build the extension:

make build

This will create a k6 binary in the current directory with the extension compiled in.

For detailed instructions on building k6 extensions, please refer to the official documentation.

Examples

We have implemented two example load-tests in the examples directory: one for registration and one for login.

Since a passkeys backend is required for load-testing, we provide a sample backend for load-testing. To start the backend, execute the following commands:

docker build -t passkeys-backend examples/backend
docker run -p 8080:8080 passkeys-backend

🚨 The backend has been implemented solely for load-testing purposes. It has not been reviewed, secured, thoroughly tested, nor does it adhere to best practices.

To load-test the registration flow, run the following command (in a different terminal):

./k6 run examples/registration.js

Running k6 Registration

To load-test the login flow, run the following command (in a different terminal):

./k6 run examples/login.js

Running k6 Registration

About

k6 extension for load-testing passkey backends ("WebAuthn servers").

Topics

Resources

License

Stars

Watchers

Forks