Commit graph

166 commits

Author SHA1 Message Date
Izalia Mae 8681ab88e4 Use HttpDate for created and expires properties of Signature 2024-04-22 22:33:10 -04:00
Izalia Mae 743fc04341 add barkshark-lib to replace JsonBase, HttpDate, and Enum classes 2024-04-22 21:48:01 -04:00
Izalia Mae 9fb4b6d39d fix data for message tests 2024-04-08 15:25:44 -04:00
Izalia Mae 0cfe0178e9 fix #2 2024-04-08 15:17:23 -04:00
Izalia Mae 4852026bea fix linter warnings 2024-04-08 15:17:06 -04:00
Izalia Mae 6468ea1437 version bump to 0.2.3 2024-04-08 15:13:32 -04:00
Izalia Mae 49a413548d properly process created and expires headers when validating hs2019 signatures 2024-04-08 15:04:51 -04:00
Izalia Mae 0c17f61531 Merge branch 'main' of ssh://git.barkshark.xyz:2222/barkshark/aputils 2024-04-08 15:01:22 -04:00
Izalia Mae bbde579e7c minor Message changes
* ensure `datetime` objects are `MessageDate` objects
* create `actor_id` property to get the actor id from an object
2024-04-08 15:00:43 -04:00
Izalia Mae f80ae87c44 allow HttpDate.parse to take a datetime object and deprecate new_from_datetime 2024-04-08 14:58:17 -04:00
Izalia Mae 6e1ac5904b fix linter warnings 2024-04-08 14:57:11 -04:00
Izalia Mae 25b0bc9852 add home page to server 2024-04-03 17:29:35 -04:00
Izalia Mae f3fae43715 expand actor bio 2024-04-03 13:46:49 -04:00
Izalia Mae 161acef572 version bump to 0.2.2 2024-04-03 13:18:32 -04:00
Izalia Mae be066dd510 flush all prints 2024-04-03 13:17:28 -04:00
Izalia Mae 15091fecee handle webfinger and add option to not include date in access log 2024-04-03 12:51:17 -04:00
Izalia Mae 122d77ae45 print message when creating key 2024-04-03 12:27:13 -04:00
Izalia Mae 0c44cc7344 verification server changes
* show message on startup
* add help to argparser options
* make hostname optional
* set hostname to addr if not specified
* make sure hostname is not `0.0.0.0`
2024-04-03 12:23:54 -04:00
Izalia Mae 192313ac71 add ability to run web server for signature verification 2024-04-03 12:02:21 -04:00
Izalia Mae 3fbe5f1555 add type annotation to JsonBase 2024-04-03 12:01:54 -04:00
Izalia Mae d09e31809d don't use fursona name for authors 2024-04-03 11:11:41 -04:00
Izalia Mae 85847772e0 fix verifying HS2019 signatures
* make sure `expires` and `created` are older than the current date
2024-04-03 11:10:24 -04:00
Izalia Mae 3e0198ec54 add typed classifier 2024-04-03 11:07:47 -04:00
Izalia Mae 784b00e37a use Self annotation for various class methods 2024-03-31 11:49:47 -04:00
Izalia Mae 4ed9f92a57 add docs for request classes 2024-03-27 23:41:24 -04:00
Izalia Mae 4596245a8c version bump to 0.2.1 2024-03-27 22:57:52 -04:00
Izalia Mae f2beccc4f4 add Signer methods for signing and validating requests 2024-03-27 22:57:25 -04:00
Izalia Mae eb1503e14f fix TypeError when signing headers 2024-03-27 22:55:50 -04:00
Izalia Mae 171814bb15 add note about changing property types in Signature 2024-03-27 21:06:46 -04:00
Izalia Mae 7f64cc140b make note of non-compliance with signing standard 2024-03-27 21:05:55 -04:00
Izalia Mae bdcd04a994 ensure signature isn't expired when verifying 2024-03-27 20:36:15 -04:00
Izalia Mae ad2456b765 also accept floats in HttpDate.parse 2024-03-27 20:35:03 -04:00
Izalia Mae d75dabe872 HttpDate and Signature changes
* Accept `int` and `float` values in `HttpDate.parse`
* Add `created_date` and `expires_date` properties
2024-03-27 20:31:48 -04:00
Izalia Mae fa80f68d47 fix dependencies in pyproject 2024-03-27 12:54:20 -04:00
Izalia Mae f015aa88a3 fix KeyError when getting digest from headers 2024-03-27 11:59:38 -04:00
Izalia Mae d4da465c31 add documentation for algorithm classes and methods 2024-03-27 11:49:06 -04:00
Izalia Mae b23c854d2d fix signature validation 2024-03-27 10:53:16 -04:00
Izalia Mae 1dacb6cce4 fix linting issues 2024-03-27 10:52:41 -04:00
Izalia Mae 574db4b7f6 ensure all required headers exist when validating 2024-03-27 10:52:05 -04:00
Izalia Mae 2474e75187 add pypi badges to readme 2024-03-27 07:52:12 -04:00
Izalia Mae ac8b3d07f9 remove debug print 2024-03-27 07:27:18 -04:00
Izalia Mae 36147cccb5 multiple signer changes
* fix several issues with signing and verifying
* rename `AlgorithmType.ORIGINAL` to `AlgorithmType.RSASHA256`
* deprecate `Digest.new_from_digest` and add `Digest.parse` class method
* swap position of `algorithm` and `sign_all` in `Signer.sign_headers`
2024-03-27 07:20:04 -04:00
Izalia Mae 98bcdb73eb deprecate Signature.algorithm_type 2024-03-27 05:49:52 -04:00
Izalia Mae 58ef6d36a4 rework signer for future algorithm support 2024-03-27 05:37:27 -04:00
Izalia Mae 13e25959fa fix tests involving HttpDate 2024-03-21 23:13:29 -04:00
Izalia Mae cea5563e79 version bump to 0.1.9 2024-03-21 23:04:17 -04:00
Izalia Mae 2db89998c8 replace typing.Self for python < 3.11 support 2024-03-21 23:03:16 -04:00
Izalia Mae 8d7dfb7e1b fix HttpDate, create MessageDate, and fix typing for Message 2024-03-21 21:05:50 -04:00
Izalia Mae e10d8821dd don't try to deserialize value if there is no associated property 2024-03-21 20:19:30 -04:00
Izalia Mae 43ccab67c6 pass through value if it is a string when setting message value 2024-03-21 20:16:01 -04:00