Commit Graph
283 Commits
Author SHA1 Message Date
micbar 58561d7a56 chore: bump version 2026-11-13 08:58:35 +01:00
2435420f69 [full-ci] chore: bump reva to 2.52.2 (#3955)
* chore: bump reva to 2.52.2

* Merge pull request #42 from opencloud-eu/fix-web-theme-merge

fix(web): merge copies of the theme sources so themeDefaults is never mutated

* Merge pull request #43 from opencloud-eu/fix-search-trailing-not

fix(search): handle missing operands in the bleve compiler

* Merge pull request #44 from opencloud-eu/fix-search-highlight-escaping

fix(search): escape file content in OpenSearch highlights

---------

Co-authored-by: Ralf Haferkamp <r.haferkamp@opencloud.eu>
Co-authored-by: Florian Schade <f.schade@icloud.com>
2026-11-11 14:14:34 +01:00
Alex Ababii 3fb1dd3f3f Merge pull request #3938 from maki5/fix/webfinger_panic
fix(webfinger): fix panic in OidcAuth middleware
2026-11-11 10:54:33 +01:00
Jörn Friedrich Dreyer 39493c1f37 Merge pull request #3937 from opencloud-eu/fix/client-ip-no-trusted-proxies
fix(middleware): do not build the XFF middleware without trusted proxies
2026-11-10 17:24:51 +01:00
Andre Duffeck 318991481a Merge pull request #3936 from aduffeck/idcache-nats-only
Remove redis-sentinel from store descriptions
2026-11-10 13:32:52 +01:00
Jörn Friedrich Dreyer 73bfeb00d0 fix(middleware): do not build the XFF middleware without trusted proxies
Starting with chi v5.4.0, ClientIPFromXFF panics when no trusted prefix
is given, so ClientIP would crash the proxy and collaboration services at
startup when no trusted proxies are configured. Without trusted proxies
every request uses the network address anyway, so return
ClientIPFromRemoteAddr.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2026-11-10 13:00:28 +01:00
André Duffeck 487313d06c Remove redis-sentinel from store descriptions
Redis isn't supported anymore. Also note that the posix driver needs
nats-js-kv for the id cache.
2026-11-10 12:26:09 +01:00
Jörn Friedrich Dreyer 9f6df0cebe Merge branch 'main' into feat/userlog_event_handler_on_demand
Keep main's shared.AllComponentsDisabledError name and use it in
userlog and eventhistory as well.

Assisted-by: Claude Opus 5.5
2026-11-09 15:20:21 +01:00
Alex Ababii c71ca6f699 fix(webfinger): fix panic in OidcAuth middleware 2026-11-09 14:33:55 +01:00
micbar 1eb3c738b1 fix: filter health checks from the pod ip
The health check calls the address the server listens on. For 0.0.0.0
that is the IP of the pod, not the loopback address. Compare the peer
with the local address of the connection instead.
2026-11-06 14:34:28 +01:00
micbar f558acdfdb fix: keep the health checks out of the access log 2026-11-05 23:00:19 +01:00
Jörn Friedrich Dreyer dc7f4433a1 fix(tracing): set the global text map propagator
The go-micro tracing wrappers and otelhttp inject and extract the trace
context with the global propagator. Nobody set it, so it stayed the
default no-op: no traceparent went over the wire and every go-micro
service (settings, policies, eventhistory, search) started a new trace
instead of joining the caller's.

GetTraceProvider now also sets the global propagator to the W3C
TraceContext and Baggage propagator we already use elsewhere.

fixes https://github.com/opencloud-eu/opencloud/issues/3856

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2026-11-05 16:20:47 +01:00
Jörn Friedrich Dreyer 8e83a0eebc Merge pull request #3464 from maki5/fix/upd_chi_real_ip
fix(chore): upd deprecated chi RealIP middelware
2026-11-03 11:05:58 +01:00
micbar b7bb4fbe8c fix: client address for clients in a private network and behind the proxy 2026-11-02 10:25:18 +01:00
Andre Duffeck 12d8edb6e7 Merge pull request #3858 from aduffeck/kql-quote-escaping
Support doubled quotes in KQL values
2026-11-02 08:56:40 +01:00
micbar 4e7ebd4f8c fix: only trust forwarding headers from trusted reverse proxies
chi's ClientIPFrom* header middlewares trust the header from anyone who can
  reach us. Pick the middleware per request instead: headers are only read
  when the peer is a trusted proxy, everyone else gets their network address.

  - PROXY_TRUSTED_PROXIES, defaults to loopback and private ranges
  - PROXY_CLIENT_IP_HEADER, defaults to X-Forwarded-For, e.g. CF-Connecting-IP
  - drop the strategy setting and xff_trusted_hops
  - pass the client address to the services in X-Forwarded-For instead of
    X-Client-Ip, reva reads it e.g. for OCM
  - same check in collaboration, traefik routes to it directly
  - OC_TRUSTED_PROXIES and OC_CLIENT_IP_HEADER set both services
  - the other services only drop RealIP, none of them reads the address

  Taken from #3864 and https://github.com/opencloud-eu/opencloud/pull/3464#issuecomment-6494799883

# Conflicts:
#	services/proxy/README.md
2026-10-30 15:15:22 +01:00
Alex Ababii cf0f06e060 select correct chi middleware to get real IP based on config values 2026-10-30 15:13:55 +01:00
Alex Ababii 850f1714a1 upd deprecated chi RealIP middelware 2026-10-30 15:13:54 +01:00
André Duffeck ff742249ba Only read a KQL value as a date, number or boolean when it is the whole value 2026-10-30 08:54:05 +01:00
Ralf Haferkamp 606fe4ee1b fix(storage): map legacy drivers to supported backends
Related: #3819
2026-10-29 16:59:11 +01:00
Ralf Haferkamp 5419a17fae fix(storage-users): use configured storage for stale node cleanup 2026-10-29 16:59:11 +01:00
André Duffeck fef2b7e3fa Support doubled quotes in KQL values
Fixes #3666
2026-10-29 10:00:59 +01:00
Viktor Scharf ae4970d92c chore: bump reva to 2.52.0 (#3820) 2026-10-27 12:46:43 +01:00
Florian Schade 385062271d feat(search): turn the query filter into a template 2026-10-22 22:46:06 +02:00
Florian Schade 3fe11ea60a feat(search): configurable query filter 2026-10-22 20:05:31 +02:00
micbar 3662a94ca7 fix: nats checks were missing the configured auth 2026-10-14 17:45:44 +02:00
Alex Ababii a51f79505d feat(authguest): renewal logic and publishing event 2026-10-13 09:30:52 +02:00
Alex Ababii 7117c4a672 feat(guestauth): global flag to disable the guest links feature 2026-10-13 09:30:51 +02:00
Alex Ababii 2c898250a9 feat(guestauth): upd file manager lock, addtional filetrs for shareExpired and shareRemoved events, common config loading fix 2026-10-06 08:08:28 +02:00
Alex Ababii c5879ca1b2 feat(guestauth): renaming guest ivitations to guest links for consistency with libre-graph-api 2026-10-06 08:08:28 +02:00
Alex Ababii a1a8221f68 feat(guestauth): global flag to disable the guest links feature 2026-10-06 08:08:26 +02:00
Alex Ababii cbf3ee8c0b feat(guestauth): guestauth service rename to auth-guest 2026-10-06 08:07:44 +02:00
Alex Ababii f86e339233 feat(guestauth): grantee email in GuestTokenCreated event 2026-10-06 08:07:44 +02:00
Alex Ababii a1cb335c37 feat(guestauth): register gusetauth service into opencloud config 2026-10-06 08:07:43 +02:00
Alex Ababii 7af24c09a8 feat(guestauth): handle events and a bit of cleanup 2026-10-06 08:07:43 +02:00
Viktor Scharf af425afb3b [full-ci] chore: bump reva to 2.51.0 (#3657)
* chore: bump reva to 2.51.0

* replaceversion placeholder
2026-10-05 17:08:52 +02:00
Pascal Bleser b8234f81d9 Merge pull request #3521 from pbleser-oc/feat/add-service-to-proxy-metrics
feat(proxy): add per-service metrics to the proxy service
2026-09-22 14:44:04 +02:00
Viktor Scharf 2ebd9635c3 chore: bump version to 8.0.1 (#3548) 2026-09-22 13:50:56 +02:00
Pascal Bleser d768a9b0f9 feat(proxy): add the service to the proxy metrics
Improve the metrics for the proxy service.

 * extend the instrumenter middleware to add a label with the name of
   the service the request is being dispatched to

 * add a native Prometheus histogram that tracks the durations and also
   includes a label for the name of the service the request is being
   dispatched to, as well as a 'result' label ('success',
   'client-error', 'server-error') based on the HTTP status code of the
   response

 * add per-service gauge functions to count the number of in-flight
   requests

 * add a counter for routing failures, for when an inbound request
   cannot be mapped to a route

 * extend the route.RoutingInfo struct with a service attribute, and a
   Service() getter

 * remove the 'routing_failure_count' metric, as it is redundant
2026-09-18 09:52:33 +02:00
Alex Ababii 66ec3765b0 userlog: reworked consumer and http disable/enable ability 2026-09-17 14:21:24 +02:00
Pascal Wengerter 002a2e43fb chore: regenerate mockery outputs 2026-09-16 14:57:41 +02:00
zerox80 2d22a2cf07 fix(oidc): reject invalid audience settings during client setup 2026-09-16 10:15:56 +02:00
zerox80 6f85ee5296 feat(oidc): add access token audience validation 2026-09-16 10:15:56 +02:00
Viktor Scharf 92560dbbdb [full-ci] chore: bump reva to 2.50.0 (#3531)
* chore: bump reva to 2.50.0

* increase timeout for extract properties tests
2026-09-15 10:13:55 +02:00
Pascal Bleser e4365320de chore(graph): use metrics tools introduced in 8821053ff8
* introduce a fix in the metrics tools introduced with 8821053ff8 in
    order to deal with a struct that has fields that are not exported
    (as is the case here)

  * introduce a func in the toplevel metrics package that registers a
    single metric, as that needs to be done explicitly for unexported
    ones

  * in the graph service, use RegisterAll and BuildInfo from the
    toplevel metrics package, as introduced with 8821053ff8
2026-09-01 10:57:54 +02:00
Dominik Schmidt d38fbc8e52 Merge pull request #3345 from opencloud-eu/refactor/search-mapping
refactor: reflection-based search mapping + location geopoint
2026-08-31 15:12:49 +02:00
Benedikt Kulmann 109e9555c8 chore(policies): disable gRPC or event handlers by configuration + metrics (#3287)
* add the ability to disable the gRPC API handler
   (POLICIES_GRPC_DISABLED)

 * add the ability to disable the Events API handler
   (POLICIES_EVENTS_DISABLED)

 * add metrics

 * add support for specifying rego files via the environment varirable
   POLICIES_ENGINE_FILES

 * for file paths specified in yaml or in POLICIES_ENGINE_FILES, support
   'config:' and 'data:' path prefixes

 * fix typos in the documentation, and try to make it more clear

 * add metrics to the documentation

 * add a section for testing in the documentation

 * introduces a new top-level package pkg/metrics/ with utilities for
   metrics that are backported from the groupware branch, with unit
   tests
2026-08-31 14:58:52 +02:00
Dominik Schmidt ec58861e4e feat(search): per-field case-insensitive search via _lowercase siblings
Keyword and path fields always index their case-preserved base and, when CaseInsensitive is set, an additional <field>_lowercase sibling used only for matching. The KQL lowering marks a restriction case-insensitive; each backend searches the sibling and lowercases the query value the same way the sibling is precomputed at index time (Go strings.ToLower on both sides, so non-ASCII stays consistent).

Search always returns the case-preserved base, so the sibling never has to be read back. In bleve it is indexed but not stored, kept out of _all, and without doc values. In OpenSearch it deliberately stays in _source: excluding it would make every update-by-query script rebuild all siblings from the document via painless toLowerCase, which lowercases differently than Go and would drift from the query side. Keeping it in _source avoids that, and a lowercased copy of a name or path is negligible disk in a cluster.

The OpenSearch move script keeps the base and its sibling in sync by swapping the moved prefix in Path_lowercase and setting Name_lowercase from Go-lowercased params, so case-insensitive search still finds a file after it moves (previously the sibling went stale). bleve re-indexes the whole document on move/delete/restore, so its siblings stay fresh for free.

This also repairs OpenSearch path search (the query value was no longer folded to lowercase, so path:<Foo> returned nothing) and makes bleve path queries match a folder and its descendants like OpenSearch's path_hierarchy. The Path base stays case-preserved so the move/delete descendant update (an exact TermQuery on Path) matches mixed-case folders.
2026-08-31 13:40:42 +02:00
Dominik Schmidt 65f615d927 refactor(kql): move parse/validation errors into pkg/kql
The KQL parser produced its own validation errors but imported them from the
search service's query package. Move them into pkg/kql and let the search
backend consume kql.IsValidationError, so the parser stops depending on a
service package.
2026-08-31 13:40:42 +02:00
Jörn Friedrich Dreyer 0becbb8212 Merge pull request #3419 from fredrikblau/fix/3413-oidc-nil-provider
fix(middleware): reject empty OIDC providers safely
2026-08-31 13:37:09 +02:00