123 Commits

Author SHA1 Message Date
Lukas Hirt
11e013d080 feat(webdav): [OCISDEV-602] add spaceid to report
Added the `spaceid` to the REPORT responses. This is aligning the
`REPORT` method with the `PROPFIND` method.
2026-02-17 11:25:42 +01:00
Paul Faure
150e1782d8 docs: address Copilot review comments
- Add comment explaining why appendFloat64Prop doesn't check for zero
  (GPS coordinates 0.0 are valid for equator/prime meridian)
- Fix changelog to list only implemented fields (removed exposureTime,
  exposureBias, flash, meteringMode, whiteBalance; added exposureNumerator,
  exposureDenominator)
2026-01-20 15:05:30 +01:00
Paul Faure
aa2c14052f refactor: remove unused ctx parameter from matchToPropResponse
The context parameter was not being used in the function.
Also removed from multistatusResponse and removed unused context import.

Addresses SonarCloud issue go:S1172.
2026-01-20 15:05:30 +01:00
Paul Faure
60fdaa7cc7 refactor: further reduce cognitive complexity with type-specific helpers
Extract repetitive nil/zero checks into reusable helper functions:
- appendStringProp: handles *string with nil and empty checks
- appendFloat32Prop: handles *float32 with nil and zero checks
- appendFloat64Prop: handles *float64 with nil check
- appendInt32Prop: handles *int32 with nil and zero checks

This reduces appendPhotoProps complexity from 18 to under 15 and
appendLocationProps complexity as well.

Addresses SonarCloud issue go:S3776.
2026-01-20 15:05:30 +01:00
Paul Faure
35165e0d26 refactor: reduce cognitive complexity in matchToPropResponse
Extract photo and location property building into separate helper
functions (appendPhotoProps, appendLocationProps) to reduce cognitive
complexity from 41 to under 15.

This addresses SonarCloud issue go:S3776.
2026-01-20 15:05:30 +01:00
Paul Faure
32da6f480e Add missing EXIF fields to WebDAV search
- Add exposure numerator/denominator to search results
- Add altitude extraction from Tika GPS metadata
- All photo EXIF fields now fully exposed via WebDAV search
2026-01-20 15:05:30 +01:00
Paul Faure
74761ba7c2 Add GPS location support to WebDAV search results
- Add location field mappings with Store=true in Bleve index
- Rename properties to oc:photo-location-* for consistency
- Add altitude support alongside latitude/longitude
- Requires index rebuild to take effect
2026-01-20 15:05:30 +01:00
Paul Faure
f551e410b9 feat(search): Add photo EXIF metadata to search index and results
This change enables photo gallery applications to access EXIF metadata
through the search API.

Changes:
- Add KQL query support for photo fields:
  - photo.takenDateTime (datetime range queries)
  - photo.cameraMake, photo.cameraModel (keyword queries)
  - photo.fNumber, photo.focalLength, photo.iso (numeric queries)
- Configure Bleve index to store photo fields (Store=true)
- Map photo metadata from Bleve hits to Entity.Photo protobuf
- Add oc:photo-* properties to WebDAV search responses
- Add unit tests for photo field queries

The photo metadata is extracted by Tika during indexing and stored
in the Bleve search index. This enables queries like:
  photo.takenDateTime:[2023-01-01 TO 2023-12-31]
  photo.cameraMake:Canon

