A Sorting section runs every case against bleve and OpenSearch and compares the order of the matches: size, modification time, track length, year with a second key, the date a photo was taken, a file without the sort value, names in code point order, and the fields that are not sortable. Its rows keep the order of the answer in the README, and the fixtures list the values that are sorted by.
Name is analyzed (lowercaseKeyword) and therefore a text field, which
OpenSearch refuses to sort on without fielddata; enable it in the index
template. The keyword tokenizer emits one term per document, so the
fielddata cache stays small. The schema version has not shipped yet, so
no reindex is needed.
(cherry picked from commit f1d0e7b773b170b119dbd59fa176d656237bed96)
The fan-out passes order_by through to each engine query; the merge
re-sorts the combined matches with CompareMatches and keeps the score
as tiebreaker (and as the sole criterion when no order_by is given).
(cherry picked from commit 66af40fc34fd9daffc028ab06f83f7ade8a360d1)
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)
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)
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.
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.
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.
The audit log tests read the audit records from a copy of the server
output, which the CI wrote with "| tee" to a file given to the tests in
AUDIT_RECORDS_FILE. The ocwrapper reads the server output anyway: it now
keeps the audit records, and returns them on GET /audit (DELETE /audit
clears them). The tests clear them when a scenario starts and fetch them
from there, so they need no extra setup in the CI or locally.
Assisted-by: Claude Code:claude-opus-5-5
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
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>
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>
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
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
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
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
AI coding agents read AGENTS.md (Claude Code through CLAUDE.md) for the
conventions of a repository. Start it with the ones for configuration
options, which are easy to miss: the OC_ prefix only for environment
variables shared by several services, the service name as the prefix
otherwise, both names for shared settings that a service may override,
and the desc and introductionVersion tags, with the %%NEXT%% placeholder
for new options.
Assisted-by: Claude Code:claude-opus-5-5
* test: acceptance tests for the audit log
Assisted-by: Claude Code:claude-opus-5-5
* test: author tag in the audit context
Assisted-by: Claude Code:claude-opus-5-5