* fix jmap.SetVacationResponse: was using JMAP create instead of update
with a patch; did so by using the modify template function as with
most other JMAP APIs
* better HTTP status code handling for the responses received from
Stalwart
* add support for not caching JMAP session retrieval failures in the
Groupware backend, by setting the error TTL to 0
* introduce a new toplevel package pkg/http for plain HTTP related
functions
* move these functions from pkg/jmap to pkg/http, including tests:
- PeekResponse
- DumpHttpRequest
- DumpHttpResponse
* also look into the OC_INSECURE environment variable to allow
accepting insecure TLS certificates
* rename GROUPWARE_ALLOW_INSECURE_TLS to GROUPWARE_TLS_INSECURE to
align with the nomenclature used by other backend services
* split off the Stalwart integration test boilerplate into a new
jmaptest package, in order to be able to use it from the groupware
package as well
* remove the JMAP Session patching in tests and, instead, pick random
free local ports for HTTP and IMAPS manually, and set those
explicitly in the Stalwart testcontainer, so that we can set the
PUBLIC_URL environment variable that Stalwart then uses to define the
URLs that are served as part of the JMAP Sessions (API URL, etc...)
* introduce configuration settings for TLS insecurity, tracing requests
and responses
* use more secure implementation when replacing JMAP placeholders in
URL templates, path escaping them to avoid injection
* add more efficient tracing of HTTP requests and responses between the
Groupware backend and the JMAP server, with the possibility of
specifying a maximum body size to trace, to avoid blowing up the logs
* use more efficient string building for HTTP Authorization headers
* change internal API to use streams (io.Reader) instead of reading
JSON responses fully into memory before parsing them
* implement supplier templating to allow addressbooks and contacts to
come from various sources ("suppliers", thus) as opposed to solely
from JMAP
* add creating, deleting, updating, getting changes
* add some search filter parameters, currently incomplete
* by adding a predicate that can analyze a filter and inform the
template methods whether the filter is applicable for that supplier
or not
* this fixed /groupware/accounts/.../addressbooks/.../contacts
* retrofit from using self-referencing generics parameters that were
introduced with Go 1.26, will re-enable when we upgrade to 1.26
* re-introduce a 'ptr' func since we don't have the new 'new' func yet
that comes with 1.26
* fix the inline dockerfile for building the stalwart:cli container,
cannot be based on scratch since we need a shell and wget, and it
should thus retain the alpine container as its base
* remove stdin_open and tty from the container attributes, not needed
* add instructions and container to create a key and certificate pair
for the built-in IDM LDAP as we need it to listen on LDAPS for
Stalwart, which has been disabled by default with
https://github.com/opencloud-eu/opencloud/pull/2880
* add environment variables to point to the certificates
* update services/groupware/DEVELOPERS.md with up-to-date instructions,
using Stalwart 0.16
* don't run the Stalwart container in recovery mode first, just run it
in "proper" mode, import the configuration and use it like that,
which only requires skipping the "destroy" steps
* add code documentation and logging
* replace the text templating of the Stalwart snapshot by doing the
same as the formatting script was doing, but directly in Go, removing
an additional step to perform when modifying a Stalwart
configuration to use in the integration tests
* add new configuration setting GROUPWARE_SEND_DURATIONS_RESPONSE
(defaults to false)
* keep track of lists of durations of backend calls
* when enabled, report them as response headers Durations (human
readable) and Durations-Nanos (as raw nanosecond values for machine
consumption)
* remove the following methods on the jmap.QueryCommand interface, as
they ended up not being needed:
- GetPosition()
- GetAnchor()
- GetAnchorOffset()
- GetLimit()
* refactor APIs in JMAP and Groupware in order to implement pagination
across multiple accountIds and multiple suppliers (currently
implemented using a mock supplier for contacts)
* requires go 1.26 due to use of self-reflecting generics type
constraints
* still missing: query criteria and sorting parameters
* still missing: multi-accountId support for emails
* errors are now all just 'error' in the APIs, instead of the
specialized implementations, and are interpreted dynamically where
necessary in order to transform them into HTTP responses
* remove position, anchor, anchorOffset as individual query parameters
as we now only support a 'next=...' token for subsequent pages
(except in emails for now), and use jmap.QueryParams instead; those
tokens have a header character for the format, followed by a JSON
encoded QueryParams map, all wrapped into base62 to make it clearer
that it is meant to be an opaque token, and not a parameter clients
should tinker with or construct themselves
* introduce QueryParamsSupplier as an interface to provide QueryParams
for various scenarios (single supplier, multiple supplier, ...) per
accountId
* implement multi-supplier template methods slist and squery