Debian Codegraph @

PKG-INFO

raw
1 Metadata-Version: 2.4
2 Name: fido2
3 Version: 2.2.1
4 Summary: FIDO2/WebAuthn library for implementing clients and servers.
5 License: Copyright (c) 2018 Yubico AB
6 All rights reserved.
7
8 Redistribution and use in source and binary forms, with or without
9 modification, are permitted provided that the following conditions are
10 met:
11
12 * Redistributions of source code must retain the above copyright
13 notice, this list of conditions and the following disclaimer.
14
15 * Redistributions in binary form must reproduce the above
16 copyright notice, this list of conditions and the following
17 disclaimer in the documentation and/or other materials provided
18 with the distribution.
19
20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 License-File: COPYING
32 License-File: COPYING.APLv2
33 License-File: COPYING.MPLv2
34 Keywords: fido2,webauthn,ctap,u2f
35 Author: Dain Nilsson
36 Author-email: <[email protected]>
37 Requires-Python: >=3.10, <4
38 Classifier: License :: OSI Approved :: BSD License
39 Classifier: License :: OSI Approved :: Apache Software License
40 Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
41 Classifier: Operating System :: MacOS
42 Classifier: Operating System :: Microsoft :: Windows
43 Classifier: Operating System :: POSIX :: Linux
44 Classifier: Development Status :: 5 - Production/Stable
45 Classifier: Intended Audience :: Developers
46 Classifier: Intended Audience :: System Administrators
47 Classifier: Topic :: Internet
48 Classifier: Topic :: Security :: Cryptography
49 Classifier: Topic :: Software Development :: Libraries :: Python Modules
50 Provides-Extra: pcsc
51 Requires-Dist: cryptography (>=2.6,!=35,<52)
52 Requires-Dist: pyscard (>=1.9,<3) ; extra == "pcsc"
53 Project-URL: Homepage, https://github.com/Yubico/python-fido2
54 Description-Content-Type: text/plain
55
56 == python-fido2
57 image:https://github.com/Yubico/python-fido2/workflows/build/badge.svg["Github actions build", link="https://github.com/Yubico/python-fido2/actions"]
58
59 Provides library functionality for communicating with a FIDO device over USB as
60 well as verifying attestation and assertion signatures.
61
62 NOTE: Version 2.0 is now released. For help with migration from version 1.x, see
63 link:doc/Migration_1-2.adoc[the migration guide].
64
65 This library aims to support the FIDO U2F and FIDO 2 protocols for
66 communicating with a USB authenticator via the Client-to-Authenticator Protocol
67 (CTAP 1 and 2). In addition to this low-level device access, classes defined in
68 the `fido2.client` and `fido2.server` modules implement higher level operations
69 which are useful when interfacing with an Authenticator, or when implementing
70 WebAuthn support for a Relying Party.
71
72 For usage, see the `examples/` directory and
73 link:https://developers.yubico.com/python-fido2/API_Documentation/[API documentation].
74
75
76 === References
77 These links related to WebAuthn and FIDO2 can help you get started:
78
79 * Yubico WebAuthn/FIDO2 guide: https://developers.yubico.com/FIDO2/
80 * W3C WebAuthn specification: https://www.w3.org/TR/webauthn/
81 * FIDO specifications: https://fidoalliance.org/specifications/download/
82
83
84 === License
85 This project, with the exception of the files mentioned below, is licensed
86 under the BSD 2-clause license.
87 See the _COPYING_ file for the full license text.
88
89 This project contains source code from pyu2f (https://github.com/google/pyu2f)
90 which is licensed under the Apache License, version 2.0.
91 These files are located in `fido2/hid/`.
92 See http://www.apache.org/licenses/LICENSE-2.0,
93 or the _COPYING.APLv2_ file for the full license text.
94
95 This project also bundles the public suffix list (https://publicsuffix.org)
96 which is licensed under the Mozilla Public License, version 2.0.
97 This file is stored as `fido2/public_suffix_list.dat`.
98 See https://mozilla.org/MPL/2.0/,
99 or the _COPYING.MPLv2_ file for the full license text.
100
101
102 === Requirements
103 fido2 is compatible with Python 3.10 and later, and is tested on Windows, MacOS,
104 and Linux. Support for OpenBSD, FreeBSD, and NetBSD is provided as-is and
105 relies on community contributions.
106
107
108 === Installation
109
110 fido2 is installable by running the following command:
111
112 pip install fido2
113
114 To install the dependencies required for communication with NFC authenticators,
115 instead use:
116
117 pip install fido2[pcsc]
118
119 Under Windows 10 (1903 or later) access to FIDO devices is restricted and
120 requires running as Administrator. This library can still be used when running
121 as non-administrator, via the `fido.client.WindowsClient` class. An example of
122 this is included in the file `examples/credential.py`.
123
124
125 Under Linux you will need to add a Udev rule to be able to access the FIDO
126 device, or run as root. For example, the Udev rule may contain the following:
127
128 ----
129 #Udev rule for allowing HID access to Yubico devices for FIDO support.
130
131 KERNEL=="hidraw*", SUBSYSTEM=="hidraw", \
132 MODE="0664", GROUP="plugdev", ATTRS{idVendor}=="1050"
133 ----
134
135 There may be a package already available for your distribution that does this
136 for you, see:
137 https://support.yubico.com/hc/en-us/articles/360013708900-Using-Your-U2F-YubiKey-with-Linux
138
139 Under FreeBSD you will either need to run as root or add rules for your device
140 to /etc/devd.conf, which can be automated by installing security/u2f-devd:
141
142 # pkg install u2f-devd
143
144 ==== Dependencies
145 This project depends on Cryptography. For instructions on installing this
146 dependency, see https://cryptography.io/en/latest/installation/.
147
148 NFC support is optionally available via PC/SC, using the pyscard library. For
149 instructions on installing this dependency, see
150 https://github.com/LudovicRousseau/pyscard/blob/master/INSTALL.md.
151
152
153 === Development
154 For development of the library we use https://docs.astral.sh/uv/[uv].
155 Follow the uv Getting Started guide to install and configure it.
156
157 We also use https://pre-commit.com/[pre-commit] to run some scans on the code
158 prior to committing.
159
160
161 ==== Running tests
162 While some tests can run on their own, most require a connected FIDO2 device to run.
163
164 WARNING: These tests are destructive, and will factory reset the device under test.
165 As a safety precaution, the tests will only run on a device that is in a newly reset
166 state, as far as the test runner can tell.
167
168 uv run pytest
169
170