Compare commits

..
Author SHA1 Message Date
lars.jurgensen ddf18216be chore(OCISDEV-900): revert graphAPI markProcessing change 2026-08-24 15:18:48 +02:00
lars.jurgensen 04eefa1e6f chore(OCISDEV-900): bump reva version 2026-08-24 11:14:08 +02:00
lars.jurgensen bd374e47ff fix(OCISDEV-900): set upload_directory to StorageRoot/uploads in OCM revaconfig
Service-level upload_directory is used as-is by reva (no /uploads join).
Pass StorageRoot + "/uploads" explicitly so rootless-driver pattern is clear.
2026-08-19 17:19:54 +02:00
lars.jurgensen a5c539b9bb chore(OCISDEV-900): bump golang.org/x/mod to v0.40.0 (CVE-2026-56864/56865) 2026-08-19 16:58:16 +02:00
lars.jurgensen 98a353424c chore(OCISDEV-900): pin transitive deps to master versions after reva bump
Prevent unnecessary downgrades introduced by reva b1626ed21a.
Only intentional diff vs master: reva bump + ceph/go-ceph v0.41.0 (required by new reva).
2026-08-19 16:46:35 +02:00
lars.jurgensen 876a0ef418 refactor(OCISDEV-900): rebase onto master, bump reva to b1626ed21a
- Remove markprocessing opaque from TouchFile in personaldata.go
- Add upload_directory to OCM dataprovider and storageprovider revaconfig
- Add mount_id to storage-users dataprovider revaconfig
- Bump reva/v2 to b1626ed21a (feat: handle missing node id in tus)
2026-08-19 16:22:42 +02:00
Juan Pablo Villafañez be118f6bde fix: [OCISDEV-811] ignore write error after successful cache read (#12772)
* fix: [OCISDEV-811] ignore write error after successful cache read

* chore: add changelog entry
2026-08-19 09:29:35 +02:00
Matteo b97840e770 fix: [OCISDEV-1358] shift-click range selection in the files list (#12804)
* fix: [OCISDEV-1358] shift-click range selection in the files list

Shift-clicking a checkbox now triggers range selection, a plain
shift-click replaces the current selection instead of adding to it, and
the browser no longer highlights the text of the affected rows.

* fix: [OCISDEV-1358] keep the checkbox checked state in sync with the model

The browser toggles the native checked property on every click, while vue does
not re-patch an unchanged model-value, so the property stayed flipped whenever a
click did not change the selection, e.g. when a range selection keeps an already
selected resource selected. The tiles view worked around that by preventing the
default click action, which desyncs the property for good: chromium restores the
pre-click value after vue has already patched it, so it never follows the model
again.

Sync the native property from the model in OcCheckbox once the parent had its
chance to react to the change, and drop the workaround.
2026-08-18 13:04:08 +02:00
Pradip Subedi ed1bc5ec9f [tests-only][full-ci] test(apiGraphGroup): add acceptance test for configurable LDAP group object class (#12751)
* test(apiGraphGroup): add acceptance test for configurable LDAP group object class

* test(apiGraphGroup): make LDAP object class test portable across test environments

* test: use multilines for message assertion
2026-08-18 16:42:55 +05:45
Prajwol Amatya 4b4c630540 [tests-only][full-ci] test: restore totp for user in before scenario and rename the step name to ckeck acr value from jwt token (#12748)
* test: move deleteUserTotpCredentials to before scenario

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>

* test: refactor the step to check acr vaule

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>

---------

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>
2026-08-18 14:36:40 +05:45
Martin 57e96f3438 fix: fix the introduction version of envvars (#12811) 2026-08-17 18:24:08 +00:00
dependabot[bot] b29dc89349 build(deps): bump the minor-and-patch group with 9 updates (#12805)
Bumps the minor-and-patch group with 9 updates:

| Package | From | To |
| --- | --- | --- |
| [github.com/nats-io/nats-server/v2](https://github.com/nats-io/nats-server) | `2.14.4` | `2.14.5` |
| [github.com/nats-io/nats.go](https://github.com/nats-io/nats.go) | `1.52.0` | `1.53.1` |
| [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) | `2.32.0` | `2.32.1` |
| [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) | `1.9.4` | `1.10.0` |
| [golang.org/x/crypto](https://github.com/golang/crypto) | `0.54.0` | `0.55.0` |
| [golang.org/x/image](https://github.com/golang/image) | `0.44.0` | `0.45.0` |
| [golang.org/x/net](https://github.com/golang/net) | `0.57.0` | `0.58.0` |
| [golang.org/x/text](https://github.com/golang/text) | `0.40.0` | `0.41.0` |
| google.golang.org/protobuf | `1.36.11` | `1.36.12` |


Updates `github.com/nats-io/nats-server/v2` from 2.14.4 to 2.14.5
- [Release notes](https://github.com/nats-io/nats-server/releases)
- [Changelog](https://github.com/nats-io/nats-server/blob/main/RELEASES.md)
- [Commits](https://github.com/nats-io/nats-server/compare/v2.14.4...v2.14.5)

Updates `github.com/nats-io/nats.go` from 1.52.0 to 1.53.1
- [Release notes](https://github.com/nats-io/nats.go/releases)
- [Commits](https://github.com/nats-io/nats.go/compare/v1.52.0...v1.53.1)

Updates `github.com/onsi/ginkgo/v2` from 2.32.0 to 2.32.1
- [Release notes](https://github.com/onsi/ginkgo/releases)
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/ginkgo/compare/v2.32.0...v2.32.1)

Updates `github.com/sirupsen/logrus` from 1.9.4 to 1.10.0
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.9.4...v1.10.0)

Updates `golang.org/x/crypto` from 0.54.0 to 0.55.0
- [Commits](https://github.com/golang/crypto/compare/v0.54.0...v0.55.0)

Updates `golang.org/x/image` from 0.44.0 to 0.45.0
- [Commits](https://github.com/golang/image/compare/v0.44.0...v0.45.0)

Updates `golang.org/x/net` from 0.57.0 to 0.58.0
- [Commits](https://github.com/golang/net/compare/v0.57.0...v0.58.0)

Updates `golang.org/x/text` from 0.40.0 to 0.41.0
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.40.0...v0.41.0)

Updates `google.golang.org/protobuf` from 1.36.11 to 1.36.12

---
updated-dependencies:
- dependency-name: github.com/nats-io/nats-server/v2
  dependency-version: 2.14.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: github.com/nats-io/nats.go
  dependency-version: 1.53.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: github.com/onsi/ginkgo/v2
  dependency-version: 2.32.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: github.com/sirupsen/logrus
  dependency-version: 1.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: golang.org/x/crypto
  dependency-version: 0.55.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: golang.org/x/image
  dependency-version: 0.45.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: golang.org/x/net
  dependency-version: 0.58.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: golang.org/x/text
  dependency-version: 0.41.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: google.golang.org/protobuf
  dependency-version: 1.36.12
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-17 10:03:50 +02:00
Nalem7 1d319a4552 [tests-only][full-ci] add retry logic for file copy requests (#12781)
* test: add retry logic for file copy and move requests

Signed-off-by: nabim777 <nabinalemagar019@gmail.com>

* test: add retry logic for file copy request only

Signed-off-by: nabim777 <nabinalemagar019@gmail.com>

* test: add retry once for 500 status code only

Signed-off-by: nabim777 <nabinalemagar019@gmail.com>

---------

Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
2026-08-17 10:46:51 +05:45
Nalem7 e75c48765c [tests-only][full-ci] test: add bug coverage tests for tag removal (#12655)
test: add coverage for idempotent tag removal

Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
2026-08-14 17:03:41 +05:45
Gaurav Soni ef41e736d1 fix: [OCISDEV-388] renaming a resource to its current name is a no-op (#12784)
A MOVE whose source and destination resolve to the same resource is now
answered with 204 No Content server side instead of a confusing 403 or
404, and instead of 409 Conflict on the id based dav route, so every
client behaves the same way. The no-op still requires the move
permission.

The server-side guard lives in reva (owncloud/reva#708 and the follow-up
owncloud/reva#713, which moves the guard above the recursion checks so it
is also reached when the request addresses the resource by its id).
Pulled in here by bumping reva to v2.0.0-20260813121157-d386075a0421.
vendor/ was regenerated with `go mod vendor`; no hand edits.

On the test side the @issue-1976 tags are dropped from the five MOVE
feature files and the corresponding entries are removed from both
expected-failures lists. Scenario Outlines that mix roles with and
without the move permission parameterize the expected status in an extra
http-status-code Examples column rather than being split into duplicate
scenarios. The gherlint newline_before_scenario rule is configured as
["error", 2, true], counting tag lines toward the total, so the eight
scenarios that lost their tag get back the blank line it occupied.

Drop the "viewer" row from the same-name Examples table in
moveByFileId.feature: "viewer" is not a valid space role for a
permissionsRole invitation, so the step errored with
Role 'viewer' not found, and the "Space Viewer" row already covers
the 403.
2026-08-14 10:50:35 +02:00
Lukas Hirt 2063b84b8f fix(deployment): downgrade drawio image to 0.4.1 in ocis_full example (#12795)
0.4.1 is the latest available version of the draw-io web-extensions image.

Signed-off-by: Lukas Hirt <info@hirt.cz>
2026-08-14 08:50:13 +02:00
Lukas Hirt a3601009ac fix(deployments): support Collabora Online 26.x in ocis_full example (#12794)
* fix(deployments): support Collabora Online 26.x in ocis_full example

collabora/code 26.x dropped the shell (no /bin/bash, no /bin/sh) and the
coolconfig helper the ocis_full example relied on to start the container
and generate its WOPI proof key, so the deployment failed to start and,
once patched to start, would reject every document open with a 500 since
the collaboration service enforces WOPI proof-key verification by default.

Drop the custom bash entrypoint (the image's default entrypoint already
honors extra_params/username/password via --use-env-vars), replace the
bash-based healthcheck with the built-in "coolwsd --probe", and add a
one-shot init container that generates and persists the WOPI proof key
on the host before Collabora starts.

Signed-off-by: Lukas Hirt <info@hirt.cz>

* fix(deployments): self-heal a bad WOPI proof key in ocis_full example

The collabora-proof-key-init container only checked "does /keys/proof_key
exist" before skipping generation. If the collabora service's single-file
bind mount of that path ever won the race against the init container (e.g.
on the very first `docker compose up`, or after an interrupted run), Docker
silently created a directory there instead of a file, which then persisted
across restarts and made coolwsd fail to load the proof key with an
EVPPKey::loadKey DECODER error, breaking WOPI CheckFileInfo for good.

Validate any existing proof_key with `openssl rsa -check` and remove it
before regenerating if it's missing, not a regular file, or invalid, so a
bad state (directory, truncated write, corrupt key) heals itself on the
next start instead of requiring a manual `rm -rf` of the generated config.

Signed-off-by: Lukas Hirt <info@hirt.cz>

---------

Signed-off-by: Lukas Hirt <info@hirt.cz>
2026-08-14 08:42:35 +02:00
Nalem7 86105b86af [tests-only][full-ci] test: add retry once for space creation wherever required (#12785)
test: add retry once for space creation

Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
2026-08-14 12:11:34 +05:45
Pradip Subedi 6dc967e583 [tests-only][full-ci] test: enable secure viewer role before upload in moveReceivedShare scenarios (#12786)
test: enable secure viewer role before upload in moveReceivedShare scenarios
2026-08-14 09:18:37 +05:45
Pradip Subedi af7d39d1b6 [tests-only][full-ci] test: Add acceptance test for empty CallToAction notification translation fix (#12616)
* test: add tests email after changing default language

* test: fix other feature files cleanup

* test: restore unrelated files

* test: add missing unshare strings to test translation fixture

* test: add missing space in email body

* test: assert full translated unshare email and sync userlog fixture

* test: remove unused negative email content step
2026-08-14 09:15:56 +05:45
Lukas Hirt e21e19470b feat(app-store): update app store repository to use ownCloud Marketplace (#12793)
Signed-off-by: Lukas Hirt <info@hirt.cz>
2026-08-13 21:46:59 +02:00
owncloud-translations-bot[bot] 74ae9bf88d chore: update translations from transifex (#12771)
Co-authored-by: owncloud-translations-bot[bot] <274778013+owncloud-translations-bot[bot]@users.noreply.github.com>
2026-08-13 13:54:04 +02:00
Michal Klos d9bae04aee feat: [OCISDEV-1115] harden nats communication (#12777)
* feat: [OCISDEV-1115] harden nats communication

* feat: bump reva for tls-enabled stores
2026-08-13 09:56:24 +00:00
Pradip Subedi 5a2c1cc351 [tests-only] test: add vault public link scenarios (#12735)
test: add vault public link rejection scenarios
2026-08-13 14:53:57 +05:45
Nalem7 4684d3d4ee [tests-only][full-ci] test: add test for space manager removing members (#12776)
test: add test for space manager removing members

Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
2026-08-13 11:42:30 +05:45
Prajwol Amatya c53e2f773e [tests-only][full-ci] test: fix flaky e2e test for tag search (#12780)
test: login user after creating resources via API

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>
2026-08-13 11:13:38 +05:45
donmor 3b5bad6ade fix(web): use light logo in light mode (in dark blue background) (#12782) 2026-08-12 19:43:08 +02:00
Alexander Salimonov 81527e98e4 fix: pass mount id to the s3ng storage driver (#12756)
* fix: pass mount id to the s3ng storage driver

Uploads to a s3ng backed storage-users service never left the processing
state, leaving the file unreadable and unmodifiable. This affects every
client equally: WebDAV, the desktop sync client and the web UI.

Decomposedfs discards any event whose storage id does not match its
configured mount id. Only the ocis driver was ever given a mount_id, so
under s3ng the comparison ran against an empty string and every
PostprocessingFinished event was dropped.

Regression since 8.1.0, where the mount-id event filter was introduced
for vault storage.

* fix: adding mount_id in OcisNoEvents and S3NGNoEvents
2026-08-12 10:55:08 +02:00
donmor 36d5089424 Generate web timestamp by env/git log; make it buildable without .git (#12758)
* fix(web): generate web timestamp by env SOURCE_DATE_EPOCH or git log (#12757)

* fix(web): suppress error when make in non-git directory (e.g. source tarballs)

* chore: add changelog for pull 12758

* fix(web): fix env description in changelog; remove cwd from execSync

* fix(web): fix format (prettier check)
2026-08-12 09:03:26 +02:00
Prajwol Amatya f6628b6264 [tests-only][full-ci] test: fix flaky e2e test in e2e-part-3 (#12778)
* test: slow down test run

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>

* test: scope temp upload path per Playwright worker

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>

---------

Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>
2026-08-12 12:30:12 +05:45
Juan Pablo Villafañez 597104629a fix: use specific gookit config instance instance of using global (#12769)
* fix: use specific gookit config instance instance of using global

Using the global instance was causing a panic when the service was
restarted. That panic won't happen now.

* chore: add changelog entry
2026-08-11 17:48:46 +02:00
Michal Klos 6d3e10c120 fix: [OCISDEV-660] harden GetUserDrive (#12742) 2026-08-11 08:27:14 +00:00
Matteo 8ea724c8a4 chore: remove Vue warnings in web (#12767)
- ResourceTile: drop leading eslint comment (fragment root) and add
  role=presentation so fallthrough attrs and drag listeners inherit and
  the element ref resolves to the card; fixes drag-and-drop crash on tiles
- markRaw components passed as extension/folder-view data to avoid
  reactive-component warnings
- web-app-external: wrap iframe/form in a single root element
- AppWrapper: type currentContent as string
2026-08-10 14:53:47 +02:00
Michal Klos 90148451c8 chore: bump go and web packages (#12765)
* chore: bump go packages

* chore: bump web packages
2026-08-10 11:43:14 +02:00
owncloud-translations-bot[bot] 101e9d6404 chore: update translations from transifex (#12755)
Co-authored-by: owncloud-translations-bot[bot] <274778013+owncloud-translations-bot[bot]@users.noreply.github.com>
2026-08-10 09:03:28 +02:00
Gaurav Soni 07f2a8bba9 fix(web): [OCISDEV-996] truncate long resource names instead of overlapping the next column (#12754)
fix(web): [OCISDEV-996] truncate long resource names instead of overlapping next column

Add `min-width: 0` to `.oc-resource` so the inline-flex item can shrink
below its content width. Without it the automatic min-content floor kept
the element at full name width, painting the name over the adjacent
column's value. The existing `oc-text-truncate` rule on the name span can
now take effect and truncate with an ellipsis at the column boundary.

Most visible in the Spaces overview, where a long space name overlapped
the "Manager" column, but it affected every resource table using the name
column, including the files list and search results.
2026-08-07 16:22:30 +02:00
kobergj 1d70560428 feat(storage-users): add recalculate-treesize command (#12746)
feat(storage-users): [OCISDEV-1203] add recalculate-treesize command

The treesize of a directory is maintained as a running counter that is updated
on every change, so a failed or incomplete update leaves the counter wrong and
the reported quota usage of a space drifts from the data on disk. Removing a node
without propagating the size change leaves its size counted against the quota
with no way to reclaim it.

Add a command that walks a space bottom up, recalculates the treesize of every
directory from the actual size of its children and corrects the stored values:

    ocis storage-users spaces recalculate-treesize --space-id <id>

As with the other maintenance commands --dry-run defaults to true, so the
command reports what it would change until explicitly told to write.

Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
2026-08-07 15:16:12 +02:00
Matteo 3da140042c fix(web): remove focus from file name in app top bar (#12752)
The open file name in the top bar was tabbable via keyboard even
though it is not clickable, which was confusing during keyboard
navigation.
2026-08-07 12:48:50 +00:00
Gaurav Soni f975f00120 fix(web): [OCISDEV-1168] open files whose name contains a hash or question mark (#12740)
Cmd+Clicking or middle-clicking a file with a `#` or `?` in its name opened the
space root instead of the file, and the top bar showed the space name rather than
the file name. The file's path is carried in a route parameter which the router
percent-encodes when it builds the URL, but the editor route was resolved twice
and resolving twice does not encode twice: the second pass rebuilt the URL from
the still-decoded parameter with the encoding step skipped. The browser then read
everything from the `#` onward as a fragment, discarding the query string along
with the `fileId` needed to identify the file. Left clicks were unaffected because
they never leave the app.

Editor routes are now handed to links unresolved, so the file name is encoded
exactly once and survives both a new tab and an in-app navigation. Hash and
question mark remain valid characters in file names.
2026-08-07 12:41:34 +02:00
Matteo e1ee0d01ef chore(web): update dep js-yml to 4.3.1 (#12747) 2026-08-07 11:17:29 +02:00
589 changed files with 30608 additions and 8868 deletions

No files matched your search

+3
View File
@@ -60,6 +60,9 @@ go.work
go.work.sum
.env
.envrc
# generated secrets for deployment examples (e.g. Collabora WOPI proof key)
deployments/examples/*/config/collabora/
CLAUDE.md
.claude/
GEMINI.md
@@ -0,0 +1,10 @@
Bugfix: Support Collabora Online 26.x in the ocis_full deployment example
collabora/code 26.x ships without a shell and without the `coolconfig` helper the
ocis_full example relied on to start the container and generate its WOPI proof
key, so the example failed to start and, once running, would reject every
document open with a 500. The example now uses the image's default entrypoint
and a one-shot init container that generates and persists the WOPI proof key
before Collabora starts.
https://github.com/owncloud/ocis/pull/12794
@@ -0,0 +1,10 @@
Bugfix: Ignore write error after successful read
In the settings service, we're caching data in the NATSjs store. When reading
service information, that information is written in the cache. Previously,
failing to write that information in the cache caused an error, despite
correct information being retrieved from the service successfully. Now, if the
information isn't written in the cache, we log the failure, but return the
read information without error.
https://github.com/owncloud/ocis/pull/12772
@@ -0,0 +1,12 @@
Bugfix: Restarting the proxy service on error was causing panics
Starting oCIS with the `ocis server` command causes oCIS to monitor the
services being started. When a service fails to start, this monitor tries
to restart the services. For the cause of the proxy service, restarting it
was a panic.
Now, the proxy service can be restarted as expected, without that panic.
Note that the service might still fail to start if the actual cause isn't
fixed, such as the service's port being taken by a different application.
https://github.com/owncloud/ocis/pull/12769
@@ -0,0 +1,10 @@
Bugfix: Remove keyboard focus from open file name in top bar
When opening a file such as a text or markdown document, the file name shown
in the top bar could be reached via keyboard tabbing even though it was not
clickable and triggered no action. This made keyboard navigation confusing.
The file name is no longer part of the tab order, since it is a purely
informational, non-interactive element.
https://github.com/owncloud/ocis/pull/12752
@@ -0,0 +1,15 @@
Bugfix: Renaming a resource to its current name is a silent no-op
Renaming a file or folder to the name it already has failed with a
confusing `403 Forbidden` or `404 Not Found`, and `409 Conflict` when the
request addressed the resource by its id. Every client had to work around
it on its own. A `MOVE` whose source and destination resolve to the same
resource is now detected server side and answered with `204 No Content`
without touching the resource, so the behaviour is consistent for all
clients and for both dav routes. The no-op still requires the move
permission: a user who may not rename the resource keeps getting
`403 Forbidden`.
https://github.com/owncloud/ocis/pull/12784
https://github.com/owncloud/reva/pull/708
https://github.com/owncloud/reva/pull/713
@@ -0,0 +1,14 @@
Bugfix: Truncate long resource names instead of overlapping the next column
In resource tables, a name that was too long for its column was not truncated.
Instead it kept its full width and was painted over the value of the adjacent
column, making both unreadable. This was most visible in the Spaces overview,
where a long space name overlapped the "Manager" column, but it affected every
resource table using the name column, including the files list and search
results, as well as the parent folder path shown below a search result.
The name is now truncated with an ellipsis at the column boundary, and the
rename button stays inside the name column. The full name remains available via
the title tooltip on hover.
https://github.com/owncloud/ocis/pull/12754
@@ -0,0 +1,20 @@
Bugfix: Fix uploads stuck in processing with the s3ng storage driver
Uploads to a `s3ng` backed storage-users service never left the processing
state, so the file stayed unreadable and unmodifiable forever. Every client was
affected equally, because the defect sits below the protocol layer: WebDAV, the
desktop sync client and the Web UI alike.
Decomposedfs ignores any event whose storage id does not match its configured
mount id. The `s3ng` driver never received a `mount_id`, so that comparison ran
against an empty string and every `PostprocessingFinished` event was discarded.
The `s3ng` driver now passes `mount_id` the same way the `ocis` driver already
does.
The same key is also added to `OcisNoEvents` and `S3NGNoEvents`. Those build the
storage provider rather than the data provider and configure no events, so today
the value is unused there. Setting it keeps both constructions of the same
storage consistent about their own identity, rather than leaving one of them to
report an empty mount id to any future reader of that option.
https://github.com/owncloud/ocis/pull/12756
@@ -0,0 +1,9 @@
Bugfix: Fix shift-click range selection in the files list
We have fixed an issue where shift-click did not select resources between
the anchor and the clicked one, and ignored ctrl/cmd. It now selects the
full range, replacing the current selection unless ctrl/cmd is held, and no
longer highlights the text of the affected rows. Checkboxes now also keep their
checked state in sync with the selection when a click does not change it.
https://github.com/owncloud/ocis/pull/12804
@@ -0,0 +1,10 @@
Enhancement: Restrict personal drive information to the owner and admins
The `/graph/v1.0/users/{userID}/drive`, `/graph/v1.0/drives/{driveID}` and
`/graph/v1.0/drives` endpoints now drop personal spaces the caller does not own
unless the caller holds account management permission, leaving project and other
shared space types unaffected. The single-drive and per-user lookups return the
same `404` as a missing drive, so the response does not depend on the target
user's existence.
https://github.com/owncloud/ocis/pull/12742
@@ -0,0 +1,8 @@
Enhancement: Add TLS support for NATS store and registry connections
All `nats-js-kv` store, cache, and service registry connections now support
TLS. Configure via `OCIS_CACHE_ENABLE_TLS`, `OCIS_PERSISTENT_STORE_ENABLE_TLS`,
and `MICRO_REGISTRY_ENABLE_TLS`, with corresponding `*_TLS_INSECURE` and
`*_TLS_ROOT_CA_CERTIFICATE` variants per connection type.
https://github.com/owncloud/ocis/pull/12765
@@ -0,0 +1,21 @@
Enhancement: Add a command to recalculate the treesize of a space
The reported quota usage of a space can drift from the data actually stored on
disk. The treesize of a directory is maintained as a running counter that is
updated on every change, so a failed or incomplete update leaves the counter
wrong. Removing a node without propagating the size change, for example, leaves
its size counted against the quota forever, with no way to reclaim it.
The new command walks a space bottom up, recalculates the treesize of every
directory from the actual size of its children and corrects the stored values:
```
ocis storage-users spaces recalculate-treesize --space-id <id>
ocis storage-users spaces recalculate-treesize --space-id <id> --dry-run=false
```
Omit `--space-id` to process all spaces. As with the other maintenance commands,
`--dry-run` defaults to true, so the command reports what it would change until
it is explicitly told to write.
https://github.com/owncloud/ocis/pull/12746
@@ -0,0 +1,5 @@
Enhancement: Update app store repository
We've updated the default app store repository to use the new ownCloud Marketplace instead of the awesome-ocis repository. The default Content-Security-Policy configuration was also updated to allow connections to the new marketplace domain.
https://github.com/owncloud/ocis/pull/12793
@@ -0,0 +1,17 @@
Bugfix: Open files whose name contains a hash or question mark
Cmd+Clicking or middle-clicking a file with a `#` or `?` in its name opened the
space root instead of the file, and the top bar showed the space name rather than
the file name. The file's path is carried in a route parameter which the router
percent-encodes when it builds the URL, but the editor route was resolved twice
and resolving twice does not encode twice: the second pass rebuilt the URL from
the still-decoded parameter with the encoding step skipped. The browser then read
everything from the `#` onward as a fragment, discarding the query string along
with the `fileId` needed to identify the file. Left clicks were unaffected because
they never leave the app.
Editor routes are now handed to links unresolved, so the file name is encoded
exactly once and survives both a new tab and an in-app navigation. Hash and
question mark remain valid characters in file names.
https://github.com/owncloud/ocis/pull/12740
@@ -0,0 +1,5 @@
fix(web): Use light logo in light mode (with dark blue topbar)
The light theme actually have a dark blue topbar and login screen, where the dark logo is applied and can hardly be seen. This patch changes it to logo.svg (the light logo).
https://github.com/owncloud/ocis/pull/12782
@@ -0,0 +1,5 @@
Bugfix: Generate web timestamp by env/git log; make it buildable without .git
Change compilationTimeStamp to distTimeStamp, set its value from env SOURCE_DATE_EPOCH, or timestamp of last git commit, or fallback to current time. Also fixes a problem that raises an error during make ci-node-generate due to running git clean -xfd in a non-repository directory (usually an extracted source tarball), showing a message instead.
https://github.com/owncloud/ocis/pull/12758
+4 -1
View File
@@ -212,7 +212,7 @@ TIKA_DOCKER_TAG=latest-full
COLLABORA=:collabora.yml
# The recommended (and tested) version to pull. If no version is used, it pulls "latest"
# release notes: https://www.collaboraonline.com/release-notes/
COLLABORA_DOCKER_TAG=25.04.9.3.1
COLLABORA_DOCKER_TAG=26.04.3.1.1
# Domain of Collabora, where you can find the frontend.
# Defaults to "collabora.owncloud.test"
COLLABORA_DOMAIN=
@@ -229,6 +229,9 @@ COLLABORA_SSL_ENABLE=false
# If you're on an internet-facing server, enable SSL verification for Collabora Online.
# Please comment out the following line:
COLLABORA_SSL_VERIFICATION=false
# Path to persist the Collabora Online WOPI proof key across container restarts (auto-generated on first start).
# Leaving it default stores it in ./config/collabora relative to this compose project.
# COLLABORA_CONFIG_DIR=/your/local/collabora/config
## Supplemental Configurations ##
+26 -3
View File
@@ -48,10 +48,33 @@ services:
driver: ${LOG_DRIVER:-local}
restart: always
# Since collabora/code 26.x, the image ships without a shell (no /bin/bash, no /bin/sh) and
# without the "coolconfig" helper that used to generate the WOPI proof key on startup.
# This one-shot container generates and persists that key on the host before "collabora" starts.
collabora-proof-key-init:
image: alpine/openssl:latest
user: root
entrypoint: ["/bin/sh", "-c"]
command:
- |
if [ -e /keys/proof_key ] && ! openssl rsa -in /keys/proof_key -check -noout >/dev/null 2>&1; then
echo "/keys/proof_key is missing, not a regular file, or invalid; regenerating" >&2
rm -rf /keys/proof_key
fi
if [ ! -f /keys/proof_key ]; then
openssl genrsa -out /keys/proof_key 2048
chmod 644 /keys/proof_key
fi
volumes:
- ${COLLABORA_CONFIG_DIR:-./config/collabora}:/keys
collabora:
image: collabora/code:${COLLABORA_DOCKER_TAG}
networks:
ocis-net:
depends_on:
collabora-proof-key-init:
condition: service_completed_successfully
environment:
DONT_GEN_SSL_CERT: "YES"
extra_params: |
@@ -62,6 +85,8 @@ services:
--o:net.frame_ancestors=${OCIS_DOMAIN:-ocis.owncloud.test}
username: ${COLLABORA_ADMIN_USER:-admin}
password: ${COLLABORA_ADMIN_PASSWORD:-admin}
volumes:
- ${COLLABORA_CONFIG_DIR:-./config/collabora}/proof_key:/etc/coolwsd/proof_key:ro
cap_add:
- MKNOD
labels:
@@ -74,7 +99,5 @@ services:
logging:
driver: ${LOG_DRIVER:-local}
restart: always
entrypoint: ['/bin/bash', '-c']
command: ['coolconfig generate-proof-key && /start-collabora-online.sh']
healthcheck:
test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/127.0.0.1/9980 && echo -e 'GET /hosting/discovery HTTP/1.1\r\nHost: localhost:9980\r\n\r\n' >&3 && head -n 1 <&3 | grep '200 OK'"]
test: ["CMD", "/usr/bin/coolwsd", "--probe"]
@@ -7,6 +7,7 @@ directives:
- 'https://${COMPANION_DOMAIN|companion.owncloud.test}/'
- 'wss://${COMPANION_DOMAIN|companion.owncloud.test}/'
- 'https://raw.githubusercontent.com/owncloud/awesome-ocis/'
- 'https://marketplace.owncloud.com/'
# In contrary to bash and docker the default is given after the | character
- 'https://${KEYCLOAK_DOMAIN|keycloak.owncloud.test}/'
# Photo-addon: OpenStreetMap tile requests
@@ -32,6 +33,7 @@ directives:
- 'data:'
- 'blob:'
- 'https://raw.githubusercontent.com/owncloud/awesome-ocis/'
- 'https://marketplace.owncloud.com/'
# In contrary to bash and docker the default is given after the | character
- 'https://${ONLYOFFICE_DOMAIN|onlyoffice.owncloud.test}/'
- 'https://${COLLABORA_DOMAIN|collabora.owncloud.test}/'
@@ -6,7 +6,7 @@ services:
condition: service_completed_successfully
drawio-init:
image: owncloud/web-extensions:draw-io-0.4.4
image: owncloud/web-extensions:draw-io-0.4.1
user: root
volumes:
- ocis-apps:/apps
@@ -5,6 +5,7 @@ directives:
- '''self'''
- 'blob:'
- 'https://raw.githubusercontent.com/owncloud/awesome-ocis/'
- 'https://marketplace.owncloud.com/'
# In contrary to bash and docker the default is given after the | character
- 'https://${KEYCLOAK_DOMAIN|keycloak.owncloud.test}/'
default-src:
@@ -23,6 +24,7 @@ directives:
- 'data:'
- 'blob:'
- 'https://raw.githubusercontent.com/owncloud/awesome-ocis/'
- 'https://marketplace.owncloud.com/'
manifest-src:
- '''self'''
media-src:
@@ -5,6 +5,7 @@ directives:
- '''self'''
- 'blob:'
- 'https://raw.githubusercontent.com/owncloud/awesome-ocis/'
- 'https://marketplace.owncloud.com/'
- 'https://${KEYCLOAK_DOMAIN|keycloak.owncloud.test}/'
default-src:
- '''none'''
@@ -24,6 +25,7 @@ directives:
- 'data:'
- 'blob:'
- 'https://raw.githubusercontent.com/owncloud/awesome-ocis/'
- 'https://marketplace.owncloud.com/'
manifest-src:
- '''self'''
media-src:
@@ -5,6 +5,7 @@ directives:
- '''self'''
- 'blob:'
- 'https://raw.githubusercontent.com/owncloud/awesome-ocis/'
- 'https://marketplace.owncloud.com/'
# In contrary to bash and docker the default is given after the | character
- 'https://${KEYCLOAK_DOMAIN|keycloak.owncloud.test}/'
default-src:
@@ -23,6 +24,7 @@ directives:
- 'data:'
- 'blob:'
- 'https://raw.githubusercontent.com/owncloud/awesome-ocis/'
- 'https://marketplace.owncloud.com/'
manifest-src:
- '''self'''
media-src:
@@ -5,6 +5,7 @@ directives:
- '''self'''
- 'blob:'
- 'https://raw.githubusercontent.com/owncloud/awesome-ocis/'
- 'https://marketplace.owncloud.com/'
default-src:
- '''none'''
font-src:
@@ -23,6 +24,7 @@ directives:
- 'data:'
- 'blob:'
- 'https://raw.githubusercontent.com/owncloud/awesome-ocis/'
- 'https://marketplace.owncloud.com/'
manifest-src:
- '''self'''
media-src:
@@ -5,6 +5,7 @@ directives:
- '''self'''
- 'blob:'
- 'https://raw.githubusercontent.com/owncloud/awesome-ocis/'
- 'https://marketplace.owncloud.com/'
default-src:
- '''none'''
font-src:
@@ -25,6 +26,7 @@ directives:
- 'data:'
- 'blob:'
- 'https://raw.githubusercontent.com/owncloud/awesome-ocis/'
- 'https://marketplace.owncloud.com/'
# In contrary to bash and docker the default is given after the | character
- 'https://${COLLABORA_DOMAIN|collabora.ocm.next.owncloud.test}/'
manifest-src:
@@ -5,6 +5,7 @@ directives:
- '''self'''
- 'blob:'
- 'https://raw.githubusercontent.com/owncloud/awesome-ocis/'
- 'https://marketplace.owncloud.com/'
default-src:
- '''none'''
font-src:
@@ -25,6 +26,7 @@ directives:
- 'data:'
- 'blob:'
- 'https://raw.githubusercontent.com/owncloud/awesome-ocis/'
- 'https://marketplace.owncloud.com/'
# In contrary to bash and docker the default is given after the | character
- 'https://${ONLYOFFICE_DOMAIN|onlyoffice.owncloud.test}/'
manifest-src:
+30 -30
View File
@@ -45,7 +45,7 @@ require (
github.com/gookit/config/v2 v2.2.9
github.com/gorilla/mux v1.8.1
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0
github.com/invopop/validation v0.8.0
github.com/jellydator/ttlcache/v2 v2.11.1
github.com/jellydator/ttlcache/v3 v3.4.1
@@ -58,16 +58,16 @@ require (
github.com/mitchellh/mapstructure v1.5.0
github.com/mna/pigeon v1.3.0
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826
github.com/nats-io/nats-server/v2 v2.14.4
github.com/nats-io/nats.go v1.52.0
github.com/nats-io/nats-server/v2 v2.14.5
github.com/nats-io/nats.go v1.53.1
github.com/olekukonko/tablewriter v1.1.4
github.com/onsi/ginkgo v1.16.5
github.com/onsi/ginkgo/v2 v2.32.0
github.com/onsi/ginkgo/v2 v2.32.1
github.com/onsi/gomega v1.42.1
github.com/open-policy-agent/opa v1.19.0
github.com/orcaman/concurrent-map v1.0.0
github.com/owncloud/libre-graph-api-go v1.0.5-0.20260216101009-eeac018af245
github.com/owncloud/reva/v2 v2.0.0-20260807095944-8056f5e1297e
github.com/owncloud/reva/v2 v2.0.0-20260821144357-79bb0520701d
github.com/pkg/errors v0.9.1
github.com/pkg/xattr v0.4.12
github.com/prometheus/client_golang v1.24.1
@@ -76,7 +76,7 @@ require (
github.com/rs/cors v1.11.1
github.com/rs/zerolog v1.35.1
github.com/shamaton/msgpack/v2 v2.4.1
github.com/sirupsen/logrus v1.9.4
github.com/sirupsen/logrus v1.10.0
github.com/spf13/afero v1.15.0
github.com/spf13/cobra v1.10.2
github.com/stretchr/testify v1.11.1
@@ -89,25 +89,25 @@ require (
github.com/xhit/go-simple-mail/v2 v2.16.0
go-micro.dev/v4 v4.11.0
go.etcd.io/bbolt v1.5.0
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.69.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0
go.opentelemetry.io/contrib/zpages v0.69.0
go.opentelemetry.io/otel v1.44.0
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.70.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.70.0
go.opentelemetry.io/contrib/zpages v0.70.0
go.opentelemetry.io/otel v1.45.0
go.opentelemetry.io/otel/exporters/jaeger v1.17.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.44.0
go.opentelemetry.io/otel/sdk v1.44.0
go.opentelemetry.io/otel/trace v1.44.0
golang.org/x/crypto v0.54.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.45.0
go.opentelemetry.io/otel/sdk v1.45.0
go.opentelemetry.io/otel/trace v1.45.0
golang.org/x/crypto v0.55.0
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f
golang.org/x/image v0.44.0
golang.org/x/net v0.57.0
golang.org/x/image v0.45.0
golang.org/x/net v0.58.0
golang.org/x/oauth2 v0.36.0
golang.org/x/sync v0.22.0
golang.org/x/term v0.45.0
golang.org/x/text v0.40.0
google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa
golang.org/x/text v0.41.0
google.golang.org/genproto/googleapis/api v0.0.0-20260803160001-6ac0973c030d
google.golang.org/grpc v1.83.0
google.golang.org/protobuf v1.36.11
google.golang.org/protobuf v1.36.12
gopkg.in/yaml.v2 v2.4.0
gotest.tools/v3 v3.5.2
stash.kopano.io/kgol/rndm v1.1.2
@@ -155,7 +155,7 @@ require (
github.com/blevesearch/zapx/v17 v17.1.2 // indirect
github.com/bluele/gcache v0.0.2 // indirect
github.com/bombsimon/logrusr/v3 v3.1.0 // indirect
github.com/ceph/go-ceph v0.40.0 // indirect
github.com/ceph/go-ceph v0.41.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cevaris/ordered_map v0.0.0-20190319150403-3adeae072e73 // indirect
github.com/clipperhouse/displaywidth v0.11.0 // indirect
@@ -182,14 +182,14 @@ require (
github.com/emvi/iso-639-1 v1.1.1 // indirect
github.com/evanphx/json-patch/v5 v5.5.0 // indirect
github.com/fatih/color v1.19.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/felixge/httpsnoop v1.1.0 // indirect
github.com/fsnotify/fsnotify v1.10.1 // indirect
github.com/gdexlab/go-render v1.0.1 // indirect
github.com/go-acme/lego/v4 v4.34.0 // indirect
github.com/go-asn1-ber/asn1-ber v1.5.8 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.9.0 // indirect
github.com/go-git/go-git/v5 v5.19.1 // indirect
github.com/go-git/go-git/v5 v5.19.2 // indirect
github.com/go-jose/go-jose/v3 v3.0.5 // indirect
github.com/go-jose/go-jose/v4 v4.1.4 // indirect
github.com/go-kit/log v0.2.1 // indirect
@@ -239,7 +239,7 @@ require (
github.com/json-iterator/go v1.1.13-0.20220915233716-71ac16282d12 // indirect
github.com/juliangruber/go-intersect v1.1.0 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.19.1 // indirect
github.com/klauspost/compress v1.19.2 // indirect
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
github.com/klauspost/crc32 v1.3.0 // indirect
github.com/kovidgoyal/go-parallel v1.1.1 // indirect
@@ -333,19 +333,19 @@ require (
go.etcd.io/etcd/client/v3 v3.7.1 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0 // indirect
go.opentelemetry.io/otel/metric v1.44.0 // indirect
go.opentelemetry.io/proto/otlp v1.10.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.45.0 // indirect
go.opentelemetry.io/otel/metric v1.45.0 // indirect
go.opentelemetry.io/proto/otlp v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.1 // indirect
go.yaml.in/yaml/v2 v2.4.4 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/mod v0.37.0 // indirect
go.yaml.in/yaml/v3 v3.0.5 // indirect
golang.org/x/mod v0.40.0 // indirect
golang.org/x/sys v0.47.0 // indirect
golang.org/x/time v0.15.0 // indirect
golang.org/x/tools v0.47.0 // indirect
golang.org/x/tools v0.49.0 // indirect
google.golang.org/genproto v0.0.0-20260319201613-d00831a3d3e7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260803160001-6ac0973c030d // indirect
gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect
gopkg.in/ini.v1 v1.67.3 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
+64 -63
View File
@@ -167,8 +167,8 @@ github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QH
github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM=
github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/ceph/go-ceph v0.40.0 h1:Wz9WOX6i73Hz74mpwhTO9S6IyX3eFPv88VUc7FRMPRk=
github.com/ceph/go-ceph v0.40.0/go.mod h1:1oFtT/x/4y+teLsNiogdd/Kj81Gmrw6JM5w1bWnZoc4=
github.com/ceph/go-ceph v0.41.0 h1:uATh5+zR1KWOQCoBYj4uEfuAPsSccajOGXWW8u8UTgA=
github.com/ceph/go-ceph v0.41.0/go.mod h1:8tvljRxQ65aEtRt7aCxzuPpN7tiwPHCPPSuAqQ5teCY=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
@@ -256,8 +256,8 @@ github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYF
github.com/fatih/color v1.19.0 h1:Zp3PiM21/9Ld6FzSKyL5c/BULoe/ONr9KlbYVOfG8+w=
github.com/fatih/color v1.19.0/go.mod h1:zNk67I0ZUT1bEGsSGyCZYZNrHuTkJJB+r6Q9VuMi0LE=
github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/felixge/httpsnoop v1.1.0 h1:3YtUj32ZZkqZtt3sZZsClsymw/QDuVfpNhoA31zeORc=
github.com/felixge/httpsnoop v1.1.0/go.mod h1:Zqxgdd+1Rkcz8euOqdr7lqgCRJztwr5hp9vDSi5UZCE=
github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=
github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
github.com/foxcpp/go-mockdns v1.2.0 h1:omK3OrHRD1IWJz1FuFBCFquhXslXoF17OvBS6JPzZF0=
@@ -298,8 +298,8 @@ github.com/go-git/go-billy/v5 v5.9.0 h1:jItGXszUDRtR/AlferWPTMN4j38BQ88XnXKbilmm
github.com/go-git/go-billy/v5 v5.9.0/go.mod h1:jCnQMLj9eUgGU7+ludSTYoZL/GGmii14RxKFj7ROgHw=
github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4=
github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII=
github.com/go-git/go-git/v5 v5.19.1 h1:nX27AnaU43/K5bKktKwgBmR9lawoYVe1Ckg0rgzzN00=
github.com/go-git/go-git/v5 v5.19.1/go.mod h1:Pb1v0c7/g8aGQJwx9Us09W85yGoyvSwuhEGMH7zjDKQ=
github.com/go-git/go-git/v5 v5.19.2 h1:wkfn7vOlUBu8ivAWKBWisTiwJK4jYHzTF8Ndv1LyGqY=
github.com/go-git/go-git/v5 v5.19.2/go.mod h1:QqCBE1EFN5ddFmrliLQ3/ntRCUjZU3EJuwuB/jWEHjk=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
@@ -393,8 +393,8 @@ github.com/gofrs/flock v0.13.0 h1:95JolYOvGMqeH31+FC7D2+uULf6mG61mEZ/A8dRYMzw=
github.com/gofrs/flock v0.13.0/go.mod h1:jxeyy9R1auM5S6JYDBhDt+E2TCo7DkratH4Pgi8P+Z0=
github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA=
github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/gofrs/uuid/v5 v5.4.0 h1:EfbpCTjqMuGyq5ZJwxqzn3Cbr2d0rUZU7v5ycAk/e/0=
github.com/gofrs/uuid/v5 v5.4.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8=
github.com/gofrs/uuid/v5 v5.5.0 h1:FkPv6jYQRbZtH3bD8yC7106u+CedTCLF8+t7CLHSZNo=
github.com/gofrs/uuid/v5 v5.5.0/go.mod h1:bbAA98EoIlxyRHIVg6ektCSsZ5n8mSbwgEhvhMYlZgg=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI=
@@ -499,8 +499,8 @@ github.com/gorilla/schema v1.4.1 h1:jUg5hUjCSDZpNGLuXQOgIWGdlgrIdYvgQ0wZtdK1M3E=
github.com/gorilla/schema v1.4.1/go.mod h1:Dg5SSm5PV60mhF2NFaTV1xuYYj8tV8NOPRo4FggUMnM=
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI=
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0 h1:5VipnvEpbqr2gA2VbM+nYVbkIF28c5ZQfqCBQ5g2xfk=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0/go.mod h1:Hyl3n6Twe1hvtd9XUXDec4pTvgMSEixRuQKPTMH2bNs=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 h1:/Tnpcb2E0Pz/tN9s3bfEY2Q8ePCEX9iuS+cneUwncnw=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0/go.mod h1:zOBXOsUaBSjKgmH4OGzV1esUpR3oUSCPYVd2cUBjKYY=
github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k=
github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
github.com/hashicorp/go-plugin v1.8.0 h1:ie8S6RRY8RvB2usYZv+AAZ/wBvx2AU5p5QeP5j/FORs=
@@ -573,8 +573,8 @@ github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4
github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.19.1 h1:VsB4HPswih7mmZ8WleSFQ75c/Ui1M4trX5oAsJnhSlk=
github.com/klauspost/compress v1.19.1/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ=
github.com/klauspost/compress v1.19.2 h1:hMRETovs/pu/dVWN7zIT1PGG8t509MwT6bO7XSi26R8=
github.com/klauspost/compress v1.19.2/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ=
github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y=
github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
@@ -696,10 +696,10 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/nats-io/jwt/v2 v2.8.2 h1:XXRgB60MSTnqsRwejQurVDs/hcv2dkt+86GjI+I/bMc=
github.com/nats-io/jwt/v2 v2.8.2/go.mod h1:Ag/56sq9OblL4JgdYufDd16Egb17Kr/8WwwuO/forVc=
github.com/nats-io/nats-server/v2 v2.14.4 h1:efgjZ8cdExAKRuqSg8UPJFprb+l7NlBtSDPhDlw3rO4=
github.com/nats-io/nats-server/v2 v2.14.4/go.mod h1:BltdpOYestjbtQSnVO2zGHdg5SGBZjt+GYTgB9LZq/I=
github.com/nats-io/nats.go v1.52.0 h1:n3avV4VBsCgsdwh71TppsTwtv+QdPs7ntSKM8qJLGsc=
github.com/nats-io/nats.go v1.52.0/go.mod h1:26HypzazeOkyO3/mqd1zZd53STJN0EjCYF9Uy2ZOBno=
github.com/nats-io/nats-server/v2 v2.14.5 h1:M6yeo/Xb7khi97RSEVELof3DForDqmYza3P4tHCPFWw=
github.com/nats-io/nats-server/v2 v2.14.5/go.mod h1:1D3iocrisKvWaD1B/imqarTqmaGrWMqALMLbEDo3v7Q=
github.com/nats-io/nats.go v1.53.1 h1:Otsq3uLc/kLdjmkNHkXH0jBqwUquwdKFoe3fq6/3/Xo=
github.com/nats-io/nats.go v1.53.1/go.mod h1:26HypzazeOkyO3/mqd1zZd53STJN0EjCYF9Uy2ZOBno=
github.com/nats-io/nkeys v0.4.16 h1:rd5oAuLOb8mnAycB0xleuEBNS1pVVnN0fv/FF34Eypg=
github.com/nats-io/nkeys v0.4.16/go.mod h1:llLgWoI0o4z/Q57q2R1kHfmocyhGV6VG/U18Glg1Afs=
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
@@ -721,8 +721,8 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
github.com/onsi/ginkgo/v2 v2.32.0 h1:Hw7s2pVrQo/8Yz5N77qdnpHaoc+c6cC9WIV1Jce+J6E=
github.com/onsi/ginkgo/v2 v2.32.0/go.mod h1:+aXOY+vzZ5mu2iI2HpTZUPmM//oQfsNFX6gU9kNcA44=
github.com/onsi/ginkgo/v2 v2.32.1 h1:6tlvcDm/3sE8lGJbZ4+d4mO3RLy24/tQWOFzVSQNIfw=
github.com/onsi/ginkgo/v2 v2.32.1/go.mod h1:+aXOY+vzZ5mu2iI2HpTZUPmM//oQfsNFX6gU9kNcA44=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.42.1 h1:iN1rCUX+44NZ1Dc97MPoeFYbFR0vh8zxoxMFwKdyZ6I=
@@ -736,8 +736,8 @@ github.com/orcaman/concurrent-map v1.0.0 h1:I/2A2XPCb4IuQWcQhBhSwGfiuybl/J0ev9HD
github.com/orcaman/concurrent-map v1.0.0/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI=
github.com/owncloud/libre-graph-api-go v1.0.5-0.20260216101009-eeac018af245 h1:JRidLTAKhnvyLMRtVtSF4lhBa0NSAOs6fof+d6JnKII=
github.com/owncloud/libre-graph-api-go v1.0.5-0.20260216101009-eeac018af245/go.mod h1:z61VMGAJRtR1nbgXWiNoCkxUXP1B3Je9rMuJbnGd+Og=
github.com/owncloud/reva/v2 v2.0.0-20260807095944-8056f5e1297e h1:VyezYtf9tz6COz9sIk2i2szESueBPTI79KEOSR8I8Ug=
github.com/owncloud/reva/v2 v2.0.0-20260807095944-8056f5e1297e/go.mod h1:XBnHPPDOGYq+Uf/PD1wGXne3xTvoghBxXPUULcSZjlc=
github.com/owncloud/reva/v2 v2.0.0-20260821144357-79bb0520701d h1:aXW5V1zEJnBZTciBDug02m1eEMkA/mHKer1PiBSoHOk=
github.com/owncloud/reva/v2 v2.0.0-20260821144357-79bb0520701d/go.mod h1:DGoRFcaZdpikfpo14QD9gPHUDw6oodKdFOrVLSa1raA=
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw=
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0=
github.com/pablodz/inotifywaitgo v0.0.12 h1:DVJJTFMDlSAdO46yisPF2vzozs/r+4k6ih8MVghq78M=
@@ -846,8 +846,8 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w=
github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g=
github.com/sirupsen/logrus v1.10.0 h1:T8MxJJXVZkfcC5zSRMRAg2F8+lxjmUCGGWPzFxO+Msc=
github.com/sirupsen/logrus v1.10.0/go.mod h1:FXZFonkDAnFozmO+5hGAFvB0Yg9/j2SIhA/QuIkP180=
github.com/skeema/knownhosts v1.3.1 h1:X2osQ+RAjK76shCbvhHHHVl3ZlgDm8apHEHFqRjnBY8=
github.com/skeema/knownhosts v1.3.1/go.mod h1:r7KTdC8l4uxWRyK2TpQZ/1o5HaSzh06ePQNxPwTcfiY=
github.com/spacewander/go-suffix-tree v0.0.0-20191010040751-0865e368c784 h1:0jjO3HdJfOn6gYHD/ZNZh0LLMxEAqkYX7xoDPQReEgs=
@@ -965,30 +965,30 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.69.0 h1:2yEATaop1/a1I4psnSLgWVPLWwCzkqWakgJy7xTDVy0=
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.69.0/go.mod h1:D7J12YRapIekYyPWgGPlA/23pRmpSEZC5xJC/TTLI9U=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0 h1:8tvICD4vSTOOsNrsI4Ljf6C+6UKvpTEH5XY3JMoyPoo=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0/go.mod h1:z9+yiacE0IHRqM4qFfkbt/JYlmYXgss8GY/jXoNuPJI=
go.opentelemetry.io/contrib/zpages v0.69.0 h1:YQC1PumJq6lUGQNrLW14ID9a0dXSBcbC/aC6VRSIARU=
go.opentelemetry.io/contrib/zpages v0.69.0/go.mod h1:FGvUcMGN5atRzUIgUsqOi+MiMvlQsfbuYATBHPP4cGs=
go.opentelemetry.io/otel v1.44.0 h1:JjwHmHpA4iZ3wBxluu2fbbE7j4kqlE8jXyAyPXH7HqU=
go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc=
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.70.0 h1:oECp5f+hN7nkwjU/8BxQ/q23bGPb8FIrD839owX222E=
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.70.0/go.mod h1:DqEFwLumhzMBDQv9PcWbyoDxHI/4lAk6CM4nJBH39sc=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.70.0 h1:LMuyCAyfalSjDyjdC65nK6N0zoTT63+E/u95X0JovZI=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.70.0/go.mod h1:085m8qbm4hgc8rZWGDEa4vmyyo2c3nPxUslYUKUIU04=
go.opentelemetry.io/contrib/zpages v0.70.0 h1:uBcclHekIrCRLO4KZfXiebDcWB52QQXaHGgvhUJ1K5I=
go.opentelemetry.io/contrib/zpages v0.70.0/go.mod h1:Nz9A1+68HVoJrk+cg92zJbcbHFAa+Jbl1uINwAlcK94=
go.opentelemetry.io/otel v1.45.0 h1:pdrWmLHofpubmArBv1LgFSv1Z0Ie/ppdZzu+kUN5EeU=
go.opentelemetry.io/otel v1.45.0/go.mod h1:XZxIqPapzEYnhNSScF5DIqXhm/rYi0FzCe2XddAwZfQ=
go.opentelemetry.io/otel/exporters/jaeger v1.17.0 h1:D7UpUy2Xc2wsi1Ras6V40q806WM07rqoCWzXu7Sqy+4=
go.opentelemetry.io/otel/exporters/jaeger v1.17.0/go.mod h1:nPCqOnEH9rNLKqH/+rrUjiMzHJdV1BlpKcTwRTyKkKI=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0 h1:4YsVu3B8+3qtWYYrsUYgn0OG78pN0rnNPRGX4SbokQI=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0/go.mod h1:+wnlSn0mD1ADVMe3v9Z/WIaiz6q6gL2J/ejaAmdmv80=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.44.0 h1:qazEJlUOQzhCpzQpFETGby7EdqjI1wsd0W+6Gg1SCTU=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.44.0/go.mod h1:fOD2Yefuxixkx3ahVNf0O/PERb6r4OlbxfATVnYvzCo=
go.opentelemetry.io/otel/metric v1.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSYCdDdmc=
go.opentelemetry.io/otel/metric v1.44.0/go.mod h1:8O7hanEPBNgEMmybD3s2VBKcgWOCsA6tzHBPODAiquo=
go.opentelemetry.io/otel/sdk v1.44.0 h1:nHYwb9lK+fJPU/dnT6s7W7Z8itMWyqrnVfbheVYrZ58=
go.opentelemetry.io/otel/sdk v1.44.0/go.mod h1:Osuydd3Se74nqjAKxid74N5eC+jfEqfTegHRnq58oK0=
go.opentelemetry.io/otel/sdk/metric v1.44.0 h1:3LlKgI+VjbVsjNRFZJZAJ30WjXC5VkNRks6si09iEfI=
go.opentelemetry.io/otel/sdk/metric v1.44.0/go.mod h1:5B5pMARnXxKhltooO4xUuCBorl65a4EpnTalObqOigA=
go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/6gtIk=
go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE=
go.opentelemetry.io/proto/otlp v1.10.0 h1:IQRWgT5srOCYfiWnpqUYz9CVmbO8bFmKcwYxpuCSL2g=
go.opentelemetry.io/proto/otlp v1.10.0/go.mod h1:/CV4QoCR/S9yaPj8utp3lvQPoqMtxXdzn7ozvvozVqk=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.45.0 h1:QRefszxJmfPdjXUUm3j6iDzY03mTPXMjqErFqQ67vUg=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.45.0/go.mod h1:Tiz03lTBVBrm7eWZBOidzEaYaJa8tjwGUGv6d8mlTyk=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.45.0 h1:fG5MCxGz8+2VtrN/WgqSpJFctVz24gpxj8CxkKmc8Ww=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.45.0/go.mod h1:BmAYTn+3ysbRe+IU2msxmf5Rx3g6DHvex+tWI3LdhYI=
go.opentelemetry.io/otel/metric v1.45.0 h1:7Eg1uH7CJ5cXv9is6tnBe1FI6rj1nwUdbFypRm3br/M=
go.opentelemetry.io/otel/metric v1.45.0/go.mod h1:HAPbm1nd3p1PmFH7v2dR+6BjXxw+Lq4a2+pndMAm08s=
go.opentelemetry.io/otel/sdk v1.45.0 h1:4VVSMgQ83dUgW2aoX5f6JgLvHwIvzcuLnF9lUdCSpCw=
go.opentelemetry.io/otel/sdk v1.45.0/go.mod h1:Sr40LgXV7DsKMMJMKOhUWOgMWTfAaqvm2kF0g7ilwuA=
go.opentelemetry.io/otel/sdk/metric v1.45.0 h1:oVFszMfyj1Am6s24Vtc7wBb8BKLcwepJjNEYILuiE3o=
go.opentelemetry.io/otel/sdk/metric v1.45.0/go.mod h1:vUWUxDZvu1WVRj8JA8S0AdhsPrZoDpA2DdZauIh4mDA=
go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOyVhxag=
go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc=
go.opentelemetry.io/proto/otlp v1.11.0 h1:5rrYs0Ykyj50sdU/JU0x8etU+LubXWb+gED6TbEdMIk=
go.opentelemetry.io/proto/otlp v1.11.0/go.mod h1:SmVizdCOAm3XBtG1g1NnOdhW6jtddT72hLMhv8VwA8E=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
@@ -1001,8 +1001,9 @@ go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc=
go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
go.yaml.in/yaml/v2 v2.4.4 h1:tuyd0P+2Ont/d6e2rl3be67goVK4R6deVxCUX5vyPaQ=
go.yaml.in/yaml/v2 v2.4.4/go.mod h1:gMZqIpDtDqOfM0uNfy0SkpRhvUryYH0Z6wdMYcacYXQ=
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw=
go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
@@ -1014,8 +1015,8 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
golang.org/x/crypto v0.54.0 h1:YLIA59K4fiNzHzjnZt2tUJQjQtUWfWbeHBqKtk3eScw=
golang.org/x/crypto v0.54.0/go.mod h1:KWL8ny2AZdGR2cWmzeHrp2azQPGogOv+HeQaVEXC2dk=
golang.org/x/crypto v0.55.0 h1:+KWHjbgOaAQ66dh/YlkZKHlz9ZUlq61AFirAR9ntP8M=
golang.org/x/crypto v0.55.0/go.mod h1:uq0V9dE/fzQuJtbnL+2EhWOE63vo164FY8xqEnV9xis=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -1030,8 +1031,8 @@ golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f h1:W3F4c+6OLc6H2lb//N1q4WpJk
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f/go.mod h1:J1xhfL/vlindoeF/aINzNzt2Bket5bjo9sdOYzOsU80=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.44.0 h1:+tDekMZED9+LrtB3G5xzRggpVh9CARjZqROla3R3R+I=
golang.org/x/image v0.44.0/go.mod h1:V8K3KE9KKKE+pLpQDOeN18w9oacNSvy1tDOirTu4xtY=
golang.org/x/image v0.45.0 h1:FMb1nTbH5H9vF55SriQHgFw5GnNL9Jg6L25BwXKzhB0=
golang.org/x/image v0.45.0/go.mod h1:n62x/7RqlwXDvGsSU4u6IUTUf6KghUZ9Bt7cG/T9Fx4=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
@@ -1053,8 +1054,8 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.37.0 h1:vF1DjpVEshcIqoEaauuHebaLk1O1forxjxBaVn884JQ=
golang.org/x/mod v0.37.0/go.mod h1:m8S8VeM9r4dzDwjrKO0a1sZP3YjeMamRRlD+fmR2Q/0=
golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs=
golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -1098,8 +1099,8 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/net v0.57.0 h1:K5+3DljvIuDG9/Jv9rvyMywYNFCQ9RSUY6OOTTkT+tE=
golang.org/x/net v0.57.0/go.mod h1:KpXc8iv+r3XplLAG/f7Jsf9RPszJzdR0f58q9vGOuEU=
golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To=
golang.org/x/net v0.58.0/go.mod h1:YwCddHnFlT7eLQqVprV19OnhLGtc5xOKgE0RyqgfWAU=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -1209,8 +1210,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.40.0 h1:Ub2Z6/xjgF1WrYQz2nuITOEegKFtiIy+rieRJ5lHZKs=
golang.org/x/text v0.40.0/go.mod h1:hpnzDAfGV753zIKo+wk3u1bVKCGPbrnF7+7LBF/UHVY=
golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8=
golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -1263,8 +1264,8 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.0.0-20210112230658-8b4aab62c064/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.47.0 h1:7Kn5x/d1svx/PzryTsqeoZN4TZwqeH5pGWjefhLi/1Q=
golang.org/x/tools v0.47.0/go.mod h1:dFHnyTvFWY212G+h7ZY4Vsp/K3U4/7W9TyVaAul8uCA=
golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI=
golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -1325,10 +1326,10 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20260319201613-d00831a3d3e7 h1:XzmzkmB14QhVhgnawEVsOn6OFsnpyxNPRY9QV01dNB0=
google.golang.org/genproto v0.0.0-20260319201613-d00831a3d3e7/go.mod h1:L43LFes82YgSonw6iTXTxXUX1OlULt4AQtkik4ULL/I=
google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa h1:Kjn0N0tCrDgiAFW+lGO4JZ3ck44CehvJQMAwj9QF0G8=
google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa/go.mod h1:q4lMZS6kskjT5HvCPrnnypcDPVJqT/f4nfxmkE7gryY=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa h1:mZHHdPZl0dbGHCflZgAq/Q468DWVFcU2whhB2KAo8fk=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=
google.golang.org/genproto/googleapis/api v0.0.0-20260803160001-6ac0973c030d h1:FarXi840EJWSHYTN3ERkADbPWjl307+FGrA22KAVjjc=
google.golang.org/genproto/googleapis/api v0.0.0-20260803160001-6ac0973c030d/go.mod h1:K/+WGbmBY7aNW1HDw1fJnKYo10i0DkAX6pows00dLig=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260803160001-6ac0973c030d h1:IL4hdHzcUv2l/gcg98/Rj3FbtE6axwqslOW8SW0C+S0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260803160001-6ac0973c030d/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
@@ -1360,8 +1361,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc=
google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/cenkalti/backoff.v1 v1.1.0 h1:Arh75ttbsvlpVA7WtVpH4u9h6Zl46xuptxqLxPiSo4Y=
gopkg.in/cenkalti/backoff.v1 v1.1.0/go.mod h1:J6Vskwqd+OMVJl8C33mmtxTBs2gyzfv7UDAkHu8BrjI=
+30 -4
View File
@@ -3,6 +3,7 @@ package natsjsregistry
import (
"context"
"crypto/tls"
"encoding/json"
"errors"
"fmt"
@@ -14,6 +15,7 @@ import (
natsjskv "github.com/go-micro/plugins/v4/store/nats-js-kv"
"github.com/nats-io/nats.go"
"github.com/owncloud/ocis/v2/ocis-pkg/generators"
revastore "github.com/owncloud/reva/v2/pkg/store"
"go-micro.dev/v4/registry"
"go-micro.dev/v4/server"
"go-micro.dev/v4/store"
@@ -21,10 +23,13 @@ import (
)
var (
_registryName = "nats-js-kv"
_registryAddressEnv = "MICRO_REGISTRY_ADDRESS"
_registryUsernameEnv = "MICRO_REGISTRY_AUTH_USERNAME"
_registryPasswordEnv = "MICRO_REGISTRY_AUTH_PASSWORD"
_registryName = "nats-js-kv"
_registryAddressEnv = "MICRO_REGISTRY_ADDRESS"
_registryUsernameEnv = "MICRO_REGISTRY_AUTH_USERNAME"
_registryPasswordEnv = "MICRO_REGISTRY_AUTH_PASSWORD"
_registryEnableTLSEnv = "MICRO_REGISTRY_ENABLE_TLS"
_registryTLSInsecureEnv = "MICRO_REGISTRY_TLS_INSECURE"
_registryTLSRootCAEnv = "MICRO_REGISTRY_TLS_ROOT_CA_CERTIFICATE"
_serviceDelimiter = "@"
)
@@ -211,6 +216,10 @@ func (n *storeregistry) storeOptions(opts registry.Options) []store.Option {
natsOptions := nats.GetDefaultOptions()
natsOptions.Name = generators.GenerateConnectionName(serviceName, generators.NTypeRegistry)
natsOptions.User, natsOptions.Password = getAuth()
if tlsConf := getTLS(); tlsConf != nil {
natsOptions.TLSConfig = tlsConf
natsOptions.Secure = true
}
natsOptions.ReconnectedCB = func(_ *nats.Conn) {
if err := n.Init(); err != nil {
fmt.Println("cannot reconnect to nats")
@@ -233,3 +242,20 @@ func (n *storeregistry) storeOptions(opts registry.Options) []store.Option {
func getAuth() (string, string) {
return os.Getenv(_registryUsernameEnv), os.Getenv(_registryPasswordEnv)
}
var (
_tlsOnce sync.Once
_tlsConfig *tls.Config
)
func getTLS() *tls.Config {
_tlsOnce.Do(func() {
if os.Getenv(_registryEnableTLSEnv) != "true" {
return
}
insecure := os.Getenv(_registryTLSInsecureEnv) == "true"
rootCA := os.Getenv(_registryTLSRootCAEnv)
_tlsConfig = revastore.BuildNatsTLSConfig(insecure, rootCA)
})
return _tlsConfig
}
+5 -2
View File
@@ -62,8 +62,11 @@ type Cache struct {
Table string `yaml:"table" env:"OCIS_CACHE_STORE_TABLE" desc:"The database table the store should use." introductionVersion:"pre5.0"`
TTL time.Duration `yaml:"ttl" env:"OCIS_CACHE_TTL" desc:"Time to live for events in the store. The duration can be set as number followed by a unit identifier like s, m or h." introductionVersion:"pre5.0"`
DisablePersistence bool `yaml:"disable_persistence" env:"OCIS_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"5.0"`
AuthUsername string `yaml:"auth_username" env:"OCIS_CACHE_AUTH_USERNAME" desc:"The username to use for authentication. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"pre5.0"`
AuthPassword string `yaml:"auth_password" env:"OCIS_CACHE_AUTH_PASSWORD" desc:"The password to use for authentication. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"pre5.0"`
AuthUsername string `yaml:"auth_username" env:"OCIS_CACHE_AUTH_USERNAME" desc:"The username to use for authentication. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"pre5.0"`
AuthPassword string `yaml:"auth_password" env:"OCIS_CACHE_AUTH_PASSWORD" desc:"The password to use for authentication. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"pre5.0"`
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS" desc:"Activate TLS for the connection to the NATS store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE" desc:"Disable TLS certificate verification for the NATS store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate used to validate the NATS store TLS certificate. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
}
// Commons holds configuration that are common to all extensions. Each extension can then decide whether
@@ -90,6 +90,7 @@ func Server(cfg *config.Config) *cli.Command {
microstore.Database(cfg.Store.Database),
microstore.Table(cfg.Store.Table),
store.Authentication(cfg.Store.AuthUsername, cfg.Store.AuthPassword),
store.TLS(cfg.Store.EnableTLS, cfg.Store.TLSInsecure, cfg.Store.TLSRootCACertificate),
)
tm, err := pool.StringToTLSMode(cfg.GRPCClientTLS.Mode)
+5 -2
View File
@@ -52,8 +52,11 @@ type Store struct {
Database string `yaml:"database" env:"ACTIVITYLOG_STORE_DATABASE" desc:"The database name the configured store should use." introductionVersion:"pre5.0"`
Table string `yaml:"table" env:"ACTIVITYLOG_STORE_TABLE" desc:"The database table the store should use." introductionVersion:"pre5.0"`
TTL time.Duration `yaml:"ttl" env:"OCIS_PERSISTENT_STORE_TTL;ACTIVITYLOG_STORE_TTL" desc:"Time to live for events in the store. See the Environment Variable Types description for more details." introductionVersion:"pre5.0"`
AuthUsername string `yaml:"username" env:"OCIS_PERSISTENT_STORE_AUTH_USERNAME;ACTIVITYLOG_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthPassword string `yaml:"password" env:"OCIS_PERSISTENT_STORE_AUTH_PASSWORD;ACTIVITYLOG_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthUsername string `yaml:"username" env:"OCIS_PERSISTENT_STORE_AUTH_USERNAME;ACTIVITYLOG_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthPassword string `yaml:"password" env:"OCIS_PERSISTENT_STORE_AUTH_PASSWORD;ACTIVITYLOG_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
EnableTLS bool `yaml:"enable_tls" env:"OCIS_PERSISTENT_STORE_ENABLE_TLS;ACTIVITYLOG_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_PERSISTENT_STORE_TLS_INSECURE;ACTIVITYLOG_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;ACTIVITYLOG_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
}
// ServiceAccount is the configuration for the used service account
@@ -83,6 +83,7 @@ func Server(cfg *config.Config) *cli.Command {
microstore.Database(cfg.Store.Database),
microstore.Table(cfg.Store.Table),
store.Authentication(cfg.Store.AuthUsername, cfg.Store.AuthPassword),
store.TLS(cfg.Store.EnableTLS, cfg.Store.TLSInsecure, cfg.Store.TLSRootCACertificate),
)
gr := runner.NewGroup()
+5 -2
View File
@@ -9,6 +9,9 @@ type Store struct {
Database string `yaml:"database" env:"COLLABORATION_STORE_DATABASE" desc:"The database name the configured store should use." introductionVersion:"7.0.0"`
Table string `yaml:"table" env:"COLLABORATION_STORE_TABLE" desc:"The database table the store should use." introductionVersion:"7.0.0"`
TTL time.Duration `yaml:"ttl" env:"OCIS_PERSISTENT_STORE_TTL;COLLABORATION_STORE_TTL" desc:"Time to live for events in the store. Defaults to '30m' (30 minutes). See the Environment Variable Types description for more details." introductionVersion:"7.0.0"`
AuthUsername string `yaml:"username" env:"OCIS_PERSISTENT_STORE_AUTH_USERNAME;COLLABORATION_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"7.0.0"`
AuthPassword string `yaml:"password" env:"OCIS_PERSISTENT_STORE_AUTH_PASSWORD;COLLABORATION_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"7.0.0"`
AuthUsername string `yaml:"username" env:"OCIS_PERSISTENT_STORE_AUTH_USERNAME;COLLABORATION_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"7.0.0"`
AuthPassword string `yaml:"password" env:"OCIS_PERSISTENT_STORE_AUTH_PASSWORD;COLLABORATION_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"7.0.0"`
EnableTLS bool `yaml:"enable_tls" env:"OCIS_PERSISTENT_STORE_ENABLE_TLS;COLLABORATION_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_PERSISTENT_STORE_TLS_INSECURE;COLLABORATION_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;COLLABORATION_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
}
@@ -72,6 +72,7 @@ func Server(cfg *config.Config) *cli.Command {
microstore.Database(cfg.Store.Database),
microstore.Table(cfg.Store.Table),
store.Authentication(cfg.Store.AuthUsername, cfg.Store.AuthPassword),
store.TLS(cfg.Store.EnableTLS, cfg.Store.TLSInsecure, cfg.Store.TLSRootCACertificate),
)
service := grpc.NewService(
+5 -2
View File
@@ -42,8 +42,11 @@ type Store struct {
Database string `yaml:"database" env:"EVENTHISTORY_STORE_DATABASE" desc:"The database name the configured store should use." introductionVersion:"pre5.0"`
Table string `yaml:"table" env:"EVENTHISTORY_STORE_TABLE" desc:"The database table the store should use." introductionVersion:"pre5.0"`
TTL time.Duration `yaml:"ttl" env:"OCIS_PERSISTENT_STORE_TTL;EVENTHISTORY_STORE_TTL" desc:"Time to live for events in the store. Defaults to '336h' (2 weeks). See the Environment Variable Types description for more details." introductionVersion:"pre5.0"`
AuthUsername string `yaml:"username" env:"OCIS_PERSISTENT_STORE_AUTH_USERNAME;EVENTHISTORY_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthPassword string `yaml:"password" env:"OCIS_PERSISTENT_STORE_AUTH_PASSWORD;EVENTHISTORY_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthUsername string `yaml:"username" env:"OCIS_PERSISTENT_STORE_AUTH_USERNAME;EVENTHISTORY_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthPassword string `yaml:"password" env:"OCIS_PERSISTENT_STORE_AUTH_PASSWORD;EVENTHISTORY_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
EnableTLS bool `yaml:"enable_tls" env:"OCIS_PERSISTENT_STORE_ENABLE_TLS;EVENTHISTORY_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_PERSISTENT_STORE_TLS_INSECURE;EVENTHISTORY_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;EVENTHISTORY_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
}
// Events combines the configuration options for the event bus.
+1 -1
View File
@@ -34,7 +34,7 @@ type Config struct {
EnableFederatedSharingIncoming bool `yaml:"enable_federated_sharing_incoming" env:"OCIS_ENABLE_OCM;FRONTEND_ENABLE_FEDERATED_SHARING_INCOMING" desc:"Changing this value is NOT supported. Enables support for incoming federated sharing for clients. The backend behaviour is not changed." introductionVersion:"pre5.0"`
EnableFederatedSharingOutgoing bool `yaml:"enable_federated_sharing_outgoing" env:"OCIS_ENABLE_OCM;FRONTEND_ENABLE_FEDERATED_SHARING_OUTGOING" desc:"Changing this value is NOT supported. Enables support for outgoing federated sharing for clients. The backend behaviour is not changed." introductionVersion:"pre5.0"`
EnableUserSharing bool `yaml:"enable_user_sharing" env:"OCIS_ENABLE_USER_SHARING" desc:"Enables direct sharing with users and groups. When disabled, creating new user or group shares is rejected and searching for users to share with is disabled. Public link sharing is not affected." introductionVersion:"%%NEXT_PRODUCTION_VERSION%%"`
EnablePublicSharing bool `yaml:"enable_public_sharing" env:"OCIS_ENABLE_PUBLIC_SHARING" desc:"Enables public link sharing. When disabled, creating new public links is rejected. Direct sharing with users and groups is not affected." introductionVersion:"%%NEXT_PRODUCTION_VERSION%%"`
EnablePublicSharing bool `yaml:"enable_public_sharing" env:"OCIS_ENABLE_PUBLIC_SHARING" desc:"Enables public link sharing. When disabled, creating new public links is rejected. Direct sharing with users and groups is not affected." introductionVersion:"8.2.0"`
SearchMinLength int `yaml:"search_min_length" env:"FRONTEND_SEARCH_MIN_LENGTH" desc:"Minimum number of characters to enter before a client should start a search for Share receivers. This setting can be used to customize the user experience if e.g too many results are displayed." introductionVersion:"pre5.0"`
UserSearchDisplayedAttributes []string `yaml:"user_search_displayed_attributes" env:"OCIS_USER_SEARCH_DISPLAYED_ATTRIBUTES;FRONTEND_USER_SEARCH_DISPLAYED_ATTRIBUTES" desc:"A list of user attributes to display in the user search results." introductionVersion:"7.3.0"`
Edition string `yaml:"edition" env:"OCIS_EDITION;FRONTEND_EDITION" desc:"Edition of oCIS. Used for branding purposes." introductionVersion:"pre5.0"`
+5 -2
View File
@@ -93,6 +93,9 @@ type Cache struct {
ProviderCacheDatabase string `yaml:"provider_cache_database" env:"OCIS_CACHE_DATABASE" desc:"The database name the configured store should use." introductionVersion:"pre5.0"`
ProviderCacheTTL time.Duration `yaml:"provider_cache_ttl" env:"OCIS_CACHE_TTL;GATEWAY_PROVIDER_CACHE_TTL" desc:"Default time to live for user info in the cache. Only applied when access tokens has no expiration. See the Environment Variable Types description for more details." introductionVersion:"pre5.0"`
ProviderCacheDisablePersistence bool `yaml:"provider_cache_disable_persistence" env:"OCIS_CACHE_DISABLE_PERSISTENCE;GATEWAY_PROVIDER_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the provider cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"5.0"`
ProviderCacheAuthUsername string `yaml:"provider_cache_auth_username" env:"OCIS_CACHE_AUTH_USERNAME;GATEWAY_PROVIDER_CACHE_AUTH_USERNAME" desc:"The username to use for authentication. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
ProviderCacheAuthPassword string `yaml:"provider_cache_auth_password" env:"OCIS_CACHE_AUTH_PASSWORD;GATEWAY_PROVIDER_CACHE_AUTH_PASSWORD" desc:"The password to use for authentication. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
ProviderCacheAuthUsername string `yaml:"provider_cache_auth_username" env:"OCIS_CACHE_AUTH_USERNAME;GATEWAY_PROVIDER_CACHE_AUTH_USERNAME" desc:"The username to use for authentication. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
ProviderCacheAuthPassword string `yaml:"provider_cache_auth_password" env:"OCIS_CACHE_AUTH_PASSWORD;GATEWAY_PROVIDER_CACHE_AUTH_PASSWORD" desc:"The password to use for authentication. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
ProviderCacheEnableTLS bool `yaml:"provider_cache_enable_tls" env:"OCIS_CACHE_ENABLE_TLS;GATEWAY_PROVIDER_CACHE_ENABLE_TLS" desc:"Activate TLS for the connection to the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
ProviderCacheTLSInsecure bool `yaml:"provider_cache_tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;GATEWAY_PROVIDER_CACHE_TLS_INSECURE" desc:"Disable TLS certificate verification for the cache store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
ProviderCacheTLSRootCACertificate string `yaml:"provider_cache_tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;GATEWAY_PROVIDER_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the cache store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
}
+5 -2
View File
@@ -72,8 +72,11 @@ func GatewayConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]i
"cache_table": "provider",
"cache_ttl": cfg.Cache.ProviderCacheTTL,
"disable_persistence": cfg.Cache.ProviderCacheDisablePersistence,
"cache_auth_username": cfg.Cache.ProviderCacheAuthUsername,
"cache_auth_password": cfg.Cache.ProviderCacheAuthPassword,
"cache_auth_username": cfg.Cache.ProviderCacheAuthUsername,
"cache_auth_password": cfg.Cache.ProviderCacheAuthPassword,
"cache_enable_tls": cfg.Cache.ProviderCacheEnableTLS,
"cache_tls_insecure": cfg.Cache.ProviderCacheTLSInsecure,
"cache_tls_root_ca_certificate": cfg.Cache.ProviderCacheTLSRootCACertificate,
},
},
"authregistry": map[string]interface{}{
+5 -2
View File
@@ -10,6 +10,9 @@ type Cache struct {
Table string `yaml:"table" env:"GRAPH_CACHE_STORE_TABLE" desc:"The database table the store should use." introductionVersion:"pre5.0"`
TTL time.Duration `yaml:"ttl" env:"OCIS_CACHE_TTL;GRAPH_CACHE_TTL" desc:"Time to live for cache records in the graph. Defaults to '336h' (2 weeks). See the Environment Variable Types description for more details." introductionVersion:"pre5.0"`
DisablePersistence bool `yaml:"disable_persistence" env:"OCIS_CACHE_DISABLE_PERSISTENCE;GRAPH_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"5.0"`
AuthUsername string `yaml:"username" env:"OCIS_CACHE_AUTH_USERNAME;GRAPH_CACHE_AUTH_USERNAME" desc:"The username to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthPassword string `yaml:"password" env:"OCIS_CACHE_AUTH_PASSWORD;GRAPH_CACHE_AUTH_PASSWORD" desc:"The password to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthUsername string `yaml:"username" env:"OCIS_CACHE_AUTH_USERNAME;GRAPH_CACHE_AUTH_USERNAME" desc:"The username to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthPassword string `yaml:"password" env:"OCIS_CACHE_AUTH_PASSWORD;GRAPH_CACHE_AUTH_PASSWORD" desc:"The password to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS;GRAPH_CACHE_ENABLE_TLS" desc:"Activate TLS for the connection to the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;GRAPH_CACHE_TLS_INSECURE" desc:"Disable TLS certificate verification for the cache store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;GRAPH_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the cache store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
}
+41
View File
@@ -8,6 +8,7 @@ import (
"net/http"
"net/url"
"path"
"slices"
"sort"
"strconv"
"strings"
@@ -260,6 +261,12 @@ func (g Graph) getDrives(r *http.Request, unrestricted bool, apiVersion APIVersi
return nil, errorcode.New(errorcode.GeneralException, err.Error())
}
// An unrestricted listing includes other users' personal spaces; drop the
// ones the caller may not see (project/shared spaces are unaffected).
if unrestricted {
spaces = g.filterForeignPersonalSpaces(ctx, spaces)
}
spaces, err = sortSpaces(odataReq, spaces)
if err != nil {
logger.Debug().Err(err).Msg("could not get drives: error sorting the spaces list according to query")
@@ -269,6 +276,37 @@ func (g Graph) getDrives(r *http.Request, unrestricted bool, apiVersion APIVersi
return spaces, nil
}
// filterForeignPersonalSpaces drops personal spaces the caller does not own,
// unless the caller holds full account management permission (OCISDEV-660).
func (g Graph) filterForeignPersonalSpaces(ctx context.Context, spaces []*libregraph.Drive) []*libregraph.Drive {
user, ok := revactx.ContextGetUser(ctx)
if !ok {
// No caller identity: drop every personal space rather than leak it.
return slices.DeleteFunc(slices.Clone(spaces), func(d *libregraph.Drive) bool {
return d.GetDriveType() == _spaceTypePersonal
})
}
callerID := user.GetId().GetOpaqueId()
isForeignPersonal := func(d *libregraph.Drive) bool {
if d.GetDriveType() != _spaceTypePersonal {
return false
}
owner := d.GetOwner()
ownerUser := owner.GetUser()
return ownerUser.GetId() != callerID
}
if !slices.ContainsFunc(spaces, isForeignPersonal) {
return spaces
}
if g.contextUserHasFullAccountPerms(ctx) {
return spaces
}
return slices.DeleteFunc(slices.Clone(spaces), isForeignPersonal)
}
// GetSingleDrive V1 does a lookup of a single space by spaceId
func (g Graph) GetSingleDrive(w http.ResponseWriter, r *http.Request) {
g.getSingleDrive(w, r, APIVersion_1)
@@ -331,6 +369,9 @@ func (g Graph) getSingleDrive(w http.ResponseWriter, r *http.Request, apiVersion
errorcode.GeneralException.Render(w, r, http.StatusInternalServerError, err.Error())
return
}
// Runs unrestricted, so decomposedfs skips per-node checks; drop a foreign
// personal space here so it renders the same 404 as a missing drive below.
spaces = g.filterForeignPersonalSpaces(ctx, spaces)
switch num := len(spaces); {
case num == 0:
log.Debug().Msg("could not get drive: no drive returned from storage")
+171
View File
@@ -1345,6 +1345,177 @@ var _ = Describe("Graph", func() {
})
})
Describe("Foreign personal drive access (OCISDEV-660)", func() {
var (
callerCtx = func(opaqueID string) context.Context {
return revactx.ContextSetUser(context.Background(), &userprovider.User{
Id: &userprovider.UserId{Type: userprovider.UserType_USER_TYPE_PRIMARY, OpaqueId: opaqueID},
})
}
personalSpace = func(owner string) *provider.StorageSpace {
return &provider.StorageSpace{
Id: &provider.StorageSpaceId{OpaqueId: "targetspace"},
SpaceType: "personal",
Owner: &userprovider.User{Id: &userprovider.UserId{OpaqueId: owner}},
Root: &provider.ResourceId{
StorageId: "pro-1",
SpaceId: "targetspace",
OpaqueId: "targetspace",
},
Name: "targetuser",
}
}
projectSpace = func(owner string) *provider.StorageSpace {
return &provider.StorageSpace{
Id: &provider.StorageSpaceId{OpaqueId: "projectspace"},
SpaceType: "project",
Owner: &userprovider.User{Id: &userprovider.UserId{OpaqueId: owner}},
Root: &provider.ResourceId{
StorageId: "pro-1",
SpaceId: "projectspace",
OpaqueId: "projectspace",
},
Name: "aproject",
}
}
mockAccountPerms = func(constraint v0.Permission_Constraint) {
permissionService.On("GetPermissionByID", mock.Anything, mock.Anything).Return(&settingssvc.GetPermissionByIDResponse{
Permission: &v0.Permission{Constraint: constraint},
}, nil)
}
mockSpaceFormatting = func() {
gatewayClient.On("GetQuota", mock.Anything, mock.Anything).Return(&provider.GetQuotaResponse{
Status: status.NewUnimplemented(ctx, fmt.Errorf("not supported"), "not supported"),
}, nil)
gatewayClient.On("InitiateFileDownload", mock.Anything, mock.Anything).Return(&gateway.InitiateFileDownloadResponse{
Status: status.NewNotFound(ctx, "not found"),
}, nil)
}
)
Describe("GetSingleDrive", func() {
singleDriveReq := func(userCtx context.Context) *http.Request {
r := httptest.NewRequest(http.MethodGet, "/graph/v1.0/drives/{driveID}/", nil)
rctx := chi.NewRouteContext()
rctx.URLParams.Add("driveID", "targetspace")
return r.WithContext(context.WithValue(userCtx, chi.RouteCtxKey, rctx))
}
It("returns 404 when a non-admin looks up another user's personal drive", func() {
mockSpaceFormatting()
mockAccountPerms(v0.Permission_CONSTRAINT_OWN)
gatewayClient.On("ListStorageSpaces", mock.Anything, mock.Anything).Return(&provider.ListStorageSpacesResponse{
Status: status.NewOK(ctx),
StorageSpaces: []*provider.StorageSpace{personalSpace("targetuser")},
}, nil)
svc.GetSingleDrive(rr, singleDriveReq(callerCtx("otheruser")))
Expect(rr.Code).To(Equal(http.StatusNotFound))
})
It("returns the personal drive to a full-account admin", func() {
mockSpaceFormatting()
mockAccountPerms(v0.Permission_CONSTRAINT_ALL)
gatewayClient.On("ListStorageSpaces", mock.Anything, mock.Anything).Return(&provider.ListStorageSpacesResponse{
Status: status.NewOK(ctx),
StorageSpaces: []*provider.StorageSpace{personalSpace("targetuser")},
}, nil)
svc.GetSingleDrive(rr, singleDriveReq(callerCtx("admin")))
Expect(rr.Code).To(Equal(http.StatusOK))
})
It("returns the owner's own personal drive", func() {
mockSpaceFormatting()
mockAccountPerms(v0.Permission_CONSTRAINT_OWN)
gatewayClient.On("ListStorageSpaces", mock.Anything, mock.Anything).Return(&provider.ListStorageSpacesResponse{
Status: status.NewOK(ctx),
StorageSpaces: []*provider.StorageSpace{personalSpace("targetuser")},
}, nil)
svc.GetSingleDrive(rr, singleDriveReq(callerCtx("targetuser")))
Expect(rr.Code).To(Equal(http.StatusOK))
})
It("returns another user's project drive to a non-admin (unaffected)", func() {
mockSpaceFormatting()
mockAccountPerms(v0.Permission_CONSTRAINT_OWN)
gatewayClient.On("ListStorageSpaces", mock.Anything, mock.Anything).Return(&provider.ListStorageSpacesResponse{
Status: status.NewOK(ctx),
StorageSpaces: []*provider.StorageSpace{projectSpace("targetuser")},
}, nil)
r := httptest.NewRequest(http.MethodGet, "/graph/v1.0/drives/{driveID}/", nil)
rctx := chi.NewRouteContext()
rctx.URLParams.Add("driveID", "projectspace")
r = r.WithContext(context.WithValue(callerCtx("otheruser"), chi.RouteCtxKey, rctx))
svc.GetSingleDrive(rr, r)
Expect(rr.Code).To(Equal(http.StatusOK))
})
})
Describe("GetAllDrivesV1 (unrestricted listing)", func() {
listedDriveIDs := func() []string {
var lr struct {
Value []map[string]interface{} `json:"value"`
}
body, _ := io.ReadAll(rr.Body)
Expect(json.Unmarshal(body, &lr)).To(Succeed())
ids := make([]string, 0, len(lr.Value))
for _, d := range lr.Value {
ids = append(ids, d["id"].(string))
}
return ids
}
It("hides other users' personal drives from a non-admin", func() {
mockSpaceFormatting()
mockAccountPerms(v0.Permission_CONSTRAINT_OWN)
gatewayClient.On("ListStorageSpaces", mock.Anything, mock.Anything).Return(&provider.ListStorageSpacesResponse{
Status: status.NewOK(ctx),
StorageSpaces: []*provider.StorageSpace{personalSpace("targetuser"), projectSpace("targetuser")},
}, nil)
r := httptest.NewRequest(http.MethodGet, "/graph/v1.0/drives", nil).WithContext(callerCtx("otheruser"))
svc.GetAllDrivesV1(rr, r)
Expect(rr.Code).To(Equal(http.StatusOK))
Expect(listedDriveIDs()).To(ConsistOf("pro-1$projectspace"))
})
It("shows all personal drives to a full-account admin", func() {
mockSpaceFormatting()
mockAccountPerms(v0.Permission_CONSTRAINT_ALL)
gatewayClient.On("ListStorageSpaces", mock.Anything, mock.Anything).Return(&provider.ListStorageSpacesResponse{
Status: status.NewOK(ctx),
StorageSpaces: []*provider.StorageSpace{personalSpace("targetuser"), projectSpace("targetuser")},
}, nil)
r := httptest.NewRequest(http.MethodGet, "/graph/v1.0/drives", nil).WithContext(callerCtx("admin"))
svc.GetAllDrivesV1(rr, r)
Expect(rr.Code).To(Equal(http.StatusOK))
Expect(listedDriveIDs()).To(ConsistOf("pro-1$targetspace", "pro-1$projectspace"))
})
It("keeps the caller's own personal drive", func() {
mockSpaceFormatting()
mockAccountPerms(v0.Permission_CONSTRAINT_OWN)
gatewayClient.On("ListStorageSpaces", mock.Anything, mock.Anything).Return(&provider.ListStorageSpacesResponse{
Status: status.NewOK(ctx),
StorageSpaces: []*provider.StorageSpace{personalSpace("targetuser")},
}, nil)
r := httptest.NewRequest(http.MethodGet, "/graph/v1.0/drives", nil).WithContext(callerCtx("targetuser"))
svc.GetAllDrivesV1(rr, r)
Expect(rr.Code).To(Equal(http.StatusOK))
Expect(listedDriveIDs()).To(ConsistOf("pro-1$targetspace"))
})
})
})
Describe("Delete a drive", func() {
It("fails on invalid drive ids", func() {
r := httptest.NewRequest(http.MethodDelete, "/graph/v1.0/drives/{driveID}/", nil)
+2
View File
@@ -114,6 +114,7 @@ type Service interface { //nolint:interfacebloat
GetSharedByMe(w http.ResponseWriter, r *http.Request)
ListSharedWithMe(w http.ResponseWriter, r *http.Request)
GetUserDrive(w http.ResponseWriter, r *http.Request)
GetRootDriveChildren(w http.ResponseWriter, r *http.Request)
GetDriveItem(w http.ResponseWriter, r *http.Request)
GetDriveItemChildren(w http.ResponseWriter, r *http.Request)
@@ -199,6 +200,7 @@ func NewService(opts ...Option) (Graph, error) { //nolint:maintidx
microstore.Table(options.Config.Cache.Table),
store.DisablePersistence(options.Config.Cache.DisablePersistence),
store.Authentication(options.Config.Cache.AuthUsername, options.Config.Cache.AuthPassword),
store.TLS(options.Config.Cache.EnableTLS, options.Config.Cache.TLSInsecure, options.Config.Cache.TLSRootCACertificate),
}
m := roles.NewManager(
roles.StoreOptions(storeOptions),
+16 -7
View File
@@ -131,14 +131,23 @@ func (g Graph) GetUserDrive(w http.ResponseWriter, r *http.Request) {
return
}
if userID == "" {
u, ok := revactx.ContextGetUser(r.Context())
if !ok {
logger.Debug().Msg("could not get user: user not in context")
errorcode.GeneralException.Render(w, r, http.StatusInternalServerError, "user not in context")
return
}
u, ok := revactx.ContextGetUser(r.Context())
if !ok {
logger.Debug().Msg("could not get user: user not in context")
errorcode.GeneralException.Render(w, r, http.StatusInternalServerError, "user not in context")
return
}
switch {
case userID == "":
// /me/drive — self access
userID = u.GetId().GetOpaqueId()
case userID != u.GetId().GetOpaqueId() && !g.contextUserHasFullAccountPerms(r.Context()):
// Only the owner or a full-account admin may read another user's drive;
// return the same 404 as a missing drive so UUIDs can't be probed.
logger.Debug().Str("userID", userID).Msg("could not get drive: access to another user's drive is not permitted")
errorcode.ItemNotFound.Render(w, r, http.StatusNotFound, "no drive returned from storage")
return
}
logger.Debug().Str("userID", userID).Msg("calling list storage spaces with user and personal filter")
@@ -937,6 +937,88 @@ var _ = Describe("Users", func() {
})
})
Describe("GetUserDrive", func() {
// grantPerms sets the permission constraint returned for every
// GetPermissionByID call. CONSTRAINT_ALL makes
// contextUserHasFullAccountPerms return true (admin); CONSTRAINT_OWN
// makes it return false (non-admin).
grantPerms := func(c settingsmsg.Permission_Constraint) {
permissionService.On("GetPermissionByID", mock.Anything, mock.Anything).Return(&settings.GetPermissionByIDResponse{
Permission: &settingsmsg.Permission{Constraint: c},
}, nil)
}
// expectPersonalSpace mocks a successful personal-drive listing owned by ownerID.
expectPersonalSpace := func(ownerID string) {
gatewayClient.On("GetQuota", mock.Anything, mock.Anything, mock.Anything).Return(&provider.GetQuotaResponse{
Status: status.NewOK(ctx),
TotalBytes: 10,
}, nil)
gatewayClient.On("ListStorageSpaces", mock.Anything, mock.Anything, mock.Anything).Return(&provider.ListStorageSpacesResponse{
Status: status.NewOK(ctx),
StorageSpaces: []*provider.StorageSpace{
{
Id: &provider.StorageSpaceId{OpaqueId: "personal"},
Owner: &userv1beta1.User{Id: &userv1beta1.UserId{OpaqueId: ownerID}},
Root: &provider.ResourceId{SpaceId: "personal", OpaqueId: "personal"},
SpaceType: "personal",
},
},
}, nil)
}
doRequest := func(userID string) {
r := httptest.NewRequest(http.MethodGet, "/graph/v1.0/users/"+userID+"/drive", nil)
rctx := chi.NewRouteContext()
rctx.URLParams.Add("userID", userID)
r = r.WithContext(context.WithValue(revactx.ContextSetUser(ctx, currentUser), chi.RouteCtxKey, rctx))
svc.GetUserDrive(rr, r)
}
It("returns the caller's own drive (self, non-admin)", func() {
grantPerms(settingsmsg.Permission_CONSTRAINT_OWN)
expectPersonalSpace("user")
doRequest("user")
Expect(rr.Code).To(Equal(http.StatusOK))
data, err := io.ReadAll(rr.Body)
Expect(err).ToNot(HaveOccurred())
drive := &libregraph.Drive{}
Expect(json.Unmarshal(data, drive)).To(Succeed())
Expect(drive.GetId()).To(Equal("personal"))
})
It("returns the personal drive for the /me path (empty userID)", func() {
grantPerms(settingsmsg.Permission_CONSTRAINT_OWN)
expectPersonalSpace("user")
doRequest("")
Expect(rr.Code).To(Equal(http.StatusOK))
})
It("allows a full-account admin to read another user's drive", func() {
grantPerms(settingsmsg.Permission_CONSTRAINT_ALL)
expectPersonalSpace("other")
doRequest("other")
Expect(rr.Code).To(Equal(http.StatusOK))
})
It("denies a non-admin reading another user's drive (IDOR), without listing spaces", func() {
grantPerms(settingsmsg.Permission_CONSTRAINT_OWN)
doRequest("other")
Expect(rr.Code).To(Equal(http.StatusNotFound))
data, err := io.ReadAll(rr.Body)
Expect(err).ToNot(HaveOccurred())
Expect(string(data)).To(ContainSubstring("no drive returned from storage"))
gatewayClient.AssertNotCalled(GinkgoT(), "ListStorageSpaces", mock.Anything, mock.Anything, mock.Anything)
})
})
Describe("PostUser", func() {
var (
user *libregraph.User
@@ -134,6 +134,7 @@ func Server(cfg *config.Config) *cli.Command {
microstore.Database(cfg.Store.Database),
microstore.Table(cfg.Store.Table),
store.Authentication(cfg.Store.AuthUsername, cfg.Store.AuthPassword),
store.TLS(cfg.Store.EnableTLS, cfg.Store.TLSInsecure, cfg.Store.TLSRootCACertificate),
)
svc := service.NewEventsNotifier(traceProvider, evts, channel, logger, gatewaySelector, valueService,
+5 -2
View File
@@ -76,6 +76,9 @@ type Store struct {
Database string `yaml:"database" env:"NOTIFICATIONS_STORE_DATABASE" desc:"The database name the configured store should use." introductionVersion:"7.1.0"`
Table string `yaml:"table" env:"NOTIFICATIONS_STORE_TABLE" desc:"The database table the store should use." introductionVersion:"7.1.0"`
TTL time.Duration `yaml:"ttl" env:"OCIS_PERSISTENT_STORE_TTL;NOTIFICATIONS_STORE_TTL" desc:"Time to live for notifications in the store. Defaults to '336h' (2 weeks). See the Environment Variable Types description for more details." introductionVersion:"7.1.0"`
AuthUsername string `yaml:"username" env:"OCIS_PERSISTENT_STORE_AUTH_USERNAME;NOTIFICATIONS_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"7.1.0"`
AuthPassword string `yaml:"password" env:"OCIS_PERSISTENT_STORE_AUTH_PASSWORD;NOTIFICATIONS_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"7.1.0"`
AuthUsername string `yaml:"username" env:"OCIS_PERSISTENT_STORE_AUTH_USERNAME;NOTIFICATIONS_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"7.1.0"`
AuthPassword string `yaml:"password" env:"OCIS_PERSISTENT_STORE_AUTH_PASSWORD;NOTIFICATIONS_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"7.1.0"`
EnableTLS bool `yaml:"enable_tls" env:"OCIS_PERSISTENT_STORE_ENABLE_TLS;NOTIFICATIONS_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_PERSISTENT_STORE_TLS_INSECURE;NOTIFICATIONS_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;NOTIFICATIONS_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
}
+6 -3
View File
@@ -3,6 +3,7 @@ package revaconfig
import (
"math"
"net/url"
"path/filepath"
"github.com/owncloud/ocis/v2/ocis-pkg/log"
"github.com/owncloud/ocis/v2/services/ocm/pkg/config"
@@ -91,8 +92,9 @@ func OCMConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]inter
"service_account_secret": cfg.ServiceAccount.Secret,
},
"dataprovider": map[string]interface{}{
"prefix": "data",
"driver": "ocmreceived",
"prefix": "data",
"driver": "ocmreceived",
"upload_directory": filepath.Join(cfg.OCMStorageProvider.StorageRoot, "uploads"),
"drivers": map[string]interface{}{
"ocmreceived": map[string]interface{}{
"insecure": cfg.OCMStorageProvider.Insecure,
@@ -181,7 +183,8 @@ func OCMConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]inter
},
},
"storageprovider": map[string]interface{}{
"driver": "ocmreceived",
"driver": "ocmreceived",
"upload_directory": filepath.Join(cfg.OCMStorageProvider.StorageRoot, "uploads"),
"drivers": map[string]interface{}{
"ocmreceived": map[string]interface{}{
"insecure": cfg.OCMStorageProvider.Insecure,
+5 -2
View File
@@ -35,6 +35,9 @@ type SigningKeys struct {
Store string `yaml:"store" env:"OCIS_CACHE_STORE;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE" desc:"The type of the signing key store. Supported values are: 'redis-sentinel' and 'nats-js-kv'. See the text description for details." introductionVersion:"5.0"`
Nodes []string `yaml:"addresses" env:"OCIS_CACHE_STORE_NODES;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_NODES" desc:"A list of nodes to access the configured store. Note that the behaviour how nodes are used is dependent on the library of the configured store. See the Environment Variable Types description for more details." introductionVersion:"5.0"`
TTL time.Duration `yaml:"ttl" env:"OCIS_CACHE_TTL;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_TTL" desc:"Default time to live for signing keys. See the Environment Variable Types description for more details." introductionVersion:"5.0"`
AuthUsername string `yaml:"username" env:"OCIS_CACHE_AUTH_USERNAME;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthPassword string `yaml:"password" env:"OCIS_CACHE_AUTH_PASSWORD;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthUsername string `yaml:"username" env:"OCIS_CACHE_AUTH_USERNAME;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthPassword string `yaml:"password" env:"OCIS_CACHE_AUTH_PASSWORD;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the signing key store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the signing key store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the signing key store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
}
+1
View File
@@ -43,6 +43,7 @@ func Server(opts ...Option) (http.Service, error) {
microstore.Database("proxy"),
microstore.Table("signing-keys"),
store.Authentication(options.Config.SigningKeys.AuthUsername, options.Config.SigningKeys.AuthPassword),
store.TLS(options.Config.SigningKeys.EnableTLS, options.Config.SigningKeys.TLSInsecure, options.Config.SigningKeys.TLSRootCACertificate),
)
handle := svc.NewService(
@@ -65,6 +65,7 @@ func Server(cfg *config.Config) *cli.Command {
microstore.Database(cfg.Store.Database),
microstore.Table(cfg.Store.Table),
store.Authentication(cfg.Store.AuthUsername, cfg.Store.AuthPassword),
store.TLS(cfg.Store.EnableTLS, cfg.Store.TLSInsecure, cfg.Store.TLSRootCACertificate),
)
svc, err := service.NewPostprocessingService(ctx, bus, logger, st, traceProvider, cfg.Postprocessing)
+5 -2
View File
@@ -62,6 +62,9 @@ type Store struct {
Database string `yaml:"database" env:"POSTPROCESSING_STORE_DATABASE" desc:"The database name the configured store should use." introductionVersion:"pre5.0"`
Table string `yaml:"table" env:"POSTPROCESSING_STORE_TABLE" desc:"The database table the store should use." introductionVersion:"pre5.0"`
TTL time.Duration `yaml:"ttl" env:"OCIS_PERSISTENT_STORE_TTL;POSTPROCESSING_STORE_TTL" desc:"Time to live for events in the store. See the Environment Variable Types description for more details." introductionVersion:"pre5.0"`
AuthUsername string `yaml:"username" env:"OCIS_PERSISTENT_STORE_AUTH_USERNAME;POSTPROCESSING_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthPassword string `yaml:"password" env:"OCIS_PERSISTENT_STORE_AUTH_PASSWORD;POSTPROCESSING_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthUsername string `yaml:"username" env:"OCIS_PERSISTENT_STORE_AUTH_USERNAME;POSTPROCESSING_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthPassword string `yaml:"password" env:"OCIS_PERSISTENT_STORE_AUTH_PASSWORD;POSTPROCESSING_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
EnableTLS bool `yaml:"enable_tls" env:"OCIS_PERSISTENT_STORE_ENABLE_TLS;POSTPROCESSING_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_PERSISTENT_STORE_TLS_INSECURE;POSTPROCESSING_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;POSTPROCESSING_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
}
+2
View File
@@ -77,6 +77,7 @@ func Server(cfg *config.Config) *cli.Command {
microstore.Table(cfg.OIDC.UserinfoCache.Table),
store.DisablePersistence(cfg.OIDC.UserinfoCache.DisablePersistence),
store.Authentication(cfg.OIDC.UserinfoCache.AuthUsername, cfg.OIDC.UserinfoCache.AuthPassword),
store.TLS(cfg.OIDC.UserinfoCache.EnableTLS, cfg.OIDC.UserinfoCache.TLSInsecure, cfg.OIDC.UserinfoCache.TLSRootCACertificate),
)
signingKeyStore := store.Create(
@@ -86,6 +87,7 @@ func Server(cfg *config.Config) *cli.Command {
microstore.Database("proxy"),
microstore.Table("signing-keys"),
store.Authentication(cfg.PreSignedURL.SigningKeys.AuthUsername, cfg.PreSignedURL.SigningKeys.AuthPassword),
store.TLS(cfg.PreSignedURL.SigningKeys.EnableTLS, cfg.PreSignedURL.SigningKeys.TLSInsecure, cfg.PreSignedURL.SigningKeys.TLSRootCACertificate),
)
cfg.GrpcClient, err = grpc.NewClient(
+10 -4
View File
@@ -144,8 +144,11 @@ type Cache struct {
Table string `yaml:"table" env:"PROXY_OIDC_USERINFO_CACHE_TABLE" desc:"The database table the store should use." introductionVersion:"pre5.0"`
TTL time.Duration `yaml:"ttl" env:"OCIS_CACHE_TTL;PROXY_OIDC_USERINFO_CACHE_TTL" desc:"Default time to live for user info in the user info cache. Only applied when access tokens has no expiration. See the Environment Variable Types description for more details." introductionVersion:"pre5.0"`
DisablePersistence bool `yaml:"disable_persistence" env:"OCIS_CACHE_DISABLE_PERSISTENCE;PROXY_OIDC_USERINFO_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"pre5.0"`
AuthUsername string `yaml:"username" env:"OCIS_CACHE_AUTH_USERNAME;PROXY_OIDC_USERINFO_CACHE_AUTH_USERNAME" desc:"The username to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthPassword string `yaml:"password" env:"OCIS_CACHE_AUTH_PASSWORD;PROXY_OIDC_USERINFO_CACHE_AUTH_PASSWORD" desc:"The password to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthUsername string `yaml:"username" env:"OCIS_CACHE_AUTH_USERNAME;PROXY_OIDC_USERINFO_CACHE_AUTH_USERNAME" desc:"The username to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthPassword string `yaml:"password" env:"OCIS_CACHE_AUTH_PASSWORD;PROXY_OIDC_USERINFO_CACHE_AUTH_PASSWORD" desc:"The password to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS;PROXY_OIDC_USERINFO_CACHE_ENABLE_TLS" desc:"Activate TLS for the connection to the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;PROXY_OIDC_USERINFO_CACHE_TLS_INSECURE" desc:"Disable TLS certificate verification for the cache store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;PROXY_OIDC_USERINFO_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the cache store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
}
// RoleAssignment contains the configuration for how to assign roles to users during login
@@ -199,8 +202,11 @@ type SigningKeys struct {
Nodes []string `yaml:"addresses" env:"OCIS_CACHE_STORE_NODES;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_NODES" desc:"A list of nodes to access the configured store. Note that the behaviour how nodes are used is dependent on the library of the configured store. See the Environment Variable Types description for more details." introductionVersion:"5.0"`
TTL time.Duration `yaml:"ttl" env:"OCIS_CACHE_TTL;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_TTL" desc:"Default time to live for signing keys. See the Environment Variable Types description for more details." introductionVersion:"5.0"`
DisablePersistence bool `yaml:"disable_persistence" env:"OCIS_CACHE_DISABLE_PERSISTENCE;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_DISABLE_PERSISTENCE" desc:"Disables persistence of the store. Only applies when store type 'nats-js-kv' is configured. Defaults to true." introductionVersion:"5.0"`
AuthUsername string `yaml:"username" env:"OCIS_CACHE_AUTH_USERNAME;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthPassword string `yaml:"password" env:"OCIS_CACHE_AUTH_PASSWORD;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthUsername string `yaml:"username" env:"OCIS_CACHE_AUTH_USERNAME;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthPassword string `yaml:"password" env:"OCIS_CACHE_AUTH_PASSWORD;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the signing key store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the signing key store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the signing key store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
}
// ClaimsSelectorConf is the config for the claims-selector
+2
View File
@@ -5,6 +5,7 @@ directives:
- '''self'''
- 'blob:'
- 'https://raw.githubusercontent.com/owncloud/awesome-ocis/'
- 'https://marketplace.owncloud.com/'
default-src:
- '''none'''
font-src:
@@ -21,6 +22,7 @@ directives:
- 'data:'
- 'blob:'
- 'https://raw.githubusercontent.com/owncloud/awesome-ocis/'
- 'https://marketplace.owncloud.com/'
manifest-src:
- '''self'''
media-src:
+9 -6
View File
@@ -13,27 +13,30 @@ import (
// LoadCSPConfig loads CSP header configuration from a yaml file.
func LoadCSPConfig(proxyCfg *config.Config) (*config.CSP, error) {
serviceName := proxyCfg.Service.Name
yamlContent, err := loadCSPYaml(proxyCfg)
if err != nil {
return nil, err
}
return loadCSPConfig(yamlContent)
return loadCSPConfig(serviceName, yamlContent)
}
// LoadCSPConfig loads CSP header configuration from a yaml file.
func loadCSPConfig(yamlContent []byte) (*config.CSP, error) {
func loadCSPConfig(svcName string, yamlContent []byte) (*config.CSP, error) {
// The LoadCSPConfig (public) is expected to be called once, so
// creating a new gookit config instance each time here is fine.
// substitute env vars and load to struct
gofig.WithOptions(gofig.ParseEnv)
gofig.AddDriver(yaml.Driver)
cfg := gofig.NewWithOptions(svcName, gofig.ParseEnv)
cfg.AddDriver(yaml.Driver)
err := gofig.LoadSources("yaml", yamlContent)
err := cfg.LoadSources("yaml", yamlContent)
if err != nil {
return nil, err
}
// read yaml
cspConfig := config.CSP{}
err = gofig.BindStruct("", &cspConfig)
err = cfg.BindStruct("", &cspConfig)
if err != nil {
return nil, err
}
@@ -20,7 +20,7 @@ directives:
- 'https://${COLLABORA_DOMAIN|collabora.owncloud.test}/'
`
config, err := loadCSPConfig([]byte(yaml))
config, err := loadCSPConfig("proxy", []byte(yaml))
if err != nil {
t.Error(err)
}
+5 -2
View File
@@ -63,6 +63,9 @@ type Cache struct {
DirectoryTable string `yaml:"directories_table" env:"SETTINGS_DIRECTORY_CACHE_TABLE" desc:"The database table the store should use for the directory cache." introductionVersion:"pre5.0"`
TTL time.Duration `yaml:"ttl" env:"OCIS_CACHE_TTL;SETTINGS_CACHE_TTL" desc:"Default time to live for entries in the cache. Only applied when access tokens has no expiration. See the Environment Variable Types description for more details." introductionVersion:"pre5.0"`
DisablePersistence bool `yaml:"disable_persistence" env:"OCIS_CACHE_DISABLE_PERSISTENCE;SETTINGS_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"5.0"`
AuthUsername string `yaml:"username" env:"OCIS_CACHE_AUTH_USERNAME;SETTINGS_CACHE_AUTH_USERNAME" desc:"The username to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthPassword string `yaml:"password" env:"OCIS_CACHE_AUTH_PASSWORD;SETTINGS_CACHE_AUTH_PASSWORD" desc:"The password to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthUsername string `yaml:"username" env:"OCIS_CACHE_AUTH_USERNAME;SETTINGS_CACHE_AUTH_USERNAME" desc:"The username to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthPassword string `yaml:"password" env:"OCIS_CACHE_AUTH_PASSWORD;SETTINGS_CACHE_AUTH_PASSWORD" desc:"The password to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS;SETTINGS_CACHE_ENABLE_TLS" desc:"Activate TLS for the connection to the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;SETTINGS_CACHE_TLS_INSECURE" desc:"Disable TLS certificate verification for the cache store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;SETTINGS_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the cache store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
}
@@ -113,7 +113,8 @@ func (c *CachedMDC) ReadDir(ctx context.Context, id string) ([]string, error) {
c.logger.Error().Err(err).Msg("ReadDir: failed to update dirs cache")
}
return s, err
// return valid data regardless of cache write failure
return s, nil
}
// MakeDirIfNotExist invalidates the cache
@@ -140,6 +141,7 @@ func (c *CachedMDC) Init(ctx context.Context, id string) error {
microstore.Table(c.cfg.Metadata.Cache.DirectoryTable),
store.DisablePersistence(c.cfg.Metadata.Cache.DisablePersistence),
store.Authentication(c.cfg.Metadata.Cache.AuthUsername, c.cfg.Metadata.Cache.AuthPassword),
store.TLS(c.cfg.Metadata.Cache.EnableTLS, c.cfg.Metadata.Cache.TLSInsecure, c.cfg.Metadata.Cache.TLSRootCACertificate),
)
c.filesCache = store.Create(
store.Store(c.cfg.Metadata.Cache.Store),
@@ -149,6 +151,7 @@ func (c *CachedMDC) Init(ctx context.Context, id string) error {
microstore.Table(c.cfg.Metadata.Cache.FileTable),
store.DisablePersistence(c.cfg.Metadata.Cache.DisablePersistence),
store.Authentication(c.cfg.Metadata.Cache.AuthUsername, c.cfg.Metadata.Cache.AuthPassword),
store.TLS(c.cfg.Metadata.Cache.EnableTLS, c.cfg.Metadata.Cache.TLSInsecure, c.cfg.Metadata.Cache.TLSRootCACertificate),
)
return c.next.Init(ctx, id)
}
+1 -1
View File
@@ -29,7 +29,7 @@ type Config struct {
PublicShareMustHavePassword bool `yaml:"public_sharing_share_must_have_password" env:"OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD;SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" desc:"Set this to true if you want to enforce passwords on all public shares." introductionVersion:"5.0"`
EnableExpiredSharesCleanup bool `yaml:"enable_expired_shares_cleanup"`
EnableUserSharing bool `yaml:"enable_user_sharing" env:"OCIS_ENABLE_USER_SHARING" desc:"Enables direct sharing with users and groups. When disabled, creating new user or group shares is rejected. Public link sharing is not affected." introductionVersion:"%%NEXT_PRODUCTION_VERSION%%"`
EnablePublicSharing bool `yaml:"enable_public_sharing" env:"OCIS_ENABLE_PUBLIC_SHARING" desc:"Enables public link sharing. When disabled, creating new public links is rejected. Direct sharing with users and groups is not affected." introductionVersion:"%%NEXT_PRODUCTION_VERSION%%"`
EnablePublicSharing bool `yaml:"enable_public_sharing" env:"OCIS_ENABLE_PUBLIC_SHARING" desc:"Enables public link sharing. When disabled, creating new public links is rejected. Direct sharing with users and groups is not affected." introductionVersion:"8.2.0"`
PasswordPolicy PasswordPolicy `yaml:"password_policy"`
Context context.Context `yaml:"-"`
@@ -68,6 +68,9 @@ type Store struct {
Nodes []string `yaml:"nodes" env:"OCIS_PERSISTENT_STORE_NODES;STORAGE_PUBLICLINK_STORE_NODES" desc:"A list of nodes to access the configured store. This has no effect when 'memory' store is configured. Note that the behaviour how nodes are used is dependent on the library of the configured store. See the Environment Variable Types description for more details." introductionVersion:"8.0.0"`
Database string `yaml:"database" env:"STORAGE_PUBLICLINK_STORE_DATABASE" desc:"The database name the configured store should use." introductionVersion:"8.0.0"`
Table string `yaml:"table" env:"STORAGE_PUBLICLINK_STORE_TABLE" desc:"The database table the store should use." introductionVersion:"8.0.0"`
AuthUsername string `yaml:"username" env:"OCIS_PERSISTENT_STORE_AUTH_USERNAME;STORAGE_PUBLICLINK_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.0.0"`
AuthPassword string `yaml:"password" env:"OCIS_PERSISTENT_STORE_AUTH_PASSWORD;STORAGE_PUBLICLINK_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.0.0"`
AuthUsername string `yaml:"username" env:"OCIS_PERSISTENT_STORE_AUTH_USERNAME;STORAGE_PUBLICLINK_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.0.0"`
AuthPassword string `yaml:"password" env:"OCIS_PERSISTENT_STORE_AUTH_PASSWORD;STORAGE_PUBLICLINK_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.0.0"`
EnableTLS bool `yaml:"enable_tls" env:"OCIS_PERSISTENT_STORE_ENABLE_TLS;STORAGE_PUBLICLINK_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_PERSISTENT_STORE_TLS_INSECURE;STORAGE_PUBLICLINK_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;STORAGE_PUBLICLINK_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
}
@@ -44,8 +44,11 @@ func StoragePublicLinkConfigFromStruct(cfg *config.Config) map[string]interface{
"store_nodes": cfg.Store.Nodes,
"store_database": cfg.Store.Database,
"store_table": cfg.Store.Table,
"store_username": cfg.Store.AuthUsername,
"store_password": cfg.Store.AuthPassword,
"store_username": cfg.Store.AuthUsername,
"store_password": cfg.Store.AuthPassword,
"store_enable_tls": cfg.Store.EnableTLS,
"store_tls_insecure": cfg.Store.TLSInsecure,
"store_tls_root_ca_certificate": cfg.Store.TLSRootCACertificate,
},
},
},
+5 -2
View File
@@ -91,6 +91,9 @@ type Cache struct {
Database string `yaml:"database" env:"OCIS_CACHE_DATABASE" desc:"The database name the configured store should use." introductionVersion:"pre5.0"`
TTL time.Duration `yaml:"ttl" env:"OCIS_CACHE_TTL;STORAGE_SYSTEM_CACHE_TTL" desc:"Default time to live for user info in the user info cache. Only applied when access tokens has no expiration. See the Environment Variable Types description for more details." introductionVersion:"pre5.0"`
DisablePersistence bool `yaml:"disable_persistence" env:"OCIS_CACHE_DISABLE_PERSISTENCE;STORAGE_SYSTEM_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"5.0"`
AuthUsername string `yaml:"auth_username" env:"OCIS_CACHE_AUTH_USERNAME;STORAGE_SYSTEM_CACHE_AUTH_USERNAME" desc:"Username for the configured store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthPassword string `yaml:"auth_password" env:"OCIS_CACHE_AUTH_PASSWORD;STORAGE_SYSTEM_CACHE_AUTH_PASSWORD" desc:"Password for the configured store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthUsername string `yaml:"auth_username" env:"OCIS_CACHE_AUTH_USERNAME;STORAGE_SYSTEM_CACHE_AUTH_USERNAME" desc:"Username for the configured store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthPassword string `yaml:"auth_password" env:"OCIS_CACHE_AUTH_PASSWORD;STORAGE_SYSTEM_CACHE_AUTH_PASSWORD" desc:"Password for the configured store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS;STORAGE_SYSTEM_CACHE_ENABLE_TLS" desc:"Activate TLS for the connection to the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;STORAGE_SYSTEM_CACHE_TLS_INSECURE" desc:"Disable TLS certificate verification for the cache store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;STORAGE_SYSTEM_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the cache store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
}
@@ -169,8 +169,11 @@ func metadataDrivers(localEndpoint string, cfg *config.Config) map[string]interf
"cache_database": cfg.FileMetadataCache.Database,
"cache_ttl": cfg.FileMetadataCache.TTL,
"cache_disable_persistence": cfg.FileMetadataCache.DisablePersistence,
"cache_auth_username": cfg.FileMetadataCache.AuthUsername,
"cache_auth_password": cfg.FileMetadataCache.AuthPassword,
"cache_auth_username": cfg.FileMetadataCache.AuthUsername,
"cache_auth_password": cfg.FileMetadataCache.AuthPassword,
"cache_enable_tls": cfg.FileMetadataCache.EnableTLS,
"cache_tls_insecure": cfg.FileMetadataCache.TLSInsecure,
"cache_tls_root_ca_certificate": cfg.FileMetadataCache.TLSRootCACertificate,
},
},
}
+39
View File
@@ -181,6 +181,45 @@ OPTIONS:
--help, -h show help
```
Note that removing a stale node does not reclaim the quota it consumed. Use the
Recalculate Treesize command afterwards to correct the reported quota usage of the space.
#### Recalculate Treesize command
The treesize of a directory is maintained as a running counter that is updated on every
change, so a failed or incomplete update leaves the counter wrong and the reported quota
usage of a space drifts from the data actually stored on disk. This command walks a space
bottom up, recalculates the treesize of every directory from the actual size of its
children and corrects the stored values.
```bash
~/ocis storage-users spaces recalculate-treesize <commandoptions>
```
```
NAME:
ocis storage-users spaces recalculate-treesize - Recalculate the treesize of all directories in a space from the actual size of their children. Use this to repair a space whose reported quota usage drifted from the data on disk
USAGE:
ocis storage-users spaces recalculate-treesize [command options]
OPTIONS:
--space-id value, -s value Space ID to recalculate (omit to process all spaces)
--dry-run Only show which treesizes would be corrected without writing them (default: true)
--verbose, -v Enable verbose logging (default: false)
--help, -h show help
```
```bash
# report incorrect treesizes of a single space without changing anything
ocis storage-users spaces recalculate-treesize --space-id 43972c79-f7ce-441b-9fe0-cf5170e4d61e
# correct them
ocis storage-users spaces recalculate-treesize --space-id 43972c79-f7ce-441b-9fe0-cf5170e4d61e --dry-run=false
```
Note: the command reads the metadata of every node in the space, so it is I/O intensive on
large spaces. Prefer targeting a single space with `--space-id` over processing all spaces.
#### Command Examples
Dry run to see what would be deleted (recommended first step)
@@ -33,6 +33,7 @@ func Spaces(cfg *config.Config) *cli.Command {
Usage: "manage spaces",
Subcommands: []*cli.Command{
PurgeDisabledSpaces(cfg),
RecalculateTreesize(cfg),
},
}
}
@@ -0,0 +1,222 @@
package command
import (
"errors"
"fmt"
"io/fs"
"os"
"path/filepath"
"strconv"
"strings"
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
"github.com/olekukonko/tablewriter"
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
"github.com/owncloud/ocis/v2/services/storage-users/pkg/config"
"github.com/owncloud/ocis/v2/services/storage-users/pkg/config/parser"
"github.com/owncloud/reva/v2/pkg/storage/utils/decomposedfs/lookup"
"github.com/owncloud/reva/v2/pkg/storage/utils/decomposedfs/metadata/prefixes"
"github.com/shamaton/msgpack/v2"
"github.com/urfave/cli/v2"
)
// metadataExtension is the suffix of the messagepack metadata file of a node
const metadataExtension = ".mpk"
// RecalculateTreesize is the entry point for the recalculate-treesize command
func RecalculateTreesize(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "recalculate-treesize",
Usage: "Recalculate the treesize of all directories in a space from the actual size of their children. " +
"Use this to repair a space whose reported quota usage drifted from the data on disk",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "space-id",
Usage: "Space ID to recalculate (omit to process all spaces)",
Required: false,
Aliases: []string{"s"},
},
&cli.BoolFlag{
Name: "dry-run",
Usage: "Only show which treesizes would be corrected without writing them",
Value: true, // default must be true to avoid accidental writes!
},
&cli.BoolFlag{
Name: "verbose",
Usage: "Enable verbose logging",
Value: false,
Aliases: []string{"v"},
},
},
Before: func(c *cli.Context) error {
return configlog.ReturnFatal(parser.ParseConfig(cfg))
},
Action: func(c *cli.Context) error {
dryRun := c.Bool("dry-run")
verbose := c.Bool("verbose")
spaceIDs := []string{}
if c.IsSet("space-id") {
spaceIDs = append(spaceIDs, c.String("space-id"))
} else {
fmt.Println("Scanning all spaces for incorrect treesizes...")
spaceIDs = globSpaceIDs(cfg)
}
if dryRun {
fmt.Print("Dry run mode enabled, no treesize will be written\n\n")
}
var (
table *tablewriter.Table
corrected int
)
table = tablewriter.NewTable(os.Stdout)
table.Header("Space", "Node", "Stored", "Calculated", "Difference")
for _, spaceID := range spaceIDs {
if verbose {
fmt.Printf("Recalculating treesizes for space: %s\n", spaceID)
}
root := filepath.Join(cfg.Drivers.OCIS.Root, "spaces", lookup.Pathify(spaceID, 1, 2), "nodes", lookup.Pathify(spaceID, 4, 2))
_, n, err := recalculateNode(cfg, spaceID, root, dryRun, verbose, table)
if err != nil {
fmt.Fprintf(os.Stderr, "Error recalculating space %s: %s\n", spaceID, err)
continue
}
corrected += n
}
if corrected > 0 {
table.Render()
}
switch {
case corrected == 0:
fmt.Println("All treesizes are correct")
case dryRun:
fmt.Printf("Would correct %d treesizes. Run with --dry-run=false to apply\n", corrected)
default:
fmt.Printf("Corrected %d treesizes\n", corrected)
}
return nil
},
}
}
// recalculateNode calculates the size of the node at the given path. For directories it
// recurses into the children first, so the whole subtree is corrected bottom up, and
// compares the sum against the stored treesize. It returns the calculated size of the
// node and the number of corrected treesizes in the subtree.
func recalculateNode(cfg *config.Config, spaceID, path string, dryRun, verbose bool, table *tablewriter.Table) (uint64, int, error) {
attribs, err := readAttributes(path)
if err != nil {
return 0, 0, err
}
// Files simply report their blobsize, there is nothing to recalculate. Only an
// explicit file type is treated as a file, everything else is walked as a
// directory: a space root for example carries no type attribute at all. This
// matches how the propagator classifies children.
if string(attribs[prefixes.TypeAttr]) == strconv.FormatUint(uint64(provider.ResourceType_RESOURCE_TYPE_FILE), 10) {
size, err := strconv.ParseUint(string(attribs[prefixes.BlobsizeAttr]), 10, 64)
if err != nil {
// a node without a blobsize contributes nothing, but it is worth reporting
if verbose {
fmt.Fprintf(os.Stderr, " Could not read blobsize of %s: %s\n", path, err)
}
return 0, 0, nil
}
return size, 0, nil
}
entries, err := os.ReadDir(path)
if err != nil {
if errors.Is(err, fs.ErrNotExist) {
return 0, 0, nil
}
return 0, 0, err
}
var (
calculated uint64
corrected int
)
for _, entry := range entries {
child, err := filepath.EvalSymlinks(filepath.Join(path, entry.Name()))
if err != nil {
// dangling child entry, it contributes nothing
if verbose {
fmt.Fprintf(os.Stderr, " Could not resolve child %s: %s\n", entry.Name(), err)
}
continue
}
size, n, err := recalculateNode(cfg, spaceID, child, dryRun, verbose, table)
if err != nil {
if verbose {
fmt.Fprintf(os.Stderr, " Could not recalculate child %s: %s\n", child, err)
}
continue
}
calculated += size
corrected += n
}
stored, storedErr := strconv.ParseUint(string(attribs[prefixes.TreesizeAttr]), 10, 64)
if storedErr == nil && stored == calculated {
return calculated, corrected, nil
}
storedStr := string(attribs[prefixes.TreesizeAttr])
if storedStr == "" {
storedStr = "unset"
}
diff := "n/a"
if storedErr == nil {
diff = fmt.Sprintf("%+d", int64(calculated)-int64(stored))
}
table.Append([]string{spaceID, nodeIDFromPath(path), storedStr, strconv.FormatUint(calculated, 10), diff})
corrected++
if !dryRun {
if err := writeTreesize(path, attribs, calculated); err != nil {
return calculated, corrected, fmt.Errorf("could not write treesize of %s: %w", path, err)
}
}
return calculated, corrected, nil
}
// readAttributes reads the messagepack metadata of the node at the given path
func readAttributes(path string) (map[string][]byte, error) {
b, err := os.ReadFile(path + metadataExtension)
if err != nil {
return nil, err
}
attribs := map[string][]byte{}
if err := msgpack.Unmarshal(b, &attribs); err != nil {
return nil, err
}
return attribs, nil
}
// writeTreesize sets the treesize attribute of the node at the given path
func writeTreesize(path string, attribs map[string][]byte, size uint64) error {
attribs[prefixes.TreesizeAttr] = []byte(strconv.FormatUint(size, 10))
b, err := msgpack.Marshal(attribs)
if err != nil {
return err
}
return os.WriteFile(path+metadataExtension, b, 0600)
}
// nodeIDFromPath rebuilds the node id from a pathified node path, i.e.
// .../nodes/5b/ba/1e/a7/-f185-4f31-8342-ed4b5743f096 -> 5bba1ea7-f185-4f31-8342-ed4b5743f096
func nodeIDFromPath(path string) string {
parts := strings.Split(path, string(filepath.Separator))
if len(parts) < 5 {
return path
}
return strings.Join(parts[len(parts)-5:], "")
}
@@ -0,0 +1,180 @@
package command
import (
"os"
"path/filepath"
"strconv"
"testing"
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
"github.com/olekukonko/tablewriter"
"github.com/owncloud/reva/v2/pkg/storage/utils/decomposedfs/metadata/prefixes"
"github.com/shamaton/msgpack/v2"
"github.com/test-go/testify/require"
)
// writeNode creates a node file with the given attributes on disk
func writeNode(t *testing.T, path string, attribs map[string][]byte) {
t.Helper()
require.NoError(t, os.MkdirAll(filepath.Dir(path), 0700))
b, err := msgpack.Marshal(attribs)
require.NoError(t, err)
require.NoError(t, os.WriteFile(path+metadataExtension, b, 0600))
}
// writeFileNode creates a file node with the given blobsize. The node file itself
// has to exist as well, decomposedfs resolves children through it.
func writeFileNode(t *testing.T, path string, blobsize int) {
t.Helper()
writeNode(t, path, map[string][]byte{
prefixes.TypeAttr: []byte(strconv.FormatUint(uint64(provider.ResourceType_RESOURCE_TYPE_FILE), 10)),
prefixes.BlobsizeAttr: []byte(strconv.Itoa(blobsize)),
})
require.NoError(t, os.WriteFile(path, []byte{}, 0600))
}
// writeDirNode creates a directory node with the given stored treesize
func writeDirNode(t *testing.T, path string, treesize int) {
t.Helper()
require.NoError(t, os.MkdirAll(path, 0700))
writeNode(t, path, map[string][]byte{
prefixes.TypeAttr: []byte(strconv.FormatUint(uint64(provider.ResourceType_RESOURCE_TYPE_CONTAINER), 10)),
prefixes.TreesizeAttr: []byte(strconv.Itoa(treesize)),
})
}
// storedTreesize reads back the treesize attribute of a node
func storedTreesize(t *testing.T, path string) string {
t.Helper()
attribs, err := readAttributes(path)
require.NoError(t, err)
return string(attribs[prefixes.TreesizeAttr])
}
// linkChild links a child node into a parent directory, mirroring how decomposedfs
// references children by symlink
func linkChild(t *testing.T, parent, child, name string) {
t.Helper()
rel, err := filepath.Rel(parent, child)
require.NoError(t, err)
require.NoError(t, os.Symlink(rel, filepath.Join(parent, name)))
}
func TestRecalculateNode(t *testing.T) {
t.Run("corrects a wrong treesize", func(t *testing.T) {
root := t.TempDir()
dir := filepath.Join(root, "dir")
writeDirNode(t, dir, 999)
f := filepath.Join(root, "file")
writeFileNode(t, f, 100)
linkChild(t, dir, f, "file")
size, corrected, err := recalculateNode(nil, "spaceid", dir, false, false, tablewriter.NewTable(os.Stdout))
require.NoError(t, err)
require.Equal(t, uint64(100), size)
require.Equal(t, 1, corrected)
require.Equal(t, "100", storedTreesize(t, dir))
})
t.Run("leaves a correct treesize untouched", func(t *testing.T) {
root := t.TempDir()
dir := filepath.Join(root, "dir")
writeDirNode(t, dir, 100)
f := filepath.Join(root, "file")
writeFileNode(t, f, 100)
linkChild(t, dir, f, "file")
size, corrected, err := recalculateNode(nil, "spaceid", dir, false, false, tablewriter.NewTable(os.Stdout))
require.NoError(t, err)
require.Equal(t, uint64(100), size)
require.Equal(t, 0, corrected)
})
t.Run("does not write in dry-run mode", func(t *testing.T) {
root := t.TempDir()
dir := filepath.Join(root, "dir")
writeDirNode(t, dir, 999)
f := filepath.Join(root, "file")
writeFileNode(t, f, 100)
linkChild(t, dir, f, "file")
size, corrected, err := recalculateNode(nil, "spaceid", dir, true, false, tablewriter.NewTable(os.Stdout))
require.NoError(t, err)
require.Equal(t, uint64(100), size)
require.Equal(t, 1, corrected)
require.Equal(t, "999", storedTreesize(t, dir), "dry-run must not write the treesize")
})
t.Run("sums nested directories bottom up", func(t *testing.T) {
root := t.TempDir()
outer := filepath.Join(root, "outer")
writeDirNode(t, outer, 0)
inner := filepath.Join(root, "inner")
writeDirNode(t, inner, 0)
f1 := filepath.Join(root, "f1")
writeFileNode(t, f1, 10)
f2 := filepath.Join(root, "f2")
writeFileNode(t, f2, 32)
linkChild(t, inner, f2, "f2")
linkChild(t, outer, f1, "f1")
linkChild(t, outer, inner, "inner")
size, corrected, err := recalculateNode(nil, "spaceid", outer, false, false, tablewriter.NewTable(os.Stdout))
require.NoError(t, err)
require.Equal(t, uint64(42), size)
require.Equal(t, 2, corrected, "both the inner and the outer directory are corrected")
require.Equal(t, "32", storedTreesize(t, inner))
require.Equal(t, "42", storedTreesize(t, outer))
})
t.Run("treats a node without a type attribute as a directory", func(t *testing.T) {
// space roots carry no type attribute
root := t.TempDir()
spaceRoot := filepath.Join(root, "space")
require.NoError(t, os.MkdirAll(spaceRoot, 0700))
writeNode(t, spaceRoot, map[string][]byte{
prefixes.TreesizeAttr: []byte("999"),
})
f := filepath.Join(root, "file")
writeFileNode(t, f, 64)
linkChild(t, spaceRoot, f, "file")
size, corrected, err := recalculateNode(nil, "spaceid", spaceRoot, false, false, tablewriter.NewTable(os.Stdout))
require.NoError(t, err)
require.Equal(t, uint64(64), size)
require.Equal(t, 1, corrected)
require.Equal(t, "64", storedTreesize(t, spaceRoot))
})
t.Run("skips dangling child links", func(t *testing.T) {
root := t.TempDir()
dir := filepath.Join(root, "dir")
writeDirNode(t, dir, 0)
f := filepath.Join(root, "file")
writeFileNode(t, f, 20)
linkChild(t, dir, f, "file")
require.NoError(t, os.Symlink("../gone", filepath.Join(dir, "gone")))
size, _, err := recalculateNode(nil, "spaceid", dir, false, false, tablewriter.NewTable(os.Stdout))
require.NoError(t, err)
require.Equal(t, uint64(20), size, "the dangling entry contributes nothing")
})
t.Run("sets an unset treesize", func(t *testing.T) {
root := t.TempDir()
dir := filepath.Join(root, "dir")
require.NoError(t, os.MkdirAll(dir, 0700))
writeNode(t, dir, map[string][]byte{
prefixes.TypeAttr: []byte(strconv.FormatUint(uint64(provider.ResourceType_RESOURCE_TYPE_CONTAINER), 10)),
})
f := filepath.Join(root, "file")
writeFileNode(t, f, 7)
linkChild(t, dir, f, "file")
_, corrected, err := recalculateNode(nil, "spaceid", dir, false, false, tablewriter.NewTable(os.Stdout))
require.NoError(t, err)
require.Equal(t, 1, corrected)
require.Equal(t, "7", storedTreesize(t, dir))
})
}
+10 -4
View File
@@ -229,8 +229,11 @@ type FilemetadataCache struct {
Database string `yaml:"database" env:"OCIS_CACHE_DATABASE" desc:"The database name the configured store should use." introductionVersion:"pre5.0"`
TTL time.Duration `yaml:"ttl" env:"OCIS_CACHE_TTL;STORAGE_USERS_FILEMETADATA_CACHE_TTL" desc:"Default time to live for user info in the user info cache. Only applied when access tokens has no expiration. See the Environment Variable Types description for more details." introductionVersion:"pre5.0"`
DisablePersistence bool `yaml:"disable_persistence" env:"OCIS_CACHE_DISABLE_PERSISTENCE;STORAGE_USERS_FILEMETADATA_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"5.0"`
AuthUsername string `yaml:"username" env:"OCIS_CACHE_AUTH_USERNAME;STORAGE_USERS_FILEMETADATA_CACHE_AUTH_USERNAME" desc:"The username to authenticate with the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthPassword string `yaml:"password" env:"OCIS_CACHE_AUTH_PASSWORD;STORAGE_USERS_FILEMETADATA_CACHE_AUTH_PASSWORD" desc:"The password to authenticate with the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthUsername string `yaml:"username" env:"OCIS_CACHE_AUTH_USERNAME;STORAGE_USERS_FILEMETADATA_CACHE_AUTH_USERNAME" desc:"The username to authenticate with the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthPassword string `yaml:"password" env:"OCIS_CACHE_AUTH_PASSWORD;STORAGE_USERS_FILEMETADATA_CACHE_AUTH_PASSWORD" desc:"The password to authenticate with the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS;STORAGE_USERS_FILEMETADATA_CACHE_ENABLE_TLS" desc:"Activate TLS for the connection to the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;STORAGE_USERS_FILEMETADATA_CACHE_TLS_INSECURE" desc:"Disable TLS certificate verification for the cache store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;STORAGE_USERS_FILEMETADATA_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the cache store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
}
// IDCache holds cache config
@@ -240,8 +243,11 @@ type IDCache struct {
Database string `yaml:"database" env:"OCIS_CACHE_DATABASE" desc:"The database name the configured store should use." introductionVersion:"pre5.0"`
TTL time.Duration `yaml:"ttl" env:"OCIS_CACHE_TTL;STORAGE_USERS_ID_CACHE_TTL" desc:"Default time to live for user info in the user info cache. Only applied when access tokens have no expiration. Defaults to 300s which is derived from the underlaying package though not explicitly set as default. See the Environment Variable Types description for more details." introductionVersion:"pre5.0"`
DisablePersistence bool `yaml:"disable_persistence" env:"OCIS_CACHE_DISABLE_PERSISTENCE;STORAGE_USERS_ID_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"5.0"`
AuthUsername string `yaml:"username" env:"OCIS_CACHE_AUTH_USERNAME;STORAGE_USERS_ID_CACHE_AUTH_USERNAME" desc:"The username to authenticate with the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthPassword string `yaml:"password" env:"OCIS_CACHE_AUTH_PASSWORD;STORAGE_USERS_ID_CACHE_AUTH_PASSWORD" desc:"The password to authenticate with the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthUsername string `yaml:"username" env:"OCIS_CACHE_AUTH_USERNAME;STORAGE_USERS_ID_CACHE_AUTH_USERNAME" desc:"The username to authenticate with the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthPassword string `yaml:"password" env:"OCIS_CACHE_AUTH_PASSWORD;STORAGE_USERS_ID_CACHE_AUTH_PASSWORD" desc:"The password to authenticate with the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
EnableTLS bool `yaml:"enable_tls" env:"OCIS_CACHE_ENABLE_TLS;STORAGE_USERS_ID_CACHE_ENABLE_TLS" desc:"Activate TLS for the connection to the cache store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_CACHE_TLS_INSECURE;STORAGE_USERS_ID_CACHE_TLS_INSECURE" desc:"Disable TLS certificate verification for the cache store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_CACHE_TLS_ROOT_CA_CERTIFICATE;STORAGE_USERS_ID_CACHE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the cache store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
}
// S3Driver is the storage driver configuration when using 's3' storage driver
@@ -80,6 +80,7 @@ func StorageUsersConfigFromStruct(cfg *config.Config) map[string]interface{} {
"prefix": cfg.HTTP.Prefix,
"driver": cfg.Driver,
"drivers": DataProviderDrivers(cfg),
"mount_id": cfg.MountID,
"nats_address": cfg.Events.Addr,
"nats_clusterID": cfg.Events.ClusterID,
"nats_tls_insecure": cfg.Events.TLSInsecure,
@@ -102,8 +102,11 @@ func Posix(cfg *config.Config, enableFSWatch bool) map[string]interface{} {
"cache_database": cfg.IDCache.Database,
"cache_ttl": cfg.IDCache.TTL,
"cache_disable_persistence": cfg.IDCache.DisablePersistence,
"cache_auth_username": cfg.IDCache.AuthUsername,
"cache_auth_password": cfg.IDCache.AuthPassword,
"cache_auth_username": cfg.IDCache.AuthUsername,
"cache_auth_password": cfg.IDCache.AuthPassword,
"cache_enable_tls": cfg.IDCache.EnableTLS,
"cache_tls_insecure": cfg.IDCache.TLSInsecure,
"cache_tls_root_ca_certificate": cfg.IDCache.TLSRootCACertificate,
},
"filemetadatacache": map[string]interface{}{
"cache_store": cfg.FilemetadataCache.Store,
@@ -111,8 +114,11 @@ func Posix(cfg *config.Config, enableFSWatch bool) map[string]interface{} {
"cache_database": cfg.FilemetadataCache.Database,
"cache_ttl": cfg.FilemetadataCache.TTL,
"cache_disable_persistence": cfg.FilemetadataCache.DisablePersistence,
"cache_auth_username": cfg.FilemetadataCache.AuthUsername,
"cache_auth_password": cfg.FilemetadataCache.AuthPassword,
"cache_auth_username": cfg.FilemetadataCache.AuthUsername,
"cache_auth_password": cfg.FilemetadataCache.AuthPassword,
"cache_enable_tls": cfg.FilemetadataCache.EnableTLS,
"cache_tls_insecure": cfg.FilemetadataCache.TLSInsecure,
"cache_tls_root_ca_certificate": cfg.FilemetadataCache.TLSRootCACertificate,
},
"use_space_groups": cfg.Drivers.Posix.UseSpaceGroups,
"watch_fs": enableFSWatch,
@@ -186,8 +192,11 @@ func Ocis(cfg *config.Config) map[string]interface{} {
"cache_database": cfg.FilemetadataCache.Database,
"cache_ttl": cfg.FilemetadataCache.TTL,
"cache_disable_persistence": cfg.FilemetadataCache.DisablePersistence,
"cache_auth_username": cfg.FilemetadataCache.AuthUsername,
"cache_auth_password": cfg.FilemetadataCache.AuthPassword,
"cache_auth_username": cfg.FilemetadataCache.AuthUsername,
"cache_auth_password": cfg.FilemetadataCache.AuthPassword,
"cache_enable_tls": cfg.FilemetadataCache.EnableTLS,
"cache_tls_insecure": cfg.FilemetadataCache.TLSInsecure,
"cache_tls_root_ca_certificate": cfg.FilemetadataCache.TLSRootCACertificate,
},
"idcache": map[string]interface{}{
"cache_store": cfg.IDCache.Store,
@@ -195,8 +204,11 @@ func Ocis(cfg *config.Config) map[string]interface{} {
"cache_database": cfg.IDCache.Database,
"cache_ttl": cfg.IDCache.TTL,
"cache_disable_persistence": cfg.IDCache.DisablePersistence,
"cache_auth_username": cfg.IDCache.AuthUsername,
"cache_auth_password": cfg.IDCache.AuthPassword,
"cache_auth_username": cfg.IDCache.AuthUsername,
"cache_auth_password": cfg.IDCache.AuthPassword,
"cache_enable_tls": cfg.IDCache.EnableTLS,
"cache_tls_insecure": cfg.IDCache.TLSInsecure,
"cache_tls_root_ca_certificate": cfg.IDCache.TLSRootCACertificate,
},
"events": map[string]interface{}{
"numconsumers": cfg.Events.NumConsumers,
@@ -214,6 +226,7 @@ func Ocis(cfg *config.Config) map[string]interface{} {
// OcisNoEvents is the config mapping for the ocis storage driver emitting no events
func OcisNoEvents(cfg *config.Config) map[string]interface{} {
return map[string]interface{}{
"mount_id": cfg.MountID,
"metadata_backend": "messagepack",
"propagator": cfg.Drivers.OCIS.Propagator,
"async_propagator_options": map[string]interface{}{
@@ -241,8 +254,11 @@ func OcisNoEvents(cfg *config.Config) map[string]interface{} {
"cache_database": cfg.FilemetadataCache.Database,
"cache_ttl": cfg.FilemetadataCache.TTL,
"cache_disable_persistence": cfg.FilemetadataCache.DisablePersistence,
"cache_auth_username": cfg.FilemetadataCache.AuthUsername,
"cache_auth_password": cfg.FilemetadataCache.AuthPassword,
"cache_auth_username": cfg.FilemetadataCache.AuthUsername,
"cache_auth_password": cfg.FilemetadataCache.AuthPassword,
"cache_enable_tls": cfg.FilemetadataCache.EnableTLS,
"cache_tls_insecure": cfg.FilemetadataCache.TLSInsecure,
"cache_tls_root_ca_certificate": cfg.FilemetadataCache.TLSRootCACertificate,
},
"idcache": map[string]interface{}{
"cache_store": cfg.IDCache.Store,
@@ -250,8 +266,11 @@ func OcisNoEvents(cfg *config.Config) map[string]interface{} {
"cache_database": cfg.IDCache.Database,
"cache_ttl": cfg.IDCache.TTL,
"cache_disable_persistence": cfg.IDCache.DisablePersistence,
"cache_auth_username": cfg.IDCache.AuthUsername,
"cache_auth_password": cfg.IDCache.AuthPassword,
"cache_auth_username": cfg.IDCache.AuthUsername,
"cache_auth_password": cfg.IDCache.AuthPassword,
"cache_enable_tls": cfg.IDCache.EnableTLS,
"cache_tls_insecure": cfg.IDCache.TLSInsecure,
"cache_tls_root_ca_certificate": cfg.IDCache.TLSRootCACertificate,
},
}
}
@@ -272,6 +291,7 @@ func S3(cfg *config.Config) map[string]interface{} {
// S3NG is the config mapping for the s3ng storage driver
func S3NG(cfg *config.Config) map[string]interface{} {
return map[string]interface{}{
"mount_id": cfg.MountID,
"metadata_backend": "messagepack",
"propagator": cfg.Drivers.S3NG.Propagator,
"async_propagator_options": map[string]interface{}{
@@ -310,8 +330,11 @@ func S3NG(cfg *config.Config) map[string]interface{} {
"cache_database": cfg.FilemetadataCache.Database,
"cache_ttl": cfg.FilemetadataCache.TTL,
"cache_disable_persistence": cfg.FilemetadataCache.DisablePersistence,
"cache_auth_username": cfg.FilemetadataCache.AuthUsername,
"cache_auth_password": cfg.FilemetadataCache.AuthPassword,
"cache_auth_username": cfg.FilemetadataCache.AuthUsername,
"cache_auth_password": cfg.FilemetadataCache.AuthPassword,
"cache_enable_tls": cfg.FilemetadataCache.EnableTLS,
"cache_tls_insecure": cfg.FilemetadataCache.TLSInsecure,
"cache_tls_root_ca_certificate": cfg.FilemetadataCache.TLSRootCACertificate,
},
"idcache": map[string]interface{}{
"cache_store": cfg.IDCache.Store,
@@ -319,8 +342,11 @@ func S3NG(cfg *config.Config) map[string]interface{} {
"cache_database": cfg.IDCache.Database,
"cache_ttl": cfg.IDCache.TTL,
"cache_disable_persistence": cfg.IDCache.DisablePersistence,
"cache_auth_username": cfg.IDCache.AuthUsername,
"cache_auth_password": cfg.IDCache.AuthPassword,
"cache_auth_username": cfg.IDCache.AuthUsername,
"cache_auth_password": cfg.IDCache.AuthPassword,
"cache_enable_tls": cfg.IDCache.EnableTLS,
"cache_tls_insecure": cfg.IDCache.TLSInsecure,
"cache_tls_root_ca_certificate": cfg.IDCache.TLSRootCACertificate,
},
"events": map[string]interface{}{
"numconsumers": cfg.Events.NumConsumers,
@@ -338,6 +364,7 @@ func S3NG(cfg *config.Config) map[string]interface{} {
// S3NGNoEvents is the config mapping for the s3ng storage driver emitting no events
func S3NGNoEvents(cfg *config.Config) map[string]interface{} {
return map[string]interface{}{
"mount_id": cfg.MountID,
"metadata_backend": "messagepack",
"propagator": cfg.Drivers.S3NG.Propagator,
"async_propagator_options": map[string]interface{}{
@@ -369,8 +396,11 @@ func S3NGNoEvents(cfg *config.Config) map[string]interface{} {
"cache_database": cfg.FilemetadataCache.Database,
"cache_ttl": cfg.FilemetadataCache.TTL,
"cache_disable_persistence": cfg.FilemetadataCache.DisablePersistence,
"cache_auth_username": cfg.FilemetadataCache.AuthUsername,
"cache_auth_password": cfg.FilemetadataCache.AuthPassword,
"cache_auth_username": cfg.FilemetadataCache.AuthUsername,
"cache_auth_password": cfg.FilemetadataCache.AuthPassword,
"cache_enable_tls": cfg.FilemetadataCache.EnableTLS,
"cache_tls_insecure": cfg.FilemetadataCache.TLSInsecure,
"cache_tls_root_ca_certificate": cfg.FilemetadataCache.TLSRootCACertificate,
},
"idcache": map[string]interface{}{
"cache_store": cfg.IDCache.Store,
@@ -378,8 +408,11 @@ func S3NGNoEvents(cfg *config.Config) map[string]interface{} {
"cache_database": cfg.IDCache.Database,
"cache_ttl": cfg.IDCache.TTL,
"cache_disable_persistence": cfg.IDCache.DisablePersistence,
"cache_auth_username": cfg.IDCache.AuthUsername,
"cache_auth_password": cfg.IDCache.AuthPassword,
"cache_auth_username": cfg.IDCache.AuthUsername,
"cache_auth_password": cfg.IDCache.AuthPassword,
"cache_enable_tls": cfg.IDCache.EnableTLS,
"cache_tls_insecure": cfg.IDCache.TLSInsecure,
"cache_tls_root_ca_certificate": cfg.IDCache.TLSRootCACertificate,
},
}
}
+1
View File
@@ -95,6 +95,7 @@ func Server(cfg *config.Config) *cli.Command {
microstore.Database(cfg.Persistence.Database),
microstore.Table(cfg.Persistence.Table),
store.Authentication(cfg.Persistence.AuthUsername, cfg.Persistence.AuthPassword),
store.TLS(cfg.Persistence.EnableTLS, cfg.Persistence.TLSInsecure, cfg.Persistence.TLSRootCACertificate),
)
tm, err := pool.StringToTLSMode(cfg.GRPCClientTLS.Mode)
+5 -2
View File
@@ -45,8 +45,11 @@ type Persistence struct {
Database string `yaml:"database" env:"USERLOG_STORE_DATABASE" desc:"The database name the configured store should use." introductionVersion:"pre5.0"`
Table string `yaml:"table" env:"USERLOG_STORE_TABLE" desc:"The database table the store should use." introductionVersion:"pre5.0"`
TTL time.Duration `yaml:"ttl" env:"OCIS_PERSISTENT_STORE_TTL;USERLOG_STORE_TTL" desc:"Time to live for events in the store. Defaults to '336h' (2 weeks). See the Environment Variable Types description for more details." introductionVersion:"pre5.0"`
AuthUsername string `yaml:"username" env:"OCIS_PERSISTENT_STORE_AUTH_USERNAME;USERLOG_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthPassword string `yaml:"password" env:"OCIS_PERSISTENT_STORE_AUTH_PASSWORD;USERLOG_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthUsername string `yaml:"username" env:"OCIS_PERSISTENT_STORE_AUTH_USERNAME;USERLOG_STORE_AUTH_USERNAME" desc:"The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
AuthPassword string `yaml:"password" env:"OCIS_PERSISTENT_STORE_AUTH_PASSWORD;USERLOG_STORE_AUTH_PASSWORD" desc:"The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
EnableTLS bool `yaml:"enable_tls" env:"OCIS_PERSISTENT_STORE_ENABLE_TLS;USERLOG_STORE_ENABLE_TLS" desc:"Activate TLS for the connection to the store. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSInsecure bool `yaml:"tls_insecure" env:"OCIS_PERSISTENT_STORE_TLS_INSECURE;USERLOG_STORE_TLS_INSECURE" desc:"Disable TLS certificate verification for the store connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_PERSISTENT_STORE_TLS_ROOT_CA_CERTIFICATE;USERLOG_STORE_TLS_ROOT_CA_CERTIFICATE" desc:"Path to the PEM-encoded root CA certificate for the store TLS connection. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"8.3.0"`
}
// Events combines the configuration options for the event bus.
+1 -1
View File
@@ -34,7 +34,7 @@ ci-node-generate: build-assets
build-assets:
cd $(WEB_DIR) && pnpm install && pnpm check:types && pnpm build
cp $(WEB_DIR)/config/config.json.dist $(WEB_DIR)/dist/
git clean -xfd assets
if ! git status > /dev/null; then echo 'Re-extract the source to a clean directory to avoid leftover files.'; else git clean -xfd assets; fi
cp -r $(WEB_DIR)/dist/. assets/core/
############ licenses ############
+10 -6
View File
@@ -1831,29 +1831,33 @@ class GraphHelper {
/**
* @param string $baseUrl
* @param string $user
* @param string $password
* @param string|null $user
* @param string|null $password
* @param string $spaceId
* @param string $itemId
* @param mixed $body
* @param array $headers
* @param boolean $isVault
*
* @return ResponseInterface
* @throws GuzzleException
*/
public static function createLinkShare(
string $baseUrl,
string $user,
string $password,
?string $user,
?string $password,
string $spaceId,
string $itemId,
$body,
array $headers = [],
bool $isVault = false,
): ResponseInterface {
$url = self::getBetaFullUrl($baseUrl, "drives/$spaceId/items/$itemId/createLink");
$url = self::getBetaFullUrl($baseUrl, "drives/$spaceId/items/$itemId/createLink", $isVault);
return HttpRequestHelper::post(
$url,
$user,
$password,
self::getRequestHeaders(),
array_merge(self::getRequestHeaders(), $headers),
$body,
);
}
+1 -1
View File
@@ -192,7 +192,7 @@ class EmailContext implements Context {
$expectedEmailBodyContent,
$actualEmailBodyContent,
"The email address '$address' should have received an"
. "email with the body containing $expectedEmailBodyContent
. " email with the body containing $expectedEmailBodyContent
but the received email is $actualEmailBodyContent",
);
}
+76 -2
View File
@@ -48,6 +48,7 @@ trait Provisioning {
private array $createdGroups = [];
private array $userTokens = [];
private array $createdKeycloakUsers = [];
private ?Ldap $idmLdap = null;
/**
* @param array $user
@@ -364,8 +365,7 @@ trait Provisioning {
'baseDn' => $this->ldapBaseDN,
'username' => $this->ldapAdminUser,
];
$this->ldap = new Ldap($options);
$this->ldap->bind();
$this->ldap = $this->bindLdap($options);
$ldifFile = __DIR__ . $suiteParameters['ldapInitialUserFilePath'];
if (!$this->skipImportLdif) {
@@ -379,6 +379,78 @@ trait Provisioning {
}
}
/**
* Connects to the LDAP server bundled with oCIS (IDM) to allow direct
* inspection of entries that oCIS services write, e.g. the objectClass
* that the graph service sets on group entries. Connection parameters
* match the IDM defaults used by the acceptance test environment.
*
* @return void
*/
private function connectToIdm(): void {
if ($this->idmLdap !== null) {
return;
}
\putenv('LDAPTLS_REQCERT=never');
$idmHost = '';
$hostSourceEnvs = ['TEST_SERVER_URL', 'OCIS_WRAPPER_URL'];
foreach ($hostSourceEnvs as $envName) {
$envValue = \getenv($envName);
if ($envValue !== false && $envValue !== '') {
$idmHost = \parse_url($envValue, PHP_URL_HOST) ?: $envValue;
break;
}
}
$options = [
'host' => $idmHost ?: '127.0.0.1',
'port' => 9235,
'useSsl' => true,
'baseDn' => 'o=libregraph-idm',
'bindRequiresDn' => true,
'username' => 'uid=admin,ou=users,o=libregraph-idm',
'password' => \getenv('IDM_ADMIN_PASSWORD') ?: 'admin',
];
$this->idmLdap = $this->bindLdap($options);
}
/**
* Creates a bound Ldap connection from the given options.
*
* @param array $options
*
* @return Ldap
*/
private function bindLdap(array $options): Ldap {
$ldap = new Ldap($options);
$ldap->bind();
return $ldap;
}
/**
* @Then /^the LDAP entry "([^"]*)" should (not|)\s?have the object class "([^"]*)"$/
*
* @param string $dn
* @param string $shouldOrNot (not|)
* @param string $objectClass
*
* @return void
*/
public function theLdapEntryShouldHaveObjectClass(string $dn, string $shouldOrNot, string $objectClass): void {
$this->connectToIdm();
$entry = $this->idmLdap->getEntry($dn);
Assert::assertNotNull($entry, "LDAP entry '$dn' does not exist");
$objectClasses = \array_map('strtolower', Laminas\Ldap\Attribute::getAttribute($entry, 'objectClass'));
$shouldHave = ($shouldOrNot !== "not");
$message = "Expected LDAP entry '$dn' to "
. ($shouldHave ? 'have' : 'not have')
. " the object class '$objectClass', but the entry has: "
. \implode(', ', $objectClasses);
Assert::assertTrue(
\in_array(\strtolower($objectClass), $objectClasses, true) === $shouldHave,
$message,
);
}
/**
* prepares a suitable nested array with user-attributes for multiple users to be created
*
@@ -626,6 +698,8 @@ trait Provisioning {
return;
}
KeycloakHelper::resetAdminAccessToken();
// Clean up any existing TOTP credentials for admin user so MFA can be set up fresh in every scenario.
KeycloakHelper::deleteUserTotpCredentials('admin');
$adminUser = [
"password" => "admin",
"displayname" => "Admin Admin",
@@ -71,14 +71,15 @@ class SharingNgContext implements Context {
public function createLinkShare(string $user, TableNode $body): ResponseInterface {
$bodyRows = $body->getRowsHash();
$resource = $bodyRows['resource'] ?? "";
$isVault = isset($bodyRows['storage']) && $bodyRows['storage'] === 'vault';
$space = $this->spacesContext->getSpaceByName($user, $bodyRows['space']);
$space = $this->spacesContext->getSpaceByName($user, $bodyRows['space'], $isVault);
$spaceId = $space['id'];
if ($resource === '' && !\in_array($bodyRows['space'], ['Personal', 'Shares'])) {
$itemId = $space['fileId'];
} else {
$itemId = $this->spacesContext->getResourceId($user, $bodyRows['space'], $resource);
$itemId = $this->spacesContext->getResourceId($user, $bodyRows['space'], $resource, $isVault);
}
$bodyRows['quickLink'] = $bodyRows['quickLink'] ?? false;
@@ -97,13 +98,25 @@ class SharingNgContext implements Context {
'password' => $this->featureContext->getActualPassword($bodyRows['password']),
];
$headers = [];
if (KeycloakHelper::isTestingWithKeycloak()) {
$accessToken = $this->featureContext->getOcisUserToken($user)['token']['accessToken'];
$headers['Authorization'] = 'Bearer ' . $accessToken;
$user = null;
$password = null;
} else {
$password = $this->featureContext->getPasswordForUser($user);
}
$response = GraphHelper::createLinkShare(
$this->featureContext->getBaseUrl(),
$user,
$this->featureContext->getPasswordForUser($user),
$password,
$spaceId,
$itemId,
\json_encode($body),
$headers,
$isVault,
);
if ($response->getStatusCode() == 200) {
+27 -2
View File
@@ -1929,11 +1929,12 @@ class SpacesContext implements Context {
}
/**
* @Given /^user "([^"]*)" has created a space "([^"]*)"(| in vault)? with the default quota using the Graph API$/
* @Given /^user "([^"]*)" has created a space "([^"]*)"(| in vault)?(| with retry) with the default quota using the Graph API$/
*
* @param string $user
* @param string $spaceName
* @param string $isVault
* @param string $withRetry
*
* @return void
*
@@ -1944,10 +1945,22 @@ class SpacesContext implements Context {
string $user,
string $spaceName,
string $isVault,
string $withRetry,
): void {
$space = ["name" => $spaceName];
$isVault = trim($isVault) === "in vault";
$withRetry = trim($withRetry) === "with retry";
// The user role may take some time to update
// This can cause an unauthorized error
// Retry once after 1 second
$response = $this->createSpace($user, $space, $isVault);
if ($withRetry && $response->getStatusCode() === 401) {
sleep(1); // Wait 1 second before retrying.
$response = $this->createSpace($user, $space, $isVault);
}
$this->featureContext->theHTTPStatusCodeShouldBe(
201,
"Expected response status code should be 201 (Created)",
@@ -2593,7 +2606,19 @@ class SpacesContext implements Context {
}
$fullUrl = "$baseUrl/$sourceDavPath/$fileId";
if ($actionType === 'copied') {
$response = $this->copyFilesAndFoldersRequest($user, $fullUrl, $headers);
// while performing copy operation,
// sometime it will return 500 error.
// So we need to retry the copy operation.
$maxAttempts = 3;
for ($attempt = 1; $attempt <= $maxAttempts; $attempt++) {
$response = $this->copyFilesAndFoldersRequest($user, $fullUrl, $headers);
if ($response->getStatusCode() !== 500) {
break;
}
if ($attempt < $maxAttempts) {
\sleep(1);
}
}
} else {
$response = $this->moveFilesAndFoldersRequest($user, $fullUrl, $headers);
}
+2 -2
View File
@@ -94,7 +94,7 @@ class VaultContext implements Context {
}
/**
* @Then user :user should have acr value :acr
* @Then user :user should have a JWT token with an ACR value :acr
*
* @param string $user
* @param string $acr
@@ -102,7 +102,7 @@ class VaultContext implements Context {
* @return void
* @throws Exception
*/
public function userShouldHaveAcrValue(string $user, string $acr): void {
public function userShouldHaveAJwtTokenWithAnAcrValue(string $user, string $acr): void {
$accessToken = $this->featureContext->getOcisUserToken($user)['token']['accessToken'];
// Decode JWT token
@@ -155,18 +155,6 @@ _ocdav: api compatibility, return correct status code_
- [coreApiTrashbin/trashbinDelete.feature:92](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiTrashbin/trashbinDelete.feature#L92)
#### [MOVE a file into same folder with same name returns 404 instead of 403](https://github.com/owncloud/ocis/issues/1976)
- [coreApiWebdavMove2/moveFile.feature:100](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L100)
- [coreApiWebdavMove2/moveFile.feature:101](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L101)
- [coreApiWebdavMove2/moveFile.feature:102](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L102)
- [coreApiWebdavMove1/moveFolder.feature:217](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L217)
- [coreApiWebdavMove1/moveFolder.feature:218](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L218)
- [coreApiWebdavMove1/moveFolder.feature:219](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L219)
- [coreApiWebdavMove2/moveShareOnOcis.feature:334](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOcis.feature#L334)
- [coreApiWebdavMove2/moveShareOnOcis.feature:337](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOcis.feature#L337)
- [coreApiWebdavMove2/moveShareOnOcis.feature:340](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOcis.feature#L340)
#### [COPY file/folder to same name is possible (but 500 code error for folder with spaces path)](https://github.com/owncloud/ocis/issues/8711)
- [coreApiSharePublicLink2/copyFromPublicLink.feature:198](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L198)
@@ -203,19 +203,8 @@ The expected failures in this file are from features in the owncloud/ocis repo.
#### [sharee (editor role) MOVE a file by file-id into shared sub-folder returns 502](https://github.com/owncloud/ocis/issues/7617)
- [apiSpacesDavOperation/moveByFileId.feature:368](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L368)
- [apiSpacesDavOperation/moveByFileId.feature:591](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L591)
#### [MOVE a file into same folder with same name returns 404 instead of 403](https://github.com/owncloud/ocis/issues/1976)
- [apiSpacesShares/moveSpaces.feature:69](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L69)
- [apiSpacesShares/moveSpaces.feature:70](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L70)
- [apiSpacesShares/moveSpaces.feature:416](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/moveSpaces.feature#L416)
- [apiSpacesDavOperation/moveByFileId.feature:61](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L61)
- [apiSpacesDavOperation/moveByFileId.feature:174](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L174)
- [apiSpacesDavOperation/moveByFileId.feature:175](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L175)
- [apiSpacesDavOperation/moveByFileId.feature:176](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L176)
- [apiSpacesDavOperation/moveByFileId.feature:393](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L393)
- [apiSpacesDavOperation/moveByFileId.feature:367](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L367)
- [apiSpacesDavOperation/moveByFileId.feature:590](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesDavOperation/moveByFileId.feature#L590)
#### [OCM. admin cannot get federated users if he hasn't connection with them ](https://github.com/owncloud/ocis/issues/9829)
@@ -269,6 +258,8 @@ The expected failures in this file are from features in the owncloud/ocis repo.
- [apiSearch2/tagSearch.feature:207](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSearch2/tagSearch.feature#L207)
- [apiSearch2/tagSearch.feature:225](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSearch2/tagSearch.feature#L225)
- [apiSearch2/tagSearch.feature:226](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSearch2/tagSearch.feature#L226)
- [apiSearch2/tagSearch.feature:293](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSearch2/tagSearch.feature#L293)
- [apiSearch2/tagSearch.feature:294](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSearch2/tagSearch.feature#L294)
- [apiSearchContent/contentSearch.feature:25](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSearchContent/contentSearch.feature#L25)
- [apiSearchContent/contentSearch.feature:26](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSearchContent/contentSearch.feature#L26)
- [apiSearchContent/contentSearch.feature:49](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSearchContent/contentSearch.feature#L49)
@@ -399,7 +390,6 @@ The expected failures in this file are from features in the owncloud/ocis repo.
- [apiGraphUser/editUser.feature:231](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUser/editUser.feature#L231)
- [apiGraphUser/editUser.feature:235](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUser/editUser.feature#L235)
- [apiGraphUser/getUser.feature:696](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUser/getUser.feature#L696)
- [apiGraphUser/getUser.feature:700](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUser/getUser.feature#L700)
#### [metadata search gives 500](https://github.com/owncloud/ocis/issues/12230)
- [apiSearchContent/metadataSerch.feature:30](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSearchContent/metadataSerch.feature#L30)
@@ -834,7 +834,7 @@ Feature: collaboration (wopi)
Scenario: user with Viewer role tries to create a odt file inside shared project space using wopi endpoint
Given using spaces DAV path
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Alice" has created a space "new-space" with retry with the default quota using the Graph API
And user "Alice" has created a folder "testFolder" in space "new-space"
And user "Alice" has sent the following space share invitation:
| space | new-space |
@@ -47,3 +47,11 @@ Feature: create group
Scenario: admin user tries to create a group that is the empty string
When user "Alice" tries to create a group "" using the Graph API
Then the HTTP status code should be "400"
@env-config @issue-11775
Scenario: admin creates a group with the configured LDAP group object class
Given the config "OCIS_LDAP_GROUP_OBJECTCLASS" has been set to "groupOfUniqueNames" for "graph" service
When the administrator creates a group "uniquegroup" using the Graph API
Then the HTTP status code should be "201"
And the LDAP entry "cn=uniquegroup,ou=groups,o=libregraph-idm" should have the object class "groupOfUniqueNames"
And the LDAP entry "cn=uniquegroup,ou=groups,o=libregraph-idm" should not have the object class "groupOfNames"
@@ -694,10 +694,6 @@ Feature: get users
| Admin | Space Admin |
| Admin | User |
| Admin | User Light |
| Space Admin | Admin |
| Space Admin | Space Admin |
| Space Admin | User |
| Space Admin | User Light |
Scenario Outline: non-admin user tries to get drive information of other user with different user role
@@ -723,15 +719,19 @@ Feature: get users
}
"""
Examples:
| user-role | user-role-2 |
| User | Admin |
| User | Space Admin |
| User | User |
| User | User Light |
| User Light | Admin |
| User Light | Space Admin |
| User Light | User |
| User Light | User Light |
| user-role | user-role-2 |
| Space Admin | Admin |
| Space Admin | Space Admin |
| Space Admin | User |
| Space Admin | User Light |
| User | Admin |
| User | Space Admin |
| User | User |
| User | User Light |
| User Light | Admin |
| User Light | Space Admin |
| User Light | User |
| User Light | User Light |
Scenario Outline: user with different user role gets his/her own drive information
@@ -414,3 +414,30 @@ Feature: Notification
| resource |
| HelloWorld |
| text.txt |
@issue-11908 @email
Scenario: recipient should not get PO file headers on removing access from resource for translated locale
Given user "Brian" has switched the system language to "es" using the Graph API
And user "Alice" has sent the following resource share invitation:
| resource | textfile1.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
When user "Alice" removes the access of user "Brian" from resource "textfile1.txt" of space "Personal" using the Graph API
Then the HTTP status code should be "204"
And user "Brian" should get a notification with subject "Recurso no compartido" and message:
| message |
| Alice Hansen dejó de compartir textfile1.txt contigo |
And user "Brian" should have received the following email from user "Alice"
"""
Hola Brian Murphy,
Alice Hansen ha eliminado la compartición 'textfile1.txt' con usted.
incluso habiendo eliminado esta compartición, usted podría tener acceso a través de otras comparticiones y/o membresías en spaces.
---
ownCloud - Store. Share. Work.
"""
@@ -263,3 +263,33 @@ Feature: tag search
| tag:mathe NOT name:exercises | 1 | /answers | |
| tag:mathe AND NOT name:exercises | 1 | /answers | |
| NOT tag:mathe | 2 | /verification work | /withoutTagFolder |
Scenario Outline: user removes an already-removed tag from a file and searches using that tag
Given using <dav-path-version> DAV path
And user "Alice" has created the following folders
| path |
| folderWithFile |
And user "Alice" has uploaded the following files with content "some data"
| path |
| fileInRootLevel.txt |
| folderWithFile/fileInsideFolder.txt |
And user "Alice" has tagged the following files of the space "Personal":
| path | tagName |
| fileInRootLevel.txt | tag1 |
| folderWithFile/fileInsideFolder.txt | tag1 |
And user "Alice" has removed the following tags for file "fileInRootLevel.txt" of space "Personal":
| tag1 |
When user "Alice" removes the following tags for file "fileInRootLevel.txt" of space "Personal":
| tag1 |
Then the HTTP status code should be "200"
When user "Alice" searches for "Tags:tag1" using the WebDAV API
Then the HTTP status code should be "207"
And the search result should contain "1" entries
And the search result of user "Alice" should contain only these files:
| folderWithFile/fileInsideFolder.txt |
Examples:
| dav-path-version |
| old |
| new |
| spaces |
@@ -311,3 +311,67 @@ Feature: Remove access to a drive item
Then the HTTP status code should be "204"
And for user "Brian" the space "Shares" should not contain these entries:
| folderToShare |
Scenario Outline: space viewer and space editor tries to remove the space creator from the project space using the permissions endpoint
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
And user "Alice" has sent the following space share invitation:
| space | NewSpace |
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions-role> |
When user "Brian" removes the access of user "Alice" from space "NewSpace" using permissions endpoint of the Graph API
Then the HTTP status code should be "403"
And the user "Alice" should have a space called "NewSpace"
And the user "Brian" should have a space called "NewSpace"
Examples:
| permissions-role |
| Space Viewer |
| Space Editor |
Scenario: space manager can remove the space creator from the project space using the permissions endpoint
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
And user "Alice" has sent the following space share invitation:
| space | NewSpace |
| sharee | Brian |
| shareType | user |
| permissionsRole | Manager |
When user "Brian" removes the access of user "Alice" from space "NewSpace" using permissions endpoint of the Graph API
Then the HTTP status code should be "204"
And the user "Alice" should not have a space called "NewSpace"
And the user "Brian" should have a space called "NewSpace"
Scenario Outline: space viewer and space editor tries to remove themselves from the project space using the permissions endpoint
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
And user "Alice" has sent the following space share invitation:
| space | NewSpace |
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions-role> |
When user "Brian" removes the access of user "Brian" from space "NewSpace" using permissions endpoint of the Graph API
Then the HTTP status code should be "403"
And the user "Alice" should have a space called "NewSpace"
And the user "Brian" should have a space called "NewSpace"
Examples:
| permissions-role |
| Space Viewer |
| Space Editor |
Scenario: space manager can remove themselves from the project space using the permissions endpoint
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
And user "Alice" has sent the following space share invitation:
| space | NewSpace |
| sharee | Brian |
| shareType | user |
| permissionsRole | Manager |
When user "Brian" removes the access of user "Brian" from space "NewSpace" using permissions endpoint of the Graph API
Then the HTTP status code should be "204"
And the user "Brian" should not have a space called "NewSpace"
And the user "Alice" should have a space called "NewSpace"
@@ -49,10 +49,10 @@ Feature: Space management
And the json response should not contain a space with name "Alice Hansen"
Scenario: space admin user can see another personal spaces
Scenario: space admin user cannot see another user's personal space
When user "Brian" lists all spaces via the Graph API with query "$filter=driveType eq 'personal'"
Then the HTTP status code should be "200"
And the JSON response should contain space called "Alice Hansen" and match
And the JSON response should contain space called "Brian Murphy" and match
"""
{
"type": "object",
@@ -64,7 +64,7 @@ Feature: Space management
"properties": {
"name": {
"type": "string",
"enum": ["Alice Hansen"]
"enum": ["Brian Murphy"]
},
"driveType": {
"type": "string",
@@ -77,6 +77,7 @@ Feature: Space management
}
}
"""
And the json response should not contain a space with name "Alice Hansen"
And the json response should not contain a space with name "Project"
@@ -57,12 +57,12 @@ Feature: moving/renaming file using file id
But for user "Alice" folder "folder/sub-folder" of the space "Personal" should not contain these files:
| textfile.txt |
@issue-1976
Scenario: try to move a file into same folder with same name
Scenario: move a file into same folder with same name
And user "Alice" has uploaded file with content "some data" to "textfile.txt"
And we save it into "FILEID"
When user "Alice" moves file with id "<<FILEID>>" as "textfile.txt" into folder "/" inside space "Personal"
Then the HTTP status code should be "403"
Then the HTTP status code should be "204"
And as "Alice" file "textfile.txt" should not exist in the trashbin of the space "Personal"
And for user "Alice" the content of the file "textfile.txt" of the space "Personal" should be "some data"
@@ -153,8 +153,8 @@ Feature: moving/renaming file using file id
| Manager |
| Space Editor |
@issue-1976
Scenario Outline: try to move a file within a project space into a folder with same name
Scenario Outline: move a file within a project space into a folder with same name
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Brian" has been created with default attributes
And user "Alice" has created a space "project-space" with the default quota using the Graph API
@@ -166,14 +166,13 @@ Feature: moving/renaming file using file id
| shareType | user |
| permissionsRole | <space-role> |
When user "Brian" moves file with id "<<FILEID>>" as "textfile.txt" into folder "/" inside space "project-space"
Then the HTTP status code should be "403"
Then the HTTP status code should be "<http-status-code>"
And as "Alice" file "textfile.txt" should not exist in the trashbin of the space "project-space"
And for user "Brian" the content of the file "textfile.txt" of the space "project-space" should be "some data"
Examples:
| space-role |
| Manager |
| Space Viewer |
| viewer |
| space-role | http-status-code |
| Manager | 204 |
| Space Viewer | 403 |
Scenario: try to move a file into a folder inside project space (viewer)
@@ -389,8 +388,8 @@ Feature: moving/renaming file using file id
And for user "Alice" folder "folder" of the space "Personal" should not contain these files:
| test.txt |
@issue-1976
Scenario: sharee tries to move a file into same shared folder with same name
Scenario: sharee moves a file into same shared folder with same name
Given user "Brian" has been created with default attributes
And user "Alice" has created folder "folder"
And user "Alice" has uploaded file with content "some data" to "folder/test.txt"
@@ -403,7 +402,7 @@ Feature: moving/renaming file using file id
| permissionsRole | Editor |
And user "Brian" has a share "/folder" synced
When user "Brian" moves file with id "<<FILEID>>" as "test.txt" into folder "folder" inside space "Shares"
Then the HTTP status code should be "403"
Then the HTTP status code should be "204"
And as "Alice" file "test.txt" should not exist in the trashbin of the space "Personal"
And for user "Brian" the content of the file "folder/test.txt" of the space "Shares" should be "some data"
And for user "Alice" the content of the file "folder/test.txt" of the space "Personal" should be "some data"
@@ -50,8 +50,8 @@ Feature: move (rename) file
But for user "Alice" the space "Project" should contain these entries:
| insideSpace.txt |
@issue-1976
Scenario Outline: try to move a file within a project space into a folder with same name
Scenario Outline: move a file within a project space into a folder with same name
Given the administrator has assigned the role "Space Admin" to user "Brian" using the Graph API
And user "Brian" has created a space "Project" with the default quota using the Graph API
And user "Brian" has uploaded a file inside space "Project" with content "some content" to "insideSpace.txt"
@@ -61,14 +61,14 @@ Feature: move (rename) file
| shareType | user |
| permissionsRole | <space-role> |
When user "Alice" moves file "insideSpace.txt" from space "Project" to "insideSpace.txt" inside space "Project" using the WebDAV API
Then the HTTP status code should be "403"
Then the HTTP status code should be "<http-status-code>"
And as "Brian" file "insideSpace.txt" should not exist in the trashbin of the space "Project"
And for user "Alice" the content of the file "insideSpace.txt" of the space "Project" should be "some content"
Examples:
| space-role |
| Manager |
| Space Editor |
| Space Viewer |
| space-role | http-status-code |
| Manager | 204 |
| Space Editor | 204 |
| Space Viewer | 403 |
@issue-8116
Scenario Outline: user moves a file from a space project with different a role to a space project with different role
@@ -395,8 +395,8 @@ Feature: move (rename) file
But for user "Alice" folder "testshare" of the space "Shares" should contain these entries:
| testfile.txt |
@issue-1976
Scenario Outline: sharee tries to move a file into same shared folder with same name
Scenario Outline: sharee moves a file into same shared folder with same name
Given user "Brian" has created folder "testshare"
And user "Brian" has uploaded file with content "test file content" to "testshare/testfile.txt"
And user "Brian" has sent the following resource share invitation:
@@ -407,15 +407,15 @@ Feature: move (rename) file
| permissionsRole | <permissions-role> |
And user "Alice" has a share "testshare" synced
When user "Alice" moves file "testshare/testfile.txt" from space "Shares" to "testshare/testfile.txt" inside space "Shares" using the WebDAV API
Then the HTTP status code should be "403"
Then the HTTP status code should be "<http-status-code>"
And as "Brian" file "testfile.txt" should not exist in the trashbin of the space "Personal"
And for user "Alice" the content of the file "testshare/testfile.txt" of the space "Shares" should be "test file content"
And for user "Brian" the content of the file "testshare/testfile.txt" of the space "Personal" should be "test file content"
Examples:
| permissions-role |
| Editor |
| Uploader |
| Viewer |
| permissions-role | http-status-code |
| Editor | 204 |
| Uploader | 403 |
| Viewer | 403 |
Scenario: overwrite a file while moving in project space
@@ -61,7 +61,7 @@ Feature: vault
And user "Alice" has logged in via web UI
When user "Alice" uploads a file inside space "Personal" with content "some content" to "vaultFile.txt" in vault using the WebDAV API
Then the HTTP status code should be "201"
And user "Alice" should have acr value "testing"
And user "Alice" should have a JWT token with an ACR value "testing"
Scenario: check capabilities endpoint for vault
@@ -275,6 +275,123 @@ Feature: vault
| testfile.txt |
Scenario: user tries to create a public link of a folder inside vault
Given user "Alice" has logged in via web UI
And user "Alice" has created a folder "vaultFolder" in space "Personal" in vault
When user "Alice" creates the following resource link share using the Graph API:
| resource | vaultFolder |
| space | Personal |
| permissionsRole | View |
| storage | vault |
Then the HTTP status code should be "400"
And the JSON data of the response should match
"""
{
"type": "object",
"required": ["error"],
"properties": {
"error": {
"type": "object",
"required": ["code", "innererror", "message"],
"properties": {
"code": {
"const": "invalidRequest"
},
"innererror": {
"type": "object",
"required": [
"date",
"request-id"
]
},
"message": {
"const": "public links are not allowed for vault resources"
}
}
}
}
}
"""
Scenario: user tries to create a public link of a file inside vault
Given user "Alice" has logged in via web UI
And user "Alice" has uploaded a file inside space "Personal" with content "some content" to "testfile.txt" in vault
When user "Alice" creates the following resource link share using the Graph API:
| resource | testfile.txt |
| space | Personal |
| permissionsRole | View |
| storage | vault |
Then the HTTP status code should be "400"
And the JSON data of the response should match
"""
{
"type": "object",
"required": ["error"],
"properties": {
"error": {
"type": "object",
"required": ["code", "innererror", "message"],
"properties": {
"code": {
"const": "invalidRequest"
},
"innererror": {
"type": "object",
"required": [
"date",
"request-id"
]
},
"message": {
"const": "public links are not allowed for vault resources"
}
}
}
}
}
"""
Scenario: user tries to create a public link of a space root inside vault
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has logged in via web UI
And user "Alice" has created a space "vault-space" in vault with the default quota using the Graph API
When user "Alice" tries to create the following space link share using permissions endpoint of the Graph API:
| space | vault-space |
| permissionsRole | View |
| storage | vault |
Then the HTTP status code should be "400"
And the JSON data of the response should match
"""
{
"type": "object",
"required": ["error"],
"properties": {
"error": {
"type": "object",
"required": ["code", "innererror", "message"],
"properties": {
"code": {
"const": "invalidRequest"
},
"innererror": {
"type": "object",
"required": [
"date",
"request-id"
]
},
"message": {
"const": "public links are not allowed for vault resources"
}
}
}
}
}
"""
Scenario Outline: send share invitation for project space in vault to user with different roles (permissions endpoint)
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has logged in via web UI
@@ -90,9 +90,9 @@ Feature: sharing
@issue-8242 @env-config
Scenario Outline: share receiver renames the shared item (old/new webdav)
Given user "Alice" has uploaded file with content "foo" to "/sharefile.txt"
Given using <dav-path-version> DAV path
And the administrator has enabled the permissions role "Secure Viewer"
And using <dav-path-version> DAV path
And user "Alice" has uploaded file with content "foo" to "/sharefile.txt"
And user "Alice" has sent the following resource share invitation:
| resource | sharefile.txt |
| space | Personal |
@@ -133,8 +133,9 @@ Feature: sharing
@issue-8242 @env-config
Scenario Outline: share receiver renames the shared item (spaces webdav)
Given user "Alice" has uploaded file with content "foo" to "/sharefile.txt"
Given using spaces DAV path
And the administrator has enabled the permissions role "Secure Viewer"
And user "Alice" has uploaded file with content "foo" to "/sharefile.txt"
And user "Alice" has sent the following resource share invitation:
| resource | sharefile.txt |
| space | Personal |
@@ -154,7 +155,6 @@ Feature: sharing
And as "Carol" file "Shares/renamedsharefile.txt" should exist
And as "Brian" file "Shares/sharefile.txt" should exist
And as "Alice" file "sharefile.txt" should exist
And using spaces DAV path
When user "Carol" sends HTTP method "PROPFIND" to URL "<dav-path>"
Then the HTTP status code should be "207"
And as user "Carol" the value of the item "//oc:name" of path "<dav-path>/renamedsharefile.txt" in the response should be "renamedsharefile.txt"
@@ -205,12 +205,13 @@ Feature: move (rename) folder
| new |
| spaces |
@issue-1976
Scenario Outline: try to rename folder to same name
Scenario Outline: rename folder to same name
Given using <dav-path-version> DAV path
And user "Alice" has created folder "testFolder"
When user "Alice" moves folder "testFolder" to "testFolder" using the WebDAV API
Then the HTTP status code should be "404"
Then the HTTP status code should be "204"
And as "Alice" folder "testFolder" should exist
And as "Alice" the folder with original path "testFolder" should not exist in the trashbin
Examples:
| dav-path-version |
@@ -87,12 +87,12 @@ Feature: move (rename) file
| new |
| spaces |
@issue-1976
Scenario Outline: try to move a file into same folder with same name
Scenario Outline: move a file into same folder with same name
Given using <dav-path-version> DAV path
And user "Alice" has uploaded file with content "ownCloud test text file" to "testfile.txt"
When user "Alice" moves file "testfile.txt" to "testfile.txt" using the WebDAV API
Then the HTTP status code should be "403"
Then the HTTP status code should be "204"
And as "Alice" the file with original path "testfile.txt" should not exist in the trashbin
And the content of file "testfile.txt" for user "Alice" should be "ownCloud test text file"
Examples:
@@ -309,8 +309,8 @@ Feature: move (rename) file
| new |
| spaces |
@issue-1976
Scenario Outline: sharee tries to move a file into same shared folder with same name
Scenario Outline: sharee moves a file into same shared folder with same name
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Brian" has created folder "testshare"
@@ -323,18 +323,18 @@ Feature: move (rename) file
| permissionsRole | <permissions-role> |
And user "Alice" has a share "testshare" synced
When user "Alice" moves folder "Shares/testshare/testfile.txt" to "Shares/testshare/testfile.txt" using the WebDAV API
Then the HTTP status code should be "403"
Then the HTTP status code should be "<http-status-code>"
And as "Brian" the file with original path "testshare/testfile.txt" should not exist in the trashbin
And the content of file "Shares/testshare/testfile.txt" for user "Alice" should be "test data"
And the content of file "testshare/testfile.txt" for user "Brian" should be "test data"
Examples:
| dav-path-version | permissions-role |
| old | Viewer |
| old | Uploader |
| old | Editor |
| new | Viewer |
| new | Uploader |
| new | Editor |
| spaces | Viewer |
| spaces | Uploader |
| spaces | Editor |
| dav-path-version | permissions-role | http-status-code |
| old | Viewer | 403 |
| old | Uploader | 403 |
| old | Editor | 204 |
| new | Viewer | 403 |
| new | Uploader | 403 |
| new | Editor | 204 |
| spaces | Viewer | 403 |
| spaces | Uploader | 403 |
| spaces | Editor | 204 |
@@ -219,7 +219,7 @@ Feature: download file
And the following headers should be set
| header | value |
| Content-Disposition | attachment; filename*=UTF-8''<encoded-file-name>; filename="<file-name>" |
| Content-Security-Policy | child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; default-src 'none'; font-src 'self' data:; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline' |
| Content-Security-Policy | child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/ https://marketplace.owncloud.com/; default-src 'none'; font-src 'self' data:; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/ https://marketplace.owncloud.com/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline' |
| X-Content-Type-Options | nosniff |
| X-Frame-Options | SAMEORIGIN |
| X-Permitted-Cross-Domain-Policies | none |
@@ -246,7 +246,7 @@ Feature: download file
And the following headers should be set
| header | value |
| Content-Disposition | attachment; filename*=UTF-8''%22quote%22double%22.txt; filename=""quote"double".txt" |
| Content-Security-Policy | child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; default-src 'none'; font-src 'self' data:; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline' |
| Content-Security-Policy | child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/ https://marketplace.owncloud.com/; default-src 'none'; font-src 'self' data:; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/ https://marketplace.owncloud.com/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline' |
| X-Content-Type-Options | nosniff |
| X-Frame-Options | SAMEORIGIN |
| X-Permitted-Cross-Domain-Policies | none |
+2
View File
@@ -5,6 +5,7 @@ directives:
- '''self'''
- 'blob:'
- 'https://raw.githubusercontent.com/owncloud/awesome-ocis/'
- 'https://marketplace.owncloud.com/'
# In contrary to bash and docker the default is given after the | character
- 'https://${KEYCLOAK_DOMAIN|keycloak.owncloud.test}/'
- 'https://localhost:8443/'
@@ -27,6 +28,7 @@ directives:
- 'data:'
- 'blob:'
- 'https://raw.githubusercontent.com/owncloud/awesome-ocis/'
- 'https://marketplace.owncloud.com/'
# In contrary to bash and docker the default is given after the | character
- 'https://${ONLYOFFICE_DOMAIN|onlyoffice:443}/'
- 'https://${COLLABORA_DOMAIN|collabora:9980}/'
+2
View File
@@ -94,6 +94,7 @@ http:
- "'self'"
- 'blob:'
- 'https://raw.githubusercontent.com/owncloud/awesome-ocis/'
- 'https://marketplace.owncloud.com/'
defaultSrc:
- "'none'"
fontSrc:
@@ -110,6 +111,7 @@ http:
- 'data:'
- 'blob:'
- 'https://raw.githubusercontent.com/owncloud/awesome-ocis/'
- 'https://marketplace.owncloud.com/'
manifestSrc:
- "'self'"
mediaSrc:
@@ -13,3 +13,18 @@ msgstr "Zum Ansehen hier klicken: {ShareLink}"
msgid "{SpaceSharer} has invited you to join \"{SpaceName}\"."
msgstr "{SpaceSharer} hat Sie eingeladen, dem Space \"{SpaceName}\" beizutreten."
msgid "Hello {ShareGrantee},"
msgstr "Hallo {ShareGrantee},"
msgid ""
"{ShareSharer} has unshared '{ShareFolder}' with you.\n"
"\n"
"Even though this share has been revoked you still might have access through other shares and/or space memberships."
msgstr ""
"{ShareSharer} hat den Ordner '{ShareFolder}' nicht mehr mit Dir geteilt.\n"
"\n"
"Auch wenn diese Freigabe widerrufen wurde, haben Sie möglicherweise noch Zugriff über andere Freigaben und/oder Space Mitgliedschaften."
msgid "{ShareSharer} unshared '{ShareFolder}' with you"
msgstr "{ShareSharer} hat den Ordner '{ShareFolder}' nicht mehr mit Dir geteilt"
Loaded 100 of 589 files, more files were not shown because too many files have changed in this diff. Show more