Commit graph

3,999 commits

Author SHA1 Message Date
Goffi
b5f8914bbc core: add debug trace to show plugins loading time 2023-03-04 22:21:28 +01:00
Goffi
6ad9431678 plugin app manager: start doesn't wait anymore for actual app start:
Application may be long to start (e.g. a Docker app may have to download images first,
and even without the downloading, the starting could be long), which may lead to UI
blocking or bridge time out.

To prevent that, `start` is now returning immediately, and 2 new signals are used to
indicate when the application is started, of if something wrong happened.

`start` now returns initial app data, including exposed data without the computed exposed
data. The computed data must be retrieved after the app has been started.
2023-03-04 18:30:47 +01:00
Goffi
ab3f76a559 core (log): type hints 2023-03-04 18:23:33 +01:00
Goffi
187369d1ca component AP gateway (http_server): use log.exception instead of log.error 2023-03-02 12:39:16 +01:00
Goffi
efb13e64b2 component AP gateway: fix missing argument when calling APOutboxPageRequest 2023-02-10 17:37:37 +01:00
Goffi
52f7a2b11f component AP gateway: don't percent-encode @:
Mastodon doesn't like when "@" is percent-encoded (because it doesn't do it, and it checks
that the URL matches the ID without taking care of percent-encoding).
2023-02-10 17:20:02 +01:00
Goffi
895ddd36be plugin XEP-0470: create a default configuration if node config can't be accessed 2022-12-05 11:54:47 +01:00
Goffi
6459ef59bc component AP gateway: fix bad condition 2022-11-25 16:34:09 +01:00
Goffi
9560a23f78 component AP gateway: fix header checking for redirection 2022-11-25 16:14:10 +01:00
Goffi
217d49918d doc[installation]: update instructions 2022-11-24 12:25:07 +01:00
Goffi
2940ba0d35 core (main): log Exception when bridge_pi fails 2022-11-24 12:25:04 +01:00
Goffi
c5d0966e34 core (log): log.exception is now usable 2022-11-24 10:08:47 +01:00
Goffi
cdd166a1b4 install: get urwid-satext directly from repos 2022-11-22 12:03:36 +01:00
Goffi
222319f616 install: typo 2022-11-22 12:00:36 +01:00
Goffi
0e0254e3a4 install: get sat_tmp directly from repos 2022-11-22 11:58:55 +01:00
Goffi
5eae9dc299 doc (components): typo 2022-11-22 11:53:31 +01:00
Goffi
faf5e43527 component AP gateway: ignore actor delection notifications:
When a `Delete` activity was received and the object was the emitting actor itself, the
signature checking was failing if the actor was unknown (due to the impossibility to
retrieve the actor public key, as it is no more accessible).

To avoid that, those notifications are ignored for now. In the future they should clean
the cache linked to this actor.
2022-11-15 18:15:16 +01:00
Goffi
b30a558f13 component AP gateway: properly close the HTTP connection on checkSignature exception:
if something is going wrong during `checkSignature` (other than signature verification
failing), a `500 Internal Server Error` code is returned, and the connection is properly
closed.
2022-11-15 18:10:33 +01:00
Goffi
4d14a623fc component AP gateway: parse body immediately on POST request:
the body is parsed immediately during a `POST` request: this avoids duplication of code,
and allows to check the body data before continuing (will be used to filter some requests
in a future patch).
2022-11-15 18:07:34 +01:00
Goffi
d6f710bd0b component AP gateway: fix pubsub attachment plugin call following renaming. 2022-11-15 18:03:07 +01:00
Goffi
c8326e24d2 component AP gateway: log at debug level instead of warning when no client is set 2022-11-15 18:02:16 +01:00
Goffi
14eac027d8 doc (components/AP Gateway): html_redirect_dict option 2022-11-11 13:51:22 +01:00
Goffi
020da52ddd component AP gateway: HTML redirection:
when a request is done on AP endpoint and `Accept` header is not set to
`application/json`, the request can now be redirected to a configurable URL.
2022-11-11 13:51:20 +01:00
Goffi
1ebe54a024 plugin XEP-0384: log import_error when import is failing 2022-11-10 15:16:43 +01:00
Goffi
dd434fbf1f doc (encryption, cli): document Pubsub Targeted Encryption:
a small section has been added to `encryption` to explain the difference with OXPS, and
the `--encrypt-for` arguments are explained.

fix 382
2022-10-31 13:50:12 +01:00
Goffi
e735ae6a58 tests (e2e/cli): test for Pubsub Targeted Encryption:
rel 382
2022-10-31 13:48:31 +01:00
Goffi
684401a3d8 cli (blog, pubsub): encryption argument for Pubsub Targeted Encryption:
add a new `--encrypt-for` argument to `blog/set` `blog/edit` `pubsub/set` and `pubsub/edit`

