Marnanel Thurman
f019d7b67e
deliver() gains the "incoming" parameter, for local delivery
...
of incoming messages.
Validation doesn't track target collections any more. Instead,
when it's validated, it passes the message over to deliver(),
with incoming=True.
Hence, validation.IncomingMessage loses the "target_collection" field.
2019-07-30 19:16:25 +01:00
Marnanel Thurman
4af7301fae
pass in target_collection
2019-07-30 16:22:44 +01:00
Marnanel Thurman
8348be5f56
Added Collection model, and modified the collection views to display it.
...
Tests in test_inbox2 use it, but this is a work in progress.
2019-07-26 17:47:44 +01:00
Marnanel Thurman
e2a9df0cd7
Check whether a public key is represented by a dict rather than a string.
...
If it is, grab the actual key string from the relevant field.
2019-07-25 17:16:40 +01:00
Marnanel Thurman
05e4d0ccf6
IncomingMessage.fields memoised
2019-07-21 16:55:15 +01:00
Marnanel Thurman
806706825b
rm debug message
2019-07-20 23:26:01 +01:00
Marnanel Thurman
6c964dddd6
"key" is the whole string, not a dict containing it
2019-07-19 22:12:17 +01:00
Marnanel Thurman
a5eba85fea
Rename validate()'s "is_local" to "is_local_user", and store it in the model.
...
This is because "is_local" is ambiguous; was the message received
locally (not over the network), or was the user a local user?
2019-07-18 14:23:43 +01:00
Marnanel Thurman
f65a6d4b08
validate() sets up the task and calls it.
...
It isn't itself the task, as before.
2019-07-18 12:16:02 +01:00
Marnanel Thurman
ca332a3396
Move to django-polymorphic. Everything gets simpler. Still cleaning up.
2019-06-27 17:19:02 +01:00
Marnanel Thurman
1a9e124e57
Thing.create() takes params as params rather than as a dict, like its Django core counterparts.
2019-05-29 11:34:43 +01:00
Marnanel Thurman
03b9262402
checking for invalid remote JSON
2019-05-29 11:17:56 +01:00
Marnanel Thurman
2f5e77c85a
Debug logging
2019-05-29 09:15:00 +01:00
Marnanel Thurman
31cee0ae93
More helpful error message if the param is of the wrong type
2019-05-28 17:49:51 +01:00
Marnanel Thurman
1e32dcefe8
Read the publicKey field for an Actor to determine its public key,
...
since it might be local or remote.
2019-05-25 18:32:24 +01:00
Marnanel Thurman
09180cc44e
Unsigned messages are logged and dropped.
...
Keys are properties of the Actor object, not subscripted items.
(Otherwise the view might accidentally send them out!)
2019-05-25 18:14:59 +01:00
Marnanel Thurman
52f3a50444
validation goes back in django_kepi.validate
2019-05-24 20:31:51 +01:00
Marnanel Thurman
18d6c7e83c
First part of moving validation entirely to batch processing.
...
There's still a lot to do.
2019-05-06 00:59:19 +01:00
Marnanel Thurman
171d9b51d3
Partial checkin. Still busy on this.
2019-04-28 21:17:10 +01:00
Marnanel Thurman
696192daaa
CachedPublicKey renamed to CachedRemoteUser; its pk is the owner URL
...
and it gains the "inbox" and "outbox" user URLs.
2019-04-18 19:32:55 +01:00
Marnanel Thurman
c7564aabd6
First steps on getting test_inbox to pass.
...
IncomingMessage.waiting_for can be null.
d_k.views creates its own logger.
2019-04-10 20:43:37 +01:00
Marnanel Thurman
fb4bbe2c49
"actor" and "key_id" are now properties of CachedPublicKey, rather than methods.
2019-04-10 20:10:46 +01:00
Marnanel Thurman
35be80864c
Tests for incoming initial message validation all written and passing.
...
Still need to write tests for validation of incoming messages where
the key has had to be fetched by a batch process.
2019-04-10 17:41:46 +01:00
Marnanel Thurman
df491d602f
Validation tests for local actor and remote actor
2019-04-10 06:35:16 +01:00
Marnanel Thurman
988b27f9f0
Generate test messages for validation, instead of supplying literals
2019-04-09 20:23:29 +01:00
Marnanel Thurman
857f79585b
validation's use of the logging package was broken.
...
IncomingMessage.__str__() now returns a string!
2019-04-07 21:51:09 +01:00
Marnanel Thurman
0e7c89a03a
Bringing the new validation system into models. Many more tests needed.
2019-04-07 21:39:11 +01:00