8 Commits
Author SHA1 Message Date
Linus Rath e6064f3476 fix: only connect and proxy plugin credentials that a plugin known to the server declares 2026-10-19 01:07:50 +02:00
Linus Rath 607f1b2496 feat: let plugin notifications carry a link to the plugin's own server 2026-10-14 10:58:19 +02:00
Linus Rath c3cf0ddcff feat: tell plugins whether the admin has set up their accounts and keys 2026-10-14 08:24:28 +02:00
Linus Rath 929ccb8bee fix: stream answers to proxied requests that send a body, and allow keyless services the admin sets up 2026-10-14 06:42:40 +02:00
Linus Rath de6a980233 feat: tell plugins where a proxied request was redirected on the same server 2026-10-14 06:31:55 +02:00
Linus Rath ae28122f67 fix: send plugin uploads through the proxy with their length, so servers like Paperless receive the file 2026-10-14 06:10:05 +02:00
Linus Rath 31205e44d8 fix: stop cutting off uploads over 10 MB that pass through the server, such as office documents saved from the editor 2026-10-14 04:17:51 +02:00
Linus Rath 022b83c005 feat: let plugins use accounts and API keys through the server without seeing them
Plugins that talk to Nextcloud, Paperless or an AI provider used to need
the password or key in their own settings, readable by the plugin and
stored in the browser. A plugin can now declare credentials in its
manifest and send requests "with credential X" through the server:

- `credentials` in the manifest: admin scope (secret and server from the
  admin config) or user scope (the user connects an account; the server
  address is fixed or chosen by the user)
- `/api/plugin-secrets`: the user's connected accounts, encrypted per
  mail account under `PLUGIN_SECRETS_DIR`; listing never returns secrets
- `/api/plugin-proxy`: adds the secret and forwards only to the
  credential's own origin, through the SSRF guard unless the admin set
  the server up or listed it in `PLUGIN_PROXY_PRIVATE_ORIGINS`; no
  redirects or WebDAV moves to other servers, streamed bodies capped at
  512 MB up and 2 GB down, 300 requests a minute per plugin, 8 at once
  per user, and one audit line per request without paths or bodies
- a capture mode that stores a secret from a sign-in response (Nextcloud
  Login Flow v2) and removes it from what the plugin gets back
2026-10-14 04:00:36 +02:00