Signed-off-by: Paul Faure <paul@faure.ca>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 15:05:30 +01:00
Lukas Hirt
a917473ee8 fix: [OCISDEV-330] limit search only when scope is passed
Previously, the search service would limit the search
to the according space when searching `/dav/spaces/`.
This was not correct, as the search should be limited
to the according space when a `scope` is passed in the search pattern instead.
2025-09-24 10:47:11 +02:00
Juan Pablo Villafañez
a46cd29cc9 Merge pull request #11573 from owncloud/otelhttp_for_tracing
Otelhttp for tracing
2025-08-07 13:48:02 +02:00
dependabot[bot]
861b20dc9d chore(deps): bump github.com/olekukonko/tablewriter from 0.0.5 to 1.0.9 (#11570)
* chore(deps): bump github.com/olekukonko/tablewriter from 0.0.5 to 1.0.9

Bumps [github.com/olekukonko/tablewriter](https://github.com/olekukonko/tablewriter) from 0.0.5 to 1.0.9.
- [Commits](https://github.com/olekukonko/tablewriter/compare/v0.0.5...v1.0.9)

---
updated-dependencies:
- dependency-name: github.com/olekukonko/tablewriter
  dependency-version: 1.0.9
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix: adjust to tablewriter 1.0.9 (AI-powered)

Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>

* update to NewTable

* bring back a Footer

* fix the tests

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Julian Koberg <julian.koberg@kiteworks.com>
Co-authored-by: Roman Perekhod <rperekhod@owncloud.com>
2025-08-06 09:39:49 +02:00
Juan Pablo Villafáñez
8b8c7f02bf fix: replace hardcoded services names for variables 2025-08-05 10:00:24 +02:00
Juan Pablo Villafáñez
0aa20cbf05 feat: propagate data from http to go-micro, add missing middleware
Middleware in the webdav service was missing. Telemetry for webdav was
relying on the otelchi middleware that was added afterwards and removed
in the previous commit. New (otelhttp) telemetry has been added to the
middlewares for the service.

Incoming telemetry data from HTTP (captured with otelhttp) with also be
stored so the telemetry for go-micro's requests can be picked up and
propagate properly.
2025-07-31 11:06:33 +02:00
Juan Pablo Villafáñez
01a9713b52 feat: use otelhttp for tracing, fix tracing in proxy
otelchi and other custom solutions have been replaced with otelhttp to
trace HTTP requests; new middleware is provided to be used across the
platform.

The proxy service will use a custom HTTP client to forward the headers
needed for telemetry automatically (also based on otelhttp)
2025-07-31 11:06:33 +02:00
Juan Pablo Villafáñez
a388c8d642 feat: Homogenize tracing of requests to other services
The "tracing.GetNewRequest" and "tracing.GetNewRequestWithContext" aims
to replace the "http.NewRequest" and "http.NewRequestWithContext"
respectively by including tracing data.

For requests that have been already created, such as the case of some
reva requests, "tracing.InjectTracingHeaders" is provided.

Note that some outgoing requests might be required NOT to use tracing
headers.
2025-07-18 14:40:55 +02:00
Juan Pablo Villafáñez
641fa42f8d chore: add otlp as supported tracing type
This is just for documentation purposes. There is no code change.
2025-07-14 15:29:16 +02:00
Roman Perekhod
4fc4822696 collect the errors from group runner 2025-06-13 16:14:41 +02:00
Roman Perekhod
d31ca63af1 set default timeouts and clean up 2025-05-28 12:21:50 +02:00
Roman Perekhod
e1325ca40f to separate controll ower the http and grpc driven services 2025-05-28 12:21:50 +02:00
Juan Pablo Villafáñez
399a24e9b6 feat: use runners to startup the services 2025-05-28 12:21:49 +02:00
Julian Koberg
b979844791 feat(ocis): adjust reva imports
Signed-off-by: Julian Koberg <jkoberg@MBP-Julian-Koberg.local>
2025-03-05 11:14:44 +01:00
Juan Pablo Villafáñez
2e3f21afbb fix: fix date formatting 2024-12-10 10:21:08 +01:00
Roman Perekhod
4e509605f7 add the time formater to webdav 2024-12-09 15:33:43 +01:00
Juan Pablo Villafáñez
d0f3458261 fix: change the format to RFC1123 to follow the specs 2024-12-09 14:43:36 +01:00
Jörn Friedrich Dreyer
dde999d5c2 align shutdown logging
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-10-28 14:47:11 +01:00
Michael Barz
35578a0ecc chore: remove unneeded stuff 2024-10-21 22:46:06 +02:00
Florian Schade
66ff86bd35 enhancement: simplify ready and health check handler usage 2024-10-16 20:26:00 +02:00
Christian Richter
d5ef26c912 add http checks to userlog & webdav
Signed-off-by: Christian Richter <crichter@owncloud.com>
2024-10-15 14:27:49 +02:00
Christian Richter
0094d30378 code cleanup & refactoring
Signed-off-by: Christian Richter <crichter@owncloud.com>
2024-10-14 08:39:42 +02:00
Florian Schade
0671039474 enhancement: add readyz and healthz check handler 2024-10-14 08:39:42 +02:00
Florian Schade
c82a7c560e enhancement: use global ready and health handlers 2024-10-14 08:39:42 +02:00
Ralf Haferkamp
f536dacd4d fix(webdav): Set Retry-After header for 429 responses
We're now setting a 'Retry-After' in the webdav response when the
thunbnailer is rate limiting the requests. For now the timeout is just
a random number between 1 and 15 seconds.
2024-10-10 17:07:34 +02:00
Ralf Haferkamp
74d54579cb fix(webdav): missing Status 429 handling in some thumbnail endpoints 2024-10-10 17:07:34 +02:00
Ralf Haferkamp
e2d7251893 fix(thumbnails): Implement ratelimit for the grpc service
This moves the ratelimit ('THUMBNAILS_MAX_CONCURRENT_REQUESTS') from the
HTTP endpoint to the GRPC endpoint. The HTTP endpoint is just used for
downloading already created thumbnails. But the resource consuming part of
thumbnail generation happens in the GRPC service.
2024-10-09 14:15:54 +02:00
Jörn Friedrich Dreyer
066c4b8173 only register signal handling once
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-07-29 16:28:13 +02:00
Jörn Friedrich Dreyer
7999e2969b do not force exit to let all services shutdown gracefully
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-07-24 14:02:52 +02:00
Jörn Friedrich Dreyer
9d1515e8fc rely on context from app
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-07-24 14:02:11 +02:00
Jörn Friedrich Dreyer
008f379a01 pass config context when running apps
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-07-24 13:30:42 +02:00
Jörn Friedrich Dreyer
7a22dfb6de NotifyContext when running services standalone
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-07-24 13:26:58 +02:00
Ralf Haferkamp
ff6674f97b Fix fallout of reva bump
reva tries to avoid copying proto messages now. This changed some calls
to take pointers now (mainly e.g. FormatResourceId())
2024-07-11 15:21:56 +02:00
Christian Richter
4d6cbdf260 Move chi HTTP-Method registering into the NewService func
Signed-off-by: Christian Richter <crichter@owncloud.com>
2024-06-04 11:09:10 +02:00
Christian Richter
1012a399ae Don't show thumbnails for secureview shares
Co-authored-by: Julian Koberg <jkoberg@owncloud.com>

Signed-off-by: Christian Richter <crichter@owncloud.com>
2024-06-03 14:04:46 +02:00
Christian Richter
288203b785 Map HTTP 403 error correctly.
Signed-off-by: Christian Richter <crichter@owncloud.com>
Co-authored-by: Julian Koberg <jkoberg@owncloud.com>
2024-06-03 14:04:46 +02:00
Thomas Müller
e79d63208e feat: limit concurrent processing of thumbnail requests 2024-05-21 14:12:50 +02:00
Jannik Stehle
164f8650da fix: use getters for protobuf types 2024-05-15 11:30:46 +02:00
Jannik Stehle
d40a643fbf feat: add remote item id to search report responses
Adds the remote item id to search `REPORT` responses for shared resources and resources that are part of such. This id represents the id of the original resource that has been shared (= the remote item) and is needed for clients to correctly resolve their locations.
2024-05-15 11:26:43 +02:00
Thomas Müller
a8cbc612cc chore: remove unused return value from BindSourcesToStructs (#9033) 2024-04-30 18:18:31 +02:00
Jörn Friedrich Dreyer
32e44a9fdc Merge pull request #8989 from owncloud/log-and-trace-fixes
log and trace fixes
2024-04-29 17:13:52 +02:00
Jörn Friedrich Dreyer
e41472234f log and trace fixes
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-04-26 17:03:49 +02:00
Thomas Müller
bdbba929d0 feat: add CSP and other security related headers in the oCIS proxy service (#8777)
* feat: add CSP and other security related headers in the oCIS proxy service

* fix: consolidate security related headers - drop middleware.Secure

* fix: use github.com/DeepDiver1975/secure

* fix: acceptance tests

* feat: support env var replacements in csp.yaml
2024-04-26 09:10:35 +02:00