Commit Graph

235 Commits

Author SHA1 Message Date
Pascal Bleser
50d0cbe807 jmap: minor logging improvements 2026-04-30 10:51:41 +02:00
Pascal Bleser
45771e28e1 groupware: jmap: add metrics 2026-04-30 10:51:41 +02:00
Pascal Bleser
b83b8d4467 groupware: Etag handling
* implement correct Etag and If-None-Match handling, responding with
   304 Not Modified if they match

 * introduce SessionState and State string type aliases to ensure we are
   using the correct fields for those, respectively

 * extract the SessionState from the JMAP response bodies in the
   groupware framework instead of having to do that in every single
   groupware API

 * use uint instead of int in some places to clarify that the values are
   >= 0

 * trace-log how long a Session was held in cache before being evicted

 * add Trace-Id header handling: add to response when specified in
   request, and implement a custom request logger to include it as a
   field

 * implement a more compact trace-logging of all the methods and URIs
   that are served, to put them into a single log entry instead of
   creating one log entry for every URI
2026-04-30 10:51:41 +02:00
Pascal Bleser
e085c87928 groupware: initial related emails implementation with SSE 2026-04-30 10:51:41 +02:00
Pascal Bleser
0e8bbe7038 groupware: add /bootstrap
* add a GET /accounts/{a}/boostrap URI that delivers the same as GET /
   but also mailboxes for a given account, in case the UI remembers the
   last used account identifier, to avoid an additional roundtrip

 * streamline the use of simpleError()

 * add logging of errors at the calling site

 * add logging of evictions of Sessions from the cache

 * change default Session cache TTL to 5min instead of 30sec
2026-04-30 10:51:41 +02:00
Pascal Bleser
7af4a01de6 groupware: swagger API documentation improvements
* add more documentation for properties

 * fixes after a bit of trial-and-error with go-swagger

 * fix email filter marshalling when there are no search criteria

 * introduce an apidoc.yml that contains Swagger data and is merged when
   generating the swagger.yml from sources