rel 382
2022-10-31 13:48:01 +01:00
Goffi
e08d8207d6 plugin pte: Pubsub Target Encryption implementation:
This plugin lets encrypt a few items for a specific set of entities.

rel 382
2022-10-31 13:46:51 +01:00
Goffi
27e9655898 tests (e2e/cli): add tests for JET:
rel 378
2022-10-31 04:09:38 +01:00
Goffi
5623d2c4ad cli (file/send): add --encrypt argument to request encryption:
rel 378
2022-10-31 04:09:38 +01:00
Goffi
721df3a7ee plugin XEP-0391: implement XEP-0391 (Jingle Encrypted Transports) + XEP-0396 (JET-OMEMO):
rel 378
2022-10-31 04:09:34 +01:00
Goffi
a53ab322f3 tools (strem): fix mode + add pre_close_cb callback:
rel 378
2022-10-31 04:04:32 +01:00
Syndace
e062c2f0e5 plugin XEP-0384: Implementation of Automatic Trust Management:
- Implementation of Trust Messages (XEP-0434)
- Implementation of Automatic Trust Management (XEP-0450)
- Implementations directly as part of the OMEMO plugin, since omemo:2 is the only protocol supported by ATM at the moment
- Trust system selection updated to allow choice between manual trust with ATM and BTBV
- dev-requirements.txt updated to include additional requirements for the e2e tests

fix 376
2022-10-28 18:50:06 +02:00
Goffi
289855c9d1 doc (encryption, cli): pubsub signing documentation:
- add a `Pubsub Signature` section to `encryption` documentation
- document `-X, --sign` flag where it's used
- document `pubsub/signature` subcommands

fix 381
2022-10-30 01:06:58 +02:00
Goffi
2f94daec1a cli (pubsub/set,edit) add --sign argument:
`signature` subcommands have also been moved just before `secret` subcommands.

rel 381
2022-10-30 01:06:58 +02:00
Goffi
58f0d26692 cli (pubsub/signature): add sign command:
this command can be used to sign any pubsub item.

rel 381
2022-10-30 01:06:58 +02:00
Goffi
0988c73644 plugin pubsub signature: fix attachment setting + default signer:
- attachment setting was crashing when `item_elt` was not specified due to argument typo
- if `signer` is set to None in attachment data, client's bare jid will be used to sign
  the item

rel 381
2022-10-30 01:06:58 +02:00
Goffi
8cf01c8569 tests (e2e/cli): add a test for Pubsub Signing:
rel 381
2022-10-30 01:06:55 +02:00
Goffi
d9f5f4c8f8 plugin pubsub signing: fix gpg_provider instanciation:
the instance was set at the class level while it is client dependant, resulting in the
instance being overwritten on each client connexion.

rel 381
2022-10-30 01:06:35 +02:00
Goffi
f74e555c23 plugin XEP-0373: minor renaming + set gpg_provider in client:
- `sat` and `self.__sat` have been renamed to `host` and `self.host` for consistency with
other plugins.

- `gpg_provider` is set in client while profile is connecting, so the instance is easily
  accessible to plugins depending on XEP-0373

rel 381
2022-10-30 01:06:32 +02:00
Goffi
8ec64e41fd cli (pubsub): new signature subcommands:
A first `check` command can be used to check signature using the signature JSON data.
More commands should follow to check or sign items.

rel 381
2022-10-28 18:47:17 +02:00
Goffi
c400bc8217 cli (blog/set): new --sign argument:
rel 381
2022-10-28 18:47:17 +02:00
Goffi
cc8b5aa554 plugin XEP-0277: signed flag can now be used in extra to use sign the blog post:
rel 381
2022-10-28 18:47:17 +02:00
Goffi
4f13a79f87 plugin pubsub signing: pubsub items signature implementation:
- this is based on a protoXEP, not yet an official XEP: https://github.com/xsf/xeps/pull/1228
- XEP-0470: `set` attachment handler can now be async

rel 381
2022-10-28 18:47:17 +02:00
Goffi
6255985262 tools (xml_tools): domish_elt_2_et_elt and et_elt_2_domish_elt now handle lxml.etree 2022-10-28 18:47:17 +02:00
Goffi
966d3cc6f4 plugin XEP-0373: typos 2022-10-28 18:47:17 +02:00
Goffi
f7fdde6dce tools (utils): fix parse_xmpp_date timezone:
rel 381
2022-10-28 18:47:17 +02:00
Goffi
14b115358e plugin OXPS: fix triggers return values:
rel 381
2022-10-28 18:47:17 +02:00
Goffi
39181f0bff doc (blog, pubsub): documentation on new e2ee arguments for pubsub, and shared secrets handling:
fix 380
2022-10-15 20:38:33 +02:00
Goffi
3ead662a51 doc: new doc giving an overview on how e2ee is working in Libervia/XMPP:
the doc explain pubsub e2ee for now

rel 380
2022-10-15 20:38:33 +02:00