Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a0f281970 |
No files matched your search
+3
-3
@@ -1,3 +1,3 @@
|
||||
# Managed by owncloud/admin — edit codeowners/ownership.yml, not this file.
|
||||
# Generated by scripts/sync-codeowners.py. Last matching pattern wins.
|
||||
* @owncloud/ocis-maintainers
|
||||
services/settings/ @lukashirt
|
||||
services/web/ @lukashirt
|
||||
assets/End-User-License-Agreement-for-ownCloud-Infinite-Scale.pdf @kobergj @hodyroff
|
||||
@@ -54,7 +54,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
|
||||
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
cache: true
|
||||
@@ -66,7 +66,7 @@ jobs:
|
||||
- name: Enable pnpm
|
||||
run: corepack enable && corepack prepare pnpm@10.28.1 --activate
|
||||
|
||||
- uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
|
||||
- uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
|
||||
with:
|
||||
php-version: "8.4"
|
||||
extensions: curl, xml, mbstring, zip, ldap, gd
|
||||
@@ -91,7 +91,6 @@ jobs:
|
||||
make govulncheck > /tmp/govulncheck.log 2>&1 & PIDS+=($!)
|
||||
make ci-node-generate > /tmp/node-gen.log 2>&1 & PIDS+=($!)
|
||||
make ci-go-generate > /tmp/go-gen.log 2>&1 & PIDS+=($!)
|
||||
make changelog-lint > /tmp/changelog-lint.log 2>&1 & PIDS+=($!)
|
||||
|
||||
FAILED=0
|
||||
for PID in "${PIDS[@]}"; do wait "$PID" || FAILED=1; done
|
||||
@@ -114,19 +113,9 @@ jobs:
|
||||
echo "=== govulncheck ===" && cat /tmp/govulncheck.log
|
||||
echo "=== ci-node-generate ===" && cat /tmp/node-gen.log
|
||||
echo "=== ci-go-generate ===" && cat /tmp/go-gen.log
|
||||
echo "=== changelog-lint ===" && cat /tmp/changelog-lint.log
|
||||
|
||||
exit $FAILED
|
||||
|
||||
- name: Trivy scan
|
||||
uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0
|
||||
with:
|
||||
scan-type: fs
|
||||
format: table
|
||||
exit-code: 1
|
||||
severity: CRITICAL,HIGH
|
||||
trivy-config: .trivy.yaml
|
||||
|
||||
- name: Build, lint and test
|
||||
run: |
|
||||
# Phase 2 — all three are CPU-bound Go compilation on 2 vCPU.
|
||||
@@ -220,7 +209,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
|
||||
- uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
|
||||
with:
|
||||
php-version: "8.4"
|
||||
extensions: curl, xml, mbstring, zip, ldap, gd
|
||||
@@ -291,7 +280,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
|
||||
- uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
|
||||
with:
|
||||
php-version: "8.4"
|
||||
extensions: curl, xml, mbstring, zip, ldap, gd
|
||||
@@ -334,7 +323,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
|
||||
- uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
|
||||
with:
|
||||
php-version: "8.4"
|
||||
extensions: curl, xml, mbstring, zip, ldap, gd
|
||||
|
||||
@@ -31,7 +31,7 @@ jobs:
|
||||
repository: owncloud/ocis
|
||||
|
||||
- name: Set up Docker Compose
|
||||
uses: docker/setup-compose-action@16feee727cbdc83b6a014e6cc26fec4a79bcf30c # v2.2.0
|
||||
uses: docker/setup-compose-action@8cccb8c14b6500aaffebff1aa49c502c34d2e5e6 # v2.1.0
|
||||
|
||||
- name: Prepare hosts entry
|
||||
run: |
|
||||
|
||||
@@ -83,14 +83,14 @@ jobs:
|
||||
needs: [determine-release-type]
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
|
||||
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
- run: npm install --silent -g yarn npx --force
|
||||
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v4
|
||||
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v4
|
||||
with:
|
||||
version: ${{ env.PNPM_VERSION }}
|
||||
- run: pnpm config set store-dir ./.pnpm-store && make ci-node-generate
|
||||
@@ -125,13 +125,13 @@ jobs:
|
||||
with:
|
||||
name: generated-code
|
||||
path: .
|
||||
- uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
|
||||
- uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
|
||||
- uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
||||
- uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
|
||||
with:
|
||||
username: ${{ vars.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- id: goversion
|
||||
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
|
||||
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
- run: |
|
||||
@@ -152,7 +152,7 @@ jobs:
|
||||
printf "tags<<EOF\n%s\nEOF\n" \
|
||||
"${REPO}:${VERSION}-linux-${ARCH}" >> $GITHUB_OUTPUT
|
||||
- id: build
|
||||
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
|
||||
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
|
||||
with:
|
||||
context: ocis
|
||||
file: ocis/docker/Dockerfile.linux.${{ matrix.arch }}
|
||||
@@ -224,7 +224,7 @@ jobs:
|
||||
matrix:
|
||||
repo: ${{ fromJSON(needs.determine-release-type.outputs.docker_repos) }}
|
||||
steps:
|
||||
- uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
|
||||
- uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
|
||||
with:
|
||||
username: ${{ vars.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
@@ -270,7 +270,7 @@ jobs:
|
||||
with:
|
||||
name: generated-code
|
||||
path: .
|
||||
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
|
||||
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
- run: |
|
||||
@@ -309,7 +309,7 @@ jobs:
|
||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
|
||||
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
- run: npm install --silent -g yarn npx "pnpm@$PNPM_VERSION" --force
|
||||
@@ -329,7 +329,7 @@ jobs:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
|
||||
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
- run: |
|
||||
@@ -365,7 +365,7 @@ jobs:
|
||||
with:
|
||||
name: changelog
|
||||
path: .
|
||||
- uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3.0.1
|
||||
- uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
|
||||
with:
|
||||
tag_name: v${{ needs.determine-release-type.outputs.version }}
|
||||
name: v${{ needs.determine-release-type.outputs.version }}
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ COPY --from=generate /ocis /ocis
|
||||
WORKDIR /ocis/ocis
|
||||
RUN make ci-go-generate build ENABLE_VIPS=true
|
||||
|
||||
FROM alpine:3.24.1
|
||||
FROM alpine:3.23.4
|
||||
|
||||
RUN apk add --no-cache attr ca-certificates curl mailcap tree \
|
||||
&& apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community "vips=8.18.2-r0" \
|
||||
|
||||
@@ -328,17 +328,6 @@ endif
|
||||
mkdir -p ocis/dist
|
||||
$(CALENS) --version $(CHANGELOG_VERSION) -o ocis/dist/CHANGELOG.md
|
||||
|
||||
.PHONY: changelog-lint
|
||||
changelog-lint:
|
||||
@FAILED=0; \
|
||||
while IFS= read -r -d '' f; do \
|
||||
title=$$(head -1 "$$f"); \
|
||||
if [ $${#title} -gt 80 ]; then \
|
||||
echo "$$f: title too long ($${#title}/80)"; FAILED=1; \
|
||||
fi; \
|
||||
done < <(find changelog -mindepth 2 -name "*.md" -print0); \
|
||||
exit $$FAILED
|
||||
|
||||
.PHONY: changelog-csv
|
||||
changelog-csv: $(CALENS)
|
||||
mkdir -p ocis/dist
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Enhancement: Use default upload protocol instead of explicitly disabling tus
|
||||
Enhancement: Use a default protocol parameter instead of explicitly disabling tus
|
||||
|
||||
https://github.com/cs3org/reva/pull/1331
|
||||
https://github.com/owncloud/ocis/pull/1374
|
||||
@@ -1,4 +1,4 @@
|
||||
Enhancement: Added share_jail and projects feature flags in spaces capability
|
||||
Enhancement: Added `share_jail` and `projects` feature flags in spaces capability
|
||||
|
||||
We've added feature flags to the `spaces` capability to indicate to clients which features are supposed to be shown to users.
|
||||
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
Bugfix: Always set an audit action for share updates
|
||||
|
||||
Share-update audit events were written with an empty `action` and a message of
|
||||
`updated field ''`, because the conversion read the deprecated
|
||||
`ShareUpdated.Updated` field, which reva no longer populates (it now sets
|
||||
`UpdateMask`). Received-share declines were also not audited correctly because
|
||||
the conversion matched `SHARE_STATE_DECLINED`, which is not a CS3 share state
|
||||
(the enum value is `SHARE_STATE_REJECTED`), again producing an empty action and
|
||||
message.
|
||||
|
||||
The conversion now derives the updated field and action from `UpdateMask`
|
||||
(falling back to the deprecated field), maps `SHARE_STATE_REJECTED` to the
|
||||
declined action, and uses a generic, non-empty action for any unrecognized
|
||||
update field or share state, so every audit entry carries a meaningful,
|
||||
countable action.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/7661
|
||||
https://github.com/owncloud/ocis/pull/12423
|
||||
@@ -1,13 +0,0 @@
|
||||
Bugfix: Honor $select=actions on the drive item permissions endpoint
|
||||
|
||||
Listing the permissions of a drive item with
|
||||
`$select=@libre.graph.permissions.actions.allowedValues` still returned the
|
||||
roles allowedValues as well. The handler only had a projection for the roles
|
||||
selection (`@libre.graph.permissions.roles.allowedValues`), which drops the
|
||||
actions, but no symmetric handling for an actions-only selection, so the roles
|
||||
were always included. The actions selection now drops the roles allowedValues
|
||||
(and, like the roles selection, skips the share lookup since only the allowed
|
||||
values are requested).
|
||||
|
||||
https://github.com/owncloud/ocis/issues/10816
|
||||
https://github.com/owncloud/ocis/pull/12419
|
||||
@@ -1,13 +0,0 @@
|
||||
Bugfix: Re-verify access tokens with an expired userinfo cache entry
|
||||
|
||||
The proxy authenticated requests against a cached userinfo entry. When the
|
||||
cached entry's expiry had passed, the request was rejected outright instead of
|
||||
re-verifying the access token. The cached expiry is not always the real token
|
||||
expiry — for opaque access tokens it falls back to the configured cache TTL —
|
||||
so a still-valid token could be rejected just because its cache entry aged out,
|
||||
causing spurious logouts (most noticeable under frequent PROPFIND requests). The
|
||||
proxy now treats an expired cache entry as a cache miss and re-verifies the
|
||||
access token, while a genuinely expired or invalid token is still rejected by
|
||||
the re-verification.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12414
|
||||
@@ -1,16 +0,0 @@
|
||||
Bugfix: Keep group memberships when the OIDC groups claim is absent
|
||||
|
||||
When auto-provisioning group memberships from an OIDC claim, the proxy
|
||||
reconciled the user's groups against the groups claim and removed them from any
|
||||
group not present in the claim. If a token carried no groups claim at all — for
|
||||
example a token issued for an OIDC client that has no groups mapper configured,
|
||||
such as a dedicated desktop-client registration — the parsed group set was empty
|
||||
and the user was removed from all of their groups.
|
||||
|
||||
The sync is now skipped when the groups claim is absent or null in the token. A
|
||||
present-but-empty claim is still treated as a legitimate "no groups" and
|
||||
reconciled as before. This mirrors the guard the role-assignment path already
|
||||
has for a missing roles claim.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/11435
|
||||
https://github.com/owncloud/ocis/pull/12420
|
||||
@@ -1,11 +0,0 @@
|
||||
Bugfix: Fix the proxy readiness check for NATS
|
||||
|
||||
The proxy readiness check passed the events cluster ID instead of the events
|
||||
endpoint to the NATS reachability check. NATS then tried to resolve the cluster
|
||||
ID (e.g. `ocis-cluster`) as a host name, which always failed, so the proxy
|
||||
`/readyz` endpoint reported the service as not ready even when NATS was
|
||||
reachable. The check now uses the events endpoint, consistent with every other
|
||||
service.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/10661
|
||||
https://github.com/owncloud/ocis/pull/12421
|
||||
@@ -1,14 +0,0 @@
|
||||
Bugfix: Prevent panic in presigned URL auth when signing key is missing
|
||||
|
||||
The presigned-URL authenticator read the per-user signing key from a store and
|
||||
indexed the first record without checking that the result was non-empty. When
|
||||
the store returns an empty result without an error — which the `noop` store
|
||||
does, and `OCIS_CACHE_STORE=noop` also switches the presigned-URL signing-key
|
||||
store to `noop` — every signed-URL request panicked with `index out of range
|
||||
[0] with length 0` (recovered per request as an HTTP 502), so all signed-URL
|
||||
downloads failed. The authenticator now guards the lookup and returns a normal
|
||||
authentication error instead of panicking; it also no longer returns a nil
|
||||
error when the stored key is empty.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/12384
|
||||
https://github.com/owncloud/ocis/pull/12418
|
||||
@@ -1,11 +0,0 @@
|
||||
Bugfix: Pass the space ID when purging revision blobs
|
||||
|
||||
The `revisions purge` command removed a revision's metadata but did not delete
|
||||
its blob, because it called the blobstore without the space ID. The blobstore
|
||||
builds the blob path from the space ID and blob ID, so an empty space ID
|
||||
targeted the wrong path: the deletion was a no-op (S3) or missed the file
|
||||
(POSIX), leaving the blob orphaned while the revision was already removed. The
|
||||
space ID parsed from the revision path is now passed to the blobstore.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/11644
|
||||
https://github.com/owncloud/ocis/pull/12422
|
||||
@@ -1,25 +0,0 @@
|
||||
Bugfix: Keep shares visible in sharedWithMe when a resource cannot be statted
|
||||
|
||||
The graph `sharedWithMe` handler resolves each received share by fanning out a per-resource
|
||||
`Stat` call with a concurrency limit, all sharing the request context. When a `Stat` failed
|
||||
for any reason (slow or stuck downstream, deleted space, gateway error, deadline exceeded)
|
||||
the worker logged at debug and returned without emitting a drive item, so the share was
|
||||
silently omitted from the response and the handler still returned `200 OK` with a partial,
|
||||
non-deterministic list. A single chronically-slow share could therefore make other,
|
||||
recently-accepted shares intermittently invisible, and repeated calls returned different
|
||||
subsets of the user's shares.
|
||||
|
||||
The handler now:
|
||||
|
||||
- bounds each per-share `Stat` with its own timeout derived from the request context, so one
|
||||
slow resource can no longer consume the deadline shared by all the other shares. The bound
|
||||
is configurable via `GRAPH_RECEIVED_SHARES_STAT_TIMEOUT` (default `10s`);
|
||||
- returns a degraded drive item built from the data already present in the share record
|
||||
(ids, permissions, grantees, timestamps, mountpoint name) when the resource cannot be statted
|
||||
due to a transient or indeterminate failure (timeout, slow or unavailable downstream), so the
|
||||
share stays visible instead of intermittently disappearing. A genuinely missing resource or
|
||||
revoked access (for example after the sharer was deleted) still drops the share, as before;
|
||||
- logs the dropped/degraded shares at warning level with a per-request count for operator
|
||||
visibility.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12430
|
||||
@@ -1,6 +0,0 @@
|
||||
Change: Deprecate the owncloudsql storage driver option
|
||||
|
||||
The value `owncloudsql` in the `STORAGE_USERS_DRIVER` environment variable is no
|
||||
longer a valid option and has been marked for deprecation.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12486
|
||||
@@ -1,15 +0,0 @@
|
||||
Enhancement: Add `ocis shares clean-corrupt-public-shares` maintenance command
|
||||
|
||||
A single public-share entry with a nil/empty `resource_id` makes the json
|
||||
public-share manager's `ListPublicShares` panic with a nil-pointer dereference.
|
||||
Because the manager reads all entries and filters them in memory, that one bad
|
||||
entry poisons the endpoint for the whole tenant: every Members/permissions panel
|
||||
load and every password-protected link creation fails.
|
||||
|
||||
The new `ocis shares clean-corrupt-public-shares` command detects and removes
|
||||
such corrupt entries. It reads the raw persistence (so it never triggers the
|
||||
panic itself) and writes back through the same metadata storage path the manager
|
||||
uses, recomputing blob size, mtime and etag automatically. It defaults to
|
||||
`--dry-run` and supports the `jsoncs3` and `json` public-share drivers.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12494
|
||||
@@ -1,4 +1,4 @@
|
||||
Bugfix: Education user DELETE no longer 404s while leaving LDAP entry behind
|
||||
Bugfix: DELETE /graph/v1.0/education/users/{id} no longer 404s while leaving the LDAP entry behind
|
||||
|
||||
The education user delete handler used `user.GetExternalID()` for the backend
|
||||
DELETE, while the regular `/users` handler and the pre-v8.0 code path used
|
||||
|
||||
@@ -13732,7 +13732,7 @@ STORAGE_USERS_DRIVER:
|
||||
defaultValue: ocis
|
||||
type: string
|
||||
description: 'The storage driver which should be used by the service. Defaults to
|
||||
''ocis'', Supported values are: ''ocis'', ''s3ng'' and ''owncloudsql'' (deprecated). The ''ocis''
|
||||
''ocis'', Supported values are: ''ocis'', ''s3ng'' and ''owncloudsql''. The ''ocis''
|
||||
driver stores all data (blob and meta data) in an POSIX compliant volume. The
|
||||
''s3ng'' driver stores metadata in a POSIX compliant volume and uploads blobs
|
||||
to the s3 bucket.'
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@ geekdocCollapseSection: true
|
||||
Welcome to oCIS, the modern file-sync and share platform, which is based on our knowledge and experience with the PHP based [ownCloud server](https://owncloud.com/#server).
|
||||
|
||||
### The idea of federated storage
|
||||
To create a truly federated storage architecture oCIS breaks down the old ownCloud Classic user specific namespace, which is assembled on the server side, and makes the individual parts accessible to clients as storage spaces and storage space registries.
|
||||
To create a truly federated storage architecture oCIS breaks down the old ownCloud 10 user specific namespace, which is assembled on the server side, and makes the individual parts accessible to clients as storage spaces and storage space registries.
|
||||
|
||||
The diagram below shows the core concepts that are the foundation for the new architecture:
|
||||
- End user devices can fetch the list of *storage spaces* a user has access to, by querying one or multiple *storage space registries*. The list contains a unique endpoint for every *storage space*.
|
||||
@@ -58,7 +58,7 @@ A lot of embedded services in oCIS are built upon the [REVA](https://reva.link/)
|
||||
Interacting with oCIS involves a multitude af APIs. The server and all clients rely on [OpenID Connect](https://openid.net/connect/) for authentication. The [embedded LibreGraph Connect](https://owncloud.dev/services/idp/) can be replaced with any other OpenID Connect Identity Provider. Clients use the [WebDAV](http://webdav.org/) based [oc sync protocol](https://github.com/cernbox/smashbox/blob/master/protocol/protocol.md) to manage files and folders, [ocs to manage shares](https://doc.owncloud.com/server/developer_manual/core/apis/ocs-share-api.html) and [TUS](https://tus.io/protocols/resumable-upload.html) to upload files in a resumable way. On the server side [REVA](https://reva.link/) is the reference implementation of the [CS3 apis](https://github.com/cs3org/cs3apis) which is defined using [protobuf](https://developers.google.com/protocol-buffers/). By embedding [libregraph/idm](https://github.com/libregraph/idm), oCIS provides a [LDAP](https://tools.ietf.org/html/rfc2849) interface to make accounts, including guests available to firewalls and other systems. In the future, we are looking into [the Microsoft Graph API](https://docs.microsoft.com/en-us/graph/api/overview?view=graph-rest-1.0), which is based on [odata](http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part1-protocol.html), as a well-defined REST/JSON dialect for the existing endpoints.
|
||||
|
||||
### Acceptance test suite
|
||||
We run a huge [test suite](https://github.com/owncloud/core/tree/master/tests), which originated in ownCloud Classic and continues to grow. A detailed description can be found in the developer docs for [testing]({{< ref "development/testing" >}}).
|
||||
We run a huge [test suite](https://github.com/owncloud/core/tree/master/tests), which originated in ownCloud 10 and continues to grow. A detailed description can be found in the developer docs for [testing]({{< ref "development/testing" >}}).
|
||||
|
||||
### Architecture Overview
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ Chosen option: "\[option 1\]", because \[justification. e.g., only option, which
|
||||
|
||||
### Cold Migration
|
||||
|
||||
The migration happens while the service is offline. File metadata, blobs and share data is exported from ownCloud Classic and imported in oCIS. This can happen user by user, where every user export would contain the file blobs, their metadata, trash, versions, shares and all metadata that belongs to the user's storage. To prevent group shares from breaking, users in the same groups must be migrated in batch. Depending on the actual group shares in an instance this may effectively require a complete migration in a single batch.
|
||||
The migration happens while the service is offline. File metadata, blobs and share data is exported from ownCloud 10 and imported in oCIS. This can happen user by user, where every user export would contain the file blobs, their metadata, trash, versions, shares and all metadata that belongs to the user's storage. To prevent group shares from breaking, users in the same groups must be migrated in batch. Depending on the actual group shares in an instance this may effectively require a complete migration in a single batch.
|
||||
|
||||
- Good, because oCIS can be tested in a staging system without writing to the production system.
|
||||
- Good, because file layout on disk can be changed to support new storage driver capabilities.
|
||||
|
||||
@@ -13,7 +13,7 @@ geekdocFilePath: 0011-global-url-format.md
|
||||
|
||||
## Context and Problem Statement
|
||||
|
||||
When speaking about URLs we have to make a difference between browser URLs and API URLs. Only browser URLs are visible to end users and will be bookmarked. The currently existing and bookmarked ownCloud Classic URLs look something like this:
|
||||
When speaking about URLs we have to make a difference between browser URLs and API URLs. Only browser URLs are visible to end users and will be bookmarked. The currently existing and bookmarked ownCloud 10 URLs look something like this:
|
||||
|
||||
```
|
||||
GET https://demo.owncloud.com/apps/files/?dir=/path/to/resource&fileid=5472225
|
||||
@@ -88,7 +88,7 @@ This ADR is limited to the scope of "how will a web client deal with the browser
|
||||
|
||||
## Considered Options
|
||||
|
||||
* Existing ownCloud Classic URLs
|
||||
* Existing ownCloud 10 URLs
|
||||
* ID based URLs
|
||||
* Path based URLs
|
||||
* Space based URLs
|
||||
@@ -112,9 +112,9 @@ Chosen option: "Mixed global URLs", because it meets the requirement to contain
|
||||
|
||||
## Pros and Cons of the Options
|
||||
|
||||
### Existing ownCloud Classic URLs
|
||||
### Existing OwnCloud 10 URLs
|
||||
|
||||
The existing ownCloud Classic URLs look like this
|
||||
The existing ownCloud 10 URLs look like this
|
||||
|
||||
| URL | comment |
|
||||
|-----|---------|
|
||||
@@ -291,7 +291,7 @@ Not every deployment may have the requirement to have the path in the URL. We co
|
||||
| `https://<host>/files?id=<resource_id>` | default id based navigation |
|
||||
| `https://<host>/files</namespaced/alias></relative/path/to/resource>?id=<resource_id>` | optional path based navigation with fallback to id |
|
||||
|
||||
In contrast to ownCloud Classic path takes precedence and the user is warned when the fileid in his bookmark no longer matches the id on the server: sth. like "The path of the resource has changed, please verify and update your bookmark!"
|
||||
In contrast to ownCloud 10 path takes precedence and the user is warned when the fileid in his bookmark no longer matches the id on the server: sth. like "The path of the resource has changed, please verify and update your bookmark!"
|
||||
|
||||
When a file is selected the filename also becomes part of the URL so individual files can be bookmarked.
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ We remove or disable the file based locking of the CS3org WOPI server.
|
||||
**CS3 API locking is good**, because:
|
||||
|
||||
- you can lock files on the actual storage (if the storage supports that -> storage driver dependent)
|
||||
- you can lock files in ownCloud Classic when using the ownCloudSQL storage driver in the migration deployment (but oC10 Collabora / OnlyOffice also need to implement locking, to fully leverage that)
|
||||
- you can lock files in ownCloud 10 when using the ownCloudSQL storage driver in the migration deployment (but oC10 Collabora / OnlyOffice also need to implement locking, to fully leverage that)
|
||||
- clients can get the lock information via the api without ignoring / hiding lock file changes
|
||||
- clients can use the lock information to lock the file in their context (e.g. via some file explorer integration)
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@ Technical Story: [Public issue](https://github.com/owncloud/ocis/issues/6993)
|
||||
|
||||
## Context and Problem Statement
|
||||
|
||||
In the early days of the rewrite of ownCloud it was an important goal to keep all important APIs compatible with ownCloud Classic. Infinite Scale embraced that goal until version 1.0.0.
|
||||
In the early days of the rewrite of ownCloud it was an important goal to keep all important APIs compatible with ownCloud 10. Infinite Scale embraced that goal until version 1.0.0.
|
||||
|
||||
After that first release, the focus changed.
|
||||
|
||||
Infinite Scale started the spaces feature which brings a whole new set of APIs and concepts. We made the conscious decision to keep the sharing API as it was, live with its shortcomings and create workarounds to support spaces. We have come a long way so far. Now we need to move on. The Web Client has made the decision to drop the support of ownCloud Classic and keep version 7.0 alive for ownCloud Classic to keep the easy migration path intact.
|
||||
Infinite Scale started the spaces feature which brings a whole new set of APIs and concepts. We made the conscious decision to keep the sharing API as it was, live with its shortcomings and create workarounds to support spaces. We have come a long way so far. Now we need to move on. The Web Client has made the decision to drop the support of ownCloud 10 and keep version 7.0 alive for ownCloud 10 to keep the easy migration path intact.
|
||||
|
||||
The desktop and mobile client platforms were suffering from poor support from the server and can now move forward with a new API implementation. By using openApi 3 and all the needed tooling around it developing the LibreGraph specification, documentaion and SDKs, we now feel confident to move on.
|
||||
|
||||
|
||||
@@ -9,19 +9,19 @@ geekdocFilePath: bridge.md
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
We are planning to build a bridge from ownCloud Classic to ocis. The idea is to have a reverse proxy in front of ownCloud Classic that will forward requests to ownCloud Classic or ocis-reva, depending on the migration status of the logged-in user.
|
||||
We are planning to build a bridge from ownCloud 10 to ocis. The idea is to have a reverse proxy in front of ownCloud 10 that will forward requests to ownCloud 10 or ocis-reva, depending on the migration status of the logged-in user.
|
||||
|
||||
This document is a work in progress of the current setup.
|
||||
|
||||
## Current status
|
||||
|
||||
Using ocis and the ownCloud Classic [graphapi app](https://github.com/owncloud/graphapi/) it is possible today to use an existing ownCloud Classic instance as a user backend and storage backend for ocis.
|
||||
Using ocis and the ownCloud 10 [graphapi app](https://github.com/owncloud/graphapi/) it is possible today to use an existing owncloud 10 instance as a user backend and storage backend for ocis.
|
||||
|
||||
## How to do it
|
||||
|
||||
### Install the ownCloud Classic graphapi app
|
||||
### Install the owncloud 10 graphapi app
|
||||
|
||||
In an ownCloud Classic apps folder
|
||||
In an owncloud 10 apps folder
|
||||
```
|
||||
$ git clone git@github.com:owncloud/graphapi.git
|
||||
$ cd graphapi
|
||||
@@ -76,7 +76,7 @@ You can check out a custom branch and build a custom binary which can then be us
|
||||
|
||||
### Start ocis glauth
|
||||
|
||||
We are going to use the built binary and ownCloud Classic graphapi app to turn ownCloud Classic into the datastore for an LDAP proxy.
|
||||
We are going to use the built binary and ownCloud 10 graphapi app to turn ownCloud 10 into the datastore for an LDAP proxy.
|
||||
|
||||
#### configure it
|
||||
|
||||
@@ -106,7 +106,7 @@ $ OCIS_LOG_PRETTY=true OCIS_LOG_COLOR=true ocis/bin/ocis server --extensions "gl
|
||||
|
||||
#### Check it is up and running
|
||||
|
||||
You should now be able to list accounts from your ownCloud Classic oc_accounts table using:
|
||||
You should now be able to list accounts from your ownCloud 10 oc_accounts table using:
|
||||
```console
|
||||
$ ldapsearch -x -H ldap://127.0.0.1:9125 -b dc=ocis,dc=test -D "cn=admin,dc=ocis,dc=test" -W '(objectclass=posixaccount)'
|
||||
```
|
||||
@@ -271,15 +271,15 @@ $ bin/web server --web-config-server https://cloud.example.com --oidc-authority
|
||||
|
||||
### Patch owncloud
|
||||
|
||||
While the UserSession in ownCloud Classic is currently used to test all available IAuthModule implementations, it immediately logs out the user when an exception occurs. However, existing ownCloud Classic instances use the oauth2 app to create Bearer tokens for mobile and desktop clients.
|
||||
While the UserSession in ownCloud 10 is currently used to test all available IAuthModule implementations, it immediately logs out the user when an exception occurs. However, existing owncloud 10 instances use the oauth2 app to create Bearer tokens for mobile and desktop clients.
|
||||
|
||||
To give the openidconnect app a chance to verify the tokens we need to change the code a bit. See https://github.com/owncloud/core/pull/37043 for a possible solution.
|
||||
|
||||
> Note: The PR is hot ... as in *younger than this list of steps*. And it messes with authentication. Use with caution.
|
||||
|
||||
### Install the ownCloud Classic openidconnect app
|
||||
### Install the owncloud 10 openidconnect app
|
||||
|
||||
In an ownCloud Classic apps folder
|
||||
In an owncloud 10 apps folder
|
||||
```
|
||||
$ git clone git@github.com:owncloud/openidconnect.git
|
||||
$ cd openidconnect
|
||||
@@ -306,7 +306,7 @@ $CONFIG = [
|
||||
|
||||
In the above configuration replace
|
||||
- `provider-url` with the URL to your `ocis-idp` issuer
|
||||
- `https://cloud.example.com` with the URL to your ownCloud Classic instance
|
||||
- `https://cloud.example.com` with the URL to your ownCloud 10 instance
|
||||
- `http://localhost:9100` with the URL to your ownCloud Web instance
|
||||
|
||||
> Note: By default the openidconnect app will use the email of the user to match the user from the oidc userinfo endpoint with the ownCloud account. So make sure your users have a unique primary email.
|
||||
@@ -315,4 +315,4 @@ In the above configuration replace
|
||||
|
||||
Aside from the above todos these are the next steps
|
||||
- tie it all together behind `ocis-proxy`
|
||||
- create an `ocis bridge` command that runs all the ocis services in one step with a properly preconfigured idp OIDC client `ocis-idp` for `ownCloud Web` and the ownCloud Classic `openidconnect` app, as well as a randomized `--signing-kid`.
|
||||
- create an `ocis bridge` command that runs all the ocis services in one step with a properly preconfigured idp OIDC client `ocis-idp` for `ownCloud Web` and the owncloud 10 `openidconnect` app, as well as a randomized `--signing-kid`.
|
||||
@@ -16,11 +16,11 @@ geekdocFilePath: oc10_ocis_parallel.md
|
||||
- OpenLDAP server with demo users
|
||||
- LDAP admin interface to edit users
|
||||
- Keycloak as OpenID Connect provider in federation with the LDAP server
|
||||
- ownCloud Classic with MariaDB and Redis
|
||||
- ownCloud Classic is configured to synchronize users from the LDAP server
|
||||
- ownCloud Classic is used to use OpenID Connect for authentication with Keycloak
|
||||
- ownCloud 10 with MariaDB and Redis
|
||||
- ownCloud 10 is configured to synchronize users from the LDAP server
|
||||
- ownCloud 10 is used to use OpenID Connect for authentication with Keycloak
|
||||
- oCIS running behind Traefik as reverse proxy
|
||||
- oCIS is using the ownCloudSQL storage driver on the same files and same database as ownCloud Classic
|
||||
- oCIS is using the ownCloudSQL storage driver on the same files and same database as ownCloud 10
|
||||
- oCIS is using Keycloak as OpenID Connect provider
|
||||
- oCIS is using the LDAP server as user backend
|
||||
- All requests to both oCIS and oC10 are routed through the oCIS proxy and will be routed based on an OIDC claim to one of them. Therefore admins can change on a user basis in the LDAP which backend is used.
|
||||
@@ -88,7 +88,7 @@ See also [example server setup]({{< ref "preparing_server" >}})
|
||||
OC10_DOCKER_TAG=
|
||||
# client secret which the openidconnect app uses to authenticate to Keycloak. Defaults to "oc10-oidc-secret"
|
||||
OC10_OIDC_CLIENT_SECRET=
|
||||
# app which will be shown when opening the ownCloud Classic UI. Defaults to "files" but also could be set to "web"
|
||||
# app which will be shown when opening the ownCloud 10 UI. Defaults to "files" but also could be set to "web"
|
||||
OWNCLOUD_DEFAULT_APP=
|
||||
# if set to "false" (default) links will be opened in the classic UI, if set to "true" ownCloud Web is used
|
||||
OWNCLOUD_WEB_REWRITE_LINKS=
|
||||
@@ -122,9 +122,9 @@ See also [example server setup]({{< ref "preparing_server" >}})
|
||||
|
||||
Set your domain for the oC10 and oCIS frontend in `CLOUD_DOMAIN=`, e.g. `CLOUD_DOMAIN=cloud.owncloud.test`.
|
||||
|
||||
By default ownCloud Classic will be started in the `latest` version. If you want to start a specific version of oCIS set the version to `OC10_DOCKER_TAG=`. Available versions can be found on [Docker Hub](https://hub.docker.com/r/owncloud/ocis/tags?page=1&ordering=last_updated).
|
||||
By default ownCloud 10 will be started in the `latest` version. If you want to start a specific version of oCIS set the version to `OC10_DOCKER_TAG=`. Available versions can be found on [Docker Hub](https://hub.docker.com/r/owncloud/ocis/tags?page=1&ordering=last_updated).
|
||||
|
||||
You can switch the default application of ownCloud Classic by setting`OWNCLOUD_DEFAULT_APP=files` in oder to have the classic UI as frontend, which is also the default. If you prefer ownCloud Web as the default application in ownCloud Classic just set `OWNCLOUD_DEFAULT_APP=web`.
|
||||
You can switch the default application of ownCloud 10 by setting`OWNCLOUD_DEFAULT_APP=files` in oder to have the classic UI as frontend, which is also the default. If you prefer ownCloud Web as the default application in ownCloud 10 just set `OWNCLOUD_DEFAULT_APP=web`.
|
||||
|
||||
In oder to change the default link open action which defaults to the classic UI (`OWNCLOUD_WEB_REWRITE_LINKS=false`) you can set it to `OWNCLOUD_WEB_REWRITE_LINKS=true`. This will lead to links being opened in ownCloud Web.
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ Prerequisite:
|
||||
|
||||
documentation resources:
|
||||
- [configure ocis with LDAP](https://owncloud.dev/ocis/deployment/ocis_ldap/)
|
||||
- [sharing API is compatible to ownCloud Classic](https://doc.owncloud.com/server/10.9/developer_manual/core/apis/ocs-share-api.html)
|
||||
- [sharing API is compatible to ownCloud 10](https://doc.owncloud.com/server/10.9/developer_manual/core/apis/ocs-share-api.html)
|
||||
- [webDav operations](#webdav)
|
||||
|
||||
| Test Case | Expected Result | Comment |
|
||||
@@ -65,7 +65,7 @@ documentation resources:
|
||||
should be tried in various ways and in different environments
|
||||
|
||||
documentation resources:
|
||||
- [sharing API is compatible to ownCloud Classic](https://doc.owncloud.com/server/10.9/developer_manual/core/apis/ocs-share-api.html)
|
||||
- [sharing API is compatible to ownCloud 10](https://doc.owncloud.com/server/10.9/developer_manual/core/apis/ocs-share-api.html)
|
||||
- [webDav operations](#webdav)
|
||||
|
||||
| Test Case | Expected Result | Comment |
|
||||
@@ -85,7 +85,7 @@ documentation resources:
|
||||
- create users and groups in LDAP
|
||||
|
||||
documentation resources:
|
||||
- [sharing API is compatible to ownCloud Classic](https://doc.owncloud.com/server/10.9/developer_manual/core/apis/ocs-share-api.html)
|
||||
- [sharing API is compatible to ownCloud 10](https://doc.owncloud.com/server/10.9/developer_manual/core/apis/ocs-share-api.html)
|
||||
|
||||
| Test Case | Expected Result | Comment |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|---------|
|
||||
@@ -257,7 +257,7 @@ Prerequisite:
|
||||
|
||||
| Test Case | Expected Result | Comment |
|
||||
|---------------------------------------------------------------|-------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|
|
||||
| use ocis as webDAV external storage in ownCloud Classic | resource access works | |
|
||||
| use ocis as webDAV external storage in ownCloud 10 | resource access works | |
|
||||
| access webDAV with your file-manager | that will not give you a good UX, but ocis should not crash | Urls: https://\<ocis-server\>/remote.php/webdav & https://\<ocis-server\>/remote.php/dav/files/\<username\> |
|
||||
| access webDAV with the "remote-files" function of LibreOffice | files are accessible and can be written back | |
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ geekdocEditPath: edit/master/docs/ocis/development
|
||||
geekdocFilePath: extensions.md
|
||||
---
|
||||
|
||||
oCIS is all about files, sync and share - but most of the time there is more you want to do with your files, e.g. having a different view on your photo collection or editing your offices files in an online file editor. ownCloud Classic faced the same problem and solved it with `applications`, which can extend the functionality of ownCloud Classic in a wide range. Since oCIS is different in its architecture compared to ownCloud Classic, we had to come up with a similar (yet slightly different) solution. To extend the functionality of oCIS, you can write or install `extensions`. An extension is basically any running code which integrates into oCIS and provides functionality to oCIS and its users. Because extensions are just microservices providing an API, you can technically choose any programming language you like - a huge improvement to ownCloud Classic, where it was nearly impossible to use a different programming language than PHP.
|
||||
oCIS is all about files, sync and share - but most of the time there is more you want to do with your files, e.g. having a different view on your photo collection or editing your offices files in an online file editor. ownCloud 10 faced the same problem and solved it with `applications`, which can extend the functionality of ownCloud 10 in a wide range. Since oCIS is different in its architecture compared to ownCloud 10, we had to come up with a similar (yet slightly different) solution. To extend the functionality of oCIS, you can write or install `extensions`. An extension is basically any running code which integrates into oCIS and provides functionality to oCIS and its users. Because extensions are just microservices providing an API, you can technically choose any programming language you like - a huge improvement to ownCloud 10, where it was nearly impossible to use a different programming language than PHP.
|
||||
|
||||
We will now introduce you to the oCIS extension system and show you how you can create a custom extension yourself.
|
||||
|
||||
|
||||
+35
-35
@@ -20,7 +20,7 @@ The migration happens in subsequent stages while the service is online. First al
|
||||
## Migration Stages
|
||||
|
||||
### Stage 0: pre migration
|
||||
Is the pre-migration stage when having a functional ownCloud Classic instance.
|
||||
Is the pre-migration stage when having a functional ownCloud 10 instance.
|
||||
|
||||
<div class="editpage">
|
||||
|
||||
@@ -36,7 +36,7 @@ Install and introduce [ownCloud Web](https://github.com/owncloud/web/) and let u
|
||||
|
||||
#### Steps
|
||||
Deploy web and enable switching to and from it.
|
||||
For more details see: [ownCloud Classic with ownCloud Web](https://owncloud.dev/clients/web/deployments/oc10-app/)
|
||||
For more details see: [ownCloud 10 with ownCloud Web](https://owncloud.dev/clients/web/deployments/oc10-app/)
|
||||
|
||||
<div class="editpage">
|
||||
|
||||
@@ -45,14 +45,14 @@ _TODO allow limiting the web ui switch to an 'early adopters' group_
|
||||
</div>
|
||||
|
||||
#### Validation
|
||||
Ensure switching back and forth between the ownCloud Classic web UI and ownCloud web works as at our https://demo.owncloud.com.
|
||||
Ensure switching back and forth between the classic ownCloud 10 web UI and ownCloud web works as at our https://demo.owncloud.com.
|
||||
|
||||
#### Rollback
|
||||
Should there be problems with ownCloud web at this point it can simply be removed from the menu and be undeployed.
|
||||
|
||||
#### Notes
|
||||
<div style="break-after: avoid"></div>
|
||||
The ownCloud Classic demo instance uses OAuth to obtain a token for ownCloud web and currently always requires explicit consent. In oCIS the token is provided by the OpenID Connect Identity Provider, which may skip the consent step for trusted clients for a more seamless login experience. You may want to introduce OpenID Connect before enabling the new web UI.
|
||||
The ownCloud 10 demo instance uses OAuth to obtain a token for ownCloud web and currently always requires explicit consent. In oCIS the token is provided by the OpenID Connect Identity Provider, which may skip the consent step for trusted clients for a more seamless login experience. You may want to introduce OpenID Connect before enabling the new web UI.
|
||||
|
||||
<div class="editpage">
|
||||
|
||||
@@ -90,7 +90,7 @@ _TODO @butonic flesh out oCIS IDP documentation_
|
||||
|
||||
</div>
|
||||
|
||||
2. Add [Openid Connect (OIDC)](https://doc.owncloud.com/server/admin_manual/configuration/user/oidc/) support to ownCloud Classic.
|
||||
2. Add [Openid Connect (OIDC)](https://doc.owncloud.com/server/admin_manual/configuration/user/oidc/) support to ownCloud 10.
|
||||
|
||||
#### Validation
|
||||
When OpenID Connect support is enabled verify that all clients can login:
|
||||
@@ -107,7 +107,7 @@ Should there be problems with OpenID Connect at this point you can disable the a
|
||||
<div style="break-after: avoid"></div>
|
||||
Legacy clients relying on Basic auth or app passwords need to be migrated to OpenId Connect to work with oCIS. For a transition period Basic auth in oCIS can be enabled with `PROXY_ENABLE_BASIC_AUTH=true`, but we strongly recommend adopting OpenID Connect for other tools as well.
|
||||
|
||||
While OpenID Connect providers will send an `iss` and `sub` claim that relying parties (services like oCIS or ownCloud Classic) can use to identify users we recommend introducing a dedicated, globally unique, persistent, non-reassignable user identifier like a UUID for every user. This `ownclouduuid` should be sent as an additional claim to save additional lookups on the server side. It will become the user id in oCIS, e.g. when searching for recipients the `ownclouduuid` will be used to persist permissions with the share manager. It has a different purpose than the ownCloud Classic username, which is used to login. Using UUIDs we can not only mitigate username collisions when merging multiple instances but also allow renaming usernames after the migration to oCIS has been completed.
|
||||
While OpenID Connect providers will send an `iss` and `sub` claim that relying parties (services like oCIS or ownCloud 10) can use to identify users we recommend introducing a dedicated, globally unique, persistent, non-reassignable user identifier like a UUID for every user. This `ownclouduuid` should be sent as an additional claim to save additional lookups on the server side. It will become the user id in oCIS, e.g. when searching for recipients the `ownclouduuid` will be used to persist permissions with the share manager. It has a different purpose than the ownCloud 10 username, which is used to login. Using UUIDs we can not only mitigate username collisions when merging multiple instances but also allow renaming usernames after the migration to oCIS has been completed.
|
||||
|
||||
<div class="editpage">
|
||||
|
||||
@@ -123,15 +123,15 @@ _Feel free to add your question as a PR to this document using the link at the t
|
||||
Before letting oCIS handle end user requests we will first make it available in the internal network. By subsequently adding services we can add functionality and verify the services work as intended.
|
||||
|
||||
Start oCIS backend and make read only tests on existing data using the `owncloudsql` storage driver which will read (and write)
|
||||
- blobs from the same datadirectory layout as in ownCloud Classic
|
||||
- metadata from the ownCloud Classic database:
|
||||
- blobs from the same datadirectory layout as in ownCloud 10
|
||||
- metadata from the ownCloud 10 database:
|
||||
The oCIS share manager will read share information from the ownCloud database using an `owncloud` driver as well.
|
||||
|
||||
<div class="editpage">
|
||||
|
||||
_TODO @butonic add guide on how to configure `owncloudsql`_
|
||||
|
||||
_TODO we need a share manager that can read from the ownCloud Classic database as well as from whatever new backend will be used for a pure oCIS setup. Currently, that would be the json file. Or that is migrated after all users have switched to oCIS. -- jfd_
|
||||
_TODO we need a share manager that can read from the ownCloud 10 database as well as from whatever new backend will be used for a pure oCIS setup. Currently, that would be the json file. Or that is migrated after all users have switched to oCIS. -- jfd_
|
||||
|
||||
</div>
|
||||
|
||||
@@ -140,7 +140,7 @@ None, only administrators will be able to explore oCIS during this stage.
|
||||
|
||||
#### Steps and verifications
|
||||
|
||||
We are going to run and explore a series of services that will together handle the same requests as ownCloud Classic. For initial exploration the oCIS binary is recommended. The services can later be deployed using a single oCIS runtime or in multiple containers.
|
||||
We are going to run and explore a series of services that will together handle the same requests as ownCloud 10. For initial exploration the oCIS binary is recommended. The services can later be deployed using a single oCIS runtime or in multiple containers.
|
||||
|
||||
|
||||
##### Storage provider for file metadata
|
||||
@@ -231,7 +231,7 @@ _Feel free to add your question as a PR to this document using the link at the t
|
||||
<div style="break-after: page"></div>
|
||||
|
||||
### Stage 4: internal write access with oCIS
|
||||
Test writing data with oCIS into the existing ownCloud Classic data directory using the `owncloudsql` storage driver.
|
||||
Test writing data with oCIS into the existing ownCloud 10 data directory using the `owncloudsql` storage driver.
|
||||
|
||||
#### User impact
|
||||
Only administrators will be able to explore oCIS during this stage. End users should not be affected if the testing is limited to test users.
|
||||
@@ -269,16 +269,16 @@ _Feel free to add your question as a PR to this document using the link at the t
|
||||
<div style="break-after: page"></div>
|
||||
|
||||
### Stage-5: introduce user aware proxy
|
||||
In the previous stages oCIS was only accessible for administrators with access to the network. To expose only a single service to the internet, oCIS comes with a user aware proxy that can be used to route requests to the existing ownCloud Classic installation or oCIS, based on the authenticated user. The proxy uses OIDC to identify the logged-in user and route them to the configured backend.
|
||||
In the previous stages oCIS was only accessible for administrators with access to the network. To expose only a single service to the internet, oCIS comes with a user aware proxy that can be used to route requests to the existing ownCloud 10 installation or oCIS, based on the authenticated user. The proxy uses OIDC to identify the logged-in user and route them to the configured backend.
|
||||
|
||||
#### User impact
|
||||
The IP address of the ownCloud host changes. There is no change for the file sync and share functionality when requests are handled by the oCIS codebase as it uses the same database and storage system as ownCloud Classic.
|
||||
The IP address of the ownCloud host changes. There is no change for the file sync and share functionality when requests are handled by the oCIS codebase as it uses the same database and storage system as owncloud 10.
|
||||
|
||||
#### Steps and verifications
|
||||
|
||||
##### Deploy oCIS proxy
|
||||
1. Deploy the `ocis proxy`
|
||||
2. Verify the requests are routed based on the ownCloud Classic routing policy `oc10` by default
|
||||
2. Verify the requests are routed based on the ownCloud 10 routing policy `oc10` by default
|
||||
|
||||
##### Test user based routing
|
||||
1. Change the routing policy for a user or an early adopters group to `ocis` <div class="editpage">_TODO @butonic currently, the migration selector will use the `ocis` policy for users that have been added to the accounts service. IMO we need to evaluate a claim from the IdP._</div>
|
||||
@@ -292,7 +292,7 @@ At this point you are ready to rock & roll!
|
||||
3. Verify the DNS change has propagated sufficiently. All requests should now use the oCIS Proxy.
|
||||
|
||||
#### Rollback
|
||||
Should there be a problem with the oCIS routes the user can be routed to ownCloud by changing his routing policy. In case of unfixable problems with the proxy the DNS needs to be updated to use the ownCloud Classic application servers directly. This could also be done in a load balancer.
|
||||
Should there be a problem with the oCIS routes the user can be routed to ownCloud by changing his routing policy. In case of unfixable problems with the proxy the DNS needs to be updated to use the ownCloud 10 application servers directly. This could also be done in a load balancer.
|
||||
|
||||
#### Notes
|
||||
<div style="break-after: avoid"></div>
|
||||
@@ -308,7 +308,7 @@ _Feel free to add your question as a PR to this document using the link at the t
|
||||
<div style="break-after: page"></div>
|
||||
|
||||
### Stage-6: parallel deployment
|
||||
Running ownCloud Classic and oCIS in parallel is a crucial stage for the migration: it allows users access to group shares regardless of the system that is being used to access the data. A user by user migration with multiple domains would technically break group shares when users vanish because they (and their data) are no longer available in the old system.
|
||||
Running ownCloud 10 and oCIS in parallel is a crucial stage for the migration: it allows users access to group shares regardless of the system that is being used to access the data. A user by user migration with multiple domains would technically break group shares when users vanish because they (and their data) are no longer available in the old system.
|
||||
|
||||
Depending on the amount of power users on an instance, the admin may want to allow users to voluntarily migrate to the oCIS backend. A monitoring system can be used to visualize the behavior for the two systems and gain trust in the overall stability and performance.
|
||||
|
||||
@@ -331,7 +331,7 @@ There are several options to move users to the oCIS backend:
|
||||
The same verification steps as for the internal testing stage apply. Just from the outside.
|
||||
|
||||
#### Rollback
|
||||
Until now, the oCIS configuration mimics ownCloud Classic and uses the old data directory layout and the ownCloud Classic database. Users can seamlessly be switched from ownCloud Classic to oCIS and back again.
|
||||
Until now, the oCIS configuration mimics ownCloud 10 and uses the old data directory layout and the ownCloud 10 database. Users can seamlessly be switched from ownCloud 10 to oCIS and back again.
|
||||
<div class="editpage">
|
||||
|
||||
_TODO @butonic we need a canary app that allows users to decide for themselves which backend to use_
|
||||
@@ -354,7 +354,7 @@ _Feel free to add your question as a PR to this document using the link at the t
|
||||
<div style="break-after: page"></div>
|
||||
|
||||
### Stage-7: introduce spaces using ocis
|
||||
To encourage users to switch you can promote the workspaces feature that is built into oCIS. The ownCloud Classic storage backend can be used for existing users. New users and group or project spaces can be provided by storage providers that better suit the underlying storage system.
|
||||
To encourage users to switch you can promote the workspaces feature that is built into oCIS. The ownCloud 10 storage backend can be used for existing users. New users and group or project spaces can be provided by storage providers that better suit the underlying storage system.
|
||||
|
||||
#### Steps
|
||||
First, the admin needs to
|
||||
@@ -375,11 +375,11 @@ The new storage space should show up in the `/graph/drives` endpoint for the man
|
||||
#### Notes
|
||||
Depending on the requirements and acceptable tradeoffs, a database less deployment using the ocis or s3ng storage driver is possible. There is also a [cephfs driver](https://github.com/cs3org/reva/pull/1209) on the way, that directly works on the API level instead of POSIX.
|
||||
|
||||
### Stage-8: shut down ownCloud Classic
|
||||
Disable ownCloud Classic in the proxy, all requests are now handled by oCIS, shut down oc10 web servers and redis (or keep for calendar & contacts only? rip out files from oCIS?)
|
||||
### Stage-8: shut down ownCloud 10
|
||||
Disable ownCloud 10 in the proxy, all requests are now handled by oCIS, shut down oc10 web servers and redis (or keep for calendar & contacts only? rip out files from oCIS?)
|
||||
|
||||
#### User impact
|
||||
All users are already sent to the oCIS backend. Shutting down ownCloud Classic will remove the old web UI, apps and functionality that is not yet present in ownCloud web. For example contacts and calendar.
|
||||
All users are already sent to the oCIS backend. Shutting down ownCloud 10 will remove the old web UI, apps and functionality that is not yet present in ownCloud web. For example contacts and calendar.
|
||||
|
||||
<div class="editpage">
|
||||
|
||||
@@ -388,14 +388,14 @@ _TODO @butonic recommend alternatives_
|
||||
</div>
|
||||
|
||||
#### Steps
|
||||
1. Shut down the apache servers that are running the ownCloud Classic PHP code.
|
||||
1. Shut down the apache servers that are running the ownCloud 10 PHP code.
|
||||
2. DO NOT SHUT DOWN THE DATABASE, YET!
|
||||
|
||||
#### Verification
|
||||
The ownCloud Classic web UI should no longer be reachable.
|
||||
The ownCloud 10 classic web UI should no longer be reachable.
|
||||
|
||||
#### Rollback
|
||||
Redeploy ownCloud Classic.
|
||||
Redeploy ownCloud 10.
|
||||
|
||||
#### Notes
|
||||
<div style="break-after: avoid"></div>
|
||||
@@ -411,7 +411,7 @@ _Feel free to add your question as a PR to this document using the link at the t
|
||||
<div style="break-after: page"></div>
|
||||
|
||||
### Stage 9: storage migration
|
||||
To get rid of the database we will move the metadata from the old ownCloud Classic database into dedicated storage providers. This can happen in a user by user fashion. group drives can properly be migrated to group, project or workspaces in this stage.
|
||||
To get rid of the database we will move the metadata from the old ownCloud 10 database into dedicated storage providers. This can happen in a user by user fashion. group drives can properly be migrated to group, project or workspaces in this stage.
|
||||
|
||||
#### User impact
|
||||
Noticeable performance improvements because we effectively shard the storage logic and persistence layer.
|
||||
@@ -452,10 +452,10 @@ _Feel free to add your question as a PR to this document using the link at the t
|
||||
### Stage-10: share metadata migration
|
||||
Migrate share data to _yet to determine_ share manager backend and shut down ownCloud database.
|
||||
|
||||
The ownCloud Classic database still holds share information in the `oc_share` and `oc_share_external` tables. They are used to efficiently answer queries about who shared what with whom. In oCIS shares are persisted using a share manager and if desired these grants are also sent to the storage provider so it can set ACLs if possible. Only one system should be responsible for the shares, which in case of treating the storage as the primary source effectively turns the share manager into a cache.
|
||||
The ownCloud 10 database still holds share information in the `oc_share` and `oc_share_external` tables. They are used to efficiently answer queries about who shared what with whom. In oCIS shares are persisted using a share manager and if desired these grants are also sent to the storage provider so it can set ACLs if possible. Only one system should be responsible for the shares, which in case of treating the storage as the primary source effectively turns the share manager into a cache.
|
||||
|
||||
#### User impact
|
||||
Depending on chosen the share manager provider some sharing requests should be faster: listing incoming and outgoing shares is no longer bound to the ownCloud Classic database but to whatever technology is used by the share provider:
|
||||
Depending on chosen the share manager provider some sharing requests should be faster: listing incoming and outgoing shares is no longer bound to the ownCloud 10 database but to whatever technology is used by the share provider:
|
||||
- For non HA scenarios they can be served from memory, backed by a simple json file.
|
||||
- TODO: implement share manager with redis / nats / ... key value store backend: use the micro store interface please ...
|
||||
|
||||
@@ -463,7 +463,7 @@ Depending on chosen the share manager provider some sharing requests should be f
|
||||
1. Start new share manager
|
||||
2. Migrate metadata using the CS3 API (copy from old to new)
|
||||
3. Shut down old share manager
|
||||
4. Shut down ownCloud Classic database
|
||||
4. Shut down ownCloud 10 database
|
||||
|
||||
<div class="editpage">
|
||||
|
||||
@@ -500,7 +500,7 @@ _Feel free to add your question as a PR to this document using the link at the t
|
||||
|
||||
## Architectural differences
|
||||
|
||||
The fundamental difference between ownCloud Classic and oCIS is that the file metadata is moved from the database in the `oc_filecache` table (which is misnamed, as it actually is an index) to the storage provider who can place metadata as close to the underlying storage system as possible. In effect, the file metadata is sharded over multiple specialized services.
|
||||
The fundamental difference between ownCloud 10 and oCIS is that the file metadata is moved from the database in the `oc_filecache` table (which is misnamed, as it actually is an index) to the storage provider who can place metadata as close to the underlying storage system as possible. In effect, the file metadata is sharded over multiple specialized services.
|
||||
|
||||
|
||||
## Data that will be migrated
|
||||
@@ -509,7 +509,7 @@ Currently, oCIS focuses on file sync and share use cases.
|
||||
|
||||
### Blob data
|
||||
|
||||
In ownCloud Classic the files are laid out on disk in the *data directory* using the following layout:
|
||||
In ownCloud 10 the files are laid out on disk in the *data directory* using the following layout:
|
||||
```
|
||||
data
|
||||
├── einstein
|
||||
@@ -551,7 +551,7 @@ data
|
||||
…
|
||||
```
|
||||
|
||||
The *data directory* may also contain subfolders for ownCloud Classic applications like `avatars`, `gallery`, `files_external` and `cache`.
|
||||
The *data directory* may also contain subfolders for ownCloud 10 applications like `avatars`, `gallery`, `files_external` and `cache`.
|
||||
|
||||
When an object storage is used as the primary storage all file blobs are stored by their file id and a prefix, e.g.: `urn:oid:<fileid>`.
|
||||
|
||||
@@ -564,7 +564,7 @@ The three types of blobs we need to migrate are stored in
|
||||
|
||||
### Filecache table
|
||||
|
||||
In both cases the file metadata, including a full replication of the file tree, is stored in the `oc_filecache` table of an ownCloud Classic database. The primary key of a row is the file id. It is used to attach additional metadata like shares, tags, favorites or arbitrary file properties.
|
||||
In both cases the file metadata, including a full replication of the file tree, is stored in the `oc_filecache` table of an ownCloud 10 database. The primary key of a row is the file id. It is used to attach additional metadata like shares, tags, favorites or arbitrary file properties.
|
||||
|
||||
The `filecache` table itself has more metadata:
|
||||
|
||||
@@ -682,7 +682,7 @@ _TODO clarify how OCM handles this and where we store / configure this. It seems
|
||||
|
||||
Users are migrated in two steps:
|
||||
1. They should all be authenticated using OpenID Connect, which already moves them to a common identity management system.
|
||||
2. To search share recipients, both, ownCloud Classic and oCIS need access to the same user directory using e.g. LDAP.
|
||||
2. To search share recipients, both, ownCloud 10 and oCIS need access to the same user directory using e.g. LDAP.
|
||||
|
||||
<div class="editpage">
|
||||
|
||||
@@ -732,9 +732,9 @@ _TODO clarify if metadata from ldap & user_shibboleth needs to be migrated_
|
||||
|
||||
</div>
|
||||
|
||||
The `dn` -> *owncloud internal username* mapping that currently lives in the `oc_ldap_user_mapping` table needs to move into a dedicated `ownclouduuid` attribute in the LDAP server. The idp should send it as a claim so the proxy does not have to look up the user using LDAP again. The username cannot be changed in ownCloud Classic and the oCIS provisioning API will not allow changing it as well. When we introduce the graph api we may allow changing usernames when all clients have moved to that api.
|
||||
The `dn` -> *owncloud internal username* mapping that currently lives in the `oc_ldap_user_mapping` table needs to move into a dedicated `ownclouduuid` attribute in the LDAP server. The idp should send it as a claim so the proxy does not have to look up the user using LDAP again. The username cannot be changed in ownCloud 10 and the oCIS provisioning API will not allow changing it as well. When we introduce the graph api we may allow changing usernames when all clients have moved to that api.
|
||||
|
||||
The problem is that the username in ownCloud Classic and in oCIS also need to be the same, which might not be the case when the ldap mapping used a different column. In that case we should add another owncloudusername attribute to the ldap server.
|
||||
The problem is that the username in owncloud 10 and in oCIS also need to be the same, which might not be the case when the ldap mapping used a different column. In that case we should add another owncloudusername attribute to the ldap server.
|
||||
|
||||
|
||||
<div class="editpage">
|
||||
|
||||
@@ -8,7 +8,7 @@ geekdocFilePath: namespaces.md
|
||||
---
|
||||
|
||||
A *namespace* is a set of paths with a common prefix. Depending on the endpoint you are talking to you will encounter a different kind of namespace:
|
||||
In ownCloud Classic all paths are considered relative to the users home. The CS3 API uses a global namespace and the *storage providers* use a local namespace with paths relative to the storage providers root.
|
||||
In ownCloud 10 all paths are considered relative to the users home. The CS3 API uses a global namespace and the *storage providers* use a local namespace with paths relative to the storage providers root.
|
||||
|
||||
{{< figure src="/ocis/storage/static/namespaces.drawio.svg" >}}
|
||||
|
||||
@@ -22,7 +22,7 @@ The different paths in the namespaces need to be translated while passing [*refe
|
||||
|
||||
|
||||
{{< hint danger >}}
|
||||
oCIS currently is configured to jail users into the CS3 `/home` namespace in the oc10 endpoints to mimic ownCloud Classic. CernBox has been exposing a global namespace on `/webdav` for years already. The ocs service returns urls that are relative to the CS3 global namespace which makes both scenarios work, but only one of them at a time. Which is why the testsuite hiccups when trying to [Allow full paths targets in reva#1605](https://github.com/cs3org/reva/pull/1605).
|
||||
oCIS currently is configured to jail users into the CS3 `/home` namespace in the oc10 endpoints to mimic ownCloud 10. CernBox has been exposing a global namespace on `/webdav` for years already. The ocs service returns urls that are relative to the CS3 global namespace which makes both scenarios work, but only one of them at a time. Which is why the testsuite hiccups when trying to [Allow full paths targets in reva#1605](https://github.com/cs3org/reva/pull/1605).
|
||||
{{< /hint >}}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ The `/shares` namespace is used to solve two problems:
|
||||
{{< /hint >}}
|
||||
|
||||
## Browser URLs vs API URLs
|
||||
In ownCloud Classic you can not only create *public links* but also *private links*. Both can be copy pasted into an email or chat to grant others access to a file. Most often though, end users will copy and paste the URL from their browsers location bar.
|
||||
In ownCloud 10 you can not only create *public links* but also *private links*. Both can be copy pasted into an email or chat to grant others access to a file. Most often though, end users will copy and paste the URL from their browsers location bar.
|
||||
|
||||
| URL | description |
|
||||
|-|-|
|
||||
|
||||
@@ -13,7 +13,7 @@ Some architectural changes still need to be clarified or changed. Maybe an ADR i
|
||||
|
||||
## A dedicated shares storage provider
|
||||
|
||||
Currently, when a user accepts a share, a cs3 reference is created in the users `/home/shares` folder. This reference represents the mount point of a share and can be renamed, similar to the share jail in ownCloud Classic. This spreads the metadata of a share in two places:
|
||||
Currently, when a user accepts a share, a cs3 reference is created in the users `/home/shares` folder. This reference represents the mount point of a share and can be renamed, similar to the share jail in ownCloud 10. This spreads the metadata of a share in two places:
|
||||
- the share is persisted in the *share manager*
|
||||
- the mount point of a share is persisted in the home *storage provider*
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ The ocdav service not only handles all WebDAV requests under `(remote.php/)(web)
|
||||
|
||||
| endpoint | service | CS3 api | CS3 namespace | description | TODO |
|
||||
|----------|---------|-------------|------|------|------|
|
||||
| *ownCloud Classic / current ocis setup:* |||||
|
||||
| *ownCloud 10 / current ocis setup:* |||||
|
||||
| `status.php` | ocdav | - | - | currently static | should return compiled version and dynamic values |
|
||||
| `(remote.php/)webdav` | ocdav | storageprovider | `/home` | the old webdav endpoint | |
|
||||
| `(remote.php/)dav/files/<username>` | ocdav | storageprovider | `/home` | the new webdav endpoint | |
|
||||
|
||||
@@ -26,7 +26,7 @@ While the *storage provider* is responsible for managing the tree, file up- and
|
||||
## Storage aspects
|
||||
A lot of different storage technologies exist, ranging from general purpose file systems with POSIX semantics to software defined storage with multiple APIs. Choosing any of them is making a tradeoff decision. Or, if a storage technology is already in place it automatically predetermines the capabilities that can be made available. *Not all storage systems are created equal.*
|
||||
|
||||
Unfortunately, no POSIX filesystem natively supports all storage aspects that ownCloud Classic requires:
|
||||
Unfortunately, no POSIX filesystem natively supports all storage aspects that ownCloud 10 requires:
|
||||
|
||||
### A hierarchical file tree
|
||||
An important aspect of a filesystem is organizing files and directories in a file hierarchy, or tree. It allows you to create, move and delete nodes. Beside the name a node also has well known metadata like size and mtime that are persisted in the tree as well.
|
||||
|
||||
@@ -13,7 +13,7 @@ require (
|
||||
github.com/beevik/etree v1.6.0
|
||||
github.com/blevesearch/bleve/v2 v2.6.0
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible
|
||||
github.com/coreos/go-oidc/v3 v3.19.0
|
||||
github.com/coreos/go-oidc/v3 v3.18.0
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20241105092511-3ad35d174fc1
|
||||
github.com/davidbyttow/govips/v2 v2.18.0
|
||||
github.com/dhowden/tag v0.0.0-20240417053706-3d75831295e8
|
||||
@@ -65,7 +65,7 @@ require (
|
||||
github.com/open-policy-agent/opa v1.17.1
|
||||
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-20260622073440-d60fcb5db155
|
||||
github.com/owncloud/reva/v2 v2.0.0-20260619111530-bcf7d7d3dab4
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/pkg/xattr v0.4.12
|
||||
github.com/prometheus/client_golang v1.23.2
|
||||
@@ -86,7 +86,7 @@ require (
|
||||
github.com/urfave/cli/v2 v2.27.7
|
||||
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.etcd.io/bbolt v1.4.3
|
||||
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
|
||||
@@ -97,7 +97,7 @@ require (
|
||||
go.opentelemetry.io/otel/trace v1.44.0
|
||||
golang.org/x/crypto v0.53.0
|
||||
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f
|
||||
golang.org/x/image v0.43.0
|
||||
golang.org/x/image v0.42.0
|
||||
golang.org/x/net v0.56.0
|
||||
golang.org/x/oauth2 v0.36.0
|
||||
golang.org/x/sync v0.21.0
|
||||
@@ -184,7 +184,7 @@ require (
|
||||
github.com/felixge/httpsnoop v1.0.4 // 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-acme/lego/v4 v4.25.2 // indirect
|
||||
github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667 // indirect
|
||||
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
|
||||
github.com/go-git/go-billy/v5 v5.9.0 // indirect
|
||||
@@ -201,7 +201,7 @@ require (
|
||||
github.com/go-playground/locales v0.14.1 // indirect
|
||||
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||
github.com/go-redis/redis/v8 v8.11.5 // indirect
|
||||
github.com/go-resty/resty/v2 v2.17.2 // indirect
|
||||
github.com/go-resty/resty/v2 v2.16.5 // indirect
|
||||
github.com/go-sql-driver/mysql v1.10.0 // indirect
|
||||
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
|
||||
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
|
||||
@@ -219,7 +219,7 @@ require (
|
||||
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
|
||||
github.com/golang/snappy v1.0.0 // indirect
|
||||
github.com/gomodule/redigo v1.9.3 // indirect
|
||||
github.com/google/go-querystring v1.2.0 // indirect
|
||||
github.com/google/go-querystring v1.1.0 // indirect
|
||||
github.com/google/go-tpm v0.9.8 // indirect
|
||||
github.com/google/pprof v0.0.0-20260402051712-545e8a4df936 // indirect
|
||||
github.com/google/renameio/v2 v2.0.2 // indirect
|
||||
@@ -236,7 +236,7 @@ require (
|
||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
|
||||
github.com/jmespath/go-jmespath v0.4.0 // indirect
|
||||
github.com/jonboulle/clockwork v0.5.0 // indirect
|
||||
github.com/json-iterator/go v1.1.13-0.20220915233716-71ac16282d12 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/juliangruber/go-intersect v1.1.0 // indirect
|
||||
github.com/kevinburke/ssh_config v1.2.0 // indirect
|
||||
github.com/klauspost/compress v1.18.6 // indirect
|
||||
@@ -257,12 +257,12 @@ require (
|
||||
github.com/longsleep/rndm v1.2.0 // indirect
|
||||
github.com/mattermost/xml-roundtrip-validator v0.1.0 // indirect
|
||||
github.com/mattn/go-colorable v0.1.14 // indirect
|
||||
github.com/mattn/go-isatty v0.0.21 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.23 // indirect
|
||||
github.com/mattn/go-sqlite3 v1.14.44 // indirect
|
||||
github.com/maxymania/go-system v0.0.0-20170110133659-647cc364bf0b // indirect
|
||||
github.com/mendsley/gojwk v0.0.0-20141217222730-4d5ec6e58103 // indirect
|
||||
github.com/miekg/dns v1.1.72 // indirect
|
||||
github.com/miekg/dns v1.1.68 // indirect
|
||||
github.com/mileusna/useragent v1.3.5 // indirect
|
||||
github.com/minio/crc64nvme v1.1.1 // indirect
|
||||
github.com/minio/highwayhash v1.0.4 // indirect
|
||||
@@ -311,7 +311,7 @@ require (
|
||||
github.com/skeema/knownhosts v1.3.1 // indirect
|
||||
github.com/spacewander/go-suffix-tree v0.0.0-20191010040751-0865e368c784 // indirect
|
||||
github.com/spf13/pflag v1.0.10 // indirect
|
||||
github.com/stretchr/objx v0.5.3 // indirect
|
||||
github.com/stretchr/objx v0.5.2 // indirect
|
||||
github.com/studio-b12/gowebdav v0.9.0 // indirect
|
||||
github.com/tchap/go-patricia/v2 v2.3.3 // indirect
|
||||
github.com/tidwall/match v1.1.1 // indirect
|
||||
|
||||
@@ -190,8 +190,8 @@ github.com/clipperhouse/uax29/v2 v2.7.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJ
|
||||
github.com/cloudflare/circl v1.6.3 h1:9GPOhQGF9MCYUeXyMYlqTR6a5gTrgR/fBLXvUgtVcg8=
|
||||
github.com/cloudflare/circl v1.6.3/go.mod h1:2eXP6Qfat4O/Yhh8BznvKnJ+uzEoTQ6jVKJRn81BiS4=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/coreos/go-oidc/v3 v3.19.0 h1:F/xyOi3x1UnG1U27YVnM1N6bHiL1K2upi6U/0qr8r+I=
|
||||
github.com/coreos/go-oidc/v3 v3.19.0/go.mod h1:DYCf24+ncYi+XkIH97GY1+dqoRlbaSI26KVTCI9SrY4=
|
||||
github.com/coreos/go-oidc/v3 v3.18.0 h1:V9orjXynvu5wiC9SemFTWnG4F45v403aIcjWo0d41+A=
|
||||
github.com/coreos/go-oidc/v3 v3.18.0/go.mod h1:DYCf24+ncYi+XkIH97GY1+dqoRlbaSI26KVTCI9SrY4=
|
||||
github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4=
|
||||
github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec=
|
||||
github.com/coreos/go-systemd/v22 v22.7.0 h1:LAEzFkke61DFROc7zNLX/WA2i5J8gYqe0rSj9KI28KA=
|
||||
@@ -284,8 +284,8 @@ github.com/gkampitakis/go-snaps v0.5.15 h1:amyJrvM1D33cPHwVrjo9jQxX8g/7E2wYdZ+01
|
||||
github.com/gkampitakis/go-snaps v0.5.15/go.mod h1:HNpx/9GoKisdhw9AFOBT1N7DBs9DiHo/hGheFGBZ+mc=
|
||||
github.com/gliderlabs/ssh v0.3.8 h1:a4YXD1V7xMF9g5nTkdfnja3Sxy1PVDCj1Zg4Wb8vY6c=
|
||||
github.com/gliderlabs/ssh v0.3.8/go.mod h1:xYoytBv1sV0aL3CavoDuJIQNURXkkfPA/wxQ1pL1fAU=
|
||||
github.com/go-acme/lego/v4 v4.34.0 h1:oRsIuPJ4ORX7ufviXvelUpBSez2XxeKGwo5pNG9BVeY=
|
||||
github.com/go-acme/lego/v4 v4.34.0/go.mod h1:gsmdlx/ZS6OUeXbOj0U+VnCLLfEFj4WCYRkcGpZw+pc=
|
||||
github.com/go-acme/lego/v4 v4.25.2 h1:+D1Q+VnZrD+WJdlkgUEGHFFTcDrwGlE7q24IFtMmHDI=
|
||||
github.com/go-acme/lego/v4 v4.25.2/go.mod h1:OORYyVNZPaNdIdVYCGSBNRNZDIjhQbPuFxwGDgWj/yM=
|
||||
github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
|
||||
github.com/go-asn1-ber/asn1-ber v1.4.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
|
||||
github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667 h1:BP4M0CvQ4S3TGls2FvczZtj5Re/2ZzkV9VwqPHH/3Bo=
|
||||
@@ -365,8 +365,8 @@ github.com/go-playground/validator/v10 v10.30.3 h1:4MU6YkEwx7GbcPJOZxrtbu+QfF3pJ
|
||||
github.com/go-playground/validator/v10 v10.30.3/go.mod h1:4Axh7oCNGcoGkqLoE4YWt6n20mcEIsPRlB7vPk3lpyc=
|
||||
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
|
||||
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
|
||||
github.com/go-resty/resty/v2 v2.17.2 h1:FQW5oHYcIlkCNrMD2lloGScxcHJ0gkjshV3qcQAyHQk=
|
||||
github.com/go-resty/resty/v2 v2.17.2/go.mod h1:kCKZ3wWmwJaNc7S29BRtUhJwy7iqmn+2mLtQrOyQlVA=
|
||||
github.com/go-resty/resty/v2 v2.16.5 h1:hBKqmWrr7uRc3euHVqmh1HTHcKn99Smr7o5spptdhTM=
|
||||
github.com/go-resty/resty/v2 v2.16.5/go.mod h1:hkJtXbA2iKHzJheXYvQ8snQES5ZLGKMwQ07xAwp/fiA=
|
||||
github.com/go-sql-driver/mysql v1.10.0 h1:Q+1LV8DkHJvSYAdR83XzuhDaTykuDx0l6fkXxoWCWfw=
|
||||
github.com/go-sql-driver/mysql v1.10.0/go.mod h1:M+cqaI7+xxXGG9swrdeUIoPG3Y3KCkF0pZej+SK+nWk=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
@@ -454,16 +454,16 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
|
||||
github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||
github.com/google/go-querystring v1.2.0 h1:yhqkPbu2/OH+V9BfpCVPZkNmUXhb2gBxJArfhIxNtP0=
|
||||
github.com/google/go-querystring v1.2.0/go.mod h1:8IFJqpSRITyJ8QhQ13bmbeMBDfmeEJZD5A0egEOmkqU=
|
||||
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
|
||||
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
|
||||
github.com/google/go-tika v0.3.1 h1:l+jr10hDhZjcgxFRfcQChRLo1bPXQeLFluMyvDhXTTA=
|
||||
github.com/google/go-tika v0.3.1/go.mod h1:DJh5N8qxXIl85QkqmXknd+PeeRkUOTbvwyYf7ieDz6c=
|
||||
github.com/google/go-tpm v0.9.8 h1:slArAR9Ft+1ybZu0lBwpSmpwhRXaa85hWtMinMyRAWo=
|
||||
@@ -561,9 +561,8 @@ github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX
|
||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||
github.com/json-iterator/go v1.1.13-0.20220915233716-71ac16282d12 h1:9Nu54bhS/H/Kgo2/7xNSUuC5G28VR8ljfrLKU2G4IjU=
|
||||
github.com/json-iterator/go v1.1.13-0.20220915233716-71ac16282d12/go.mod h1:TBzl5BIHNXfS9+C35ZyJaklL7mLDbgUkcgXzSLa8Tk0=
|
||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
|
||||
github.com/juliangruber/go-intersect v1.1.0 h1:sc+y5dCjMMx0pAdYk/N6KBm00tD/f3tq+Iox7dYDUrY=
|
||||
@@ -648,8 +647,8 @@ github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHP
|
||||
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||
github.com/mattn/go-isatty v0.0.21 h1:xYae+lCNBP7QuW4PUnNG61ffM4hVIfm+zUzDuSzYLGs=
|
||||
github.com/mattn/go-isatty v0.0.21/go.mod h1:ZXfXG4SQHsB/w3ZeOYbR0PrPwLy+n6xiMrJlRFqopa4=
|
||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/mattn/go-runewidth v0.0.23 h1:7ykA0T0jkPpzSvMS5i9uoNn2Xy3R383f9HDx3RybWcw=
|
||||
github.com/mattn/go-runewidth v0.0.23/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=
|
||||
github.com/mattn/go-sqlite3 v1.14.44 h1:3VSe+xafpbzsLbdr2AWlAZk9yRHiBhTBakioXaCKTF8=
|
||||
@@ -661,8 +660,8 @@ github.com/mendsley/gojwk v0.0.0-20141217222730-4d5ec6e58103 h1:Z/i1e+gTZrmcGeZy
|
||||
github.com/mendsley/gojwk v0.0.0-20141217222730-4d5ec6e58103/go.mod h1:o9YPB5aGP8ob35Vy6+vyq3P3bWe7NQWzf+JLiXCiMaE=
|
||||
github.com/mfridman/tparse v0.18.0 h1:wh6dzOKaIwkUGyKgOntDW4liXSo37qg5AXbIhkMV3vE=
|
||||
github.com/mfridman/tparse v0.18.0/go.mod h1:gEvqZTuCgEhPbYk/2lS3Kcxg1GmTxxU7kTC8DvP0i/A=
|
||||
github.com/miekg/dns v1.1.72 h1:vhmr+TF2A3tuoGNkLDFK9zi36F2LS+hKTRW0Uf8kbzI=
|
||||
github.com/miekg/dns v1.1.72/go.mod h1:+EuEPhdHOsfk6Wk5TT2CzssZdqkmFhf8r+aVyDEToIs=
|
||||
github.com/miekg/dns v1.1.68 h1:jsSRkNozw7G/mnmXULynzMNIsgY2dHC8LO6U6Ij2JEA=
|
||||
github.com/miekg/dns v1.1.68/go.mod h1:fujopn7TB3Pu3JM69XaawiU0wqjpL9/8xGop5UrTPps=
|
||||
github.com/mileusna/useragent v1.3.5 h1:SJM5NzBmh/hO+4LGeATKpaEX9+b4vcGg2qXGLiNGDws=
|
||||
github.com/mileusna/useragent v1.3.5/go.mod h1:3d8TOmwL/5I8pJjyVDteHtgDGcefrFUX4ccGOMKNYYc=
|
||||
github.com/minio/crc64nvme v1.1.1 h1:8dwx/Pz49suywbO+auHCBpCtlW1OfpcLN7wYgVR6wAI=
|
||||
@@ -739,6 +738,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-20260619111530-bcf7d7d3dab4 h1:b+gXYJ1sInE9iIJK1RGw6bqyhI1FIJQPUzBbAwQrcrc=
|
||||
github.com/owncloud/reva/v2 v2.0.0-20260619111530-bcf7d7d3dab4/go.mod h1:gNSgpblFyfCDi1OQfU4VqPIHWtAPR3YPTE1ZaTNnG/U=
|
||||
github.com/owncloud/reva/v2 v2.0.0-20260622073440-d60fcb5db155 h1:RaT3PLjficoMB6SMoeU1BfcwBULTjbuHbXC+bmW1780=
|
||||
github.com/owncloud/reva/v2 v2.0.0-20260622073440-d60fcb5db155/go.mod h1:gNSgpblFyfCDi1OQfU4VqPIHWtAPR3YPTE1ZaTNnG/U=
|
||||
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw=
|
||||
@@ -864,9 +865,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
|
||||
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
|
||||
github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4=
|
||||
github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
@@ -946,8 +946,8 @@ github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ=
|
||||
github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0=
|
||||
github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs=
|
||||
github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s=
|
||||
go.etcd.io/bbolt v1.5.0 h1:S7GAl7Fxv12yohbwFfIbQCGDWbQbtDGPET4P/bD4lxU=
|
||||
go.etcd.io/bbolt v1.5.0/go.mod h1:mkltfYE5aUHQxUct9N9V+Kp7aSjFqjgrhcXIS70Lrdk=
|
||||
go.etcd.io/bbolt v1.4.3 h1:dEadXpI6G79deX5prL3QRNP6JB8UxVkqo4UPnHaNXJo=
|
||||
go.etcd.io/bbolt v1.4.3/go.mod h1:tKQlpPaYCVFctUIgFKFnAlvbmB3tpy1vkTnDWohtc0E=
|
||||
go.etcd.io/etcd/api/v3 v3.6.11 h1:XFGTgrJ8nak3kB4NgMG8t7NT+lEeuuvKQAqUHKVgkWQ=
|
||||
go.etcd.io/etcd/api/v3 v3.6.11/go.mod h1:HYfTh0jyh+uFgp6gMbxJteIDYY97yMuYz85Rnw6Gy9o=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.6.11 h1:e41mp315Yn3QMGPmEzCyLsMINgJXTY/dX8kM++1csxU=
|
||||
@@ -1029,8 +1029,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.43.0 h1:FLxcP4ec2350nTfOC8ysKtqYSIFbk/QGjw1ZHNP4tsY=
|
||||
golang.org/x/image v0.43.0/go.mod h1:rrpelvGFt+kLPAjPM4HeWPgrl0FtafueU//e5N0qk/Q=
|
||||
golang.org/x/image v0.42.0 h1:1gSs6ehNWXLbkHBIPcWztk3D/6aIA/8hauiAYtlodVY=
|
||||
golang.org/x/image v0.42.0/go.mod h1:rrpelvGFt+kLPAjPM4HeWPgrl0FtafueU//e5N0qk/Q=
|
||||
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=
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM amd64/alpine:3.24.1
|
||||
FROM amd64/alpine:3.23.4
|
||||
|
||||
ARG VERSION=""
|
||||
ARG REVISION=""
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM arm64v8/alpine:3.24.1
|
||||
FROM arm64v8/alpine:3.23.4
|
||||
|
||||
ARG VERSION=""
|
||||
ARG REVISION=""
|
||||
|
||||
@@ -1,196 +0,0 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
link "github.com/cs3org/go-cs3apis/cs3/sharing/link/v1beta1"
|
||||
"github.com/owncloud/reva/v2/pkg/publicshare/manager/json/persistence"
|
||||
pcs3 "github.com/owncloud/reva/v2/pkg/publicshare/manager/json/persistence/cs3"
|
||||
pfile "github.com/owncloud/reva/v2/pkg/publicshare/manager/json/persistence/file"
|
||||
metadatacs3 "github.com/owncloud/reva/v2/pkg/storage/utils/metadata"
|
||||
"github.com/owncloud/reva/v2/pkg/utils"
|
||||
"github.com/urfave/cli/v2"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
|
||||
mregistry "github.com/owncloud/ocis/v2/ocis-pkg/registry"
|
||||
sharingparser "github.com/owncloud/ocis/v2/services/sharing/pkg/config/parser"
|
||||
)
|
||||
|
||||
// cleanCorruptPublicSharesCmd removes corrupt public-share entries (those with a
|
||||
// missing/nil resource_id) from the public-share manager persistence.
|
||||
//
|
||||
// Background: a single public-share row with a nil resource_id makes the json
|
||||
// public-share manager's ListPublicShares panic with a nil-pointer dereference,
|
||||
// because it builds a cache key from resource_id without a nil-check. As the
|
||||
// manager reads all rows and filters in memory, that one bad row poisons the
|
||||
// endpoint for the whole tenant: every Members/permissions panel load and every
|
||||
// link-with-password creation fails. This command removes the offending rows so
|
||||
// affected deployments can be unblocked until the code fix is rolled out.
|
||||
//
|
||||
// It reads the raw persistence (it does NOT call ListPublicShares, so it never
|
||||
// hits the panic) and writes back through the same metadata storage path the
|
||||
// manager uses, so blob size, mtime and etag are recomputed automatically and no
|
||||
// on-disk metadata surgery is required.
|
||||
func cleanCorruptPublicSharesCmd(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "clean-corrupt-public-shares",
|
||||
Usage: `Remove corrupt public-share entries (nil resource_id) that crash ListPublicShares.`,
|
||||
Flags: []cli.Flag{
|
||||
&cli.BoolFlag{
|
||||
Name: "dry-run",
|
||||
Value: true,
|
||||
Usage: "Only report corrupt entries, do not modify anything",
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "verbose",
|
||||
Aliases: []string{"v"},
|
||||
Usage: "Verbose logging enabled",
|
||||
},
|
||||
},
|
||||
Before: func(c *cli.Context) error {
|
||||
if err := parser.ParseConfig(cfg, true); err != nil {
|
||||
return configlog.ReturnError(err)
|
||||
}
|
||||
cfg.Sharing.Commons = cfg.Commons
|
||||
return configlog.ReturnError(sharingparser.ParseConfig(cfg.Sharing))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
return cleanCorruptPublicShares(c, cfg)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func cleanCorruptPublicShares(c *cli.Context, cfg *config.Config) error {
|
||||
dryRun := c.Bool("dry-run")
|
||||
verbose := c.Bool("verbose")
|
||||
|
||||
// Initialize the service registry so the jsoncs3 driver can resolve the
|
||||
// storage-system provider via service discovery.
|
||||
_ = mregistry.GetRegistry()
|
||||
|
||||
driver := cfg.Sharing.PublicSharingDriver
|
||||
p, err := publicSharePersistence(driver, cfg)
|
||||
if err != nil {
|
||||
return configlog.ReturnError(err)
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
if err := p.Init(ctx); err != nil {
|
||||
return configlog.ReturnError(fmt.Errorf("failed to initialize public-share persistence: %w", err))
|
||||
}
|
||||
|
||||
db, err := p.Read(ctx)
|
||||
if err != nil {
|
||||
return configlog.ReturnError(fmt.Errorf("failed to read public shares: %w", err))
|
||||
}
|
||||
|
||||
if dryRun {
|
||||
fmt.Print("Dry run mode enabled: no entries will be removed\n\n")
|
||||
}
|
||||
fmt.Printf("Scanning %d public-share entries (driver=%s)\n", len(db), driver)
|
||||
|
||||
corrupt := findCorruptPublicShares(db)
|
||||
for _, f := range corrupt {
|
||||
fmt.Printf(" CORRUPT id=%s token=%s: %s\n", f.ID, f.Token, f.Reason)
|
||||
}
|
||||
if verbose {
|
||||
for id, raw := range db {
|
||||
share, ok := decodePublicShare(raw)
|
||||
if ok && share.GetResourceId() != nil && share.GetResourceId().GetStorageId() != "" {
|
||||
fmt.Printf(" ok id=%s token=%s resource_id=%s\n", id, share.GetToken(), share.GetResourceId().GetOpaqueId())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(corrupt) == 0 {
|
||||
fmt.Println("\nNo corrupt public-share entries found. Nothing to do.")
|
||||
return nil
|
||||
}
|
||||
|
||||
if dryRun {
|
||||
fmt.Printf("\nDry run: found %d corrupt entr(y/ies). Re-run with --dry-run=false to remove them.\n", len(corrupt))
|
||||
return nil
|
||||
}
|
||||
|
||||
for _, f := range corrupt {
|
||||
delete(db, f.ID)
|
||||
}
|
||||
if err := p.Write(ctx, db); err != nil {
|
||||
return configlog.ReturnError(fmt.Errorf("failed to write public shares: %w", err))
|
||||
}
|
||||
|
||||
fmt.Printf("\nRemoved %d corrupt public-share entr(y/ies). %d entr(y/ies) remaining.\n", len(corrupt), len(db))
|
||||
return nil
|
||||
}
|
||||
|
||||
// corruptShare identifies a public-share persistence entry that would crash the
|
||||
// json public-share manager (or that the manager cannot decode at all).
|
||||
type corruptShare struct {
|
||||
ID string
|
||||
Token string
|
||||
Reason string
|
||||
}
|
||||
|
||||
// findCorruptPublicShares returns the entries that must be removed: those whose
|
||||
// stored value is not a decodable public-share record, and those with a nil or
|
||||
// empty resource_id (the condition that makes ListPublicShares panic).
|
||||
func findCorruptPublicShares(db persistence.PublicShares) []corruptShare {
|
||||
var out []corruptShare
|
||||
for id, raw := range db {
|
||||
share, ok := decodePublicShare(raw)
|
||||
if !ok {
|
||||
out = append(out, corruptShare{ID: id, Reason: "entry is not a valid public-share record"})
|
||||
continue
|
||||
}
|
||||
if share.GetResourceId() == nil || share.GetResourceId().GetStorageId() == "" {
|
||||
out = append(out, corruptShare{ID: id, Token: share.GetToken(), Reason: "nil/empty resource_id"})
|
||||
}
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
// decodePublicShare extracts the cs3 PublicShare from a raw persistence entry.
|
||||
// The persistence stores each entry as map{"share": <json-encoded-PublicShare>, "password": <string>}.
|
||||
// It returns ok=false when the entry does not match that shape.
|
||||
func decodePublicShare(raw interface{}) (*link.PublicShare, bool) {
|
||||
m, ok := raw.(map[string]interface{})
|
||||
if !ok {
|
||||
return nil, false
|
||||
}
|
||||
s, ok := m["share"].(string)
|
||||
if !ok {
|
||||
return nil, false
|
||||
}
|
||||
var ps link.PublicShare
|
||||
if err := utils.UnmarshalJSONToProtoV1([]byte(s), &ps); err != nil {
|
||||
return nil, false
|
||||
}
|
||||
return &ps, true
|
||||
}
|
||||
|
||||
// publicSharePersistence builds the persistence backend for the configured public-share
|
||||
// driver, mirroring how reva's json public-share manager constructs it. Only the file-backed
|
||||
// ("json") and cs3-backed ("jsoncs3") drivers store data in a way this command can repair.
|
||||
func publicSharePersistence(driver string, cfg *config.Config) (persistence.Persistence, error) {
|
||||
switch driver {
|
||||
case "jsoncs3":
|
||||
d := cfg.Sharing.PublicSharingDrivers.JSONCS3
|
||||
s, err := metadatacs3.NewCS3Storage(d.ProviderAddr, d.ProviderAddr, d.SystemUserID, d.SystemUserIDP, d.SystemUserAPIKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return pcs3.New(s), nil
|
||||
case "json":
|
||||
file := cfg.Sharing.PublicSharingDrivers.JSON.File
|
||||
if file == "" {
|
||||
file = "/var/tmp/reva/publicshares"
|
||||
}
|
||||
return pfile.New(file), nil
|
||||
default:
|
||||
return nil, errors.New("clean-corrupt-public-shares is only implemented for the 'jsoncs3' and 'json' public-share drivers, got: " + driver)
|
||||
}
|
||||
}
|
||||
@@ -1,166 +0,0 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
link "github.com/cs3org/go-cs3apis/cs3/sharing/link/v1beta1"
|
||||
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
|
||||
"github.com/owncloud/reva/v2/pkg/publicshare/manager/json/persistence"
|
||||
"github.com/owncloud/reva/v2/pkg/utils"
|
||||
)
|
||||
|
||||
// encodeEntry builds a persistence entry the same way the reva json public-share
|
||||
// manager does: map{"share": <json-encoded PublicShare>, "password": <string>}.
|
||||
func encodeEntry(t *testing.T, ps *link.PublicShare) map[string]interface{} {
|
||||
t.Helper()
|
||||
enc, err := utils.MarshalProtoV1ToJSON(ps)
|
||||
if err != nil {
|
||||
t.Fatalf("failed to marshal public share: %v", err)
|
||||
}
|
||||
return map[string]interface{}{
|
||||
"share": string(enc),
|
||||
"password": "",
|
||||
}
|
||||
}
|
||||
|
||||
func validShare(id, token string) *link.PublicShare {
|
||||
return &link.PublicShare{
|
||||
Id: &link.PublicShareId{OpaqueId: id},
|
||||
Token: token,
|
||||
ResourceId: &provider.ResourceId{
|
||||
StorageId: "storage-1",
|
||||
SpaceId: "space-1",
|
||||
OpaqueId: "node-1",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func TestFindCorruptPublicShares(t *testing.T) {
|
||||
t.Run("nil resource_id is corrupt", func(t *testing.T) {
|
||||
ps := validShare("bad-nil", "tok-nil")
|
||||
ps.ResourceId = nil
|
||||
db := persistence.PublicShares{
|
||||
"good": encodeEntry(t, validShare("good", "tok-good")),
|
||||
"bad-nil": encodeEntry(t, ps),
|
||||
}
|
||||
|
||||
got := findCorruptPublicShares(db)
|
||||
if len(got) != 1 {
|
||||
t.Fatalf("expected 1 corrupt entry, got %d (%v)", len(got), got)
|
||||
}
|
||||
if got[0].ID != "bad-nil" {
|
||||
t.Errorf("expected corrupt id 'bad-nil', got %q", got[0].ID)
|
||||
}
|
||||
if got[0].Token != "tok-nil" {
|
||||
t.Errorf("expected token 'tok-nil', got %q", got[0].Token)
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("empty storage_id is corrupt", func(t *testing.T) {
|
||||
ps := validShare("bad-empty", "tok-empty")
|
||||
ps.ResourceId = &provider.ResourceId{StorageId: "", SpaceId: "s", OpaqueId: "o"}
|
||||
db := persistence.PublicShares{
|
||||
"bad-empty": encodeEntry(t, ps),
|
||||
}
|
||||
|
||||
got := findCorruptPublicShares(db)
|
||||
if len(got) != 1 {
|
||||
t.Fatalf("expected 1 corrupt entry, got %d", len(got))
|
||||
}
|
||||
if got[0].ID != "bad-empty" {
|
||||
t.Errorf("expected corrupt id 'bad-empty', got %q", got[0].ID)
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("undecodable entry is corrupt", func(t *testing.T) {
|
||||
db := persistence.PublicShares{
|
||||
"not-a-record": "just a string",
|
||||
"missing-share": map[string]interface{}{"password": ""},
|
||||
"bad-json": map[string]interface{}{"share": "{not json", "password": ""},
|
||||
}
|
||||
|
||||
got := findCorruptPublicShares(db)
|
||||
if len(got) != 3 {
|
||||
t.Fatalf("expected 3 corrupt entries, got %d (%v)", len(got), got)
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("all valid yields none", func(t *testing.T) {
|
||||
db := persistence.PublicShares{
|
||||
"a": encodeEntry(t, validShare("a", "tok-a")),
|
||||
"b": encodeEntry(t, validShare("b", "tok-b")),
|
||||
}
|
||||
|
||||
got := findCorruptPublicShares(db)
|
||||
if len(got) != 0 {
|
||||
t.Fatalf("expected 0 corrupt entries, got %d (%v)", len(got), got)
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("empty db yields none", func(t *testing.T) {
|
||||
if got := findCorruptPublicShares(persistence.PublicShares{}); len(got) != 0 {
|
||||
t.Fatalf("expected 0 corrupt entries, got %d", len(got))
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("only corrupt entries are removed, valid ones preserved", func(t *testing.T) {
|
||||
bad := validShare("bad", "tok-bad")
|
||||
bad.ResourceId = nil
|
||||
db := persistence.PublicShares{
|
||||
"keep-1": encodeEntry(t, validShare("keep-1", "tok-1")),
|
||||
"bad": encodeEntry(t, bad),
|
||||
"keep-2": encodeEntry(t, validShare("keep-2", "tok-2")),
|
||||
}
|
||||
|
||||
for _, f := range findCorruptPublicShares(db) {
|
||||
delete(db, f.ID)
|
||||
}
|
||||
|
||||
if len(db) != 2 {
|
||||
t.Fatalf("expected 2 entries remaining, got %d", len(db))
|
||||
}
|
||||
if _, ok := db["bad"]; ok {
|
||||
t.Error("corrupt entry 'bad' was not removed")
|
||||
}
|
||||
if _, ok := db["keep-1"]; !ok {
|
||||
t.Error("valid entry 'keep-1' was removed")
|
||||
}
|
||||
if _, ok := db["keep-2"]; !ok {
|
||||
t.Error("valid entry 'keep-2' was removed")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func TestDecodePublicShare(t *testing.T) {
|
||||
t.Run("valid entry decodes", func(t *testing.T) {
|
||||
entry := encodeEntry(t, validShare("x", "tok-x"))
|
||||
ps, ok := decodePublicShare(entry)
|
||||
if !ok {
|
||||
t.Fatal("expected decode to succeed")
|
||||
}
|
||||
if ps.GetToken() != "tok-x" {
|
||||
t.Errorf("expected token 'tok-x', got %q", ps.GetToken())
|
||||
}
|
||||
if ps.GetResourceId().GetStorageId() != "storage-1" {
|
||||
t.Errorf("expected storage_id 'storage-1', got %q", ps.GetResourceId().GetStorageId())
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("non-map entry fails", func(t *testing.T) {
|
||||
if _, ok := decodePublicShare("not a map"); ok {
|
||||
t.Error("expected decode to fail for non-map entry")
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("missing share key fails", func(t *testing.T) {
|
||||
if _, ok := decodePublicShare(map[string]interface{}{"password": ""}); ok {
|
||||
t.Error("expected decode to fail when 'share' key is missing")
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("invalid json fails", func(t *testing.T) {
|
||||
if _, ok := decodePublicShare(map[string]interface{}{"share": "{broken"}); ok {
|
||||
t.Error("expected decode to fail for invalid json")
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -66,7 +66,6 @@ func SharesCommand(cfg *config.Config) *cli.Command {
|
||||
cleanupCmd(cfg),
|
||||
cleanOrphanedGrantsCmd(cfg),
|
||||
moveStuckUploadBlobsCmd(cfg),
|
||||
cleanCorruptPublicSharesCmd(cfg),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
package revisions
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/owncloud/reva/v2/pkg/storage/utils/decomposedfs/node"
|
||||
"github.com/shamaton/msgpack/v2"
|
||||
"github.com/test-go/testify/require"
|
||||
)
|
||||
|
||||
// recordingBlobstore records the nodes passed to Delete so the test can assert
|
||||
// the blob path inputs (SpaceID + BlobID).
|
||||
type recordingBlobstore struct {
|
||||
deleted []*node.Node
|
||||
}
|
||||
|
||||
func (r *recordingBlobstore) Delete(n *node.Node) error {
|
||||
r.deleted = append(r.deleted, n)
|
||||
return nil
|
||||
}
|
||||
|
||||
// TestPurgeRevisionsDeletesBlobWithSpaceID guards against orphaning blobs: the
|
||||
// blobstore derives the blob path from the node's SpaceID and BlobID, so
|
||||
// PurgeRevisions must pass the SpaceID parsed from the revision path. Without
|
||||
// it the blobstore targets the wrong path (no-op delete) while the revision
|
||||
// metadata is still removed, leaving the blob orphaned.
|
||||
func TestPurgeRevisionsDeletesBlobWithSpaceID(t *testing.T) {
|
||||
const (
|
||||
spaceID = "spaceid1"
|
||||
nodeID = "nodeid1"
|
||||
blobID = "blob-abc"
|
||||
)
|
||||
|
||||
tmp := t.TempDir()
|
||||
dir := filepath.Join(tmp, "storage", "users", "spaces", spaceID, "nodes")
|
||||
require.NoError(t, os.MkdirAll(dir, 0o755))
|
||||
|
||||
revPath := filepath.Join(dir, nodeID+".REV.2024-05-22T07:32:53.123456789Z.mpk")
|
||||
value, err := msgpack.Marshal(map[string][]byte{"user.ocis.blobid": []byte(blobID)})
|
||||
require.NoError(t, err)
|
||||
require.NoError(t, os.WriteFile(revPath, value, 0o644))
|
||||
|
||||
nodes := make(chan string, 1)
|
||||
nodes <- revPath
|
||||
close(nodes)
|
||||
|
||||
bs := &recordingBlobstore{}
|
||||
PurgeRevisions(nodes, bs, false, false)
|
||||
|
||||
require.Len(t, bs.deleted, 1, "expected exactly one blob delete")
|
||||
require.Equal(t, blobID, bs.deleted[0].BlobID)
|
||||
require.Equal(t, spaceID, bs.deleted[0].SpaceID, "SpaceID must be passed to the blobstore, otherwise the blob is orphaned")
|
||||
}
|
||||
@@ -164,13 +164,8 @@ func PurgeRevisions(nodes <-chan string, bs DelBlobstore, dryRun, verbose bool)
|
||||
|
||||
if !dryRun {
|
||||
if blobID != "" {
|
||||
// The blobstore derives the blob path from the node's SpaceID and
|
||||
// BlobID, so the SpaceID must be set. Without it the wrong (empty
|
||||
// space) path is targeted: the s3ng delete is a no-op and the
|
||||
// posix delete misses, leaving the blob orphaned while the
|
||||
// revision metadata below is still removed.
|
||||
spaceID, _ := getIDsFromPath(d)
|
||||
if err := bs.Delete(&node.Node{SpaceID: spaceID, BlobID: blobID}); err != nil {
|
||||
// TODO: needs spaceID for s3ng
|
||||
if err := bs.Delete(&node.Node{BlobID: blobID}); err != nil {
|
||||
fmt.Printf("error deleting blob %s: %v\n", blobID, err)
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-24 03:20+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: Martin <github@diemattels.at>, 2026\n"
|
||||
"Language-Team: Catalan (https://app.transifex.com/owncloud-org/teams/6149/ca/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-24 03:20+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: Martin <github@diemattels.at>, 2026\n"
|
||||
"Language-Team: German (https://app.transifex.com/owncloud-org/teams/6149/de/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-24 03:20+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: Martin <github@diemattels.at>, 2026\n"
|
||||
"Language-Team: English (United Kingdom) (https://app.transifex.com/owncloud-org/teams/6149/en_GB/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-24 03:20+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: Martin <github@diemattels.at>, 2026\n"
|
||||
"Language-Team: English (United States) (https://app.transifex.com/owncloud-org/teams/6149/en_US/)\n"
|
||||
|
||||
@@ -12,7 +12,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-24 03:20+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: Victor Vinuela <vinuela.victor@dissectio.com>, 2026\n"
|
||||
"Language-Team: Spanish (https://app.transifex.com/owncloud-org/teams/6149/es/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-29 03:23+0000\n"
|
||||
"POT-Creation-Date: 2026-06-08 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: Domainmasteri, 2026\n"
|
||||
"Language-Team: Finnish (Finland) (https://app.transifex.com/owncloud-org/teams/6149/fi_FI/)\n"
|
||||
|
||||
@@ -12,7 +12,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-24 03:20+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: Cesare Capoferri, 2026\n"
|
||||
"Language-Team: Italian (https://app.transifex.com/owncloud-org/teams/6149/it/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-24 03:20+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: Martin <github@diemattels.at>, 2026\n"
|
||||
"Language-Team: Japanese (https://app.transifex.com/owncloud-org/teams/6149/ja/)\n"
|
||||
|
||||
@@ -12,7 +12,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-24 03:20+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: BoneNI, 2026\n"
|
||||
"Language-Team: Lao (https://app.transifex.com/owncloud-org/teams/6149/lo/)\n"
|
||||
|
||||
@@ -12,7 +12,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-24 03:20+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: Martin <github@diemattels.at>, 2026\n"
|
||||
"Language-Team: Portuguese (https://app.transifex.com/owncloud-org/teams/6149/pt/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-24 03:20+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: Martin <github@diemattels.at>, 2026\n"
|
||||
"Language-Team: Portuguese (Brazil) (https://app.transifex.com/owncloud-org/teams/6149/pt_BR/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-07-03 03:14+0000\n"
|
||||
"POT-Creation-Date: 2026-06-12 03:22+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: Martin <github@diemattels.at>, 2026\n"
|
||||
"Language-Team: Russian (https://app.transifex.com/owncloud-org/teams/6149/ru/)\n"
|
||||
|
||||
@@ -12,7 +12,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-24 03:20+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: Miha Podobnik, 2026\n"
|
||||
"Language-Team: Slovenian (https://app.transifex.com/owncloud-org/teams/6149/sl/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-24 03:20+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: Martin <github@diemattels.at>, 2026\n"
|
||||
"Language-Team: Albanian (https://app.transifex.com/owncloud-org/teams/6149/sq/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-24 03:20+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: Martin <github@diemattels.at>, 2026\n"
|
||||
"Language-Team: Uyghur (https://app.transifex.com/owncloud-org/teams/6149/ug/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-07-03 03:14+0000\n"
|
||||
"POT-Creation-Date: 2026-06-12 03:22+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: Martin <github@diemattels.at>, 2026\n"
|
||||
"Language-Team: Ukrainian (https://app.transifex.com/owncloud-org/teams/6149/uk/)\n"
|
||||
|
||||
@@ -5,16 +5,15 @@
|
||||
#
|
||||
# Translators:
|
||||
# 許明凱 <yuteson@gmail.com>, 2026
|
||||
# 振东 刘, 2026
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-19 03:23+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: 振东 刘, 2026\n"
|
||||
"Last-Translator: 許明凱 <yuteson@gmail.com>, 2026\n"
|
||||
"Language-Team: Chinese Traditional (https://app.transifex.com/owncloud-org/teams/6149/zh-Hant/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@@ -28,7 +27,7 @@ msgstr "描述"
|
||||
|
||||
#: pkg/service/response.go:43
|
||||
msgid "display name"
|
||||
msgstr "显示名称"
|
||||
msgstr ""
|
||||
|
||||
#: pkg/service/response.go:42
|
||||
msgid "expiration date"
|
||||
@@ -36,7 +35,7 @@ msgstr "設置到期日期"
|
||||
|
||||
#: pkg/service/response.go:41
|
||||
msgid "password"
|
||||
msgstr "密码"
|
||||
msgstr ""
|
||||
|
||||
#: pkg/service/response.go:40
|
||||
msgid "permission"
|
||||
|
||||
@@ -13,7 +13,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-24 03:20+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: 許明凱 <yuteson@gmail.com>, 2026\n"
|
||||
"Language-Team: Chinese (https://app.transifex.com/owncloud-org/teams/6149/zh/)\n"
|
||||
|
||||
@@ -5,17 +5,17 @@
|
||||
#
|
||||
# Translators:
|
||||
# Martin <github@diemattels.at>, 2026
|
||||
# guanu244, 2026
|
||||
# 許明凱 <yuteson@gmail.com>, 2026
|
||||
# 振东 刘, 2026
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-19 03:23+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: 振东 刘, 2026\n"
|
||||
"Last-Translator: 許明凱 <yuteson@gmail.com>, 2026\n"
|
||||
"Language-Team: Chinese (China) (https://app.transifex.com/owncloud-org/teams/6149/zh_CN/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@@ -29,31 +29,31 @@ msgstr "描述"
|
||||
|
||||
#: pkg/service/response.go:43
|
||||
msgid "display name"
|
||||
msgstr "显示名称"
|
||||
msgstr "顯示名稱"
|
||||
|
||||
#: pkg/service/response.go:42
|
||||
msgid "expiration date"
|
||||
msgstr "过期日期"
|
||||
msgstr "設置到期日期"
|
||||
|
||||
#: pkg/service/response.go:41
|
||||
msgid "password"
|
||||
msgstr "密码"
|
||||
msgstr "密碼"
|
||||
|
||||
#: pkg/service/response.go:40
|
||||
msgid "permission"
|
||||
msgstr "权限"
|
||||
msgstr "權限"
|
||||
|
||||
#: pkg/service/response.go:45
|
||||
msgid "shared-with-me"
|
||||
msgstr "已与我共享"
|
||||
msgstr "與我共享"
|
||||
|
||||
#: pkg/service/response.go:39
|
||||
msgid "some field"
|
||||
msgstr "部分字段"
|
||||
msgstr "部分欄位"
|
||||
|
||||
#: pkg/service/response.go:26
|
||||
msgid "{resource} was downloaded via public link {token}"
|
||||
msgstr "{resource} 已通过公开链接 {token} 下载"
|
||||
msgstr "{resource} 透過公開連結{token} 被下載了"
|
||||
|
||||
#: pkg/service/response.go:24
|
||||
msgid "{user} added {resource} to {folder}"
|
||||
@@ -97,7 +97,7 @@ msgstr "{user} 通过 {sharee} 共享了 {resource}"
|
||||
|
||||
#: pkg/service/response.go:34
|
||||
msgid "{user} updated {field} for a link {token} on {resource}"
|
||||
msgstr "{user} 修改了 {resource} 上链接 {token} 的 {field} 属性"
|
||||
msgstr "{user} 更新了 {resource} 連結 {token} 的 {field} 欄位"
|
||||
|
||||
#: pkg/service/response.go:31
|
||||
msgid "{user} updated {field} for the {resource}"
|
||||
|
||||
@@ -13,7 +13,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-24 03:20+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: 許明凱 <yuteson@gmail.com>, 2026\n"
|
||||
"Language-Team: Chinese (Hong Kong) (https://app.transifex.com/owncloud-org/teams/6149/zh_HK/)\n"
|
||||
|
||||
@@ -13,7 +13,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-24 03:20+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: 許明凱 <yuteson@gmail.com>, 2026\n"
|
||||
"Language-Team: Chinese (Taiwan) (https://app.transifex.com/owncloud-org/teams/6149/zh_TW/)\n"
|
||||
|
||||
@@ -252,7 +252,7 @@ var testCases = []struct {
|
||||
GranteeGroupID: nil,
|
||||
Sharer: userID("sharing-userid"),
|
||||
MTime: timestamp(10e8),
|
||||
State: "SHARE_STATE_REJECTED",
|
||||
State: "SHARE_STATE_DECLINED",
|
||||
},
|
||||
},
|
||||
CheckAuditEvent: func(t *testing.T, b []byte) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -94,7 +95,7 @@ func LinkCreated(ev events.LinkCreated) AuditEventShareCreated {
|
||||
func ShareUpdated(ev events.ShareUpdated) AuditEventShareUpdated {
|
||||
uid := ev.Sharer.OpaqueId
|
||||
with, typ := extractGrantee(ev.GranteeUserID, ev.GranteeGroupID)
|
||||
base := BasicAuditEvent(uid, formatTime(ev.MTime), MessageShareUpdated(uid, ev.ShareID.OpaqueId, shareUpdateField(ev.Updated, ev.UpdateMask)), shareUpdateAction(ev.Updated, ev.UpdateMask))
|
||||
base := BasicAuditEvent(uid, formatTime(ev.MTime), MessageShareUpdated(uid, ev.ShareID.OpaqueId, ev.Updated), updateType(ev.Updated))
|
||||
return AuditEventShareUpdated{
|
||||
AuditEventSharing: SharingAuditEvent(ev.ShareID.GetOpaqueId(), ev.ItemID.OpaqueId, uid, base),
|
||||
ShareOwner: uid,
|
||||
@@ -114,7 +115,7 @@ func ShareUpdated(ev events.ShareUpdated) AuditEventShareUpdated {
|
||||
func LinkUpdated(ev events.LinkUpdated) AuditEventShareUpdated {
|
||||
uid := ev.Sharer.OpaqueId
|
||||
with, typ := "", _linktype
|
||||
base := BasicAuditEvent(uid, formatTime(ev.MTime), MessageLinkUpdated(uid, ev.ShareID.GetOpaqueId(), ev.FieldUpdated), shareUpdateAction(ev.FieldUpdated, nil))
|
||||
base := BasicAuditEvent(uid, formatTime(ev.MTime), MessageLinkUpdated(uid, ev.ShareID.GetOpaqueId(), ev.FieldUpdated), updateType(ev.FieldUpdated))
|
||||
return AuditEventShareUpdated{
|
||||
AuditEventSharing: SharingAuditEvent(ev.ShareID.GetOpaqueId(), ev.ItemID.OpaqueId, uid, base),
|
||||
ShareOwner: uid,
|
||||
@@ -180,21 +181,14 @@ func ReceivedShareUpdated(ev events.ReceivedShareUpdated) AuditEventReceivedShar
|
||||
with, typ := extractGrantee(ev.GranteeUserID, ev.GranteeGroupID)
|
||||
itemID := ev.ItemID.GetOpaqueId()
|
||||
|
||||
var msg, utype string
|
||||
msg, utype := "", ""
|
||||
switch ev.State {
|
||||
case "SHARE_STATE_ACCEPTED":
|
||||
msg = MessageShareAccepted(with, sid, uid)
|
||||
utype = ActionShareAccepted
|
||||
// the CS3 share state enum is SHARE_STATE_REJECTED; "SHARE_STATE_DECLINED"
|
||||
// is not a valid value and never matched, so declines were not audited.
|
||||
case "SHARE_STATE_REJECTED":
|
||||
case "SHARE_STATE_DECLINED":
|
||||
msg = MessageShareDeclined(with, sid, uid)
|
||||
utype = ActionShareDeclined
|
||||
default:
|
||||
// keep the action non-empty for any other state (e.g. pending) so the
|
||||
// event remains attributable instead of producing an empty record.
|
||||
msg = MessageShareStateChanged(with, sid, uid, ev.State)
|
||||
utype = ActionShareStateChanged
|
||||
}
|
||||
base := BasicAuditEvent(with, formatTime(ev.MTime), msg, utype)
|
||||
return AuditEventReceivedShareUpdated{
|
||||
@@ -558,39 +552,24 @@ func formatTime(t *types.Timestamp) string {
|
||||
return time.Unix(int64(t.Seconds), int64(t.Nanos)).UTC().Format(time.RFC3339)
|
||||
}
|
||||
|
||||
// shareUpdateField resolves the name of the updated field for the audit message.
|
||||
// reva deprecated the single Updated field in favour of UpdateMask, so prefer
|
||||
// the mask when Updated is empty.
|
||||
func shareUpdateField(updated string, updateMask []string) string {
|
||||
if updated != "" {
|
||||
return updated
|
||||
func updateType(u string) string {
|
||||
switch u {
|
||||
case "permissions":
|
||||
return ActionSharePermissionUpdated
|
||||
case "displayname":
|
||||
return ActionShareDisplayNameUpdated
|
||||
case "TYPE_PERMISSIONS":
|
||||
return ActionSharePermissionUpdated
|
||||
case "TYPE_DISPLAYNAME":
|
||||
return ActionShareDisplayNameUpdated
|
||||
case "TYPE_PASSWORD":
|
||||
return ActionSharePasswordUpdated
|
||||
case "TYPE_EXPIRATION":
|
||||
return ActionShareExpirationUpdated
|
||||
default:
|
||||
fmt.Println("Unknown update type", u)
|
||||
return ""
|
||||
}
|
||||
return strings.Join(updateMask, ", ")
|
||||
}
|
||||
|
||||
// shareUpdateAction resolves the audit action for a share or link update. It
|
||||
// prefers the deprecated Updated field and falls back to the UpdateMask, mapping
|
||||
// the first recognized field to its specific action. Unknown or empty updates
|
||||
// map to the generic ActionShareUpdated so every update stays attributable
|
||||
// (an empty action cannot be counted for telemetry).
|
||||
func shareUpdateAction(updated string, updateMask []string) string {
|
||||
candidates := updateMask
|
||||
if updated != "" {
|
||||
candidates = []string{updated}
|
||||
}
|
||||
for _, c := range candidates {
|
||||
switch c {
|
||||
case "permissions", "TYPE_PERMISSIONS":
|
||||
return ActionSharePermissionUpdated
|
||||
case "displayname", "TYPE_DISPLAYNAME":
|
||||
return ActionShareDisplayNameUpdated
|
||||
case "TYPE_PASSWORD":
|
||||
return ActionSharePasswordUpdated
|
||||
case "expiration", "TYPE_EXPIRATION":
|
||||
return ActionShareExpirationUpdated
|
||||
}
|
||||
}
|
||||
return ActionShareUpdated
|
||||
}
|
||||
|
||||
// normalizeString tries to create a somewhat stable string
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
user "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
|
||||
collaboration "github.com/cs3org/go-cs3apis/cs3/sharing/collaboration/v1beta1"
|
||||
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
|
||||
types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1"
|
||||
"github.com/owncloud/reva/v2/pkg/events"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
// TestShareUpdateAction ensures every share/link update maps to a non-empty,
|
||||
// countable audit action, including the case where reva only sets the
|
||||
// UpdateMask (the single Updated field is deprecated and no longer populated).
|
||||
func TestShareUpdateAction(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
updated string
|
||||
mask []string
|
||||
want string
|
||||
}{
|
||||
{"share permissions", "permissions", nil, ActionSharePermissionUpdated},
|
||||
{"link permissions", "TYPE_PERMISSIONS", nil, ActionSharePermissionUpdated},
|
||||
{"link password", "TYPE_PASSWORD", nil, ActionSharePasswordUpdated},
|
||||
{"share expiration", "expiration", nil, ActionShareExpirationUpdated},
|
||||
{"share displayname", "displayname", nil, ActionShareDisplayNameUpdated},
|
||||
{"deprecated empty, mask permissions", "", []string{"permissions"}, ActionSharePermissionUpdated},
|
||||
{"deprecated empty, mask expiration", "", []string{"expiration"}, ActionShareExpirationUpdated},
|
||||
{"empty updated and empty mask", "", nil, ActionShareUpdated},
|
||||
{"unknown field", "somethingelse", nil, ActionShareUpdated},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
got := shareUpdateAction(tt.updated, tt.mask)
|
||||
require.Equal(t, tt.want, got)
|
||||
require.NotEmpty(t, got, "audit action must never be empty")
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// TestShareUpdatedDerivesActionFromUpdateMask reproduces the reported bug:
|
||||
// reva populates UpdateMask (not the deprecated Updated field), so the audit
|
||||
// event must still carry a specific action and a meaningful field in the
|
||||
// message rather than an empty action and "updated field ''".
|
||||
func TestShareUpdatedDerivesActionFromUpdateMask(t *testing.T) {
|
||||
ev := events.ShareUpdated{
|
||||
Sharer: &user.UserId{OpaqueId: "sharer"},
|
||||
ShareID: &collaboration.ShareId{OpaqueId: "shareid"},
|
||||
ItemID: &provider.ResourceId{OpaqueId: "itemid"},
|
||||
GranteeUserID: &user.UserId{OpaqueId: "grantee"},
|
||||
Permissions: &collaboration.SharePermissions{},
|
||||
MTime: &types.Timestamp{Seconds: 1},
|
||||
// reva sets the mask; the deprecated Updated field stays empty
|
||||
UpdateMask: []string{"permissions"},
|
||||
}
|
||||
|
||||
out := ShareUpdated(ev)
|
||||
require.Equal(t, ActionSharePermissionUpdated, out.Action)
|
||||
require.NotEmpty(t, out.Action)
|
||||
require.Contains(t, out.Message, "permissions")
|
||||
}
|
||||
|
||||
// TestReceivedShareUpdatedStates ensures the received-share state changes map to
|
||||
// non-empty actions, including the rejected case (CS3 uses SHARE_STATE_REJECTED,
|
||||
// which previously did not match "SHARE_STATE_DECLINED") and a generic fallback.
|
||||
func TestReceivedShareUpdatedStates(t *testing.T) {
|
||||
build := func(state string) events.ReceivedShareUpdated {
|
||||
return events.ReceivedShareUpdated{
|
||||
Sharer: &user.UserId{OpaqueId: "sharer"},
|
||||
ShareID: &collaboration.ShareId{OpaqueId: "shareid"},
|
||||
ItemID: &provider.ResourceId{OpaqueId: "itemid"},
|
||||
GranteeUserID: &user.UserId{OpaqueId: "grantee"},
|
||||
MTime: &types.Timestamp{Seconds: 1},
|
||||
State: state,
|
||||
}
|
||||
}
|
||||
|
||||
accepted := ReceivedShareUpdated(build("SHARE_STATE_ACCEPTED"))
|
||||
require.Equal(t, ActionShareAccepted, accepted.Action)
|
||||
|
||||
rejected := ReceivedShareUpdated(build("SHARE_STATE_REJECTED"))
|
||||
require.Equal(t, ActionShareDeclined, rejected.Action)
|
||||
require.NotEmpty(t, rejected.Message)
|
||||
|
||||
pending := ReceivedShareUpdated(build("SHARE_STATE_PENDING"))
|
||||
require.Equal(t, ActionShareStateChanged, pending.Action)
|
||||
require.NotEmpty(t, pending.Message)
|
||||
}
|
||||
@@ -12,7 +12,6 @@ import (
|
||||
const (
|
||||
// Sharing
|
||||
ActionShareCreated = "file_shared"
|
||||
ActionShareUpdated = "share_updated"
|
||||
ActionSharePermissionUpdated = "share_permission_updated"
|
||||
ActionShareDisplayNameUpdated = "share_name_updated"
|
||||
ActionSharePasswordUpdated = "share_password_updated"
|
||||
@@ -20,7 +19,6 @@ const (
|
||||
ActionShareRemoved = "file_unshared"
|
||||
ActionShareAccepted = "share_accepted"
|
||||
ActionShareDeclined = "share_declined"
|
||||
ActionShareStateChanged = "share_state_changed"
|
||||
ActionLinkAccessed = "public_link_accessed"
|
||||
|
||||
// Files
|
||||
@@ -98,12 +96,6 @@ func MessageShareDeclined(userid, shareID, sharerID string) string {
|
||||
return fmt.Sprintf("user '%s' declined share '%s' from user '%s'", userid, shareID, sharerID)
|
||||
}
|
||||
|
||||
// MessageShareStateChanged returns the human-readable string that describes a
|
||||
// received-share state change that is neither an accept nor a decline.
|
||||
func MessageShareStateChanged(userid, shareID, sharerID, state string) string {
|
||||
return fmt.Sprintf("user '%s' changed the state of share '%s' from user '%s' to '%s'", userid, shareID, sharerID, state)
|
||||
}
|
||||
|
||||
// MessageLinkAccessed returns the human-readable string that describes the action
|
||||
func MessageLinkAccessed(token string, success bool) string {
|
||||
return fmt.Sprintf("link with token '%s' was accessed. Success: %v", token, success)
|
||||
|
||||
@@ -20,7 +20,7 @@ The datagateway endpoint, by default `/data`, forwards file up- and download req
|
||||
|
||||
### ocs
|
||||
|
||||
The ocs endpoint, by default `/ocs`, implements the ownCloud Classic Open Collaboration Services API by translating it into CS3 API requests. It can handle users, groups, capabilities and also implements the files sharing functionality on top of CS3. The `/ocs/v[12].php/cloud/user/signing-key` is currently handled by the dedicated [ocs](https://github.com/owncloud/ocis/tree/master/services/ocs) service.
|
||||
The ocs endpoint, by default `/ocs`, implements the ownCloud 10 Open Collaboration Services API by translating it into CS3 API requests. It can handle users, groups, capabilities and also implements the files sharing functionality on top of CS3. The `/ocs/v[12].php/cloud/user/signing-key` is currently handled by the dedicated [ocs](https://github.com/owncloud/ocis/tree/master/services/ocs) service.
|
||||
|
||||
#### Event Handler
|
||||
|
||||
|
||||
@@ -411,8 +411,8 @@ func (_c *DriveItemPermissionsProvider_Invite_Call) RunAndReturn(run func(contex
|
||||
}
|
||||
|
||||
// ListPermissions provides a mock function with given fields: ctx, itemID, listFederatedRoles, selectRoles
|
||||
func (_m *DriveItemPermissionsProvider) ListPermissions(ctx context.Context, itemID *providerv1beta1.ResourceId, listFederatedRoles bool, selectRoles bool, selectActions bool) (libregraph.CollectionOfPermissionsWithAllowedValues, error) {
|
||||
ret := _m.Called(ctx, itemID, listFederatedRoles, selectRoles, selectActions)
|
||||
func (_m *DriveItemPermissionsProvider) ListPermissions(ctx context.Context, itemID *providerv1beta1.ResourceId, listFederatedRoles bool, selectRoles bool) (libregraph.CollectionOfPermissionsWithAllowedValues, error) {
|
||||
ret := _m.Called(ctx, itemID, listFederatedRoles, selectRoles)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for ListPermissions")
|
||||
@@ -420,17 +420,17 @@ func (_m *DriveItemPermissionsProvider) ListPermissions(ctx context.Context, ite
|
||||
|
||||
var r0 libregraph.CollectionOfPermissionsWithAllowedValues
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceId, bool, bool, bool) (libregraph.CollectionOfPermissionsWithAllowedValues, error)); ok {
|
||||
return rf(ctx, itemID, listFederatedRoles, selectRoles, selectActions)
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceId, bool, bool) (libregraph.CollectionOfPermissionsWithAllowedValues, error)); ok {
|
||||
return rf(ctx, itemID, listFederatedRoles, selectRoles)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceId, bool, bool, bool) libregraph.CollectionOfPermissionsWithAllowedValues); ok {
|
||||
r0 = rf(ctx, itemID, listFederatedRoles, selectRoles, selectActions)
|
||||
if rf, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceId, bool, bool) libregraph.CollectionOfPermissionsWithAllowedValues); ok {
|
||||
r0 = rf(ctx, itemID, listFederatedRoles, selectRoles)
|
||||
} else {
|
||||
r0 = ret.Get(0).(libregraph.CollectionOfPermissionsWithAllowedValues)
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(context.Context, *providerv1beta1.ResourceId, bool, bool, bool) error); ok {
|
||||
r1 = rf(ctx, itemID, listFederatedRoles, selectRoles, selectActions)
|
||||
if rf, ok := ret.Get(1).(func(context.Context, *providerv1beta1.ResourceId, bool, bool) error); ok {
|
||||
r1 = rf(ctx, itemID, listFederatedRoles, selectRoles)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package config
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
|
||||
)
|
||||
@@ -34,8 +33,6 @@ type Config struct {
|
||||
UnifiedRoles UnifiedRoles `yaml:"unified_roles"`
|
||||
MaxConcurrency int `yaml:"max_concurrency" env:"OCIS_MAX_CONCURRENCY;GRAPH_MAX_CONCURRENCY" desc:"The maximum number of concurrent requests the service will handle." introductionVersion:"7.0.0"`
|
||||
|
||||
ReceivedSharesStatTimeout time.Duration `yaml:"received_shares_stat_timeout" env:"GRAPH_RECEIVED_SHARES_STAT_TIMEOUT" desc:"The maximum duration to wait for the storage to respond while resolving a single received share's resource when listing 'sharedWithMe'. Bounding each resource lookup individually prevents one slow or unreachable resource from consuming the request deadline shared by all the other shares. A share whose resource cannot be statted within this time is still listed as a degraded item instead of being dropped. Defaults to '10s'. See the Environment Variable Types description for more details." introductionVersion:"NEXT"`
|
||||
|
||||
Keycloak Keycloak `yaml:"keycloak"`
|
||||
ServiceAccount ServiceAccount `yaml:"service_account" mask:"struct"`
|
||||
MultiInstance MultiInstanceConfig `yaml:"multi_instance"`
|
||||
|
||||
@@ -127,8 +127,7 @@ func DefaultConfig() *config.Config {
|
||||
Cluster: "ocis-cluster",
|
||||
EnableTLS: false,
|
||||
},
|
||||
MaxConcurrency: 20,
|
||||
ReceivedSharesStatTimeout: 10 * time.Second,
|
||||
MaxConcurrency: 20,
|
||||
UnifiedRoles: config.UnifiedRoles{
|
||||
AvailableRoles: nil, // will be populated with defaults in EnsureDefaults
|
||||
},
|
||||
|
||||
@@ -12,7 +12,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-24 03:20+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: Ivan Fustero, 2026\n"
|
||||
"Language-Team: Catalan (https://app.transifex.com/owncloud-org/teams/6149/ca/)\n"
|
||||
|
||||
@@ -12,7 +12,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-24 03:20+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: David Walter, 2026\n"
|
||||
"Language-Team: German (https://app.transifex.com/owncloud-org/teams/6149/de/)\n"
|
||||
|
||||
@@ -12,7 +12,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-24 03:20+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: Jesús Recio <jrecio@izertis.com>, 2026\n"
|
||||
"Language-Team: Spanish (https://app.transifex.com/owncloud-org/teams/6149/es/)\n"
|
||||
|
||||
@@ -12,7 +12,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-29 03:23+0000\n"
|
||||
"POT-Creation-Date: 2026-06-08 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: Domainmasteri, 2026\n"
|
||||
"Language-Team: Finnish (Finland) (https://app.transifex.com/owncloud-org/teams/6149/fi_FI/)\n"
|
||||
|
||||
@@ -13,7 +13,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-07-01 03:21+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: Cesare Capoferri, 2026\n"
|
||||
"Language-Team: Italian (https://app.transifex.com/owncloud-org/teams/6149/it/)\n"
|
||||
@@ -81,7 +81,7 @@ msgstr "Può modificare con versioni e mostrare gli invitati"
|
||||
#. UnifiedRole SpaceEditor, Role DisplayName (resolves directly)
|
||||
#: pkg/unifiedrole/roles.go:232
|
||||
msgid "Can edit with versions and trash bin"
|
||||
msgstr "Può modificare con accesso a versioni e cestino"
|
||||
msgstr ""
|
||||
|
||||
#. Manager
|
||||
#. UnifiedRole Manager, Role DisplayName (resolves directly)
|
||||
@@ -178,8 +178,6 @@ msgstr ""
|
||||
#: pkg/unifiedrole/roles.go:210
|
||||
msgid "View, download, upload, edit, add, delete and restore from trash bin."
|
||||
msgstr ""
|
||||
"Visualizza, scarica, carica, modifica, aggiungi, elimina e ripristina dal "
|
||||
"cestino."
|
||||
|
||||
#. UnifiedRole EditorListGrants Editor, Role Description (resolves directly)
|
||||
#: pkg/unifiedrole/roles.go:158
|
||||
@@ -194,8 +192,6 @@ msgid ""
|
||||
"View, download, upload, edit, add, delete, show all versions and restore "
|
||||
"from trash bin."
|
||||
msgstr ""
|
||||
"Visualizza, scarica, carica, modifica, aggiungi, elimina, mostra tutte le "
|
||||
"versioni e ripristina dal cestino."
|
||||
|
||||
#. UnifiedRole Manager, Role Description (resolves directly)
|
||||
#: pkg/unifiedrole/roles.go:242
|
||||
@@ -203,8 +199,6 @@ msgid ""
|
||||
"View, download, upload, edit, add, delete, show all versions, restore from "
|
||||
"trash bin, empty the trash bin and manage members."
|
||||
msgstr ""
|
||||
"Visualizza, scarica, carica, modifica, aggiungi, elimina, mostra tutte le "
|
||||
"versioni, ripristina dal cestino, svuota il cestino e gestisci i membri."
|
||||
|
||||
#. UnifiedRole EditorListGrantsWithVersions, Role Description (resolves
|
||||
#. directly)
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-24 03:20+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: BoneNI, 2026\n"
|
||||
"Language-Team: Lao (https://app.transifex.com/owncloud-org/teams/6149/lo/)\n"
|
||||
|
||||
@@ -12,7 +12,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-24 03:20+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: Besnik Bleta <besnik@programeshqip.org>, 2026\n"
|
||||
"Language-Team: Albanian (https://app.transifex.com/owncloud-org/teams/6149/sq/)\n"
|
||||
|
||||
@@ -12,7 +12,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-07-03 03:14+0000\n"
|
||||
"POT-Creation-Date: 2026-06-12 03:22+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: Roman Perekhod, 2026\n"
|
||||
"Language-Team: Ukrainian (https://app.transifex.com/owncloud-org/teams/6149/uk/)\n"
|
||||
|
||||
@@ -5,16 +5,15 @@
|
||||
#
|
||||
# Translators:
|
||||
# 許明凱 <yuteson@gmail.com>, 2026
|
||||
# 振东 刘, 2026
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-20 03:19+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: 振东 刘, 2026\n"
|
||||
"Last-Translator: 許明凱 <yuteson@gmail.com>, 2026\n"
|
||||
"Language-Team: Chinese Traditional (https://app.transifex.com/owncloud-org/teams/6149/zh-Hant/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@@ -80,7 +79,7 @@ msgstr "可以編輯、使用版本紀錄及顯示受邀者"
|
||||
#. UnifiedRole SpaceEditor, Role DisplayName (resolves directly)
|
||||
#: pkg/unifiedrole/roles.go:232
|
||||
msgid "Can edit with versions and trash bin"
|
||||
msgstr "可以使用版本和垃圾桶进行编辑"
|
||||
msgstr ""
|
||||
|
||||
#. Manager
|
||||
#. UnifiedRole Manager, Role DisplayName (resolves directly)
|
||||
@@ -172,7 +171,7 @@ msgstr "查看、下載、上傳、編輯、新增及刪除。"
|
||||
#. directly)
|
||||
#: pkg/unifiedrole/roles.go:210
|
||||
msgid "View, download, upload, edit, add, delete and restore from trash bin."
|
||||
msgstr "“查看、下载、上传、编辑、添加、删除以及从垃圾桶恢复。"
|
||||
msgstr ""
|
||||
|
||||
#. UnifiedRole EditorListGrants Editor, Role Description (resolves directly)
|
||||
#: pkg/unifiedrole/roles.go:158
|
||||
|
||||
@@ -6,16 +6,15 @@
|
||||
# Translators:
|
||||
# Benedikt Kulmann <benedikt@kulmann.biz>, 2026
|
||||
# 許明凱 <yuteson@gmail.com>, 2026
|
||||
# 振东 刘, 2026
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-20 03:19+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: 振东 刘, 2026\n"
|
||||
"Last-Translator: 許明凱 <yuteson@gmail.com>, 2026\n"
|
||||
"Language-Team: Chinese (https://app.transifex.com/owncloud-org/teams/6149/zh/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@@ -81,7 +80,7 @@ msgstr "可以編輯、使用版本紀錄及顯示受邀者"
|
||||
#. UnifiedRole SpaceEditor, Role DisplayName (resolves directly)
|
||||
#: pkg/unifiedrole/roles.go:232
|
||||
msgid "Can edit with versions and trash bin"
|
||||
msgstr "可以使用版本和垃圾桶进行编辑"
|
||||
msgstr ""
|
||||
|
||||
#. Manager
|
||||
#. UnifiedRole Manager, Role DisplayName (resolves directly)
|
||||
@@ -173,7 +172,7 @@ msgstr "查看、下載、上傳、編輯、新增及刪除。"
|
||||
#. directly)
|
||||
#: pkg/unifiedrole/roles.go:210
|
||||
msgid "View, download, upload, edit, add, delete and restore from trash bin."
|
||||
msgstr "查看、下载、上传、编辑、添加、删除以及从垃圾桶恢复。"
|
||||
msgstr ""
|
||||
|
||||
#. UnifiedRole EditorListGrants Editor, Role Description (resolves directly)
|
||||
#: pkg/unifiedrole/roles.go:158
|
||||
|
||||
@@ -8,16 +8,15 @@
|
||||
# fnoopv <fnoopv@outlook.com>, 2026
|
||||
# Shouyuan, 2026
|
||||
# 許明凱 <yuteson@gmail.com>, 2026
|
||||
# 振东 刘, 2026
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-20 03:19+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: 振东 刘, 2026\n"
|
||||
"Last-Translator: 許明凱 <yuteson@gmail.com>, 2026\n"
|
||||
"Language-Team: Chinese (China) (https://app.transifex.com/owncloud-org/teams/6149/zh_CN/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@@ -83,7 +82,7 @@ msgstr "可以編輯、使用版本紀錄及顯示受邀者"
|
||||
#. UnifiedRole SpaceEditor, Role DisplayName (resolves directly)
|
||||
#: pkg/unifiedrole/roles.go:232
|
||||
msgid "Can edit with versions and trash bin"
|
||||
msgstr "可以使用版本和垃圾桶进行编辑"
|
||||
msgstr ""
|
||||
|
||||
#. Manager
|
||||
#. UnifiedRole Manager, Role DisplayName (resolves directly)
|
||||
@@ -175,7 +174,7 @@ msgstr "查看、下載、上傳、編輯、新增及刪除。"
|
||||
#. directly)
|
||||
#: pkg/unifiedrole/roles.go:210
|
||||
msgid "View, download, upload, edit, add, delete and restore from trash bin."
|
||||
msgstr "“查看、下载、上传、编辑、添加、删除以及从垃圾桶恢复。"
|
||||
msgstr ""
|
||||
|
||||
#. UnifiedRole EditorListGrants Editor, Role Description (resolves directly)
|
||||
#: pkg/unifiedrole/roles.go:158
|
||||
|
||||
@@ -8,16 +8,15 @@
|
||||
# fnoopv <fnoopv@outlook.com>, 2026
|
||||
# Shouyuan, 2026
|
||||
# 許明凱 <yuteson@gmail.com>, 2026
|
||||
# 振东 刘, 2026
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-20 03:19+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: 振东 刘, 2026\n"
|
||||
"Last-Translator: 許明凱 <yuteson@gmail.com>, 2026\n"
|
||||
"Language-Team: Chinese (Hong Kong) (https://app.transifex.com/owncloud-org/teams/6149/zh_HK/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@@ -83,7 +82,7 @@ msgstr "可以編輯、使用版本紀錄及顯示受邀者"
|
||||
#. UnifiedRole SpaceEditor, Role DisplayName (resolves directly)
|
||||
#: pkg/unifiedrole/roles.go:232
|
||||
msgid "Can edit with versions and trash bin"
|
||||
msgstr "可以使用版本和垃圾桶进行编辑"
|
||||
msgstr ""
|
||||
|
||||
#. Manager
|
||||
#. UnifiedRole Manager, Role DisplayName (resolves directly)
|
||||
@@ -175,7 +174,7 @@ msgstr "查看、下載、上傳、編輯、新增及刪除。"
|
||||
#. directly)
|
||||
#: pkg/unifiedrole/roles.go:210
|
||||
msgid "View, download, upload, edit, add, delete and restore from trash bin."
|
||||
msgstr "“查看、下载、上传、编辑、添加、删除以及从垃圾桶恢复。"
|
||||
msgstr ""
|
||||
|
||||
#. UnifiedRole EditorListGrants Editor, Role Description (resolves directly)
|
||||
#: pkg/unifiedrole/roles.go:158
|
||||
|
||||
@@ -7,16 +7,15 @@
|
||||
# Martin <github@diemattels.at>, 2026
|
||||
# Shouyuan, 2026
|
||||
# 許明凱 <yuteson@gmail.com>, 2026
|
||||
# 振东 刘, 2026
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-20 03:19+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: 振东 刘, 2026\n"
|
||||
"Last-Translator: 許明凱 <yuteson@gmail.com>, 2026\n"
|
||||
"Language-Team: Chinese (Taiwan) (https://app.transifex.com/owncloud-org/teams/6149/zh_TW/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@@ -82,7 +81,7 @@ msgstr "可以編輯、使用版本紀錄及顯示受邀者"
|
||||
#. UnifiedRole SpaceEditor, Role DisplayName (resolves directly)
|
||||
#: pkg/unifiedrole/roles.go:232
|
||||
msgid "Can edit with versions and trash bin"
|
||||
msgstr "可以使用版本和垃圾桶进行编辑"
|
||||
msgstr ""
|
||||
|
||||
#. Manager
|
||||
#. UnifiedRole Manager, Role DisplayName (resolves directly)
|
||||
@@ -174,7 +173,7 @@ msgstr "查看、下載、上傳、編輯、新增及顯示所有版本。"
|
||||
#. directly)
|
||||
#: pkg/unifiedrole/roles.go:210
|
||||
msgid "View, download, upload, edit, add, delete and restore from trash bin."
|
||||
msgstr "“查看、下载、上传、编辑、添加、删除以及从垃圾桶恢复。"
|
||||
msgstr ""
|
||||
|
||||
#. UnifiedRole EditorListGrants Editor, Role Description (resolves directly)
|
||||
#: pkg/unifiedrole/roles.go:158
|
||||
|
||||
@@ -52,7 +52,7 @@ const (
|
||||
type DriveItemPermissionsProvider interface {
|
||||
Invite(ctx context.Context, resourceId *storageprovider.ResourceId, invite libregraph.DriveItemInvite) (libregraph.Permission, error)
|
||||
SpaceRootInvite(ctx context.Context, driveID *storageprovider.ResourceId, invite libregraph.DriveItemInvite) (libregraph.Permission, error)
|
||||
ListPermissions(ctx context.Context, itemID *storageprovider.ResourceId, listFederatedRoles, selectRoles, selectActions bool) (libregraph.CollectionOfPermissionsWithAllowedValues, error)
|
||||
ListPermissions(ctx context.Context, itemID *storageprovider.ResourceId, listFederatedRoles, selectRoles bool) (libregraph.CollectionOfPermissionsWithAllowedValues, error)
|
||||
ListSpaceRootPermissions(ctx context.Context, driveID *storageprovider.ResourceId) (libregraph.CollectionOfPermissionsWithAllowedValues, error)
|
||||
DeletePermission(ctx context.Context, itemID *storageprovider.ResourceId, permissionID string) error
|
||||
DeleteSpaceRootPermission(ctx context.Context, driveID *storageprovider.ResourceId, permissionID string) error
|
||||
@@ -390,7 +390,7 @@ func (s DriveItemPermissionsService) SpaceRootInvite(ctx context.Context, driveI
|
||||
}
|
||||
|
||||
// ListPermissions lists the permissions of a driveItem
|
||||
func (s DriveItemPermissionsService) ListPermissions(ctx context.Context, itemID *storageprovider.ResourceId, listFederatedRoles, selectRoles, selectActions bool) (libregraph.CollectionOfPermissionsWithAllowedValues, error) {
|
||||
func (s DriveItemPermissionsService) ListPermissions(ctx context.Context, itemID *storageprovider.ResourceId, listFederatedRoles, selectRoles bool) (libregraph.CollectionOfPermissionsWithAllowedValues, error) {
|
||||
|
||||
ctx, span := s.tp.Tracer("graph").Start(ctx, "ListPermissions")
|
||||
defer span.End()
|
||||
@@ -443,13 +443,6 @@ func (s DriveItemPermissionsService) ListPermissions(ctx context.Context, itemID
|
||||
return collectionOfPermissions, nil
|
||||
}
|
||||
|
||||
if selectActions {
|
||||
// drop the roles
|
||||
collectionOfPermissions.LibreGraphPermissionsRolesAllowedValues = nil
|
||||
// no need to fetch shares, we are only interested in the actions
|
||||
return collectionOfPermissions, nil
|
||||
}
|
||||
|
||||
driveItems := make(driveItemsByResourceID, 1)
|
||||
// we can use the statResponse to build the drive item before fetching the shares
|
||||
item, err := cs3ResourceToDriveItem(s.logger, statResponse.GetInfo())
|
||||
@@ -534,7 +527,7 @@ func (s DriveItemPermissionsService) ListSpaceRootPermissions(ctx context.Contex
|
||||
}
|
||||
|
||||
rootResourceID := space.GetRoot()
|
||||
return s.ListPermissions(ctx, rootResourceID, false, false, false) // federated roles are not supported for spaces
|
||||
return s.ListPermissions(ctx, rootResourceID, false, false) // federated roles are not supported for spaces
|
||||
}
|
||||
|
||||
// GetPermission returns a single permission of a drive item identified by permissionID
|
||||
@@ -543,7 +536,7 @@ func (s DriveItemPermissionsService) GetPermission(ctx context.Context, itemID *
|
||||
defer span.End()
|
||||
|
||||
// Reuse ListPermissions to obtain all permissions and select the requested one
|
||||
collection, err := s.ListPermissions(ctx, itemID, false, false, false)
|
||||
collection, err := s.ListPermissions(ctx, itemID, false, false)
|
||||
if err != nil {
|
||||
return libregraph.Permission{}, err
|
||||
}
|
||||
@@ -894,14 +887,9 @@ func (api DriveItemPermissionsApi) ListPermissions(w http.ResponseWriter, r *htt
|
||||
selectRoles = true
|
||||
}
|
||||
|
||||
var selectActions bool
|
||||
if GetSelectParam(r) == "@libre.graph.permissions.actions.allowedValues" {
|
||||
selectActions = true
|
||||
}
|
||||
|
||||
ctx := r.Context()
|
||||
|
||||
permissions, err := api.driveItemPermissionsService.ListPermissions(ctx, itemID, listFederatedRoles, selectRoles, selectActions)
|
||||
permissions, err := api.driveItemPermissionsService.ListPermissions(ctx, itemID, listFederatedRoles, selectRoles)
|
||||
if err != nil {
|
||||
errorcode.RenderError(w, r, err)
|
||||
return
|
||||
|
||||
@@ -391,25 +391,11 @@ var _ = Describe("DriveItemPermissionsService", func() {
|
||||
gatewayClient.On("Stat", mock.Anything, mock.Anything).Return(statResponse, nil)
|
||||
gatewayClient.On("ListShares", mock.Anything, mock.Anything).Return(listSharesResponse, nil)
|
||||
gatewayClient.On("ListPublicShares", mock.Anything, mock.Anything).Return(listPublicSharesResponse, nil)
|
||||
permissions, err := driveItemPermissionsService.ListPermissions(context.Background(), itemID, false, false, false)
|
||||
permissions, err := driveItemPermissionsService.ListPermissions(context.Background(), itemID, false, false)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(len(permissions.LibreGraphPermissionsActionsAllowedValues)).ToNot(BeZero())
|
||||
Expect(len(permissions.LibreGraphPermissionsRolesAllowedValues)).ToNot(BeZero())
|
||||
})
|
||||
It("returns only the roles allowedValues when roles are selected", func() {
|
||||
gatewayClient.On("Stat", mock.Anything, mock.Anything).Return(statResponse, nil)
|
||||
permissions, err := driveItemPermissionsService.ListPermissions(context.Background(), itemID, false, true, false)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(len(permissions.LibreGraphPermissionsRolesAllowedValues)).ToNot(BeZero())
|
||||
Expect(permissions.LibreGraphPermissionsActionsAllowedValues).To(BeEmpty())
|
||||
})
|
||||
It("returns only the actions allowedValues when actions are selected", func() {
|
||||
gatewayClient.On("Stat", mock.Anything, mock.Anything).Return(statResponse, nil)
|
||||
permissions, err := driveItemPermissionsService.ListPermissions(context.Background(), itemID, false, false, true)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(len(permissions.LibreGraphPermissionsActionsAllowedValues)).ToNot(BeZero())
|
||||
Expect(permissions.LibreGraphPermissionsRolesAllowedValues).To(BeEmpty())
|
||||
})
|
||||
It("returns one permission per share", func() {
|
||||
statResponse.Info.PermissionSet = roleconversions.NewEditorRole().CS3ResourcePermissions()
|
||||
listSharesResponse.Shares = []*collaboration.Share{
|
||||
@@ -453,7 +439,7 @@ var _ = Describe("DriveItemPermissionsService", func() {
|
||||
gatewayClient.On("ListShares", mock.Anything, mock.Anything).Return(listSharesResponse, nil)
|
||||
gatewayClient.On("GetUser", mock.Anything, mock.Anything).Return(getUserResponse, nil)
|
||||
gatewayClient.On("ListPublicShares", mock.Anything, mock.Anything).Return(listPublicSharesResponse, nil)
|
||||
permissions, err := driveItemPermissionsService.ListPermissions(context.Background(), itemID, false, false, false)
|
||||
permissions, err := driveItemPermissionsService.ListPermissions(context.Background(), itemID, false, false)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(len(permissions.LibreGraphPermissionsActionsAllowedValues)).ToNot(BeZero())
|
||||
Expect(len(permissions.LibreGraphPermissionsRolesAllowedValues)).ToNot(BeZero())
|
||||
@@ -489,7 +475,7 @@ var _ = Describe("DriveItemPermissionsService", func() {
|
||||
gatewayClient.On("ListShares", mock.Anything, mock.Anything).Return(listSharesResponse, nil)
|
||||
gatewayClient.On("GetUser", mock.Anything, mock.Anything).Return(getUserResponse, nil)
|
||||
gatewayClient.On("ListPublicShares", mock.Anything, mock.Anything).Return(listPublicSharesResponse, nil)
|
||||
permissions, err := driveItemPermissionsService.ListPermissions(context.Background(), itemID, false, false, false)
|
||||
permissions, err := driveItemPermissionsService.ListPermissions(context.Background(), itemID, false, false)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(len(permissions.LibreGraphPermissionsActionsAllowedValues)).ToNot(BeZero())
|
||||
Expect(len(permissions.LibreGraphPermissionsRolesAllowedValues)).ToNot(BeZero())
|
||||
@@ -525,7 +511,7 @@ var _ = Describe("DriveItemPermissionsService", func() {
|
||||
gatewayClient.On("ListShares", mock.Anything, mock.Anything).Return(listSharesResponse, nil)
|
||||
gatewayClient.On("GetUser", mock.Anything, mock.Anything).Return(getUserResponse, nil)
|
||||
gatewayClient.On("ListPublicShares", mock.Anything, mock.Anything).Return(listPublicSharesResponse, nil)
|
||||
permissions, err := driveItemPermissionsService.ListPermissions(context.Background(), itemID, false, false, false)
|
||||
permissions, err := driveItemPermissionsService.ListPermissions(context.Background(), itemID, false, false)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(len(permissions.LibreGraphPermissionsActionsAllowedValues)).ToNot(BeZero())
|
||||
Expect(len(permissions.LibreGraphPermissionsRolesAllowedValues)).ToNot(BeZero())
|
||||
@@ -1490,8 +1476,8 @@ var _ = Describe("DriveItemPermissionsApi", func() {
|
||||
inviteJson, err := json.Marshal(invite)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
mockProvider.On("ListPermissions", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).
|
||||
Return(func(ctx context.Context, itemid *provider.ResourceId, listFederatedRoles, selectRoles, selectActions bool) (libregraph.CollectionOfPermissionsWithAllowedValues, error) {
|
||||
mockProvider.On("ListPermissions", mock.Anything, mock.Anything, mock.Anything, mock.Anything).
|
||||
Return(func(ctx context.Context, itemid *provider.ResourceId, listFederatedRoles, selectRoles bool) (libregraph.CollectionOfPermissionsWithAllowedValues, error) {
|
||||
Expect(listFederatedRoles).To(Equal(false))
|
||||
Expect(storagespace.FormatResourceID(itemid)).To(Equal("1$2!3"))
|
||||
return libregraph.CollectionOfPermissionsWithAllowedValues{}, nil
|
||||
|
||||
@@ -87,7 +87,7 @@ func (g BaseGraphService) CS3ReceivedSharesToDriveItems(ctx context.Context, rec
|
||||
}
|
||||
|
||||
availableRoles := unifiedrole.GetRoles(unifiedrole.RoleFilterIDs(g.config.UnifiedRoles.AvailableRoles...))
|
||||
return cs3ReceivedSharesToDriveItems(ctx, g.logger, gatewayClient, g.identityCache, receivedShares, availableRoles, g.config.ReceivedSharesStatTimeout)
|
||||
return cs3ReceivedSharesToDriveItems(ctx, g.logger, gatewayClient, g.identityCache, receivedShares, availableRoles)
|
||||
}
|
||||
|
||||
func (g BaseGraphService) CS3ReceivedOCMSharesToDriveItems(ctx context.Context, receivedShares []*ocm.ReceivedShare) ([]libregraph.DriveItem, error) {
|
||||
|
||||
@@ -46,7 +46,7 @@ func (g Graph) listSharedWithMe(ctx context.Context) ([]libregraph.DriveItem, er
|
||||
listReceivedSharesResponse.Shares = filterVaultShares(ctx, listReceivedSharesResponse.GetShares())
|
||||
|
||||
availableRoles := unifiedrole.GetRoles(unifiedrole.RoleFilterIDs(g.config.UnifiedRoles.AvailableRoles...))
|
||||
driveItems, err := cs3ReceivedSharesToDriveItems(ctx, g.logger, gatewayClient, g.identityCache, listReceivedSharesResponse.GetShares(), availableRoles, g.config.ReceivedSharesStatTimeout)
|
||||
driveItems, err := cs3ReceivedSharesToDriveItems(ctx, g.logger, gatewayClient, g.identityCache, listReceivedSharesResponse.GetShares(), availableRoles)
|
||||
if err != nil {
|
||||
g.logger.Error().Err(err).Msg("could not convert received shares to drive items")
|
||||
return nil, err
|
||||
|
||||
@@ -376,157 +376,6 @@ var _ = Describe("SharedWithMe", func() {
|
||||
Expect(jsonData.Get("id").String()).To(Equal(getUserResponseShareCreator.User.Id.OpaqueId))
|
||||
})
|
||||
|
||||
It("returns a degraded drive item when a share's resource stat times out", func() {
|
||||
// a second share, pointing at a different resource, whose Stat times out (transport error)
|
||||
brokenShare := &collaborationv1beta1.ReceivedShare{
|
||||
Share: &collaborationv1beta1.Share{
|
||||
ResourceId: toResourceID("7$8!9"),
|
||||
Id: &collaborationv1beta1.ShareId{
|
||||
OpaqueId: "broken:share:id",
|
||||
},
|
||||
Permissions: &collaborationv1beta1.SharePermissions{
|
||||
Permissions: roleconversions.NewViewerRole().CS3ResourcePermissions(),
|
||||
},
|
||||
Creator: getUserResponseShareCreator.User.Id,
|
||||
Ctime: utils.TSNow(),
|
||||
},
|
||||
MountPoint: &providerv1beta1.Reference{Path: "broken folder"},
|
||||
State: collaborationv1beta1.ShareState_SHARE_STATE_ACCEPTED,
|
||||
}
|
||||
listReceivedSharesResponse.Shares = append(listReceivedSharesResponse.Shares, brokenShare)
|
||||
|
||||
// reset and re-register the gateway expectations so Stat fails for the
|
||||
// broken share's resource but succeeds for the others.
|
||||
gatewayClient.ExpectedCalls = nil
|
||||
gatewayClient.On("GetUser", mock.Anything, mock.Anything).Return(getUserResponseDefault, nil)
|
||||
gatewayClient.On("ListReceivedShares", mock.Anything, mock.Anything).Return(listReceivedSharesResponse, nil)
|
||||
gatewayClient.On("Stat", mock.Anything, mock.Anything).Return(func(_ context.Context, r *providerv1beta1.StatRequest, _ ...grpc.CallOption) (*providerv1beta1.StatResponse, error) {
|
||||
if r.Ref.ResourceId == brokenShare.Share.ResourceId {
|
||||
return nil, context.DeadlineExceeded
|
||||
}
|
||||
return &providerv1beta1.StatResponse{
|
||||
Status: status.NewOK(ctx),
|
||||
Info: &providerv1beta1.ResourceInfo{
|
||||
Id: r.Ref.ResourceId,
|
||||
Type: providerv1beta1.ResourceType_RESOURCE_TYPE_CONTAINER,
|
||||
},
|
||||
}, nil
|
||||
})
|
||||
|
||||
svc.ListSharedWithMe(
|
||||
tape,
|
||||
httptest.NewRequest(http.MethodGet, "/graph/v1beta1/me/drive/sharedWithMe", nil),
|
||||
)
|
||||
|
||||
driveItems := libregraph.CollectionOfDriveItems{}
|
||||
err := json.Unmarshal(tape.Body.Bytes(), &driveItems)
|
||||
Expect(err).To(BeNil())
|
||||
|
||||
// both shares must be present: the broken one is returned as a degraded
|
||||
// item built from the share record, not silently dropped.
|
||||
Expect(len(driveItems.Value)).To(Equal(2))
|
||||
|
||||
var remoteIDs []string
|
||||
for _, di := range driveItems.GetValue() {
|
||||
ri := di.GetRemoteItem()
|
||||
remoteIDs = append(remoteIDs, ri.GetId())
|
||||
}
|
||||
Expect(remoteIDs).To(ContainElement(storagespace.FormatResourceID(brokenShare.Share.ResourceId)))
|
||||
})
|
||||
|
||||
It("bounds the per-share Stat with the configured GRAPH_RECEIVED_SHARES_STAT_TIMEOUT", func() {
|
||||
// Use a value distinct from the 10s default so we can tell the
|
||||
// configured timeout (not the default) is the one applied. The service
|
||||
// holds cfg by pointer, so setting it here is observed by the handler.
|
||||
cfg.ReceivedSharesStatTimeout = 3 * time.Second
|
||||
|
||||
var statDeadline time.Time
|
||||
var statHadDeadline bool
|
||||
gatewayClient.ExpectedCalls = nil
|
||||
gatewayClient.On("GetUser", mock.Anything, mock.Anything).Return(getUserResponseDefault, nil)
|
||||
gatewayClient.On("ListReceivedShares", mock.Anything, mock.Anything).Return(listReceivedSharesResponse, nil)
|
||||
gatewayClient.On("Stat", mock.Anything, mock.Anything).Return(func(statCtx context.Context, r *providerv1beta1.StatRequest, _ ...grpc.CallOption) (*providerv1beta1.StatResponse, error) {
|
||||
// the worker writes these before returning; cs3ReceivedSharesToDriveItems
|
||||
// only returns after group.Wait(), so reading them after the handler
|
||||
// call is race-free.
|
||||
statDeadline, statHadDeadline = statCtx.Deadline()
|
||||
return &providerv1beta1.StatResponse{
|
||||
Status: status.NewOK(ctx),
|
||||
Info: &providerv1beta1.ResourceInfo{
|
||||
Id: r.Ref.ResourceId,
|
||||
Type: providerv1beta1.ResourceType_RESOURCE_TYPE_CONTAINER,
|
||||
},
|
||||
}, nil
|
||||
})
|
||||
|
||||
svc.ListSharedWithMe(
|
||||
tape,
|
||||
httptest.NewRequest(http.MethodGet, "/graph/v1beta1/me/drive/sharedWithMe", nil),
|
||||
)
|
||||
|
||||
Expect(tape.Code).To(Equal(http.StatusOK))
|
||||
// the per-share Stat must carry a deadline derived from the configured
|
||||
// timeout: never above the configured 3s, and clearly below the 10s default.
|
||||
Expect(statHadDeadline).To(BeTrue())
|
||||
Expect(time.Until(statDeadline)).To(BeNumerically("<=", 3*time.Second))
|
||||
Expect(time.Until(statDeadline)).To(BeNumerically(">", 2*time.Second))
|
||||
})
|
||||
|
||||
It("drops a share when the storage returns an error for its resource (e.g. the sharer was deleted)", func() {
|
||||
// a second share whose resource the storage cannot serve (definitive status error) must not be listed
|
||||
goneShare := &collaborationv1beta1.ReceivedShare{
|
||||
Share: &collaborationv1beta1.Share{
|
||||
ResourceId: toResourceID("7$8!9"),
|
||||
Id: &collaborationv1beta1.ShareId{
|
||||
OpaqueId: "gone:share:id",
|
||||
},
|
||||
Permissions: &collaborationv1beta1.SharePermissions{
|
||||
Permissions: roleconversions.NewViewerRole().CS3ResourcePermissions(),
|
||||
},
|
||||
Creator: getUserResponseShareCreator.User.Id,
|
||||
Ctime: utils.TSNow(),
|
||||
},
|
||||
MountPoint: &providerv1beta1.Reference{Path: "gone folder"},
|
||||
State: collaborationv1beta1.ShareState_SHARE_STATE_ACCEPTED,
|
||||
}
|
||||
listReceivedSharesResponse.Shares = append(listReceivedSharesResponse.Shares, goneShare)
|
||||
|
||||
gatewayClient.ExpectedCalls = nil
|
||||
gatewayClient.On("GetUser", mock.Anything, mock.Anything).Return(getUserResponseDefault, nil)
|
||||
gatewayClient.On("ListReceivedShares", mock.Anything, mock.Anything).Return(listReceivedSharesResponse, nil)
|
||||
gatewayClient.On("Stat", mock.Anything, mock.Anything).Return(func(_ context.Context, r *providerv1beta1.StatRequest, _ ...grpc.CallOption) (*providerv1beta1.StatResponse, error) {
|
||||
if r.Ref.ResourceId == goneShare.Share.ResourceId {
|
||||
return &providerv1beta1.StatResponse{Status: status.NewInternal(ctx, "node broken after sharer deletion")}, nil
|
||||
}
|
||||
return &providerv1beta1.StatResponse{
|
||||
Status: status.NewOK(ctx),
|
||||
Info: &providerv1beta1.ResourceInfo{
|
||||
Id: r.Ref.ResourceId,
|
||||
Type: providerv1beta1.ResourceType_RESOURCE_TYPE_CONTAINER,
|
||||
},
|
||||
}, nil
|
||||
})
|
||||
|
||||
svc.ListSharedWithMe(
|
||||
tape,
|
||||
httptest.NewRequest(http.MethodGet, "/graph/v1beta1/me/drive/sharedWithMe", nil),
|
||||
)
|
||||
|
||||
driveItems := libregraph.CollectionOfDriveItems{}
|
||||
err := json.Unmarshal(tape.Body.Bytes(), &driveItems)
|
||||
Expect(err).To(BeNil())
|
||||
|
||||
// the dead share (resource gone) is dropped; only the healthy share remains
|
||||
Expect(len(driveItems.Value)).To(Equal(1))
|
||||
|
||||
var remoteIDs []string
|
||||
for _, di := range driveItems.GetValue() {
|
||||
ri := di.GetRemoteItem()
|
||||
remoteIDs = append(remoteIDs, ri.GetId())
|
||||
}
|
||||
Expect(remoteIDs).ToNot(ContainElement(storagespace.FormatResourceID(goneShare.Share.ResourceId)))
|
||||
})
|
||||
|
||||
It("returns a single drive item when multiple shares exist for the same resource", func() {
|
||||
anotherShare := &collaborationv1beta1.ReceivedShare{
|
||||
Share: &collaborationv1beta1.Share{
|
||||
|
||||
@@ -8,8 +8,6 @@ import (
|
||||
"net/http"
|
||||
"path"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1"
|
||||
cs3User "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
|
||||
@@ -177,39 +175,18 @@ func identitySetToSpacePermissionID(identitySet libregraph.SharePointIdentitySet
|
||||
return id
|
||||
}
|
||||
|
||||
// _receivedShareStatTimeout is the default bound for how long the resource Stat
|
||||
// for a single received share may take. It is used when the configured
|
||||
// GRAPH_RECEIVED_SHARES_STAT_TIMEOUT is not set (or non-positive). Without a
|
||||
// per-share bound, one slow or stuck downstream resource consumes the whole
|
||||
// request deadline budget, which causes the other shares to be dropped from the
|
||||
// sharedWithMe listing (and the request to occasionally 502). Keeping it small
|
||||
// relative to a typical request deadline lets one bad share fail fast without
|
||||
// affecting the visibility of the others.
|
||||
const _receivedShareStatTimeout = 10 * time.Second
|
||||
|
||||
func cs3ReceivedSharesToDriveItems(ctx context.Context,
|
||||
logger *log.Logger,
|
||||
gatewayClient gateway.GatewayAPIClient,
|
||||
identityCache identity.IdentityCache,
|
||||
receivedShares []*collaboration.ReceivedShare,
|
||||
availableRoles []*libregraph.UnifiedRoleDefinition,
|
||||
statTimeout time.Duration,
|
||||
) ([]libregraph.DriveItem, error) {
|
||||
|
||||
// Fall back to the default when unconfigured: a non-positive timeout would
|
||||
// make context.WithTimeout cancel immediately and drop every share.
|
||||
if statTimeout <= 0 {
|
||||
statTimeout = _receivedShareStatTimeout
|
||||
}
|
||||
|
||||
group := new(errgroup.Group)
|
||||
// Set max concurrency
|
||||
group.SetLimit(10)
|
||||
|
||||
// number of shares that could not be fully resolved and were returned as a
|
||||
// degraded drive item built from the share record alone.
|
||||
var degradedShares atomic.Int64
|
||||
|
||||
receivedSharesByResourceID := make(map[string][]*collaboration.ReceivedShare, len(receivedShares))
|
||||
for _, receivedShare := range receivedShares {
|
||||
if receivedShare == nil {
|
||||
@@ -225,39 +202,18 @@ func cs3ReceivedSharesToDriveItems(ctx context.Context,
|
||||
receivedShares := receivedSharesForResource
|
||||
|
||||
group.Go(func() error {
|
||||
// Bound the per-share Stat so one slow/stuck resource cannot consume
|
||||
// the request deadline shared by all the other shares.
|
||||
statCtx, cancel := context.WithTimeout(ctx, statTimeout)
|
||||
defer cancel()
|
||||
shareStat, err := gatewayClient.Stat(statCtx, &storageprovider.StatRequest{
|
||||
var err error // redeclare
|
||||
shareStat, err := gatewayClient.Stat(ctx, &storageprovider.StatRequest{
|
||||
Ref: &storageprovider.Reference{
|
||||
ResourceId: receivedShares[0].GetShare().GetResourceId(),
|
||||
},
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
// The storage could not be reached in time (per-share timeout,
|
||||
// cancellation, or an unavailable downstream). The resource most
|
||||
// likely still exists, so keep the share visible as a degraded item
|
||||
// built from the share record instead of dropping it: a single slow
|
||||
// share must neither vanish nor take the other shares down with it.
|
||||
logger.Warn().Err(err).
|
||||
if err := errorcode.FromCS3Status(shareStat.GetStatus(), err); err != nil {
|
||||
logger.Debug().Err(err).
|
||||
Str("shareid", receivedShares[0].GetShare().GetId().GetOpaqueId()).
|
||||
Str("resourceid", storagespace.FormatResourceID(receivedShares[0].GetShare().GetResourceId())).
|
||||
Msg("could not stat received share, returning a degraded drive item")
|
||||
degradedShares.Add(1)
|
||||
ch <- *buildDegradedDriveItemFromReceivedShares(ctx, logger, identityCache, receivedShares, availableRoles)
|
||||
return nil
|
||||
}
|
||||
|
||||
if statErr := errorcode.FromCS3Status(shareStat.GetStatus(), nil); statErr != nil {
|
||||
// The storage answered with a definitive error (resource gone,
|
||||
// access revoked, or a broken node, e.g. after the sharer was
|
||||
// deleted). The share is dead and must not be listed.
|
||||
logger.Debug().Err(statErr).
|
||||
Str("shareid", receivedShares[0].GetShare().GetId().GetOpaqueId()).
|
||||
Str("resourceid", storagespace.FormatResourceID(receivedShares[0].GetShare().GetResourceId())).
|
||||
Msg("could not stat received share, skipping (resource unavailable)")
|
||||
Msg("could not stat received share, skipping")
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -397,68 +353,9 @@ func cs3ReceivedSharesToDriveItems(ctx context.Context,
|
||||
driveItems = append(driveItems, di)
|
||||
}
|
||||
|
||||
if n := degradedShares.Load(); n > 0 {
|
||||
logger.Warn().
|
||||
Int64("degraded", n).
|
||||
Int("total", len(receivedSharesByResourceID)).
|
||||
Msg("some received shares could not be fully resolved and were returned as degraded drive items")
|
||||
}
|
||||
|
||||
return driveItems, err
|
||||
}
|
||||
|
||||
// buildDegradedDriveItemFromReceivedShares constructs a DriveItem for a set of
|
||||
// received shares pointing at the same resource when that resource could not be
|
||||
// statted. It exposes the data already contained in the share records (ids,
|
||||
// permissions, grantees, timestamps, mountpoint name) so the share stays
|
||||
// visible in the sharedWithMe listing instead of being silently dropped.
|
||||
// Properties that are only known from a successful Stat (size, etag, mime type,
|
||||
// owner, file/folder type) are intentionally left unset. It never returns an
|
||||
// error: if even the degraded build fails it falls back to a minimal item that
|
||||
// still carries the share identity.
|
||||
func buildDegradedDriveItemFromReceivedShares(ctx context.Context, logger *log.Logger,
|
||||
identityCache identity.IdentityCache, receivedShares []*collaboration.ReceivedShare,
|
||||
availableRoles []*libregraph.UnifiedRoleDefinition) *libregraph.DriveItem {
|
||||
|
||||
driveItem, err := fillDriveItemPropertiesFromReceivedShare(ctx, logger, identityCache, receivedShares, nil, availableRoles)
|
||||
if err != nil {
|
||||
logger.Warn().Err(err).
|
||||
Str("shareid", receivedShares[0].GetShare().GetId().GetOpaqueId()).
|
||||
Msg("could not build degraded drive item, returning a minimal item")
|
||||
driveItem = libregraph.NewDriveItem()
|
||||
driveItem.SetId(storagespace.FormatResourceID(&storageprovider.ResourceId{
|
||||
StorageId: utils.ShareStorageProviderID,
|
||||
OpaqueId: receivedShares[0].GetShare().GetId().GetOpaqueId(),
|
||||
SpaceId: utils.ShareStorageSpaceID,
|
||||
}))
|
||||
driveItem.RemoteItem = libregraph.NewRemoteItem()
|
||||
}
|
||||
|
||||
// the item lives in the virtual share jail, same as the fully-resolved item
|
||||
driveItem.ParentReference = libregraph.NewItemReference()
|
||||
driveItem.ParentReference.SetDriveType(_spaceTypeVirtual)
|
||||
driveItem.ParentReference.SetDriveId(storagespace.FormatStorageID(utils.ShareStorageProviderID, utils.ShareStorageSpaceID))
|
||||
driveItem.ParentReference.SetId(storagespace.FormatResourceID(&storageprovider.ResourceId{
|
||||
StorageId: utils.ShareStorageProviderID,
|
||||
OpaqueId: utils.ShareStorageSpaceID,
|
||||
SpaceId: utils.ShareStorageSpaceID,
|
||||
}))
|
||||
|
||||
if rid := receivedShares[0].GetShare().GetResourceId(); rid != nil {
|
||||
driveItem.RemoteItem.SetId(storagespace.FormatResourceID(rid))
|
||||
driveItem.RemoteItem.SpaceId = libregraph.PtrString(storagespace.FormatStorageID(rid.GetStorageId(), rid.GetSpaceId()))
|
||||
}
|
||||
|
||||
// fall back to the mountpoint name when the resource name is unknown
|
||||
if driveItem.GetName() == "" {
|
||||
if name := receivedShares[0].GetMountPoint().GetPath(); name != "" {
|
||||
driveItem.SetName(name)
|
||||
}
|
||||
}
|
||||
|
||||
return driveItem
|
||||
}
|
||||
|
||||
func fillDriveItemPropertiesFromReceivedShare(ctx context.Context, logger *log.Logger,
|
||||
identityCache identity.IdentityCache, receivedShares []*collaboration.ReceivedShare,
|
||||
resourceInfo *storageprovider.ResourceInfo, availableRoles []*libregraph.UnifiedRoleDefinition) (*libregraph.DriveItem, error) {
|
||||
@@ -551,36 +448,26 @@ func cs3ReceivedShareToLibreGraphPermissions(ctx context.Context, logger *log.Lo
|
||||
}
|
||||
|
||||
if permissionSet := receivedShare.GetShare().GetPermissions().GetPermissions(); permissionSet != nil {
|
||||
// resourceInfo is nil for a degraded item, i.e. when the underlying
|
||||
// resource could not be statted. The resource type, and therefore the
|
||||
// unified role, cannot be determined in that case, so expose the raw
|
||||
// actions instead of failing the whole listing.
|
||||
if resourceInfo == nil {
|
||||
if actions := unifiedrole.CS3ResourcePermissionsToLibregraphActions(permissionSet); len(actions) > 0 {
|
||||
permission.SetLibreGraphPermissionsActions(actions)
|
||||
}
|
||||
} else {
|
||||
condition, err := roleConditionForResourceType(resourceInfo)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
condition, err := roleConditionForResourceType(resourceInfo)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
role := unifiedrole.CS3ResourcePermissionsToRole(
|
||||
availableRoles,
|
||||
permissionSet,
|
||||
condition,
|
||||
false,
|
||||
)
|
||||
if role != nil {
|
||||
permission.SetRoles([]string{role.GetId()})
|
||||
}
|
||||
role := unifiedrole.CS3ResourcePermissionsToRole(
|
||||
availableRoles,
|
||||
permissionSet,
|
||||
condition,
|
||||
false,
|
||||
)
|
||||
if role != nil {
|
||||
permission.SetRoles([]string{role.GetId()})
|
||||
}
|
||||
|
||||
actions := unifiedrole.CS3ResourcePermissionsToLibregraphActions(permissionSet)
|
||||
actions := unifiedrole.CS3ResourcePermissionsToLibregraphActions(permissionSet)
|
||||
|
||||
// actions only make sense if no role is set
|
||||
if role == nil && len(actions) > 0 {
|
||||
permission.SetLibreGraphPermissionsActions(actions)
|
||||
}
|
||||
// actions only make sense if no role is set
|
||||
if role == nil && len(actions) > 0 {
|
||||
permission.SetLibreGraphPermissionsActions(actions)
|
||||
}
|
||||
}
|
||||
switch grantee := receivedShare.GetShare().GetGrantee(); {
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"time"
|
||||
|
||||
gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1"
|
||||
userpb "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
|
||||
@@ -266,7 +265,6 @@ var _ = Describe("Utils", func() {
|
||||
identityCache,
|
||||
receivedShares,
|
||||
unifiedrole.GetRoles(unifiedrole.RoleFilterAll()),
|
||||
10*time.Second,
|
||||
)
|
||||
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
!assets
|
||||
!assets/**
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 86 KiB |
Binary file not shown.
Binary file not shown.
Generated
Whitespace-only changes.
@@ -12,7 +12,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-24 03:20+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: Ivan Fustero, 2026\n"
|
||||
"Language-Team: Catalan (https://app.transifex.com/owncloud-org/teams/6149/ca/)\n"
|
||||
|
||||
@@ -12,7 +12,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-06-24 03:20+0000\n"
|
||||
"POT-Creation-Date: 2026-06-03 03:23+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: David Walter, 2026\n"
|
||||
"Language-Team: German (https://app.transifex.com/owncloud-org/teams/6149/de/)\n"
|
||||
|
||||
Loaded 100 of 246 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user