[PR #254] [MERGED] Adds Yubikey OTP Support #2685

Closed
opened 2026-03-03 08:36:30 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/254
Author: @Step7750
Created: 11/16/2018
Status: Merged
Merged: 11/16/2018
Merged by: @dani-garcia

Base: masterHead: master


📝 Commits (9)

  • 24a4478 Adds yubico-rs library dep
  • e664366 Adds Yubico Client ID and Secret Key Env Vars
  • 9e0e4b1 Adds Yubikey OTP Support
  • 2433d39 Allows Custom Yubico OTP Server
  • 6d73580 Ensures Yubico Creds are set when opening Yubikey Modal
  • 2c233cd Adds Yubikey OTP Support to Readme
  • 5a8d5e4 Switches to Downstream yubico with Optional libusb
  • 82e2b8a Code style changes
  • aba9c28 Disable Yubikey 2FA if 0 Keys Provided

📊 Changes

8 files changed (+394 additions, -1 deletions)

View changed files

📝 .env (+8 -0)
📝 Cargo.lock (+124 -0)
📝 Cargo.toml (+6 -0)
📝 README.md (+18 -1)
📝 src/api/core/mod.rs (+3 -0)
📝 src/api/core/two_factor.rs (+215 -0)
📝 src/api/identity.rs (+6 -0)
📝 src/main.rs (+14 -0)

📄 Description

Resolves #86
Feature Requests: #246

Features:

  • Yubikey OTP Support
  • Multiple keys (up to 5)
  • Custom OTP Validation server

Known Issues:

  • https://github.com/wisespace-io/yubico-rs/issues/4 The Yubico-rs library has an issue when sending out the OTP request to multiple validation servers simultaneously; any requests that finish after the caller has exited will panic.
    • Impact: Validation still works as intended but the console will be populated with a couple panics every time a key is validated or registered.

Requires pkg-config and libusb


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/dani-garcia/vaultwarden/pull/254 **Author:** [@Step7750](https://github.com/Step7750) **Created:** 11/16/2018 **Status:** ✅ Merged **Merged:** 11/16/2018 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (9) - [`24a4478`](https://github.com/dani-garcia/vaultwarden/commit/24a4478b5c1056cce0dee9bc11958abe406a34f9) Adds yubico-rs library dep - [`e664366`](https://github.com/dani-garcia/vaultwarden/commit/e66436625ce81d1a757f11d1bed5c5fcd8b5392f) Adds Yubico Client ID and Secret Key Env Vars - [`9e0e4b1`](https://github.com/dani-garcia/vaultwarden/commit/9e0e4b13c54f5f9595ecdf6a21c49f9249602265) Adds Yubikey OTP Support - [`2433d39`](https://github.com/dani-garcia/vaultwarden/commit/2433d39df5aa37c8927b0583ef1dc1c9a2e9c67f) Allows Custom Yubico OTP Server - [`6d73580`](https://github.com/dani-garcia/vaultwarden/commit/6d735806c04b7334eddcfdc7935d0b21d799b1d4) Ensures Yubico Creds are set when opening Yubikey Modal - [`2c233cd`](https://github.com/dani-garcia/vaultwarden/commit/2c233cda8bd123f9156fc3ba3f6800fd1fa3e4c3) Adds Yubikey OTP Support to Readme - [`5a8d5e4`](https://github.com/dani-garcia/vaultwarden/commit/5a8d5e426dca0f5c3d03db0722ddc1457e7c7ceb) Switches to Downstream yubico with Optional libusb - [`82e2b8a`](https://github.com/dani-garcia/vaultwarden/commit/82e2b8a8c0ad01225058bafd487f2656afb81704) Code style changes - [`aba9c28`](https://github.com/dani-garcia/vaultwarden/commit/aba9c28226d4f716d4f6fbc28baf98b84262ae00) Disable Yubikey 2FA if 0 Keys Provided ### 📊 Changes **8 files changed** (+394 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `.env` (+8 -0) 📝 `Cargo.lock` (+124 -0) 📝 `Cargo.toml` (+6 -0) 📝 `README.md` (+18 -1) 📝 `src/api/core/mod.rs` (+3 -0) 📝 `src/api/core/two_factor.rs` (+215 -0) 📝 `src/api/identity.rs` (+6 -0) 📝 `src/main.rs` (+14 -0) </details> ### 📄 Description Resolves #86 Feature Requests: #246 Features: * Yubikey OTP Support * Multiple keys (up to 5) * Custom OTP Validation server Known Issues: * https://github.com/wisespace-io/yubico-rs/issues/4 The Yubico-rs library has an issue when sending out the OTP request to multiple validation servers simultaneously; any requests that finish after the caller has exited will panic. * Impact: Validation still works as intended but the console will be populated with a couple panics every time a key is validated or registered. Requires pkg-config and libusb --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 08:36:30 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#2685
No description provided.