RepositoryPythonUSHoa Kỳ
duo-labs

duo-labs/py_webauthn

Pythonic WebAuthn 🐍

1.1ksao
203fork
5issue
6lượt xem

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Chủ đề: webauthn

#1 Repository của tháng

1
TINIX TRENDING·Chủ đề: pypi

#1 Repository của tháng

1
TINIX TRENDING·Chủ đề: fido2

#1 Repository của tháng

🐍 py_webauthn — Triển khai WebAuthn phía server bằng Python

Thư viện server-side WebAuthn từ duo-labs, chỉ với 4 phương thức cốt lõi là đã xử lý toàn bộ flow xác thực không mật khẩu.

py_webauthn là thư viện Python3 do duo-labs (Đội an ninh của Cisco) phát triển, triển khai đầy đủ phía máy chủ của WebAuthn API theo chuẩn W3C. Thư viện hỗ trợ mọi xác thực viên (authenticator) tuân thủ FIDO2 — từ security key vật lý đến Touch ID, Face ID, Windows Hello, Android biometrics.

Cài đặt đơn giản qua PyPI với pip install webauthn, yêu cầu Python 3.10+. Thư viện hoạt động theo mô hình Relying Party, giao tiếp với frontend qua JSON và base64url encoding.

✨ Điểm nổi bật

  • 4 phương thức cốt lõi: generate_registration_options(), verify_registration_response(), generate_authentication_options(), verify_authentication_response() — bao toàn bộ WebAuthn ceremony.
  • Hỗ trợ mọi FIDO2 authenticator: security keys, Touch ID, Face ID, Windows Hello, Android biometrics.
  • Base64url encoding tích hợp: options_to_json() và base64url_to_bytes() giúp truyền dữ liệu bytes sang frontend mà không cần phụ thuộc thêm.
  • Dataclasses có type hint: webauthn.helpers.structs cung cấp cấu trúc dữ liệu rõ ràng, đảm bảo tính nhất quán khi truyền dữ liệu.
  • Tách biệt bytes server-side: các giá trị bytes chỉ lưu trên server, tránh encoding thừa khi không cần thiết.
  • Tương thích frontend dễ dàng: JSON là định dạng truyền mặc định, phù hợp với navigator.credentials.create() và navigator.credentials.get().
  • Code quality cao: full type checking bằng mypy, format bằng black, 52 source file không issue.
  • BSD license, nhẹ, không phụ thuộc ngoài lõi WebAuthn spec.

💡 Vì sao đáng chú ý

WebAuthn đang trở thành tiêu chuẩn xác thực không mật khẩu, nhưng triển khai server-side phức tạp và dễ sai lệch nếu tự code từ đầu. py_webauthn đóng gói toàn bộ logic phức tạp — từ generating challenge, parsing credential, đến verifying signature — vào vài phương thức rõ ràng. Điều này giúp RP (Relying Party) tập trung vào business logic thay vì xử lý chi tiết cryptographic.

Thư viện đặc biệt phù hợp cho bất kỳ ứng dụng Python nào muốn tích hợp đăng nhập WebAuthn/FIDO2: từ API backend, microservice đến app enterprise. Pair với frontend library như @simplewebauthn/browser là có ngay flow đăng nhập không mật khẩu hoàn chỉnh.


#WebAuthn #FIDO2 #Python #Security #TiniX

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryPython
donnemartin/system-design-primer

Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.

379.9k
Sep 15, 2026
RepositoryPython
practical-tutorials/project-based-learning

Curated list of project-based tutorials

290.9k
Nov 30, 2026
RepositoryTypeScript
morluto/rea

Reverse engineer anything with agents, from app behavior down to native binaries.

487.0k
Dec 2, 2026
RepositoryJavaScript
CyC2018/CS-Notes

:books: 技术面试必备基础知识、Leetcode、计算机操作系统、计算机网络、系统设计

186.6k
Nov 27, 2026
RepositoryPython
Asabeneh/30-Days-Of-Python

The 30 Days of Python programming challenge is a step-by-step guide to learn the Python programming language in 30 days. This challenge may take more than 100 days. Follow your own pace. These videos may help too: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw

80.0k
Sep 30, 2026
RepositoryPython
pypa/pipx

Install and Run Python Applications in Isolated Environments

13.0k
Nov 24, 2026
RepositoryPython
pypiserver/pypiserver

Minimal PyPI server for uploading & downloading packages with pip/easy_install

2.1k
Dec 1, 2026
RepositoryPython
CoderWanFeng/python-office

pip install python-office 自动化办公专用库

1.4k
Oct 29, 2026
RepositoryPython
Yubico/python-fido2

Provides library functionality for FIDO 2.0, including communication with a device over USB.

553
Nov 19, 2026