The tag listing searched for every tagged resource with an unlimited page and collected the tags from the matches. OpenSearch answers an unlimited page with the first 1000 matches of a space, so tags that only resources beyond those carry were missing from the list. Bleve returned every match with all stored fields to read one of them.
The listing now asks for a terms aggregation on the tags, ordered by key, without matches. The search counts every tagged resource on both engines and cuts the list at the 100 listed tags after merging the spaces, in the same byte order as before. AGG-47 pins that a tag is found whichever match carries it.
A page size below -1 from a direct gRPC caller ran into a slice out of range. A bad request an engine answers is the fault of the request, it was logged as an error once per space.
The search held both engines to the first 10000 matches, the default index.max_result_window of OpenSearch. Bleve has no such limit, so a WebDAV report with a limit above 10000 that bleve answered before got a 400.
The window is no longer checked by the service. Bleve answers every page again. OpenSearch refuses a page beyond its window itself, the backend turns that into a bad request instead of an internal error, so a window raised on the index takes effect without a change here. The graph endpoint no longer caps from and size or moreResultsAvailable at 10000.
Replicas keep their own statistics and may score a document differently, so consecutive pages of one search could come in a different order from an unchanged index. The user id is the preference of the search request now.
The share root is the root of the mountpoint drive. Described as a child of / there, driveId, path and name led to a folder of the same name inside the share.
A search scoped to a folder (scope:<id>) restricts the engine query to the path of that folder. The path filter matches the folder itself as well as everything below it, so the folder is a match of its own search whenever it fits the query.
Until now the service dropped it after the engine had answered, by comparing names: a match was removed when "/" + its name equalled the path of the scope. That had three effects:
- The total and the aggregation buckets still counted the folder, so they were one higher than the list of matches.
- It only worked for a scope directly below the space root. With a scope of /a/b the path is never "/" + "b", so the folder b stayed in the results of a search inside b.
- With a scope of /a every match named "a" was removed, also a file or folder of that name further down, which is a legitimate match.
The id of the scope folder is known from the Stat that resolves the scope. It now goes into the engine query as NOT id:"<id>", the same way the default query template already excludes the personal space root, and the name comparison is gone. Matches, total and buckets agree, on every depth, for the WebDAV report and for the graph search.
Example, searching "urlaub" inside /Urlaub, which holds urlaub-2024.jpg and a sub folder Urlaub: before, 1 match (the jpg) and a total of 3. Now, 2 matches (the sub folder and the jpg) and a total of 2.
At most 16 aggregations and 3 bucket levels per request and 5 requests per query. The bleve collector stops at the bucket limit instead of checking after the walk, and the limit also holds for the result merged across spaces.
Server-issued aggregationFilterToken on buckets, consumed verbatim via searchRequest.aggregationFilters. The graph layer decodes a filter into its buckets (a term, a range, or an or(...) of them), the proto carries them as AggregationFilter, and the engines match them natively: a key as the exact value of the field, a range from-inclusive and to-exclusive, so a drilldown returns exactly the matches the bucket counted. Filters are validated like aggregations, in both layers. Range tokens use the MS Graph spelling (range(min, 1980), range(2010, max, to="le")). AGG-22 to AGG-33, 36, 38 and 45 in the parity suite.
Sub-aggregations on both engines: bleve folds child buckets below their parent through the same collector, OpenSearch nests them natively, so a request stays one search per space. The proto gains sub_aggregations on the option and on the bucket; merge, finalize, validation and the bucket limit walk every level, results are positional at every level, a metric has no buckets to nest in. AGG-10 to AGG-15, 20, 35, 40 and 44 in the parity suite, AGG-14 as a known OpenSearch divergence.
sum/min/max/avg over a numeric field: bleve folds the accumulators from doc values, OpenSearch reads them from a stats aggregation, the service layer reduces them to the value of the kind after the cross-space merge. The proto gains MetricDefinition, MetricKind and Metric, which travels as accumulators (sum, count, min, max) so the merge works whatever the kind; value is set after the merge and absent for a metric without a single value. A metric is only valid on a numeric field, and only one of bucketDefinition and metricDefinition at a time. AGG-06, 18 and 21 in the parity suite.
Numeric and date ranges on both engines: bleve folds them from doc values, OpenSearch uses range and date_range aggregations. The proto gains BucketRange and bucketDefinition.ranges, the aggregation package the range parser (bounds are numbers or RFC3339 dates, one kind per aggregation, anything else is rejected), the kind of an option and the validation of ranges against the field type. Every requested range is answered in request order, an empty one with a count of zero, with no space answering too; size does not cut ranges, keyAsNumber sorts them by their lower bound. Range keys read from..to. AGG-04, 05 and 07 to 09 in the parity suite.
Term buckets on both engines: bleve folds them from doc values (its facets read numbers as prefix-coded terms), OpenSearch uses terms aggregations. A request gets every bucket, up to 65535 per space (the OpenSearch default for search.max_buckets, held on bleve as well); beyond that it is refused. The proto gains AggregationOption, BucketDefinition (sort, minimum count), AggregationResult and Bucket. The new aggregation package merges the per-space results by position, so several aggregations on one field stay apart, and shapes them per BucketDefinition (minimum count, sort, size). It also validates aggregations against the index mapping (a field the index knows and a client may name, of a type whose values are buckets; the mapping overrides mark the internal fields): the search service relies on it, the graph endpoint asks it first to save the round trip, next to its own checks against the spec, and with the field names of the request so an error reads like the request. A request names a field like the driveItem property, exactly so. A number is keyed as it is, a bool as true or false on both engines, an empty value is no bucket. Pinned in the parity suite as AGG-01 to 03, 17, 34, 37 and 39; the paging rows AGG-41 to 43 pin the first commit through the same matrix machinery, which also shortens long answer lists in the README.
convert.copyFacet rebuilt every facet by hand on the way into the index; mapping.ToProto is the generic counterpart of the FromProto the graph endpoint uses, so both directions share one bridge.
MS Graph style search endpoint: searchRequest with KQL queryString, from/size pagination (values outside the spec's bounds are rejected), entityTypes validated to driveItem, hits as driveItems with webUrl, parentReference, remoteItem for shares, the facets and @libre.graph.permissions.actions.allowedValues, which the search service now projects onto the Entity from the same permission set as the WebDAV report. Properties the endpoint does not evaluate yet (aggregations, aggregationFilters, sortProperties) answer 501 instead of being ignored, an unknown $expand answers 400, and a failing search service keeps its status. Hits reuse what the drive item listing has, which moves a little: the thumbnails helper is named for the drive item it fills (setDriveItemThumbnailsByID, it served shares only), the web URL of an id gets a helper (webURLForID), and the facets come out of the proto through one generic mapping.FromProto instead of a copy per facet.
The search service takes a `from` offset next to the page size and applies it after the cross-space merge; every space answers the full prefix up to from+size, since an offset cannot be distributed. Pages are stable: both engines and the merge break score ties by id, and OpenSearch counts every match (track_total_hits). No engine pages beyond the first 10000 matches, the OpenSearch result window, so a from and size reaching beyond it are rejected on both engines. `page_size` becomes optional on the wire: absent is the default of 200, 0 asks for no matches, -1 for all; WebDAV and the tags listing set it accordingly, and the WebDAV report's `<oc:offset>`, parsed since the report exists and never read, now pages the merged list. The gRPC wrapper passes the request through and keys its cache by the whole request.
* test(guest-link): check share types of resources shared with a guest
* test(guest-link): rename the share types scenarios as suggested in the review
Assisted-by: Claude Code:claude-opus-5-5
* tests: remove unused tags from the acceptance tests
Remove the tags that neither the CI of opencloud nor the one of reva
filters on, and that no hook uses: @smokeTest, @skipOnStorage:ceph,
@skipOnStorage:scality, @skipOnOpencloud-decomposeds3-Storage (the CI only
runs posix and decomposed), @sqliteDB, @notification and @skip-local-run.
A tag line left empty becomes an empty line, so that the line numbers of
the scenarios, which the expected failures of opencloud and reva refer to,
stay the same.
Also fix the typo @@skipOnReva, and write the issue tags the same way:
@issues-<n> becomes @issue-<n>, @web-issue-<n> becomes @issue-web-<n>.
Assisted-by: Claude Code:claude-opus-5-5
* tests: run the search properties scenarios as expected failures
The two scenarios that check the properties of search results were
skipped, since the search REPORT returns an empty d:getetag (#3501) and
the step retried the whole check for 20 seconds, which made them too slow
as expected failures.
- retry the search only until the entry is indexed, then check its
properties once: once found, the entry is complete, so a wrong value
fails right away
- check what the search returns: d:getcontentlength for files, the real
size of 12 bytes, a file id of the form <uuid>$<uuid>!<uuid>, anchored
patterns, and no oc:owner-id and oc:owner-display-name, which the
search response never contains
- list them as expected failures of #3501 instead of skipping them
Without the d:getetag check, both scenarios pass.
Assisted-by: Claude Code:claude-opus-5-5
* lint fix
Link permissions now carry their creator as invitation.invitedBy.user,
like user and group shares do.
Fixes#4148
Assisted-by: Claude Code:claude-opus-5-5
The local dev setup of web switched from inbucket to mailpit
(opencloud-eu/web#4059). Use mailpit for the acceptance tests too, in the
CI, the docker setup and the README, so that one mail catcher is used
everywhere.
The tests now read and delete the emails through the API of mailpit
(port 8025), and the server sends them via SMTP to port 1025. mailpit's
search also matches parts of addresses, so EmailHelper narrows the results
down to the mailbox (the local part of the address), as inbucket did.
Assisted-by: Claude Code:claude-opus-5-5
target and path semantics, the public link as actor, roles and recipients in share records, one login per OIDC session, the link access dedupe, the output ordering and why strict comes later.
frontend, sharing and storage-users pass the audit settings and the service version to the reva audit emitters. `best_effort` is the only mode for now, any other value stops the service. The frontend keeps the events endpoint the archiver needs for its records.
The proxy builds the audit request context: client address (PROXY_CLIENT_IP_HEADER behind trusted proxies), user agent, auth method, session and OIDC client. A value a client sent in X-Audit-Context is dropped.
A login is recorded once per OIDC session and client, not per access token. Public link access is recorded with the client address, failed attempts every time.
The audit service reads the JetStream stream `audit` and writes every record as one line of JSON to stdout and, if configured, to an OTLP endpoint, with the emitting service in the resource. A record is acknowledged only when all outputs have it, so an output outage keeps the records in the stream, in order and without duplicates. The old audit log stays available with AUDIT_LEGACY_ENABLED.
Adds the OpenTelemetry log packages for the OTLP output.
* docs: label reva bumps by the changes they bring in
Assisted-by: Claude Code:claude-opus-5-5
* docs: label web bumps by the changes they bring in
Assisted-by: Claude Code:claude-opus-5-5
---------
Co-authored-by: v.scharf <v.scharf@opencloud.eu>
Before each request with a bearer token, the test helper sent a
GET /graph/v1.0/me to check that the cached token is still valid, which
doubled the number of requests. Now the request is sent with the cached
token right away, and on a 401 the token is renewed and the request sent
once more.
Also drop the retry while the share manager is migrating, which is no
longer needed.
Helpers and Given/Then steps no longer store their response, so a Then
step can't pass on a response left over from an earlier step:
- favorite helpers, used by Given steps too, return the response
- the preview Given/Then steps and the space entry Then steps pass their
response explicitly instead of storing it
- the rename by file id and set property steps are When steps
- the wopi, trashbin, colon path and revisions cleanup helpers return the
response to their When steps