Commit Graph
5571 Commits
Author SHA1 Message Date
Dominik Schmidt c867efb2b7 feat(search): allow sorting by any scalar hit field
Sortable is every field that is indexed as a scalar and carried on the
match entity: name, size, lastModifiedDateTime, mimeType and the scalar
facet fields (photo.*, audio.*, image.*, location.*, ...). Both sets
are derived by reflection, so new facet fields become sortable
automatically. Multivalued fields (tags), bare facets and internal
index fields are rejected with invalidRequest at the graph layer.
CompareMatches provides the merge comparator for the service layer.

(cherry picked from commit bd32795194cf3945e8416ede496a147ce8d6cb5c)
2026-12-03 17:23:01 +01:00
Dominik Schmidt 7982c06794 feat(graph): accept sortProperties on search requests
Validated against the sortable-field whitelist (name, size,
lastModifiedDateTime, photo.takenDateTime) and forwarded to the search
service as order_by. Also fixes the stub search service's IndexSpace
signature (streaming response) so the suite builds again.

(cherry picked from commit 9aa6a3492de3468da7a8480a3b9ef5748cee1f5d)
(cherry picked from commit 35a6cad8ea6a7890bdc0bc98c7ac97bdcbf477cc)
2026-12-03 17:23:01 +01:00
Dominik Schmidt 01e4c21b29 feat(search): add sortProperties plumbing (libregraph model, proto order_by)
(cherry picked from commit 1b748fb757e2dde5b3cd1beaa543be4266342590)
2026-12-03 17:23:01 +01:00
Dominik Schmidt 2e8fc06b50 Merge pull request #4206 from opencloud-eu/feat/search-geohash-filter-token
feat(search): geohash cells as aggregation filter tokens
2026-12-03 16:19:45 +00:00
Dominik Schmidt 9c34cea0d3 test(search): cover the cell filter parsing and the OpenSearch cell query 2026-12-03 16:35:54 +01:00
Andre Duffeck ecb9fbde41 Merge pull request #4154 from opencloud-eu/fix/tags-listing-aggregation
fix(graph): list tags through a terms aggregation
2026-12-03 16:18:26 +01:00
Dominik Schmidt ac41685a58 docs(search): name Lucene as the source of the cell edge rule 2026-12-03 16:11:19 +01:00
Dominik Schmidt 793cf6ad3a test(search): cover the cell edges at 0, 90 and 180 2026-12-03 16:11:19 +01:00
Dominik Schmidt c09c02e2fb feat(search): geohash cells as aggregation filter tokens 2026-12-03 16:11:19 +01:00
Dominik Schmidt 19e332f579 fix(graph): answer geohash cells without a filter token 2026-12-03 14:45:45 +01:00
Dominik Schmidt b928dc8342 feat(search): geohash aggregation
A geohash_grid aggregation over a geopoint field, requested with
@libre.graph.geohashDefinition {precision}. OpenSearch answers it with
geohash_grid on the geopoint field, bleve folds the doc values of the
geohash sibling field. size limits the buckets to the top cells by count.
2026-12-03 14:45:45 +01:00
Dominik Schmidt 921bbb1450 Merge pull request #4201 from opencloud-eu/fix/bleve-geo-verify-test-build
test(search): build the bleve geo test against the new backend signature
2026-12-03 14:15:36 +01:00
Alex Ababii f5252449c5 Merge pull request #4115 from maki5/fix/activitylog_nats_ttl
fix(activitylog): expire old activities with the configured store TTL
2026-12-03 14:01:36 +01:00
Dominik Schmidt 318db96f1d test(search): build the bleve geo test against the new backend signature 2026-12-03 13:56:06 +01:00
Dominik Schmidt 314287ab2a Merge pull request #3519 from opencloud-eu/feat/search-bleve-geohash-sibling
feat(search): geohash support in bleve
2026-12-03 13:19:58 +01:00
Alex Ababii fda7232556 fix(activitylog): fall back to the version key when the stream info cannot be read 2026-12-03 13:01:45 +01:00
Florian Schade f999523c49 Merge pull request #4137 from opencloud-eu/fix/mention-share-jail-id
fix(graph): resolve share jail ids in activity notifications
2026-12-03 11:30:21 +01:00
opencloudeu 3f1d8b01e7 [tx] updated from transifex 2026-12-02 23:16:37 +00:00
Dominik Schmidt a059ae8179 test(webdav): drop the newTika helper again
It only saved the preset argument, the other three still vary per call,
and the calls changed anyway, so the diff got larger rather than smaller.
2026-12-02 16:47:28 +01:00
Dominik Schmidt 0ac1ea8e30 fix(webdav): trim the Tika thumbnail preset once in Sanitize
The check trimmed the preset but the URL took it untrimmed, so " thumbnail"
started fine and then answered 404 for /unpack/preset/%20thumbnail. Sanitize
trims it now and Validate only compares against "". The tests build their
Tika through a helper that sets the default preset.
2026-12-02 16:43:53 +01:00
Dominik Schmidt 17a9874be2 feat(webdav): make the Tika thumbnail preset configurable
OC_TIKA_THUMBNAIL_PRESET (WEBDAV_TIKA_THUMBNAIL_PRESET) names the catalog
preset webdav unpacks thumbnails with, "thumbnail" by default. A preset of
your own has to bring the same filter, only the raster images Tika marks as
THUMBNAIL or RENDERING, since webdav takes the first image in the answer.
An empty preset fails at startup.

