pywarp
pywarp copied to clipboard
Support for packed attestation, improved packaging and test coverage
Hello!
I needed a proper WebAuthn RP implementation in a hurry, so I started developing over this project with the modifications needed to better handle standards. Notably, I added support for packed attestation using EC256/384/512 and RSA, and refactored FIDO U2F attestation as needed.
I also added a few tests to ensure both authentications worked with on-demand generated credentials.
Since I'm more used to using poetry as dependency manager, I converted the old setup.py script. I also use pytest for testing since its fixture support comes in very handy to avoid code duplication.
All files were PEP-8 formatted with autopep8 and imports are sorted using isort
Last but not least, this PR is still work in progress, since I did not yet finished testing validation of FIDO certificates (I mostly didn't touch your code), and I do not have an U2F device, at most I can mock one (see https://github.com/concise/v2f.py).
If ever merging this PR, I suggest not squashing commits as it would generate a large, messy commit with multiple features.
Codecov Report
Merging #3 (3431a47) into master (187082e) will increase coverage by
30.23%
. The diff coverage is83.24%
.
@@ Coverage Diff @@
## master #3 +/- ##
===========================================
+ Coverage 44.57% 74.81% +30.23%
===========================================
Files 10 10
Lines 258 266 +8
===========================================
+ Hits 115 199 +84
+ Misses 143 67 -76
Impacted Files | Coverage Δ | |
---|---|---|
pywarp/__init__.py | 100.00% <ø> (ø) |
|
pywarp/compat.py | 50.00% <ø> (ø) |
|
pywarp/credentials.py | 68.96% <67.85%> (+35.63%) |
:arrow_up: |
pywarp/rp.py | 63.38% <73.17%> (+31.12%) |
:arrow_up: |
pywarp/backends.py | 54.54% <80.00%> (+24.11%) |
:arrow_up: |
pywarp/fido/metadata.py | 44.44% <80.00%> (-3.84%) |
:arrow_down: |
pywarp/attestation.py | 86.44% <85.71%> (+45.26%) |
:arrow_up: |
pywarp/authenticators.py | 92.30% <91.30%> (+63.73%) |
:arrow_up: |
pywarp/cose.py | 100.00% <100.00%> (ø) |
|
pywarp/utils.py | 100.00% <100.00%> (ø) |
|
... and 4 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 187082e...47221a0. Read the comment docs.
Thank you for working on this! I was off the grid for a while so just coming back to this. It will take me a little while to chew through this PR and I may have to ask you to break it down into a few smaller parts, but I'm very grateful for the work that you have put in.
Looking forward to reviewing this in the next few days.
break it down into a few smaller parts
Sure! I will go over the changes again to make it smaller and cleaner.