2026-04-30 10:51:41 +02:00
Pascal Bleser
304bbe2fa6 Groupware improvements
* ensure that all the jmap responses contain the SessionState

 * implement missing errors that were marked as TODO

 * moved common functions from pkg/jmap and pkg/services/groupware to
   pkg/log and pkg/structs to commonalize them across both source trees

 * implement error handling for SetError occurences

 * Email: replace anonymous map[string]bool for mailbox rights with a
   MailboxRights struct, as the keys are well-defined, which allows for
   properly documenting them

 * introduce ObjectType as an "enum"

 * fix JSON marshalling and unmarshalling of EmailBodyStructure

 * move the swagger documentation structs from groupware_api.go to
   groupware_docs.go

 * fix: change verb for /groupware/accounts/*/vacation from POST to PUT
2026-04-30 10:51:41 +02:00
Pascal Bleser
92f35520d4 groupware: minor email searching response improvements + started implementing vacation response setting API 2026-04-30 10:51:41 +02:00
Pascal Bleser
9a5de81313 groupware: add identities of all accounts to the index resource 2026-04-30 10:51:41 +02:00
Pascal Bleser
b1b60c0124 groupware: fix email search, add variant that includes the full emails 2026-04-30 10:51:40 +02:00
Pascal Bleser
4a0dac0d96 Groupware: refactor jmap package, implement Email/set, EmailSubmission
* refactor the jmap package to split it into several files as the
   jmap.api.go file was becoming too unwieldy

 * refactor the Groupware handler function response to be a Response
   object, to be more future-proof and avoid adding more and more
   return parameters while handling "no content" response as well

 * more godoc for the JMAP model

 * add Email creation, updating, deleting (Email/set,
   EmailSubmission/set)

 * add endpoints
   - POST /accounts/{accountid}/messages
   - PATCH|PUT /accounts/{accountid}/messages/{messageid}
   - DELETE /accounts/{accountid}/messages/{messageid}
2026-04-30 10:51:40 +02:00
Pascal Bleser
b200d7fedc groupware: implement message search with snippets 2026-04-30 10:51:40 +02:00
Pascal Bleser
3794008dc7 groupware: blob streaming (upload and download) 2026-04-30 10:51:40 +02:00
Pascal Bleser
d3354001b5 groupware: more JMAP operations implementation 2026-04-30 10:51:40 +02:00
Pascal Bleser
e65527b5df groupware: further implementation and improvements 2026-04-30 10:51:40 +02:00
Pascal Bleser
61aed94c50 refactored the Session object, refactored the services/groupware directory, and started Swagger documentation implementation 2026-04-30 10:51:40 +02:00
Pascal Bleser
ea91210c24 groupware: refactoring the API mechanisms 2026-04-30 10:51:40 +02:00
Pascal Bleser
26cbdb8f7e groupware: implement JSON:API's error response format, with a revamped error handling in jmap and services/groupware 2026-04-30 10:51:40 +02:00
Pascal Bleser
fc1994db2d Refactor groupware service after ADR decision on the Groupware API
* after having decided that the Groupware API should be a standalone
   independent custom REST API that is using JMAP data models as much as
   possible,
 * removed Groupware APIs from the Graph service
 * moved Groupware implementation to the Groupware service, and
   refactored a few things accordingly
2026-04-30 10:51:40 +02:00
Pascal Bleser
ad73661703 Groupware and jmap: cleanup and API documentation 2026-04-30 10:51:40 +02:00
Pascal Bleser
75e04f8f68 Groupware improvements: refactoring, k6 tests
* refactored the models to be strongly typed with structs and mapstruct
   to decompose the dynamic parts of the JMAP payloads

 * externalized large JSON strings for tests into .json files under
   testdata/

 * added a couple of fantasy Graph groupware APIs to explore further
   options

 * added k6 scripts to test those graph/me/messages APIs, with a setup
   program to set up users in LDAP, fill their IMAP inbox, activate them
   in Stalwart, cleaning things up, etc...
2026-04-30 10:51:40 +02:00
Pascal Bleser
0948c50931 groupware and jmap improvements and refactoring 2026-04-30 10:51:40 +02:00
Pascal Bleser
de6708faf8 add an auth-api service to make an exemplary implementation of an external authentication API for third party services such as Stalwart 2026-04-30 10:51:40 +02:00
Pascal Bleser
7c1f491344 move services/groupware/pkg/jmap to pkg/jmap 2026-04-30 10:51:40 +02:00
Pascal Bleser
a90f792caa WIP: initial implementation of the groupware service 2026-04-30 10:51:40 +02:00
Florian Schade
d0e3f14539 chore: remove loop var references 2026-04-23 17:11:55 +02:00
Florian Schade
288e67cc39 chore: replace interface with any 2026-04-23 09:31:11 +02:00
Florian Schade
68b356292b Merge pull request #2632 from opencloud-eu/feat/kql-dotted-keys
feat(kql): support dotted keys in property restrictions
2026-04-22 09:45:59 +02:00
Dominik Schmidt
1c58888497 test(kql): capitalise Kleene in dotted-key test comment
Stephen Kleene is a proper noun, so "Kleene star" / "Kleene
closure" is the correct spelling.
2026-04-20 16:42:37 +02:00
Viktor Scharf
6099ca3658 [full-ci] chore: bump reva to v2.43.0 (#2630) 2026-04-20 16:05:48 +02:00
Dominik Schmidt
c7a2ab8d02 test(kql): cover dotted keys in property restrictions
Four cases covering the distinct grammar paths touched by the
new Key rule: dotted key in a TextPropertyRestrictionNode,
multi-level key (stressing the Kleene part), dotted key in a
GroupNode (the k:Key? branch), and a dot on the value side
that must stay a literal character.
2026-04-20 16:05:07 +02:00
Dominik Schmidt
ed1353d161 feat(kql): support dotted keys in property restrictions
Introduce a dedicated Key rule (Char+ ("." Char+)*) so property
restriction keys can contain dots. Queries like
audio.artist:Motörhead or photo.cameraMake:Apple now parse.

Goal: keep the data structure aligned with the query namespace.
A driveItem exposes nested fields as dotted paths in its API
response (photo.cameraMake, location.latitude); users should be
able to query with the same path, without admin-configured slot
mappings or alias tables like Microsoft requires.

Both bleve and OpenSearch already treat dots as the nesting
separator for field paths and pass unknown keys through
unchanged — only the KQL grammar blocked dotted keys via
Char <- [A-Za-z]. The new Key rule lifts that restriction; no
compiler changes or field-alias maintenance is needed.

Values are unaffected — dots in values still parse as literal
characters.
2026-04-20 15:52:14 +02:00
Viktor Scharf
0c8829c15d set version placeholder (#2547) 2026-03-30 14:51:00 +02:00
Viktor Scharf
8f939b93c6 chore: bump reva to v2.42.5 (#2543) 2026-03-30 12:29:40 +02:00
Viktor Scharf
bd649d02ac chore: bump reva to v2.42.5 2026-03-09 12:36:50 +01:00
André Duffeck
2043dee745 Bump opencloud version 2026-02-16 11:02:50 +01:00
Viktor Scharf
2bf70a6f70 reva-bump-2.42.2 2026-02-05 12:29:10 +01:00
Viktor Scharf
e7c14d2ee4 reva-bump-2.42.1 (#2225) 2026-01-28 15:51:15 +01:00
Viktor Scharf
6cefc94493 bump-web-5.0.0 (#2216) 2026-01-26 15:33:43 +01:00
Michael Barz
3654897f60 fix: markdown links formatting (#2143) 2026-01-14 16:19:32 +01:00
Christian Richter
0bada429d3 fix typo in shared_types
Signed-off-by: Christian Richter <c.richter@opencloud.eu>
2026-01-08 15:32:10 +01:00
Christian Richter
cb9815acb1 fix yaml mappings
Signed-off-by: Christian Richter <c.richter@opencloud.eu>
2026-01-08 14:16:31 +01:00
Christian Richter
4883496527 move log configure function to global log package
Signed-off-by: Christian Richter <c.richter@opencloud.eu>
2026-01-08 12:25:44 +01:00
Christian Richter
efd6331a61 consolidate log config in activitylog
Signed-off-by: Christian Richter <c.richter@opencloud.eu>
2026-01-08 12:25:44 +01:00
Jörn Friedrich Dreyer
c99342318f merge ocdav into frontend
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2026-01-07 15:04:34 +01:00
Michael Barz
15ece66e96 Update LatestTag to version 4.1.0 (#2096) 2025-12-31 11:03:57 +01:00
Florian Schade
50ef4f2ef1 fix: propagate the current edition channel in the edition validation error 2025-12-22 15:57:51 +01:00
Jörn Friedrich Dreyer
b19307f1be allow http2 connections to proxy
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-12-16 12:03:55 +01:00
Christian Richter
0372869b8b refactor remaining code from urfave/cli
Signed-off-by: Christian Richter <c.richter@opencloud.eu>
2025-12-15 16:40:27 +01:00
Christian Richter
7be33b0607 refactor interims DefaultAppCobra to DefaultApp
Signed-off-by: Christian Richter <c.richter@opencloud.eu>
2025-12-15 16:40:26 +01:00