Changing the preset needs the thumbnail cache emptied, as a Tika upgrade
does.
2026-12-02 16:22:19 +01:00
Dominik Schmidt e6acfb721d Merge pull request #3332 from opencloud-eu/feat/thumbnails-raw-embedded-preview
feat(webdav): extract thumbnails through Tika
2026-12-02 12:13:30 +01:00
Ralf Haferkamp 3f25437ae5 Merge pull request #3477 from zerox80/codex/oidc-session-logout
fix(proxy): reject tokens covered by a backchannel logout
2026-12-02 09:21:54 +01:00
opencloudeu 10da3b6701 [tx] updated from transifex 2026-12-01 23:16:26 +00:00
Alex 25b7c7cc88 fix(collaboration): use the edit action for Collabora in read/write mode (#4178) 2026-12-01 16:52:03 +01:00
Alex Ababii d0b0da9d66 Merge pull request #3795 from maki5/feat/guestlinks_pin_flag
feat(authguest): respond with pin true/false in renewal endpoint
2026-12-01 14:51:36 +01:00
Dominik Schmidt 492412ca56 Merge pull request #3835 from opencloud-eu/refactor/search-engine-ast
refactor(search): hand the engines the parsed query
2026-12-01 14:48:06 +01:00
Pascal Bleser 64a44e77ff chore(graph): log the resource and the tags in AssignTags (#4156)
UnassignTags logs with a sublogger that carries the request ID, the
resource ID and the tags of the request, AssignTags still used the
plain service logger. Use the same sublogger in AssignTags, so that the
log lines of both handlers can be found by the same fields.

Also drop the error from the "no permissionset on file" line: err is
always nil there.

Assisted-by: Claude Code:claude-opus-5-5
2026-12-01 12:59:32 +01:00
Jörn Friedrich Dreyer 4f2ab613a2 Merge pull request #3903 from opencloud-eu/feat/policies-request-length
feat(policies): pass request lengths to the proxy policies
2026-11-30 15:27:36 +01:00
Jörn Friedrich Dreyer 15ad13be2f docs(policies): do not blame concatenation for the postprocessing check
The README claimed that the TUS concatenation extension can merge
several smaller uploads into one file. The posix and decomposed drivers
cannot do that: tusd creates the final upload with NewUpload, which
they do not implement, because uploads have to be started with
InitiateUpload via ocdav.

Checking the actual size in postprocessing is still useful as a safety
net, the early check only sees what the client declares.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2026-11-30 12:35:19 +01:00
Jörn Friedrich Dreyer a69677cecf feat(policies): leave unknown request lengths out of the policy input
content_length was 0 both for an empty body and for a body of unknown
length, e.g. a PUT with chunked transfer encoding. A policy could not
reject uploads that do not declare their size.

The lengths are now proto3 optional fields and the proxy sets
content_length whenever Go knows it, including 0 for an empty body.
An unknown length leaves the key out of the policy input. Rules that
compare a missing key do not apply, so existing limit rules keep
working, and a policy can reject an undeclared length explicitly with
`not "content_length" in object.keys(input.request)`.

We use field presence instead of -1, because a negative sentinel would
turn a request without lengths, e.g. in the postprocessing stage, into
an empty body.

related: https://github.com/opencloud-eu/opencloud/pull/3903#issuecomment-7273785513

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2026-11-30 12:31:02 +01:00
zerox80 06220c591f Merge branch 'main' into codex/oidc-session-logout
main moved the audit login records into a store of their own. Both sides
add an option to the OIDC authenticator, keep both.

Assisted-by: Claude Code:Claude Mythos 5.2
2026-11-30 10:31:05 +00:00
zerox80 23197a969c test(proxy): cover the audit log together with the logout markers
The merge with main had to decide two things about the audit log that no test
described yet:

- A backchannel logout is audited even if the cached claims cannot be removed
  afterwards, because the marker has ended the session by then.
- A token that a logout marker rejects is audited as a failed login. Only a
  token that failed its time validation is left out, as before.

Assisted-by: Claude Code:Claude Mythos 5.2
2026-11-30 10:25:52 +00:00
zerox80 ef56f57c50 docs(proxy): correct the retention of logout markers on nats-js-kv
The README said that an existing bucket of the markers keeps its retention
when PROXY_OIDC_MAX_ACCESS_TOKEN_LIFETIME is changed. The store updates the
bucket at every start, so the new value also applies to markers that already
exist. Say so, and that the lifetime should only be lowered once the tokens
with the longer lifetime have expired.

The section on the backchannel logout was placed in the middle of the notes
on the cache stores. It now follows them.

Assisted-by: Claude Code:Claude Mythos 5.2
2026-11-30 10:25:52 +00:00
zerox80 b945a94532 Merge branch 'main' into codex/oidc-session-logout
main brought the audit log and reva v3. Besides the textual conflicts, some
code of both sides no longer fits together and is adapted here:

- newOIDCAuthenticator and loadMiddlewares take the logout markers and the
  audit emitter.
- The backchannel logout handler still writes the marker first. The logout is
  audited once the user is resolved, whether or not the cached claims can be
  removed afterwards, because the marker has ended the session by then.
- userForClaimKey reads the cached TokenRecord instead of a plain claims map.
- isExpectedTokenTimeError stays, because the audit log uses it to leave out
  expired tokens. A token rejected by a logout marker is still audited as a
  failed login, isExpectedTokenError only keeps it out of the error log.
- The audit test of the handler gets logout markers, an iat in the logout
  token and the new format of the cached record.
- The middleware test of the command package passes no markers.
- The logout tests import the events of reva v3.

Assisted-by: Claude Code:Claude Mythos 5.2
2026-11-30 10:25:52 +00:00
Dominik Schmidt d6077ece93 feat(clientlog): send item-metadata-changed over SSE 2026-11-30 09:46:21 +01:00
Dominik Schmidt 73da277d74 fix(search): reject a scope that is negated or joined with OR
A scope narrows the whole search to one folder. NOT scope: searched
inside the folder instead of outside it, and OR scope: was treated as
AND. Both are a 400 now.
2026-11-27 17:28:24 +01:00
Dominik Schmidt ef53745b04 test(search): cover an implicitly joined scope at the start and in the middle 2026-11-27 17:28:15 +01:00
Dominik Schmidt 79f522c5fe fix(search): fill a repeated root placeholder everywhere, reject a repeated or grouped scope 2026-11-27 17:28:02 +01:00
Dominik Schmidt a7ad1492eb refactor(search): drop the generic Compiler interface, bleve has the one compiler 2026-11-27 17:27:53 +01:00
Dominik Schmidt d62e904f9b fix(search): reject a nested scope after a top-level one 2026-11-27 17:27:43 +01:00
Dominik Schmidt ef1ba48b41 refactor(search): validate the template on the tree and share the parse 2026-11-27 17:27:34 +01:00
Dominik Schmidt b3becdd35f refactor(search): take scope and is:favorite out of the tree instead of the text 2026-11-27 17:27:25 +01:00
Dominik Schmidt 11047abb6a refactor(search): hand the engines the parsed query
The service parsed the query once for validation and every engine parsed the
expanded string again per space. Now the service parses once and the engines
compile an AST. The query template is parsed at startup and expanded by
substituting nodes, the indexer's up-to-date check is built as nodes as well.
2026-11-27 17:27:16 +01:00
Dominik Schmidt 97c4288be8 Merge pull request #3211 from opencloud-eu/feat/graph-search-query
feat(search): graph search query endpoint with aggregations
2026-11-27 16:47:18 +01:00
Andre Duffeck 17bf7b058e Merge pull request #4151 from opencloud-eu/fix/graph-get-user-drive-unknown-user
fix(graph): look up the user drive by id when the user is unknown
2026-11-27 16:47:12 +01:00
Dominik Schmidt 4443a8f9fc fix(webdav): bound a kept source only by the cache's own limit 2026-11-27 16:40:33 +01:00
Dominik Schmidt 253b2d4d52 fix(webdav): key the source cache by extractor, keep no empty entry per size 2026-11-27 16:40:24 +01:00
Dominik Schmidt 081a0a71ec fix(webdav): hash the source cache key like the thumbnail key 2026-11-27 16:40:15 +01:00
Dominik Schmidt d27aaa403f docs(webdav): split the thumbnail README by topic, with setups as a table 2026-11-27 16:40:05 +01:00