-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use standard system package for ECDSA verification and add tests #460
Conversation
Mypy is unhappy about it, to fix. |
97df43f
to
b7ed5c9
Compare
53cd498
to
0d2efe4
Compare
3d407e4
to
2d04362
Compare
c0d8ceb
to
7358989
Compare
The reviewer should be very careful when reviewing this PR, as it includes a number of significant changes that could potentially impact the system's functionality. Please let me know if you need any further assistance. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #460 +/- ##
==========================================
+ Coverage 51.92% 53.84% +1.91%
==========================================
Files 58 58
Lines 5177 5310 +133
Branches 595 594 -1
==========================================
+ Hits 2688 2859 +171
+ Misses 2358 2313 -45
- Partials 131 138 +7 ☔ View full report in Codecov by Sentry. |
I have updated the branch with main, fixed the lint errors, added the dependency in the installation for the packages, and added a whole lot of tests for the auth decorator. |
6809e34
to
16c13ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks !
Can you add docstrings that explain the goal of each test ? I know it is usually in the name of the test function, but that is not always obvious.
What about adding type annotations on the code ?
I also had ruff
reporting the following messages that seemed useful:
tests/supervisor/test_authentication.py:52:11: N801 Class name `mydatetime` should use CapWords convention
tests/supervisor/test_authentication.py:53:21: DTZ001 The use of `datetime.datetime()` without `tzinfo` argument is not allowed
tests/supervisor/test_authentication.py:170:5: T201 `print` found
830b870
to
5dee333
Compare
Use the standard jwcrypto package (apt install python3-jwcrypto) instead of the jwskate wrapper for ECDSA verification. To use in the auth code for checking the owner. Co-authored-by: Bonjour Internet <[email protected]> Co-authored-by: Hugo Herter <[email protected]>
Merged with previous test_jwk. Retook one of the old tests
5dee333
to
19a8a1a
Compare
was causing compat problem with other package Solution :reimplement their hex method to ensure it works on all version restore eth-account version that was reverted by error
cd45f6b
to
d875fca
Compare
Olivier writing a note on this PR I took over:
I have updated the branch with main, fixed the lint errors, added the dependency in the installation for the packages, and added a whole lot of tests for the auth decorator.
For testing I have by hand used the
vm-operator-control-frontend
tool that Hugo shared with me. I have also written unit test based on reverse engineering the code and the aforementioned tool queries.It's ready for review and merge.
Use the standard jwcrypto package (
apt install python3-jwcrypto
) instead of the jwskate wrapper for ECDSA verification (used inside the trusted owner control code).closes #384
To do before merging⚠️