Compare commits

..
231 changed files with 3489 additions and 11728 deletions

No files matched your search

+26 -10
View File
@@ -3975,10 +3975,18 @@ def k3sCluster(name = OCIS_SERVER_NAME, ocm = False):
if ocm:
commands.extend([
# wait for peer
"until getent hosts %s >/dev/null 2>&1; do echo 'Waiting for %s...'; sleep 2; done" % (peer_name, peer_name),
# create namespace
"kubectl create namespace ocis || true",
"bash %s/tests/config/k8s/expose-external-svc.sh -n ocis %s:443" % (dirs["base"], peer_name),
"echo 'Waiting for %s to be available...'" % peer_name,
"for i in {1..60}; do if getent hosts %s > /dev/null 2>&1; then break; fi; echo 'Waiting for %s... attempt '$i; sleep 2; done" % (peer_name, peer_name),
# get the IP of peer
"PEER_IP=$(getent hosts %s | awk '{ print $1 }')" % peer_name,
"echo \"%s IP: $PEER_IP\"" % peer_name,
# create namespace for ocis
"kubectl create namespace ocis --dry-run=client -o yaml | kubectl apply -f -",
# create service in the 'ocis' namespace
"cat <<EOF | kubectl apply -f -\napiVersion: v1\nkind: Service\nmetadata:\n name: %s\n namespace: ocis\nspec:\n type: ClusterIP\n clusterIP: None\n ports:\n - port: 443\n protocol: TCP\n---\napiVersion: v1\nkind: Endpoints\nmetadata:\n name: %s\n namespace: ocis\nsubsets:\n- addresses:\n - ip: $PEER_IP\n ports:\n - port: 443\n protocol: TCP\nEOF" % (peer_name, peer_name),
# verify
"kubectl get svc %s -n ocis" % peer_name,
"kubectl get endpoints %s -n ocis" % peer_name,
])
commands.extend([
@@ -4017,7 +4025,7 @@ def prepareChartsK8s(environment = []):
"[ ! -d %s/ocis-charts ] && " % dirs["base"] +
"git clone --single-branch -b main --depth 1 https://github.com/owncloud/ocis-charts.git",
# prepare charts for the tests
"bash %s/tests/config/k8s/setup.sh %s/ocis-charts" % (dirs["base"], dirs["base"]),
"bash %s/tests/config/drone/k8s/setup.sh %s/ocis-charts" % (dirs["base"], dirs["base"]),
]
return [{
@@ -4062,6 +4070,10 @@ def deployOcisK8s(name = OCIS_SERVER_NAME):
"cd %s/ocis-charts" % dirs["base"],
# update external domain
"sed -i 's|externalDomain:.*|externalDomain: %s|' ./charts/ocis/ci/deployment-values.yaml" % name,
# [NOTE]
# Remove schema validation to add extra configs in values.yaml.
# Also this allows us to use fakeoffice as web-office server
"rm ./charts/ocis/values.schema.json || true",
# deploy ocis
"make helm-install-atomic",
],
@@ -4122,10 +4134,15 @@ def exposeNodePortsK8s(services = [], name = OCIS_SERVER_NAME):
}]
def exposeExternalServersK8s(servers = [], name = OCIS_SERVER_NAME):
servers_arg = []
commands = []
for server in servers:
servers_arg.append("%s:%s" % (server[0], str(server[1])))
servers_arg = ",".join(servers_arg)
server_name = server[0]
server_port = str(server[1])
commands.append("SERVER_IP=$(getent hosts %s | awk '{print $1}')" % server_name)
commands.append('echo -e "apiVersion: v1\nkind: Endpoints\nmetadata:\n name: %s\n namespace: ocis\n' % server_name +
'subsets:\n- addresses:\n - ip: $SERVER_IP\n ports:\n - port: %s" | kubectl apply -f -' % server_port)
commands.append('echo -e "apiVersion: v1\nkind: Service\nmetadata:\n name: %s\n namespace: ocis\n' % server_name +
'spec:\n ports:\n - port: %s\n targetPort: %s" | kubectl apply -f -' % (server_port, server_port))
return [{
"name": "expose-external-servers",
@@ -4133,6 +4150,5 @@ def exposeExternalServersK8s(servers = [], name = OCIS_SERVER_NAME):
"commands": [
"export KUBECONFIG=kubeconfig-$${DRONE_BUILD_NUMBER}-%s.yaml" % name,
"until test -f $${KUBECONFIG}; do sleep 1s; done",
"bash %s/tests/config/k8s/expose-external-svc.sh -n ocis %s" % (dirs["base"], servers_arg),
],
] + commands,
}]
-5
View File
@@ -19,9 +19,4 @@ updates:
schedule:
interval: "weekly"
open-pull-requests-limit: 2
- package-ecosystem: "github-actions"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
+4 -2
View File
@@ -55,7 +55,8 @@ branches:
require_code_owner_reviews: false
required_status_checks:
strict: false
contexts: []
contexts:
- continuous-integration/drone/pr
enforce_admins: null
restrictions:
apps: []
@@ -73,7 +74,8 @@ branches:
require_code_owner_reviews: false
required_status_checks:
strict: false
contexts: []
contexts:
- continuous-integration/drone/pr
enforce_admins: null
restrictions:
apps: []
-342
View File
@@ -1,342 +0,0 @@
name: Acceptance Tests
on:
pull_request:
workflow_dispatch:
jobs:
coding-standard:
name: coding-standard
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
with:
php-version: "8.4"
extensions: curl, xml, mbstring, zip
tools: composer
- name: PHP code style
run: |
make vendor-bin-codestyle
make vendor-bin-codesniffer
make test-php-style
- name: Check env var annotations
run: make check-env-var-annotations
check-gherkin-standard:
name: check-gherkin-standard
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: "24"
- name: Lint feature files
run: |
npm install -g @gherlint/gherlint@1.1.0
make test-gherkin-lint
check-suites-in-expected-failures:
name: check-suites-in-expected-failures
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Check suites
run: bash tests/acceptance/check-deleted-suites-in-expected-failure.sh
build-and-test:
name: build-and-test
needs: [coding-standard, check-gherkin-standard, check-suites-in-expected-failures]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
cache: true
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: "24"
- name: Enable pnpm
run: corepack enable && corepack prepare pnpm@10.28.1 --activate
- name: Generate nodejs
run: make ci-node-generate
- name: Generate go
run: make ci-go-generate
- name: Vulnerability scan
run: make govulncheck
- name: Lint
run: make ci-golangci-lint
- name: Build ocis
run: make -C ocis build
- name: Build debug binary
run: make -C ocis build-debug
- name: Unit tests
run: make test
local-api-tests:
name: ${{ matrix.suite }}
needs: [build-and-test]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
suite:
# contract & locks
- apiContract
- apiLocks
# settings & notifications (needs email)
- apiSettings
- apiNotification
- apiCors
# graph
- apiGraphUser
- apiGraph
- apiGraphGroup
# spaces & dav
- apiSpaces
- apiSpacesShares
- apiSpacesDavOperation
- apiDownloads
- apiAsyncUpload
- apiDepthInfinity
- apiArchiver
- apiActivities
# search
- apiSearch1
# - apiSearch2
- apiSearchContent # needs Tika
# sharing
- apiSharingNgShares
- apiReshare
- apiSharingNgPermissions
- apiSharingNgAdditionalShareRole
- apiSharingNgDriveInvitation
- apiSharingNgItemInvitation
- apiSharingNgDriveLinkShare
- apiSharingNgItemLinkShare
- apiSharingNgLinkShareManagement
# auth
- apiAuthApp
# antivirus (needs ClamAV)
- apiAntivirus
# federation (needs email + federation ocis)
# - apiOcm
# collaboration (needs WOPI)
- apiCollaboration
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
cache: true
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: "24"
- name: Enable pnpm
run: corepack enable && corepack prepare pnpm@10.28.1 --activate
- name: Install libcurl 8.12.0 from source
run: |
sudo apt-get update -qq
sudo apt-get install -y libssl-dev libnghttp2-dev libpsl-dev libldap-dev libssh-dev zlib1g-dev libvips-dev
cd /tmp
curl -sLO https://curl.se/download/curl-8.12.0.tar.gz
tar xzf curl-8.12.0.tar.gz
cd curl-8.12.0
./configure --with-ssl --with-zlib --with-nghttp2 --prefix=/usr/local --enable-versioned-symbols --silent
make -j$(nproc) --silent
sudo make install --silent
sudo ldconfig
curl --version | head -1
php -r '
$v = curl_version()["version"];
echo "PHP curl: $v\n";
if (version_compare($v, "8.12.0", "<")) {
fwrite(STDERR, "FATAL: PHP sees libcurl $v, need >= 8.12.0\n");
exit(1);
}
'
- uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
with:
php-version: "8.4"
extensions: curl, xml, mbstring, zip
tools: composer
- name: Run ${{ matrix.suite }}
run: BEHAT_SUITES=${{ matrix.suite }} python3 tests/acceptance/run-github.py
cli-tests:
needs: [build-and-test]
name: ${{ matrix.suite }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
suite:
- cliCommands,apiServiceAvailability # grouped like drone; needs ClamAV + email
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
cache: true
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: "24"
- name: Enable pnpm
run: corepack enable && corepack prepare pnpm@10.28.1 --activate
- uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
with:
php-version: "8.4"
extensions: curl, xml, mbstring, zip
tools: composer
- name: Run ${{ matrix.suite }}
run: BEHAT_SUITES="${{ matrix.suite }}" python3 tests/acceptance/run-github.py
core-api-tests:
name: ${{ matrix.suite }}
needs: [build-and-test]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
suite:
- "coreApiShareManagementBasicToShares,coreApiShareManagementToShares"
- "coreApiSharees,coreApiSharePublicLink2"
- "coreApiShareOperationsToShares1,coreApiShareOperationsToShares2,coreApiSharePublicLink1,coreApiShareCreateSpecialToShares1,coreApiShareCreateSpecialToShares2,coreApiShareUpdateToShares"
- "coreApiTrashbin,coreApiTrashbinRestore,coreApiWebdavEtagPropagation1,coreApiWebdavEtagPropagation2"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
cache: true
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: "24"
- name: Enable pnpm
run: corepack enable && corepack prepare pnpm@10.28.1 --activate
- name: Install libcurl 8.12.0 from source
run: |
sudo apt-get update -qq
sudo apt-get install -y libssl-dev libnghttp2-dev libpsl-dev libldap-dev libssh-dev zlib1g-dev libvips-dev
cd /tmp
curl -sLO https://curl.se/download/curl-8.12.0.tar.gz
tar xzf curl-8.12.0.tar.gz
cd curl-8.12.0
./configure --with-ssl --with-zlib --with-nghttp2 --prefix=/usr/local --enable-versioned-symbols --silent
make -j$(nproc) --silent
sudo make install --silent
sudo ldconfig
curl --version | head -1
php -r '
$v = curl_version()["version"];
echo "PHP curl: $v\n";
if (version_compare($v, "8.12.0", "<")) {
fwrite(STDERR, "FATAL: PHP sees libcurl $v, need >= 8.12.0\n");
exit(1);
}
'
- uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
with:
php-version: "8.4"
extensions: curl, xml, mbstring, zip
tools: composer
- name: Run ${{ matrix.suite }}
run: >
BEHAT_SUITES="${{ matrix.suite }}"
ACCEPTANCE_TEST_TYPE=core-api
EXPECTED_FAILURES_FILE=tests/acceptance/expected-failures-API-on-OCIS-storage.md
python3 tests/acceptance/run-github.py
- name: Upload test logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-logs-${{ matrix.suite }}
path: tests/acceptance/output/
litmus:
name: litmus
needs: [build-and-test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Run litmus
run: python3 tests/acceptance/run-litmus.py
cs3api:
name: cs3api
needs: [build-and-test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Run cs3api validator
run: python3 tests/acceptance/run-cs3api.py
wopi-builtin:
name: wopi-builtin
needs: [build-and-test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Run WOPI validator (builtin)
run: python3 tests/acceptance/run-wopi.py --type builtin
wopi-cs3:
name: wopi-cs3
needs: [build-and-test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Run WOPI validator (cs3)
run: python3 tests/acceptance/run-wopi.py --type cs3
all-acceptance-tests:
needs: [local-api-tests, cli-tests, core-api-tests, litmus, cs3api, wopi-builtin, wopi-cs3]
runs-on: ubuntu-latest
if: always()
steps:
- name: Check all jobs passed
run: |
if [[ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
exit 1
fi
+1 -1
View File
@@ -17,7 +17,7 @@ jobs:
name: Remove Stale Branches
runs-on: ubuntu-latest
steps:
- uses: fpicalausa/remove-stale-branches@v2.4.0
- uses: fpicalausa/remove-stale-branches@v1.6.0
with:
ignore-unknown-authors: true
default-recipient: "kobergj"
+1 -1
View File
@@ -18,7 +18,7 @@ jobs:
container: golang:1.25-alpine
steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: Run CI Reporter
working-directory: tools/ci-reporter
+4 -1
View File
@@ -57,6 +57,7 @@ protogen/buf.sha1.lock
/third-party-licenses
# misc
.agents/
/tmp
go.work
go.work.sum
@@ -64,4 +65,6 @@ go.work.sum
.envrc
CLAUDE.md
.claude/
.agents/
# charts
ocis-charts/
+24 -53
View File
@@ -1,67 +1,42 @@
#!/bin/bash
# The following grep will filter out every line containing an `env` annotation.
# It will ignore every line that already has a valid `introductionVersion` annotation.
RED=$(echo -e "\033[0;31m")
GREEN=$(echo -e "\033[0;32m")
NORM=$(echo -e "\033[0m")
# create a here doc function to be printed in case of introductionVersion annotation errors
# note that tabs are used intentionally. they are removed by cat but are required to make the code readable.
print_introduction_version_examples() {
cat <<-EOL
${GREEN}Valid examples:${NORM}
introductionVersion:"pre5.0"
introductionVersion:"5.0"
introductionVersion:"4.9.3-rc5"
introductionVersion:"5.0.1-cheesecake"
introductionVersion:"5.10.100.15"
introductionVersion:"0.0"
introductionVersion:"releaseX" # acceptable alphabetical version
introductionVersion:"Addams" # another alphabetical example such as a release name
${RED}Invalid examples:${NORM}
introductionVersion:"5.0cheesecake"
introductionVersion:"5"
introductionVersion:"5blueberry"
introductionVersion:"5-lasagna"
introductionVersion:"4.9.3rc5"
See the dev docs for more details: https://owncloud.dev/services/general-info/envvars/envvar-naming-scopes/
EOL
}
# The following grep will filter out every line containing an `env` annotation
# it will ignore every line that already has a valid `introductionVersion` annotation
#
# valid examples:
#
# introductionVersion:"pre5.0"
# introductionVersion:"5.0"
# introductionVersion:"4.9.3-rc5"
# introductionVersion:"5.0.1-cheesecake"
# introductionVersion:"5.10.100.15"
# introductionVersion:"0.0"
# introductionVersion:"releaseX" # acceptable alphabetical version
# introductionVersion:"Addams" # another alphabetical example
#
# invalid examples:
#
# introductionVersion:"5.0cheesecake"
# introductionVersion:"5"
# introductionVersion:"5blueberry"
# introductionVersion:"5-lasagna"
# introductionVersion:"4.9.3rc5"
ERROR=0
SEMVER_REGEX="([0-9]|[1-9][0-9]*)(\.([0-9]|[1-9][0-9]*)){1,2}(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?"
ALPHA_REGEX="[A-Za-z]+[A-Za-z0-9-]*"
QI=$(git grep -n "env:" -- '*.go' |grep -v -P "introductionVersion:\"($SEMVER_REGEX|(pre5\\.0)|($ALPHA_REGEX))\""|grep -v "_test.go"|grep -v "vendor/")
# add a new line after each hit, eol identified via "´ which only appears at the end of each envvar string definition
QUERY_INTRO=$(echo "${QI}" | sed "s#\"\`#\"\`\n#g")
QUERY_INTRO=$(git grep -n "env:" -- '*.go' |grep -v -P "introductionVersion:\"($SEMVER_REGEX|(pre5\\.0)|($ALPHA_REGEX))\""|grep -v "_test.go"|grep -v "vendor/")
RESULTS_INTRO=$(echo "${QUERY_INTRO}"|wc -l)
echo "Checking introductionVersion annotations"
if [ "${QUERY_INTRO}" != "" ] && [ "${RESULTS_INTRO}" -gt 0 ]; then
echo
echo "==============================================================================================="
echo ${RED}"The following ${RESULTS_INTRO} items contain invalid or missing introductionVersion annotation(s):"${NORM}
echo "The following ${RESULTS_INTRO} items contain an invalid or missing introductionVersion annotation:"
echo "==============================================================================================="
echo
echo "$QUERY_INTRO"
echo
print_introduction_version_examples
echo
ERROR=1
else
echo "All introductionVersion annotations are valid"
echo
fi
# The following grep will filter out every line containing an `env` annotation
@@ -70,13 +45,9 @@ fi
QUERY_DESC=$(git grep -n "env:" -- '*.go' |grep -v -P "desc:\".{10,}\""|grep -v "_test.go"|grep -v "vendor/")
RESULTS_DESC=$(echo "${QUERY_DESC}"|wc -l)
echo "Checking description annotations"
if [ "${QUERY_DESC}" != "" ] && [ "${RESULTS_DESC}" -gt 0 ]; then
echo
echo "==============================================================================================="
echo ${RED}"The following ${RESULTS_DESC} items contain invalid or missing description annotation:"${NORM}
echo "The following ${RESULTS_DESC} items contain an invalid or missing description annotation:"
echo "==============================================================================================="
echo "$QUERY_DESC"
ERROR=1
-17
View File
@@ -82,7 +82,6 @@ The following sections list the changes for unreleased.
* Bugfix - Prevent incomplete Tika extractions from permanently blocking re-index: [#12095](https://github.com/owncloud/ocis/pull/12095)
* Bugfix - Use O(1) document lookup instead of full search during reindexing: [#12096](https://github.com/owncloud/ocis/pull/12096)
* Bugfix - Fix IDP build on FreeBSD by disabling absolute Babel runtime: [#12114](https://github.com/owncloud/ocis/pull/12114)
* Bugfix - Don't index failed uploads: [#12121](https://github.com/owncloud/ocis/pull/12121)
* Enhancement - Add web extensions deployment configuration: [#11940](https://github.com/owncloud/ocis/pull/11940)
* Enhancement - Add AI-assisted development guide: [#11941](https://github.com/owncloud/ocis/pull/11941)
* Enhancement - Bump Web to 12.3.1: [#12015](https://github.com/owncloud/ocis/pull/12015)
@@ -93,7 +92,6 @@ The following sections list the changes for unreleased.
* Enhancement - Support numeric range queries in KQL: [#12094](https://github.com/owncloud/ocis/pull/12094)
* Enhancement - Add blobstore CLI commands to storage-users service: [#12102](https://github.com/owncloud/ocis/pull/12102)
* Enhancement - Optimize search index after bulk reindexing: [#12104](https://github.com/owncloud/ocis/pull/12104)
* Enhancement - Update images in the ocis_full deployment example: [#12123](https://github.com/owncloud/ocis/pull/12123)
## Details
@@ -253,14 +251,6 @@ The following sections list the changes for unreleased.
https://github.com/owncloud/ocis/issues/12065
https://github.com/owncloud/ocis/pull/12114
* Bugfix - Don't index failed uploads: [#12121](https://github.com/owncloud/ocis/pull/12121)
The search service was indexing uploads even when they failed. This caused
unnecessary index operations for incomplete or errored file transfers. The fix
skips indexing when the UploadReady event indicates the upload has failed.
https://github.com/owncloud/ocis/pull/12121
* Enhancement - Add web extensions deployment configuration: [#11940](https://github.com/owncloud/ocis/pull/11940)
We added deployment configuration for the photo-addon and advanced-search web
@@ -375,13 +365,6 @@ The following sections list the changes for unreleased.
https://github.com/owncloud/ocis/issues/12093
https://github.com/owncloud/ocis/pull/12104
* Enhancement - Update images in the ocis_full deployment example: [#12123](https://github.com/owncloud/ocis/pull/12123)
- Update the docker images for core services and web-extensions - Moving all
default image definitions (latest) into the .env file for consistency
https://github.com/owncloud/ocis/pull/12123
# Changelog for [8.0.0] (2026-02-13)
The following sections list the changes for 8.0.0.
+1 -1
View File
@@ -333,7 +333,7 @@ changelog-csv: $(CALENS)
.PHONY: govulncheck
govulncheck: $(GOVULNCHECK)
scripts/govulncheck-wrapper.sh $(GOVULNCHECK)
$(GOVULNCHECK) ./...
.PHONY: l10n-push
l10n-push:
@@ -1,7 +0,0 @@
Bugfix: Don't index failed uploads
The search service was indexing uploads even when they failed. This caused
unnecessary index operations for incomplete or errored file transfers. The fix
skips indexing when the UploadReady event indicates the upload has failed.
https://github.com/owncloud/ocis/pull/12121
+1 -1
View File
@@ -4,4 +4,4 @@ bumped reva version
https://github.com/owncloud/ocis/pull/12051
https://github.com/owncloud/ocis/pull/12087
https://github.com/owncloud/ocis/pull/12137
@@ -1,5 +0,0 @@
Enhancement: Add Keycloak to the ocis_full deployment example
Added Keycloak to the ocis_full deployment example.
https://github.com/owncloud/ocis/pull/12139
@@ -1,10 +0,0 @@
Enhancement: Log effective data and config paths at startup
oCIS now logs the effective data path and config path at startup so
operators can immediately verify that data is written to the expected
location. This helps catch misconfigured Docker volume mounts where
data silently falls back to an ephemeral container path instead of
the intended persistent mount.
https://github.com/owncloud/ocis/pull/12117
https://github.com/owncloud/ocis/issues/12044
@@ -1,11 +0,0 @@
Bugfix: Always descend into directories during space reindexing
The search indexer's `IndexSpace` walk previously used `filepath.SkipDir`
to skip entire directory subtrees when the directory itself was already
indexed. After a failed or interrupted indexing run (e.g. Tika crash),
this caused thousands of unindexed files to be permanently skipped
because the parent directory's mtime had not changed. The indexer now
always descends into directories, relying on the O(1) per-file DocID
lookup to skip already-indexed files efficiently.
https://github.com/owncloud/ocis/pull/12119
@@ -1,6 +0,0 @@
Enhancement: Update images in the ocis_full deployment example
- Update the docker images for core services and web-extensions
- Moving all default image definitions (latest) into the .env file for consistency
https://github.com/owncloud/ocis/pull/12123
+9 -32
View File
@@ -12,7 +12,7 @@ INSECURE=true
# Note: Traefik is always enabled and can't be disabled.
# The recommended (and tested) version to pull. If no version is used, it pulls "latest"
# release notes: https://github.com/traefik/traefik/releases
TRAEFIK_DOCKER_TAG=v3.6.10
TRAEFIK_DOCKER_TAG=v3.6.7
# Serve Traefik dashboard.
# Defaults to "false".
TRAEFIK_DASHBOARD=
@@ -45,7 +45,7 @@ OCIS=:ocis.yml
OCIS_DOCKER_IMAGE=owncloud/ocis
# The oCIS container version.
# Defaults to "latest" and points to the latest stable tag.
OCIS_DOCKER_TAG=latest
OCIS_DOCKER_TAG=
# Domain of oCIS, where you can find the frontend.
# Defaults to "ocis.owncloud.test"
OCIS_DOMAIN=
@@ -94,9 +94,6 @@ S3NG_BUCKET=
# For testing purposes, add local minio S3 storage to the docker-compose file.
# The leading colon is required to enable the service.
#S3NG_MINIO=:minio.yml
# Set the desired docker image tag or digest.
# Defaults to "latest"
MINIO_DOCKER_TAG=latest
# Minio domain. Defaults to "minio.owncloud.test".
MINIO_DOMAIN=
@@ -167,26 +164,6 @@ COMPANION_ONEDRIVE_KEY=
COMPANION_ONEDRIVE_SECRET=
### Keycloak Settings ###
# The recommended (and tested) version to pull. If no version is used, it pulls "latest"
# release notes: https://github.com/keycloak/keycloak/releases
KEYCLOAK_DOCKER_TAG=26.2.5
# Domain of Keycloak, where you can find the management and authentication frontend. Defaults to "keycloak.owncloud.test"
KEYCLOAK_DOMAIN=
# Realm which to be used with oCIS. Defaults to "oCIS"
KEYCLOAK_REALM=
# Admin user login name. Defaults to "admin"
KEYCLOAK_ADMIN_USER=
# Admin user login password. Defaults to "admin"
KEYCLOAK_ADMIN_PASSWORD=
# Enable tracing in Keycloak. Traces will be sent to "http://jaeger:4317". Defaults to "false"
KEYCLOAK_TRACING=
# Enable Keycloak manually if you want to use it
# Note: the leading colon is required to enable the service.
#KEYCLOAK=:keycloak.yml
## Default Enabled Services ##
### Apache Tika Content Analysis Toolkit ###
@@ -194,8 +171,8 @@ KEYCLOAK_TRACING=
# Note: the leading colon is required to enable the service.
TIKA=:tika.yml
# Set the desired docker image tag or digest.
# Defaults to "latest-full"
TIKA_DOCKER_TAG=latest-full
# Defaults to "latest"
TIKA_IMAGE=
### IMPORTANT Note for Online Office Apps ###
# To avoid app interlocking issues, you should select only one app to be active/configured.
@@ -208,7 +185,7 @@ TIKA_DOCKER_TAG=latest-full
COLLABORA=:collabora.yml
# The recommended (and tested) version to pull. If no version is used, it pulls "latest"
# release notes: https://www.collaboraonline.com/release-notes/
COLLABORA_DOCKER_TAG=25.04.9.3.1
COLLABORA_DOCKER_TAG=25.04.8.1.1
# Domain of Collabora, where you can find the frontend.
# Defaults to "collabora.owncloud.test"
COLLABORA_DOMAIN=
@@ -240,7 +217,7 @@ COLLABORA_SSL_VERIFICATION=false
#CLAMAV=:clamav.yml
# Image version of the ClamAV container.
# Defaults to "latest"
CLAMAV_DOCKER_TAG=latest
CLAMAV_DOCKER_TAG=
### OnlyOffice Settings ###
@@ -253,7 +230,7 @@ CLAMAV_DOCKER_TAG=latest
ONLYOFFICE_IMAGE=onlyoffice/documentserver
# The recommended (and tested) version to pull. If no version is used, it pulls "latest"
# release notes: https://github.com/ONLYOFFICE/DocumentServer/releases
ONLYOFFICE_DOCKER_TAG=9.3.1.1
ONLYOFFICE_DOCKER_TAG=9.2.1.1
# EE only: the path to your license file on the host.
# To activate a license file, comment ONLYOFFICE_DEACTIVATE_LICENSE. Otherwise, it <must> stay uncommented.
@@ -280,7 +257,7 @@ ONLYOFFICE_DOMAIN=
MAIL_SERVER_DOMAIN=
# The recommended (and tested) version to pull. If no version is used, it pulls "latest"
# release notes: https://github.com/axllent/mailpit/releases
MAIL_SERVER_DOCKER_TAG=v1.29.3
MAIL_SERVER_DOCKER_TAG=v1.28.0
### Debugging - Monitoring ###
@@ -297,4 +274,4 @@ MAIL_SERVER_DOCKER_TAG=v1.29.3
# This MUST be the last line as it assembles the supplemental compose files to be used.
# ALL supplemental configs must be added here, whether commented or not.
# Each var must either be empty or contain :path/file.yml
COMPOSE_FILE=docker-compose.yml${OCIS:-}${TIKA:-}${S3NG:-}${S3NG_MINIO:-}${COLLABORA:-}${IMPORTER:-}${CLAMAV:-}${ONLYOFFICE:-}${EXTENSIONS:-}${UNZIP:-}${DRAWIO:-}${JSONVIEWER:-}${PROGRESSBARS:-}${EXTERNALSITES:-}${PHOTOADDON:-}${ADVANCEDSEARCH:-}${MAIL_SERVER:-}${MONITORING:-}${KEYCLOAK:-}
COMPOSE_FILE=docker-compose.yml${OCIS:-}${TIKA:-}${S3NG:-}${S3NG_MINIO:-}${COLLABORA:-}${IMPORTER:-}${CLAMAV:-}${ONLYOFFICE:-}${EXTENSIONS:-}${UNZIP:-}${DRAWIO:-}${JSONVIEWER:-}${PROGRESSBARS:-}${EXTERNALSITES:-}${PHOTOADDON:-}${ADVANCEDSEARCH:-}${MAIL_SERVER:-}${MONITORING:-}
-7
View File
@@ -15,11 +15,4 @@ This deployment example is documented in two locations for different audiences:
Providing details which are more developer focused. This description can also be used when deviating from the default.\
Note that this examples uses self signed certificates and is intended for testing purposes.
## Optional Services
### Keycloak
Keycloak can be optionally enabled by uncommenting the corresponding variables in the `.env` file:
- `KEYCLOAK=:keycloak.yml`
Note that Keycloak requires the default `ocis` Identity Provider to be disabled, which is automatically handled when the `keycloak.yml` configuration is used.
+1 -1
View File
@@ -13,7 +13,7 @@ services:
- "clamav-socket:/var/run/clamav"
clamav:
image: clamav/clamav:${CLAMAV_DOCKER_TAG}
image: clamav/clamav:${CLAMAV_DOCKER_TAG:-latest}
# release notes: https://blog.clamav.net
networks:
ocis-net:
+2 -2
View File
@@ -12,7 +12,7 @@ services:
GRAPH_AVAILABLE_ROLES: "b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5,a8d5fe5e-96e3-418d-825b-534dbdf22b99,fb6c3e19-e378-47e5-b277-9732f9de6e21,58c63c02-1d89-4572-916a-870abc5a1b7d,2d00ce52-1fc2-4dbc-8b95-a73b73395f5a,1c996275-f1c9-4e71-abdf-a42f6495e960,312c0871-5ef7-4b3a-85b6-0e4074c64049,aa97fe03-7980-45ac-9e50-b325749fd7e6"
collaboration:
image: ${OCIS_DOCKER_IMAGE:-owncloud/ocis}:${OCIS_DOCKER_TAG}
image: ${OCIS_DOCKER_IMAGE:-owncloud/ocis}:${OCIS_DOCKER_TAG:-latest}
networks:
ocis-net:
depends_on:
@@ -49,7 +49,7 @@ services:
restart: always
collabora:
image: collabora/code:${COLLABORA_DOCKER_TAG}
image: collabora/code:${COLLABORA_DOCKER_TAG:-latest}
networks:
ocis-net:
environment:
@@ -1,64 +0,0 @@
{
"clientId": "e4rAsNUSIUs0lF4nbv9FmCeUkTlV9GdgTLDH1b5uie7syb90SzEVrbN7HIpmWJeD",
"name": "ownCloud Android app",
"surrogateAuthRequired": false,
"enabled": true,
"alwaysDisplayInConsole": false,
"clientAuthenticatorType": "client-secret",
"secret": "dInFYGV33xKzhbRmpqQltYNdfLdJIfJ9L5ISoKhNoT9qZftpdWSP71VrpGR9pmoD",
"redirectUris": [
"oc://android.owncloud.com"
],
"webOrigins": [],
"notBefore": 0,
"bearerOnly": false,
"consentRequired": false,
"standardFlowEnabled": true,
"implicitFlowEnabled": false,
"directAccessGrantsEnabled": true,
"serviceAccountsEnabled": false,
"publicClient": false,
"frontchannelLogout": false,
"protocol": "openid-connect",
"attributes": {
"saml.assertion.signature": "false",
"saml.force.post.binding": "false",
"saml.multivalued.roles": "false",
"saml.encrypt": "false",
"post.logout.redirect.uris": "+",
"backchannel.logout.revoke.offline.tokens": "false",
"saml.server.signature": "false",
"saml.server.signature.keyinfo.ext": "false",
"exclude.session.state.from.auth.response": "false",
"backchannel.logout.session.required": "true",
"client_credentials.use_refresh_token": "false",
"saml_force_name_id_format": "false",
"saml.client.signature": "false",
"tls.client.certificate.bound.access.tokens": "false",
"saml.authnstatement": "false",
"display.on.consent.screen": "false",
"saml.onetimeuse.condition": "false"
},
"authenticationFlowBindingOverrides": {},
"fullScopeAllowed": true,
"nodeReRegistrationTimeout": -1,
"defaultClientScopes": [
"web-origins",
"profile",
"roles",
"groups",
"basic",
"email"
],
"optionalClientScopes": [
"address",
"phone",
"offline_access",
"microprofile-jwt"
],
"access": {
"view": true,
"configure": true,
"manage": true
}
}
@@ -1,67 +0,0 @@
{
"clientId": "3keLfua0olYvW1zKXTDB3OjAMPEYWEQNuiscli395GKJOiPnPURNQWGvGCJZf4Hw",
"name": "Cyberduck",
"description": "",
"surrogateAuthRequired": false,
"enabled": true,
"alwaysDisplayInConsole": false,
"clientAuthenticatorType": "client-secret",
"secret": "yoqICbLIeYbpZPqDH4D8k4NKb04HqnrWBntEeVZEQ5gO1RmaUlln0Aqu1dj2UoF4",
"redirectUris": [
"x-cyberduck-action:oauth",
"x-mountainduck-action:oauth"
],
"webOrigins": [],
"notBefore": 0,
"bearerOnly": false,
"consentRequired": false,
"standardFlowEnabled": true,
"implicitFlowEnabled": false,
"directAccessGrantsEnabled": true,
"serviceAccountsEnabled": false,
"publicClient": false,
"frontchannelLogout": false,
"protocol": "openid-connect",
"attributes": {
"saml.assertion.signature": "false",
"saml.force.post.binding": "false",
"saml.multivalued.roles": "false",
"saml.encrypt": "false",
"oauth2.device.authorization.grant.enabled": "false",
"backchannel.logout.revoke.offline.tokens": "false",
"saml.server.signature": "false",
"saml.server.signature.keyinfo.ext": "false",
"exclude.session.state.from.auth.response": "false",
"oidc.ciba.grant.enabled": "false",
"backchannel.logout.session.required": "true",
"client_credentials.use_refresh_token": "false",
"saml_force_name_id_format": "false",
"saml.client.signature": "false",
"tls.client.certificate.bound.access.tokens": "false",
"saml.authnstatement": "false",
"display.on.consent.screen": "false",
"saml.onetimeuse.condition": "false"
},
"authenticationFlowBindingOverrides": {},
"fullScopeAllowed": true,
"nodeReRegistrationTimeout": -1,
"defaultClientScopes": [
"web-origins",
"profile",
"roles",
"groups",
"basic",
"email"
],
"optionalClientScopes": [
"address",
"phone",
"offline_access",
"microprofile-jwt"
],
"access": {
"view": true,
"configure": true,
"manage": true
}
}
@@ -1,65 +0,0 @@
{
"clientId": "xdXOt13JKxym1B1QcEncf2XDkLAexMBFwiT9j6EfhhHFJhs2KM9jbjTmf8JBXE69",
"name": "ownCloud Desktop Client",
"surrogateAuthRequired": false,
"enabled": true,
"alwaysDisplayInConsole": false,
"clientAuthenticatorType": "client-secret",
"secret": "UBntmLjC2yYCeHwsyj73Uwo9TAaecAetRwMw0xYcvNL9yRdLSUi0hUAHfvCHFeFh",
"redirectUris": [
"http://127.0.0.1:*",
"http://localhost:*"
],
"webOrigins": [],
"notBefore": 0,
"bearerOnly": false,
"consentRequired": false,
"standardFlowEnabled": true,
"implicitFlowEnabled": false,
"directAccessGrantsEnabled": true,
"serviceAccountsEnabled": false,
"publicClient": false,
"frontchannelLogout": false,
"protocol": "openid-connect",
"attributes": {
"saml.assertion.signature": "false",
"saml.force.post.binding": "false",
"saml.multivalued.roles": "false",
"saml.encrypt": "false",
"post.logout.redirect.uris": "+",
"backchannel.logout.revoke.offline.tokens": "false",
"saml.server.signature": "false",
"saml.server.signature.keyinfo.ext": "false",
"exclude.session.state.from.auth.response": "false",
"backchannel.logout.session.required": "true",
"client_credentials.use_refresh_token": "false",
"saml_force_name_id_format": "false",
"saml.client.signature": "false",
"tls.client.certificate.bound.access.tokens": "false",
"saml.authnstatement": "false",
"display.on.consent.screen": "false",
"saml.onetimeuse.condition": "false"
},
"authenticationFlowBindingOverrides": {},
"fullScopeAllowed": true,
"nodeReRegistrationTimeout": -1,
"defaultClientScopes": [
"web-origins",
"profile",
"roles",
"groups",
"basic",
"email"
],
"optionalClientScopes": [
"address",
"phone",
"offline_access",
"microprofile-jwt"
],
"access": {
"view": true,
"configure": true,
"manage": true
}
}
@@ -1,64 +0,0 @@
{
"clientId": "mxd5OQDk6es5LzOzRvidJNfXLUZS2oN3oUFeXPP8LpPrhx3UroJFduGEYIBOxkY1",
"name": "ownCloud iOS app",
"surrogateAuthRequired": false,
"enabled": true,
"alwaysDisplayInConsole": false,
"clientAuthenticatorType": "client-secret",
"secret": "KFeFWWEZO9TkisIQzR3fo7hfiMXlOpaqP8CFuTbSHzV1TUuGECglPxpiVKJfOXIx",
"redirectUris": [
"oc://ios.owncloud.com"
],
"webOrigins": [],
"notBefore": 0,
"bearerOnly": false,
"consentRequired": false,
"standardFlowEnabled": true,
"implicitFlowEnabled": false,
"directAccessGrantsEnabled": true,
"serviceAccountsEnabled": false,
"publicClient": false,
"frontchannelLogout": false,
"protocol": "openid-connect",
"attributes": {
"saml.assertion.signature": "false",
"saml.force.post.binding": "false",
"saml.multivalued.roles": "false",
"saml.encrypt": "false",
"post.logout.redirect.uris": "+",
"backchannel.logout.revoke.offline.tokens": "false",
"saml.server.signature": "false",
"saml.server.signature.keyinfo.ext": "false",
"exclude.session.state.from.auth.response": "false",
"backchannel.logout.session.required": "true",
"client_credentials.use_refresh_token": "false",
"saml_force_name_id_format": "false",
"saml.client.signature": "false",
"tls.client.certificate.bound.access.tokens": "false",
"saml.authnstatement": "false",
"display.on.consent.screen": "false",
"saml.onetimeuse.condition": "false"
},
"authenticationFlowBindingOverrides": {},
"fullScopeAllowed": true,
"nodeReRegistrationTimeout": -1,
"defaultClientScopes": [
"web-origins",
"profile",
"roles",
"groups",
"basic",
"email"
],
"optionalClientScopes": [
"address",
"phone",
"offline_access",
"microprofile-jwt"
],
"access": {
"view": true,
"configure": true,
"manage": true
}
}
@@ -1,72 +0,0 @@
{
"clientId": "web",
"name": "",
"description": "",
"rootUrl": "https://ocis.owncloud.test",
"adminUrl": "https://ocis.owncloud.test",
"baseUrl": "",
"surrogateAuthRequired": false,
"enabled": true,
"alwaysDisplayInConsole": false,
"clientAuthenticatorType": "client-secret",
"redirectUris": [
"https://ocis.owncloud.test/*"
],
"webOrigins": [
"https://ocis.owncloud.test"
],
"notBefore": 0,
"bearerOnly": false,
"consentRequired": false,
"standardFlowEnabled": true,
"implicitFlowEnabled": false,
"directAccessGrantsEnabled": true,
"serviceAccountsEnabled": false,
"publicClient": true,
"frontchannelLogout": false,
"protocol": "openid-connect",
"attributes": {
"saml.assertion.signature": "false",
"saml.force.post.binding": "false",
"saml.multivalued.roles": "false",
"saml.encrypt": "false",
"post.logout.redirect.uris": "+",
"oauth2.device.authorization.grant.enabled": "false",
"backchannel.logout.revoke.offline.tokens": "false",
"saml.server.signature": "false",
"saml.server.signature.keyinfo.ext": "false",
"exclude.session.state.from.auth.response": "false",
"oidc.ciba.grant.enabled": "false",
"backchannel.logout.url": "https://ocis.owncloud.test/backchannel_logout",
"backchannel.logout.session.required": "true",
"client_credentials.use_refresh_token": "false",
"saml_force_name_id_format": "false",
"saml.client.signature": "false",
"tls.client.certificate.bound.access.tokens": "false",
"saml.authnstatement": "false",
"display.on.consent.screen": "false",
"saml.onetimeuse.condition": "false"
},
"authenticationFlowBindingOverrides": {},
"fullScopeAllowed": true,
"nodeReRegistrationTimeout": -1,
"defaultClientScopes": [
"web-origins",
"profile",
"roles",
"groups",
"basic",
"email"
],
"optionalClientScopes": [
"address",
"phone",
"offline_access",
"microprofile-jwt"
],
"access": {
"view": true,
"configure": true,
"manage": true
}
}
@@ -1,8 +0,0 @@
#!/bin/bash
printenv
# replace oCIS domain in keycloak realm import
mkdir /opt/keycloak/data/import
sed -e "s/ocis.owncloud.test/${OCIS_DOMAIN}/g" /opt/keycloak/data/import-dist/ocis-realm.json > /opt/keycloak/data/import/oCIS-realm.json
# run original docker-entrypoint
/opt/keycloak/bin/kc.sh "$@"
File diff suppressed because it is too large. Load diff
@@ -7,8 +7,6 @@ directives:
- 'https://${COMPANION_DOMAIN|companion.owncloud.test}/'
- 'wss://${COMPANION_DOMAIN|companion.owncloud.test}/'
- 'https://raw.githubusercontent.com/owncloud/awesome-ocis/'
# In contrary to bash and docker the default is given after the | character
- 'https://${KEYCLOAK_DOMAIN|keycloak.owncloud.test}/'
# Photo-addon: OpenStreetMap tile requests
- 'https://*.tile.openstreetmap.org'
default-src:
@@ -1,7 +1,7 @@
---
services:
traefik:
image: traefik:${TRAEFIK_DOCKER_TAG}
image: traefik:${TRAEFIK_DOCKER_TAG:-latest}
networks:
ocis-net:
command:
@@ -1,78 +0,0 @@
---
services:
traefik:
networks:
ocis-net:
aliases:
- ${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}
ocis:
environment:
# Keycloak IDP specific configuration
PROXY_AUTOPROVISION_ACCOUNTS: "true"
PROXY_ROLE_ASSIGNMENT_DRIVER: "oidc"
OCIS_OIDC_ISSUER: https://${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}/realms/${KEYCLOAK_REALM:-oCIS}
PROXY_OIDC_REWRITE_WELLKNOWN: "true"
WEB_OIDC_CLIENT_ID: ${OCIS_OIDC_CLIENT_ID:-web}
PROXY_USER_OIDC_CLAIM: "preferred_username"
PROXY_USER_CS3_CLAIM: "username"
OCIS_EXCLUDE_RUN_SERVICES: "idp"
GRAPH_ASSIGN_DEFAULT_USER_ROLE: "false"
GRAPH_USERNAME_MATCH: "none"
KEYCLOAK_DOMAIN: ${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}
WEB_OIDC_SCOPE: "openid profile email acr"
postgres:
image: postgres:alpine
networks:
ocis-net:
volumes:
- keycloak_postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: keycloak
logging:
driver: ${LOG_DRIVER:-local}
restart: always
keycloak:
image: quay.io/keycloak/keycloak:${KEYCLOAK_DOCKER_TAG}
networks:
ocis-net:
command: ["start", "--spi-connections-http-client-default-disable-trust-manager=${INSECURE:-false}", "--import-realm"]
entrypoint: ["/bin/sh", "/opt/keycloak/bin/docker-entrypoint-override.sh"]
volumes:
- "./config/keycloak/docker-entrypoint-override.sh:/opt/keycloak/bin/docker-entrypoint-override.sh"
- "./config/keycloak/ocis-realm.dist.json:/opt/keycloak/data/import-dist/ocis-realm.json"
environment:
OCIS_DOMAIN: ${OCIS_DOMAIN:-ocis.owncloud.test}
KC_HOSTNAME: ${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}
KC_DB: postgres
KC_DB_URL: "jdbc:postgresql://postgres:5432/keycloak"
KC_DB_USERNAME: keycloak
KC_DB_PASSWORD: keycloak
KC_FEATURES: impersonation,opentelemetry
KC_BOOTSTRAP_ADMIN_USERNAME: ${KEYCLOAK_ADMIN_USER:-admin}
KC_BOOTSTRAP_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD:-admin}
# as replacement of --proxy=edge
KC_PROXY_HEADERS: xforwarded
KC_HTTP_ENABLED: true
# tracing
KC_TRACING_ENABLED: ${KEYCLOAK_TRACING:-false}
KC_TRACING_ENDPOINT: http://jaeger:4317
labels:
- "traefik.enable=true"
- "traefik.http.routers.keycloak.entrypoints=https"
- "traefik.http.routers.keycloak.rule=Host(`${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}`)"
- "traefik.http.routers.keycloak.tls.certresolver=http"
- "traefik.http.routers.keycloak.service=keycloak"
- "traefik.http.services.keycloak.loadbalancer.server.port=8080"
depends_on:
- postgres
logging:
driver: ${LOG_DRIVER:-local}
restart: always
volumes:
keycloak_postgres_data:
@@ -8,7 +8,7 @@ services:
NOTIFICATIONS_SMTP_INSECURE: "true"
mailserver:
image: axllent/mailpit:${MAIL_SERVER_DOCKER_TAG}
image: axllent/mailpit:${MAIL_SERVER_DOCKER_TAG:-latest}
networks:
- ocis-net
ports:
+1 -1
View File
@@ -1,7 +1,7 @@
---
services:
minio:
image: minio/minio:${MINIO_DOCKER_TAG}
image: minio/minio:latest
# release notes: https://github.com/minio/minio/releases
networks:
ocis-net:
+1 -1
View File
@@ -6,7 +6,7 @@ services:
aliases:
- ${OCIS_DOMAIN:-ocis.owncloud.test}
ocis:
image: ${OCIS_DOCKER_IMAGE:-owncloud/ocis}:${OCIS_DOCKER_TAG}
image: ${OCIS_DOCKER_IMAGE:-owncloud/ocis}:${OCIS_DOCKER_TAG:-latest}
# changelog: https://github.com/owncloud/ocis/tree/master/changelog
# release notes: https://doc.owncloud.com/ocis_release_notes.html
networks:
@@ -7,7 +7,7 @@ services:
- ${ONLYOFFICE_DOMAIN:-onlyoffice.owncloud.test}
collaboration-oo:
image: ${OCIS_DOCKER_IMAGE:-owncloud/ocis}:${OCIS_DOCKER_TAG}
image: ${OCIS_DOCKER_IMAGE:-owncloud/ocis}:${OCIS_DOCKER_TAG:-latest}
networks:
ocis-net:
depends_on:
@@ -45,7 +45,7 @@ services:
onlyoffice:
# note, you also need to add a volume when using the enterprise version, see below
image: ${ONLYOFFICE_IMAGE:-onlyoffice/documentserver}:${ONLYOFFICE_DOCKER_TAG}
image: ${ONLYOFFICE_IMAGE:-onlyoffice/documentserver}:${ONLYOFFICE_DOCKER_TAG:-latest}
networks:
ocis-net:
entrypoint:
+1 -1
View File
@@ -1,7 +1,7 @@
---
services:
tika:
image: apache/tika:${TIKA_DOCKER_TAG}
image: ${TIKA_IMAGE:-apache/tika:latest-full}
# release notes: https://tika.apache.org
networks:
ocis-net:
@@ -6,7 +6,7 @@ services:
condition: service_completed_successfully
advanced-search-init:
image: owncloud/web-extensions:advanced-search-0.2.0
image: owncloud/web-extensions:advanced-search-0.1.0
user: root
volumes:
- ocis-apps:/apps
@@ -6,7 +6,7 @@ services:
condition: service_completed_successfully
photo-addon-init:
image: owncloud/web-extensions:photo-addon-0.2.0
image: owncloud/web-extensions:photo-addon-0.1.0
user: root
volumes:
- ocis-apps:/apps
+3
View File
@@ -41,3 +41,6 @@ KEYCLOAK_TRACING=
# you need uncomment following line. Please see documentation at
# https://owncloud.dev/ocis/deployment/monitoring-tracing/
#COMPOSE_FILE=docker-compose.yml:monitoring_tracing/docker-compose-additions.yml
# To add vault support to this stack, uncomment the following line:
#COMPOSE_FILE=docker-compose.yml:vault.yml
@@ -4,3 +4,16 @@ document this deployment example in: docs/ocis/deployment/ocis_keycloak.md
Please refer to [our documentation](https://owncloud.dev/ocis/deployment/ocis_keycloak/)
for instructions on how to deploy this scenario.
## Vault
Adds vault sidecar services (`graph-vault`, `storage-users-vault`) to `ocis_keycloak`.
### Running
Uncomment in `.env` or run directly:
```bash
docker compose -f docker-compose.yml -f vault.yml up -d
```
@@ -2277,7 +2277,7 @@
"requirement": "REQUIRED",
"priority": 1,
"autheticatorFlow": false,
"userSetupAllowed": false
"userSetupAllowed": true
}
]
},
@@ -83,11 +83,13 @@ services:
KEYCLOAK_DOMAIN: ${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}
OCIS_MFA_ENABLED: ${OCIS_MFA_ENABLED:-false}
WEB_OIDC_SCOPE: "openid profile email acr"
# WEB_ASSET_CORE_PATH: /web/dist # local web dist
volumes:
- ./config/ocis/banned-password-list.txt:/etc/ocis/banned-password-list.txt
- ./config/ocis/csp.yaml:/etc/ocis/csp.yaml
- ocis-config:/etc/ocis
- ocis-data:/var/lib/ocis
# - /Users/mk/dev/kiteworks/web/dist:/web/dist # local web dist
labels:
- "traefik.enable=true"
- "traefik.http.routers.ocis.entrypoints=https"
@@ -109,6 +111,11 @@ services:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: keycloak
healthcheck:
test: ["CMD-SHELL", "pg_isready -U keycloak"]
interval: 5s
timeout: 5s
retries: 10
logging:
driver: ${LOG_DRIVER:-local}
restart: always
@@ -138,6 +145,13 @@ services:
# tracing
KC_TRACING_ENABLED: ${KEYCLOAK_TRACING:-false}
KC_TRACING_ENDPOINT: http://jaeger:4317
KC_HEALTH_ENABLED: "true"
healthcheck:
test: ["CMD-SHELL", "exec 3<>/dev/tcp/localhost/9000 && echo -e 'GET /health/ready HTTP/1.0\\r\\n\\r\\n' >&3 && grep -q '\"status\": \"UP\"' <&3"]
interval: 10s
timeout: 5s
retries: 18
start_period: 30s
labels:
- "traefik.enable=true"
- "traefik.http.routers.keycloak.entrypoints=https"
@@ -146,7 +160,8 @@ services:
- "traefik.http.routers.keycloak.service=keycloak"
- "traefik.http.services.keycloak.loadbalancer.server.port=8080"
depends_on:
- postgres
postgres:
condition: service_healthy
logging:
driver: ${LOG_DRIVER:-local}
restart: always
@@ -0,0 +1,48 @@
---
version: "3.7"
services:
ocis:
environment:
# Vault: expose internal services so sidecar containers can reach them
NATS_NATS_HOST: 0.0.0.0
OCIS_GATEWAY_GRPC_ADDR: 0.0.0.0:9142
# Vault: auto-create vault home space on first user login
PROXY_CREATE_VAULT_HOME: "true"
GRAPH_ENABLE_VAULT_MODE: "true"
# MFA: guard Admin Settings with step-up auth (LOA2)
# OCIS_MFA_ENABLED: "true"
storage-users-vault:
image: ${OCIS_DOCKER_IMAGE:-owncloud/ocis}:${OCIS_DOCKER_TAG:-latest}
networks:
ocis-net:
depends_on:
ocis:
condition: service_started
command: ["storage-users", "server"]
environment:
OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-info}
OCIS_LOG_COLOR: "${OCIS_LOG_COLOR:-false}"
OCIS_GATEWAY_GRPC_ADDR: ocis:9142
STORAGE_USERS_ENABLE_VAULT_MODE: "true"
STORAGE_USERS_SERVICE_NAME: storage-users-vault
STORAGE_USERS_GRPC_ADDR: 0.0.0.0:9170
STORAGE_USERS_HTTP_ADDR: 0.0.0.0:9168
STORAGE_USERS_DATA_SERVER_URL: http://storage-users-vault:9168/data
STORAGE_USERS_DEBUG_ADDR: 0.0.0.0:9169
STORAGE_USERS_OCIS_ROOT: /var/lib/ocis/storage/users-vault
STORAGE_USERS_EVENTS_CONSUMER_GROUP: vault-dcfs
MICRO_REGISTRY_ADDRESS: ocis:9233
OCIS_EVENTS_ENDPOINT: ocis:9233
OCIS_CACHE_STORE_NODES: ocis:9233
OCIS_INSECURE: "${INSECURE:-false}"
volumes:
- ocis-data:/var/lib/ocis
- ocis-config:/etc/ocis
logging:
driver: ${LOG_DRIVER:-local}
restart: always
networks:
ocis-net:
+128 -126
View File
@@ -7912,7 +7912,7 @@ OCIS_ASYNC_UPLOADS:
removalVersion: ""
deprecationInfo: ""
OCIS_CACHE_AUTH_PASSWORD:
name: OCIS_CACHE_AUTH_PASSWORD;GRAPH_CACHE_AUTH_PASSWORD
name: OCIS_CACHE_AUTH_PASSWORD;SETTINGS_CACHE_AUTH_PASSWORD
defaultValue: ""
type: string
description: The password to authenticate with the cache. Only applies when store
@@ -7922,7 +7922,7 @@ OCIS_CACHE_AUTH_PASSWORD:
removalVersion: ""
deprecationInfo: ""
OCIS_CACHE_AUTH_USERNAME:
name: OCIS_CACHE_AUTH_USERNAME;GRAPH_CACHE_AUTH_USERNAME
name: OCIS_CACHE_AUTH_USERNAME;SETTINGS_CACHE_AUTH_USERNAME
defaultValue: ""
type: string
description: The username to authenticate with the cache. Only applies when store
@@ -7933,7 +7933,7 @@ OCIS_CACHE_AUTH_USERNAME:
deprecationInfo: ""
OCIS_CACHE_DATABASE:
name: OCIS_CACHE_DATABASE
defaultValue: cache-userinfo
defaultValue: settings-cache
type: string
description: The database name the configured store should use.
introductionVersion: pre5.0
@@ -7941,7 +7941,7 @@ OCIS_CACHE_DATABASE:
removalVersion: ""
deprecationInfo: ""
OCIS_CACHE_DISABLE_PERSISTENCE:
name: OCIS_CACHE_DISABLE_PERSISTENCE;GRAPH_CACHE_DISABLE_PERSISTENCE
name: OCIS_CACHE_DISABLE_PERSISTENCE;SETTINGS_CACHE_DISABLE_PERSISTENCE
defaultValue: "false"
type: bool
description: Disables persistence of the cache. Only applies when store type 'nats-js-kv'
@@ -7951,7 +7951,7 @@ OCIS_CACHE_DISABLE_PERSISTENCE:
removalVersion: ""
deprecationInfo: ""
OCIS_CACHE_STORE:
name: OCIS_CACHE_STORE;GRAPH_CACHE_STORE
name: OCIS_CACHE_STORE;SETTINGS_CACHE_STORE
defaultValue: memory
type: string
description: 'The type of the cache store. Supported values are: ''memory'', ''redis-sentinel'',
@@ -7961,11 +7961,11 @@ OCIS_CACHE_STORE:
removalVersion: ""
deprecationInfo: ""
OCIS_CACHE_STORE_NODES:
name: OCIS_CACHE_STORE_NODES;GRAPH_CACHE_STORE_NODES
name: OCIS_CACHE_STORE_NODES;SETTINGS_CACHE_STORE_NODES
defaultValue: '[127.0.0.1:9233]'
type: '[]string'
description: A list of nodes to access the configured store. This has no effect
when 'memory' store are configured. Note that the behaviour how nodes are used
when 'memory' store is configured. Note that the behaviour how nodes are used
is dependent on the library of the configured store. See the Environment Variable
Types description for more details.
introductionVersion: pre5.0
@@ -7973,11 +7973,12 @@ OCIS_CACHE_STORE_NODES:
removalVersion: ""
deprecationInfo: ""
OCIS_CACHE_TTL:
name: OCIS_CACHE_TTL;GRAPH_CACHE_TTL
defaultValue: 336h0m0s
name: OCIS_CACHE_TTL;SETTINGS_CACHE_TTL
defaultValue: 10m0s
type: Duration
description: Time to live for cache records in the graph. Defaults to '336h' (2
weeks). See the Environment Variable Types description for more details.
description: Default time to live for entries in the cache. Only applied when access
tokens has no expiration. See the Environment Variable Types description for more
details.
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
@@ -8020,46 +8021,45 @@ OCIS_CLAIM_MANAGED_SPACES_REGEXP:
removalVersion: ""
deprecationInfo: ""
OCIS_CORS_ALLOW_CREDENTIALS:
name: OCIS_CORS_ALLOW_CREDENTIALS;THUMBNAILS_CORS_ALLOW_CREDENTIALS
name: OCIS_CORS_ALLOW_CREDENTIALS;SETTINGS_CORS_ALLOW_CREDENTIALS
defaultValue: "true"
type: bool
description: 'Allow credentials for CORS.See following chapter for more details:
*Access-Control-Allow-Credentials* at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials.'
introductionVersion: "6.0"
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_CORS_ALLOW_HEADERS:
name: OCIS_CORS_ALLOW_HEADERS;THUMBNAILS_CORS_ALLOW_HEADERS
defaultValue: '[Authorization Origin Content-Type Accept X-Requested-With X-Request-Id
Cache-Control]'
name: OCIS_CORS_ALLOW_HEADERS;SETTINGS_CORS_ALLOW_HEADERS
defaultValue: '[Authorization Origin Content-Type Accept X-Requested-With X-Request-Id]'
type: '[]string'
description: 'A list of allowed CORS headers. See following chapter for more details:
*Access-Control-Request-Headers* at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Request-Headers.
See the Environment Variable Types description for more details.'
introductionVersion: "6.0"
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_CORS_ALLOW_METHODS:
name: OCIS_CORS_ALLOW_METHODS;THUMBNAILS_CORS_ALLOW_METHODS
name: OCIS_CORS_ALLOW_METHODS;SETTINGS_CORS_ALLOW_METHODS
defaultValue: '[GET POST PUT PATCH DELETE OPTIONS]'
type: '[]string'
description: 'A list of allowed CORS methods. See following chapter for more details:
*Access-Control-Request-Method* at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Request-Method.
See the Environment Variable Types description for more details.'
introductionVersion: "6.0"
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_CORS_ALLOW_ORIGINS:
name: OCIS_CORS_ALLOW_ORIGINS;THUMBNAILS_CORS_ALLOW_ORIGINS
name: OCIS_CORS_ALLOW_ORIGINS;SETTINGS_CORS_ALLOW_ORIGINS
defaultValue: '[*]'
type: '[]string'
description: 'A list of allowed CORS origins. See following chapter for more details:
*Access-Control-Allow-Origin* at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin.
See the Environment Variable Types description for more details.'
introductionVersion: "6.0"
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
@@ -8176,36 +8176,38 @@ OCIS_ENABLE_OCM:
removalVersion: ""
deprecationInfo: ""
OCIS_EVENTS_AUTH_PASSWORD:
name: OCIS_EVENTS_AUTH_PASSWORD;SHARING_EVENTS_AUTH_PASSWORD
name: OCIS_EVENTS_AUTH_PASSWORD;SSE_EVENTS_AUTH_PASSWORD
defaultValue: ""
type: string
description: Password for the events broker.
description: The password to authenticate with the events broker. The events broker
is the ocis service which receives and delivers events between the services.
introductionVersion: "5.0"
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_EVENTS_AUTH_USERNAME:
name: OCIS_EVENTS_AUTH_USERNAME;SHARING_EVENTS_AUTH_USERNAME
name: OCIS_EVENTS_AUTH_USERNAME;SSE_EVENTS_AUTH_USERNAME
defaultValue: ""
type: string
description: Username for the events broker.
description: The username to authenticate with the events broker. The events broker
is the ocis service which receives and delivers events between the services.
introductionVersion: "5.0"
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_EVENTS_CLUSTER:
name: OCIS_EVENTS_CLUSTER;SHARING_EVENTS_CLUSTER
name: OCIS_EVENTS_CLUSTER;SSE_EVENTS_CLUSTER
defaultValue: ocis-cluster
type: string
description: The clusterID of the event system. The event system is the message
queuing service. It is used as message broker for the microservice architecture.
Mandatory when using NATS as event system.
introductionVersion: pre5.0
introductionVersion: "5.0"
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_EVENTS_ENABLE_TLS:
name: OCIS_EVENTS_ENABLE_TLS;SHARING_EVENTS_ENABLE_TLS
name: OCIS_EVENTS_ENABLE_TLS;NATS_EVENTS_ENABLE_TLS
defaultValue: "false"
type: bool
description: Enable TLS for the connection to the events broker. The events broker
@@ -8215,22 +8217,22 @@ OCIS_EVENTS_ENABLE_TLS:
removalVersion: ""
deprecationInfo: ""
OCIS_EVENTS_ENDPOINT:
name: OCIS_EVENTS_ENDPOINT;SHARING_EVENTS_ENDPOINT
name: OCIS_EVENTS_ENDPOINT;SSE_EVENTS_ENDPOINT
defaultValue: 127.0.0.1:9233
type: string
description: The address of the event system. The event system is the message queuing
service. It is used as message broker for the microservice architecture.
introductionVersion: pre5.0
introductionVersion: "5.0"
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE:
name: OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE;SHARING_EVENTS_TLS_ROOT_CA_CERTIFICATE
name: OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE;SSE_EVENTS_TLS_ROOT_CA_CERTIFICATE
defaultValue: ""
type: string
description: The root CA certificate used to validate the server's TLS certificate.
If provided SHARING_EVENTS_TLS_INSECURE will be seen as false.
introductionVersion: pre5.0
If provided SSE_EVENTS_TLS_INSECURE will be seen as false.
introductionVersion: "5.0"
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
@@ -8267,7 +8269,7 @@ OCIS_GRPC_CLIENT_TLS_MODE:
removalVersion: ""
deprecationInfo: ""
OCIS_GRPC_PROTOCOL:
name: OCIS_GRPC_PROTOCOL;SHARING_GRPC_PROTOCOL
name: OCIS_GRPC_PROTOCOL;APP_REGISTRY_GRPC_PROTOCOL
defaultValue: ""
type: string
description: The transport protocol of the GRPC service.
@@ -8307,16 +8309,17 @@ OCIS_HTTP_TLS_KEY:
removalVersion: ""
deprecationInfo: ""
OCIS_INSECURE:
name: OCIS_INSECURE;SHARING_EVENTS_TLS_INSECURE
name: OCIS_INSECURE;NATS_TLS_SKIP_VERIFY_CLIENT_CERT
defaultValue: "false"
type: bool
description: Whether to verify the server TLS certificates.
description: Whether the NATS server should skip the client certificate verification
during the TLS handshake.
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_JWT_SECRET:
name: OCIS_JWT_SECRET;SHARING_JWT_SECRET
name: OCIS_JWT_SECRET;APP_REGISTRY_JWT_SECRET
defaultValue: ""
type: string
description: The secret to mint and validate jwt tokens.
@@ -8380,7 +8383,7 @@ OCIS_KEYCLOAK_USER_REALM:
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_BIND_DN:
name: OCIS_LDAP_BIND_DN;AUTH_BASIC_LDAP_BIND_DN
name: OCIS_LDAP_BIND_DN;USERS_LDAP_BIND_DN
defaultValue: uid=reva,ou=sysusers,o=libregraph-idm
type: string
description: LDAP DN to use for simple bind authentication with the target LDAP
@@ -8390,7 +8393,7 @@ OCIS_LDAP_BIND_DN:
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_BIND_PASSWORD:
name: OCIS_LDAP_BIND_PASSWORD;AUTH_BASIC_LDAP_BIND_PASSWORD
name: OCIS_LDAP_BIND_PASSWORD;USERS_LDAP_BIND_PASSWORD
defaultValue: ""
type: string
description: Password to use for authenticating the 'bind_dn'.
@@ -8399,7 +8402,7 @@ OCIS_LDAP_BIND_PASSWORD:
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_CACERT:
name: OCIS_LDAP_CACERT;AUTH_BASIC_LDAP_CACERT
name: OCIS_LDAP_CACERT;USERS_LDAP_CACERT
defaultValue: /var/lib/ocis/idm/ldap.crt
type: string
description: Path/File name for the root CA certificate (in PEM format) used to
@@ -8420,7 +8423,7 @@ OCIS_LDAP_CROSS_INSTANCE_REFERENCE_TEMPLATE:
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_DISABLE_USER_MECHANISM:
name: OCIS_LDAP_DISABLE_USER_MECHANISM;AUTH_BASIC_DISABLE_USER_MECHANISM
name: OCIS_LDAP_DISABLE_USER_MECHANISM;USERS_LDAP_DISABLE_USER_MECHANISM
defaultValue: attribute
type: string
description: An option to control the behavior for disabling users. Valid options
@@ -8433,7 +8436,7 @@ OCIS_LDAP_DISABLE_USER_MECHANISM:
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_DISABLED_USERS_GROUP_DN:
name: OCIS_LDAP_DISABLED_USERS_GROUP_DN;AUTH_BASIC_DISABLED_USERS_GROUP_DN
name: OCIS_LDAP_DISABLED_USERS_GROUP_DN;USERS_LDAP_DISABLED_USERS_GROUP_DN
defaultValue: cn=DisabledUsersGroup,ou=groups,o=libregraph-idm
type: string
description: The distinguished name of the group to which added users will be classified
@@ -8453,7 +8456,7 @@ OCIS_LDAP_GROUP_AFFILIATION_ATTRIBUTE:
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_GROUP_BASE_DN:
name: OCIS_LDAP_GROUP_BASE_DN;AUTH_BASIC_LDAP_GROUP_BASE_DN
name: OCIS_LDAP_GROUP_BASE_DN;USERS_LDAP_GROUP_BASE_DN
defaultValue: ou=groups,o=libregraph-idm
type: string
description: Search base DN for looking up LDAP groups.
@@ -8462,7 +8465,7 @@ OCIS_LDAP_GROUP_BASE_DN:
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_GROUP_FILTER:
name: OCIS_LDAP_GROUP_FILTER;AUTH_BASIC_LDAP_GROUP_FILTER
name: OCIS_LDAP_GROUP_FILTER;USERS_LDAP_GROUP_FILTER
defaultValue: ""
type: string
description: LDAP filter to add to the default filters for group searches.
@@ -8471,17 +8474,17 @@ OCIS_LDAP_GROUP_FILTER:
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_GROUP_OBJECTCLASS:
name: OCIS_LDAP_GROUP_OBJECTCLASS;AUTH_BASIC_LDAP_GROUP_OBJECTCLASS
name: OCIS_LDAP_GROUP_OBJECTCLASS;USERS_LDAP_GROUP_OBJECTCLASS
defaultValue: groupOfNames
type: string
description: The object class to use for groups in the default group search filter
('groupOfNames').
like 'groupOfNames'.
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_GROUP_SCHEMA_DISPLAYNAME:
name: OCIS_LDAP_GROUP_SCHEMA_DISPLAYNAME;AUTH_BASIC_LDAP_GROUP_SCHEMA_DISPLAYNAME
name: OCIS_LDAP_GROUP_SCHEMA_DISPLAYNAME;USERS_LDAP_GROUP_SCHEMA_DISPLAYNAME
defaultValue: cn
type: string
description: LDAP Attribute to use for the displayname of groups (often the same
@@ -8491,7 +8494,7 @@ OCIS_LDAP_GROUP_SCHEMA_DISPLAYNAME:
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_GROUP_SCHEMA_GROUPNAME:
name: OCIS_LDAP_GROUP_SCHEMA_GROUPNAME;AUTH_BASIC_LDAP_GROUP_SCHEMA_GROUPNAME
name: OCIS_LDAP_GROUP_SCHEMA_GROUPNAME;USERS_LDAP_GROUP_SCHEMA_GROUPNAME
defaultValue: cn
type: string
description: LDAP Attribute to use for the name of groups.
@@ -8500,28 +8503,28 @@ OCIS_LDAP_GROUP_SCHEMA_GROUPNAME:
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_GROUP_SCHEMA_ID:
name: OCIS_LDAP_GROUP_SCHEMA_ID;AUTH_BASIC_LDAP_GROUP_SCHEMA_ID
name: OCIS_LDAP_GROUP_SCHEMA_ID;USERS_LDAP_GROUP_SCHEMA_ID
defaultValue: ownclouduuid
type: string
description: LDAP Attribute to use as the unique id for groups. This should be a
stable globally unique id (e.g. a UUID).
description: LDAP Attribute to use as the unique ID for groups. This should be a
stable globally unique ID like a UUID.
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_GROUP_SCHEMA_ID_IS_OCTETSTRING:
name: OCIS_LDAP_GROUP_SCHEMA_ID_IS_OCTETSTRING;AUTH_BASIC_LDAP_GROUP_SCHEMA_ID_IS_OCTETSTRING
name: OCIS_LDAP_GROUP_SCHEMA_ID_IS_OCTETSTRING;USERS_LDAP_GROUP_SCHEMA_ID_IS_OCTETSTRING
defaultValue: "false"
type: bool
description: Set this to true if the defined 'id' attribute for groups is of the
'OCTETSTRING' syntax. This is e.g. required when using the 'objectGUID' attribute
of Active Directory for the group IDs.
of Active Directory for the group ID's.
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_GROUP_SCHEMA_MAIL:
name: OCIS_LDAP_GROUP_SCHEMA_MAIL;AUTH_BASIC_LDAP_GROUP_SCHEMA_MAIL
name: OCIS_LDAP_GROUP_SCHEMA_MAIL;USERS_LDAP_GROUP_SCHEMA_MAIL
defaultValue: mail
type: string
description: LDAP Attribute to use for the email address of groups (can be empty).
@@ -8530,7 +8533,7 @@ OCIS_LDAP_GROUP_SCHEMA_MAIL:
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_GROUP_SCHEMA_MEMBER:
name: OCIS_LDAP_GROUP_SCHEMA_MEMBER;AUTH_BASIC_LDAP_GROUP_SCHEMA_MEMBER
name: OCIS_LDAP_GROUP_SCHEMA_MEMBER;USERS_LDAP_GROUP_SCHEMA_MEMBER
defaultValue: member
type: string
description: LDAP Attribute that is used for group members.
@@ -8539,7 +8542,7 @@ OCIS_LDAP_GROUP_SCHEMA_MEMBER:
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_GROUP_SCOPE:
name: OCIS_LDAP_GROUP_SCOPE;AUTH_BASIC_LDAP_GROUP_SCOPE
name: OCIS_LDAP_GROUP_SCOPE;USERS_LDAP_GROUP_SCOPE
defaultValue: sub
type: string
description: LDAP search scope to use when looking up groups. Supported values are
@@ -8549,7 +8552,7 @@ OCIS_LDAP_GROUP_SCOPE:
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_INSECURE:
name: OCIS_LDAP_INSECURE;AUTH_BASIC_LDAP_INSECURE
name: OCIS_LDAP_INSECURE;USERS_LDAP_INSECURE
defaultValue: "false"
type: bool
description: Disable TLS certificate validation for the LDAP connections. Do not
@@ -8629,7 +8632,7 @@ OCIS_LDAP_SERVER_WRITE_ENABLED:
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_URI:
name: OCIS_LDAP_URI;AUTH_BASIC_LDAP_URI
name: OCIS_LDAP_URI;USERS_LDAP_URI
defaultValue: ldaps://localhost:9235
type: string
description: URI of the LDAP Server to connect to. Supported URI schemes are 'ldaps://'
@@ -8639,7 +8642,7 @@ OCIS_LDAP_URI:
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_USER_BASE_DN:
name: OCIS_LDAP_USER_BASE_DN;AUTH_BASIC_LDAP_USER_BASE_DN
name: OCIS_LDAP_USER_BASE_DN;USERS_LDAP_USER_BASE_DN
defaultValue: ou=users,o=libregraph-idm
type: string
description: Search base DN for looking up LDAP users.
@@ -8648,7 +8651,7 @@ OCIS_LDAP_USER_BASE_DN:
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_USER_ENABLED_ATTRIBUTE:
name: OCIS_LDAP_USER_ENABLED_ATTRIBUTE;AUTH_BASIC_LDAP_USER_ENABLED_ATTRIBUTE
name: OCIS_LDAP_USER_ENABLED_ATTRIBUTE;USERS_LDAP_USER_ENABLED_ATTRIBUTE
defaultValue: ownCloudUserEnabled
type: string
description: LDAP attribute to use as a flag telling if the user is enabled or disabled.
@@ -8657,7 +8660,7 @@ OCIS_LDAP_USER_ENABLED_ATTRIBUTE:
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_USER_FILTER:
name: OCIS_LDAP_USER_FILTER;AUTH_BASIC_LDAP_USER_FILTER
name: OCIS_LDAP_USER_FILTER;USERS_LDAP_USER_FILTER
defaultValue: ""
type: string
description: LDAP filter to add to the default filters for user search like '(objectclass=ownCloud)'.
@@ -8686,24 +8689,24 @@ OCIS_LDAP_USER_MEMBER_ATTRIBUTE:
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_USER_OBJECTCLASS:
name: OCIS_LDAP_USER_OBJECTCLASS;AUTH_BASIC_LDAP_USER_OBJECTCLASS
name: OCIS_LDAP_USER_OBJECTCLASS;USERS_LDAP_USER_OBJECTCLASS
defaultValue: inetOrgPerson
type: string
description: The object class to use for users in the default user search filter
('inetOrgPerson').
like 'inetOrgPerson'.
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_USER_SCHEMA_DISPLAYNAME:
name: OCIS_LDAP_USER_SCHEMA_DISPLAYNAME;AUTH_BASIC_LDAP_USER_SCHEMA_DISPLAYNAME
name: OCIS_LDAP_USER_SCHEMA_DISPLAYNAME;USERS_LDAP_USER_SCHEMA_DISPLAYNAME
defaultValue: displayname
type: string
description: LDAP Attribute to use for the displayname of users.
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: 'LDAP_USER_SCHEMA_DISPLAY_NAME changing name for consistency | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '
deprecationInfo: 'LDAP_USER_SCHEMA_DISPLAY_NAME changing name for consistency | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '
OCIS_LDAP_USER_SCHEMA_EXTERNAL_ID:
name: OCIS_LDAP_USER_SCHEMA_EXTERNAL_ID;GRAPH_LDAP_EXTERNAL_ID_ATTRIBUTE
defaultValue: owncloudExternalID
@@ -8716,7 +8719,7 @@ OCIS_LDAP_USER_SCHEMA_EXTERNAL_ID:
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_USER_SCHEMA_ID:
name: OCIS_LDAP_USER_SCHEMA_ID;AUTH_BASIC_LDAP_USER_SCHEMA_ID
name: OCIS_LDAP_USER_SCHEMA_ID;USERS_LDAP_USER_SCHEMA_ID
defaultValue: ownclouduuid
type: string
description: LDAP Attribute to use as the unique ID for users. This should be a
@@ -8726,18 +8729,18 @@ OCIS_LDAP_USER_SCHEMA_ID:
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_USER_SCHEMA_ID_IS_OCTETSTRING:
name: OCIS_LDAP_USER_SCHEMA_ID_IS_OCTETSTRING;AUTH_BASIC_LDAP_USER_SCHEMA_ID_IS_OCTETSTRING
name: OCIS_LDAP_USER_SCHEMA_ID_IS_OCTETSTRING;USERS_LDAP_USER_SCHEMA_ID_IS_OCTETSTRING
defaultValue: "false"
type: bool
description: Set this to true if the defined 'ID' attribute for users is of the
'OCTETSTRING' syntax. This is e.g. required when using the 'objectGUID' attribute
of Active Directory for the user IDs.
of Active Directory for the user ID's.
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_USER_SCHEMA_MAIL:
name: OCIS_LDAP_USER_SCHEMA_MAIL;AUTH_BASIC_LDAP_USER_SCHEMA_MAIL
name: OCIS_LDAP_USER_SCHEMA_MAIL;USERS_LDAP_USER_SCHEMA_MAIL
defaultValue: mail
type: string
description: LDAP Attribute to use for the email address of users.
@@ -8746,7 +8749,7 @@ OCIS_LDAP_USER_SCHEMA_MAIL:
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_USER_SCHEMA_USER_TYPE:
name: OCIS_LDAP_USER_SCHEMA_USER_TYPE;GRAPH_LDAP_USER_TYPE_ATTRIBUTE
name: OCIS_LDAP_USER_SCHEMA_USER_TYPE;USERS_LDAP_USER_TYPE_ATTRIBUTE
defaultValue: ownCloudUserType
type: string
description: LDAP Attribute to distinguish between 'Member' and 'Guest' users. Default
@@ -8756,7 +8759,7 @@ OCIS_LDAP_USER_SCHEMA_USER_TYPE:
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_USER_SCHEMA_USERNAME:
name: OCIS_LDAP_USER_SCHEMA_USERNAME;AUTH_BASIC_LDAP_USER_SCHEMA_USERNAME
name: OCIS_LDAP_USER_SCHEMA_USERNAME;USERS_LDAP_USER_SCHEMA_USERNAME
defaultValue: uid
type: string
description: LDAP Attribute to use for username of users.
@@ -8765,7 +8768,7 @@ OCIS_LDAP_USER_SCHEMA_USERNAME:
removalVersion: ""
deprecationInfo: ""
OCIS_LDAP_USER_SCOPE:
name: OCIS_LDAP_USER_SCOPE;AUTH_BASIC_LDAP_USER_SCOPE
name: OCIS_LDAP_USER_SCOPE;USERS_LDAP_USER_SCOPE
defaultValue: sub
type: string
description: LDAP search scope to use when looking up users. Supported values are
@@ -8775,7 +8778,7 @@ OCIS_LDAP_USER_SCOPE:
removalVersion: ""
deprecationInfo: ""
OCIS_LOG_COLOR:
name: OCIS_LOG_COLOR;SHARING_LOG_COLOR
name: OCIS_LOG_COLOR;APP_REGISTRY_LOG_COLOR
defaultValue: "false"
type: bool
description: Activates colorized log output.
@@ -8784,7 +8787,7 @@ OCIS_LOG_COLOR:
removalVersion: ""
deprecationInfo: ""
OCIS_LOG_FILE:
name: OCIS_LOG_FILE;SHARING_LOG_FILE
name: OCIS_LOG_FILE;APP_REGISTRY_LOG_FILE
defaultValue: ""
type: string
description: The path to the log file. Activates logging to this file if set.
@@ -8793,7 +8796,7 @@ OCIS_LOG_FILE:
removalVersion: ""
deprecationInfo: ""
OCIS_LOG_LEVEL:
name: OCIS_LOG_LEVEL;SHARING_LOG_LEVEL
name: OCIS_LOG_LEVEL;APP_REGISTRY_LOG_LEVEL
defaultValue: ""
type: string
description: 'The log level. Valid values are: ''panic'', ''fatal'', ''error'',
@@ -8803,7 +8806,7 @@ OCIS_LOG_LEVEL:
removalVersion: ""
deprecationInfo: ""
OCIS_LOG_PRETTY:
name: OCIS_LOG_PRETTY;SHARING_LOG_PRETTY
name: OCIS_LOG_PRETTY;APP_REGISTRY_LOG_PRETTY
defaultValue: "false"
type: bool
description: Activates pretty log output.
@@ -8812,7 +8815,7 @@ OCIS_LOG_PRETTY:
removalVersion: ""
deprecationInfo: ""
OCIS_MACHINE_AUTH_API_KEY:
name: OCIS_MACHINE_AUTH_API_KEY;IDP_MACHINE_AUTH_API_KEY
name: OCIS_MACHINE_AUTH_API_KEY;AUTH_MACHINE_API_KEY
defaultValue: ""
type: string
description: Machine auth API key used to validate internal requests necessary for
@@ -8822,7 +8825,7 @@ OCIS_MACHINE_AUTH_API_KEY:
removalVersion: ""
deprecationInfo: ""
OCIS_MAX_CONCURRENCY:
name: OCIS_MAX_CONCURRENCY;SHARING_USER_JSONCS3_MAX_CONCURRENCY
name: OCIS_MAX_CONCURRENCY;USERLOG_MAX_CONCURRENCY
defaultValue: "1"
type: int
description: Maximum number of concurrent go-routines. Higher values can potentially
@@ -8932,17 +8935,16 @@ OCIS_OIDC_CLIENT_ID:
removalVersion: ""
deprecationInfo: ""
OCIS_OIDC_ISSUER:
name: OCIS_URL;OCIS_OIDC_ISSUER;AUTH_BASIC_IDP_URL
name: OCIS_URL;OCIS_OIDC_ISSUER
defaultValue: https://localhost:9200
type: string
description: The identity provider value to set in the userids of the CS3 user objects
for users returned by this user provider.
description: The OIDC issuer URL to assign to the demo users.
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_PASSWORD_POLICY_BANNED_PASSWORDS_LIST:
name: OCIS_PASSWORD_POLICY_BANNED_PASSWORDS_LIST;SHARING_PASSWORD_POLICY_BANNED_PASSWORDS_LIST
name: OCIS_PASSWORD_POLICY_BANNED_PASSWORDS_LIST;FRONTEND_PASSWORD_POLICY_BANNED_PASSWORDS_LIST
defaultValue: ""
type: string
description: Path to the 'banned passwords list' file. This only impacts public
@@ -8952,7 +8954,7 @@ OCIS_PASSWORD_POLICY_BANNED_PASSWORDS_LIST:
removalVersion: ""
deprecationInfo: ""
OCIS_PASSWORD_POLICY_DISABLED:
name: OCIS_PASSWORD_POLICY_DISABLED;SHARING_PASSWORD_POLICY_DISABLED
name: OCIS_PASSWORD_POLICY_DISABLED;FRONTEND_PASSWORD_POLICY_DISABLED
defaultValue: "false"
type: bool
description: Disable the password policy. Defaults to false if not set.
@@ -8961,7 +8963,7 @@ OCIS_PASSWORD_POLICY_DISABLED:
removalVersion: ""
deprecationInfo: ""
OCIS_PASSWORD_POLICY_MIN_CHARACTERS:
name: OCIS_PASSWORD_POLICY_MIN_CHARACTERS;SHARING_PASSWORD_POLICY_MIN_CHARACTERS
name: OCIS_PASSWORD_POLICY_MIN_CHARACTERS;FRONTEND_PASSWORD_POLICY_MIN_CHARACTERS
defaultValue: "8"
type: int
description: Define the minimum password length. Defaults to 8 if not set.
@@ -8970,7 +8972,7 @@ OCIS_PASSWORD_POLICY_MIN_CHARACTERS:
removalVersion: ""
deprecationInfo: ""
OCIS_PASSWORD_POLICY_MIN_DIGITS:
name: OCIS_PASSWORD_POLICY_MIN_DIGITS;SHARING_PASSWORD_POLICY_MIN_DIGITS
name: OCIS_PASSWORD_POLICY_MIN_DIGITS;FRONTEND_PASSWORD_POLICY_MIN_DIGITS
defaultValue: "1"
type: int
description: Define the minimum number of digits. Defaults to 1 if not set.
@@ -8979,7 +8981,7 @@ OCIS_PASSWORD_POLICY_MIN_DIGITS:
removalVersion: ""
deprecationInfo: ""
OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS:
name: OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS;SHARING_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS
name: OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS;FRONTEND_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS
defaultValue: "1"
type: int
description: Define the minimum number of uppercase letters. Defaults to 1 if not
@@ -8989,7 +8991,7 @@ OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS:
removalVersion: ""
deprecationInfo: ""
OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS:
name: OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS;SHARING_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS
name: OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS;FRONTEND_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS
defaultValue: "1"
type: int
description: Define the minimum number of characters from the special characters
@@ -8999,7 +9001,7 @@ OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS:
removalVersion: ""
deprecationInfo: ""
OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS:
name: OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS;SHARING_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS
name: OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS;FRONTEND_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS
defaultValue: "1"
type: int
description: Define the minimum number of lowercase letters. Defaults to 1 if not
@@ -9009,54 +9011,54 @@ OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS:
removalVersion: ""
deprecationInfo: ""
OCIS_PERSISTENT_STORE:
name: OCIS_PERSISTENT_STORE;COLLABORATION_STORE
name: OCIS_PERSISTENT_STORE;STORAGE_PUBLICLINK_STORE_STORE
defaultValue: nats-js-kv
type: string
description: 'The type of the store. Supported values are: ''memory'', ''nats-js-kv'',
''redis-sentinel'', ''noop''. See the text description for details.'
introductionVersion: 7.0.0
introductionVersion: 8.0.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_PERSISTENT_STORE_AUTH_PASSWORD:
name: OCIS_PERSISTENT_STORE_AUTH_PASSWORD;COLLABORATION_STORE_AUTH_PASSWORD
name: OCIS_PERSISTENT_STORE_AUTH_PASSWORD;STORAGE_PUBLICLINK_STORE_AUTH_PASSWORD
defaultValue: ""
type: string
description: The password to authenticate with the store. Only applies when store
type 'nats-js-kv' is configured.
introductionVersion: 7.0.0
introductionVersion: 8.0.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_PERSISTENT_STORE_AUTH_USERNAME:
name: OCIS_PERSISTENT_STORE_AUTH_USERNAME;COLLABORATION_STORE_AUTH_USERNAME
name: OCIS_PERSISTENT_STORE_AUTH_USERNAME;STORAGE_PUBLICLINK_STORE_AUTH_USERNAME
defaultValue: ""
type: string
description: The username to authenticate with the store. Only applies when store
type 'nats-js-kv' is configured.
introductionVersion: 7.0.0
introductionVersion: 8.0.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_PERSISTENT_STORE_NODES:
name: OCIS_PERSISTENT_STORE_NODES;COLLABORATION_STORE_NODES
name: OCIS_PERSISTENT_STORE_NODES;STORAGE_PUBLICLINK_STORE_NODES
defaultValue: '[127.0.0.1:9233]'
type: '[]string'
description: A list of nodes to access the configured store. This has no effect
when 'memory' store is configured. Note that the behaviour how nodes are used
is dependent on the library of the configured store. See the Environment Variable
Types description for more details.
introductionVersion: 7.0.0
introductionVersion: 8.0.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_PERSISTENT_STORE_TTL:
name: OCIS_PERSISTENT_STORE_TTL;COLLABORATION_STORE_TTL
defaultValue: 30m0s
name: OCIS_PERSISTENT_STORE_TTL;USERLOG_STORE_TTL
defaultValue: 336h0m0s
type: Duration
description: Time to live for events in the store. Defaults to '30m' (30 minutes).
description: Time to live for events in the store. Defaults to '336h' (2 weeks).
See the Environment Variable Types description for more details.
introductionVersion: 7.0.0
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
@@ -9101,17 +9103,19 @@ OCIS_REVA_GATEWAY_TLS_MODE:
removalVersion: ""
deprecationInfo: ""
OCIS_SERVICE_ACCOUNT_ID:
name: OCIS_SERVICE_ACCOUNT_ID;GRAPH_SERVICE_ACCOUNT_ID
name: SETTINGS_SERVICE_ACCOUNT_IDS;OCIS_SERVICE_ACCOUNT_ID
defaultValue: ""
type: string
description: The ID of the service account the service should use. See the 'auth-service'
service description for more details.
type: '[]string'
description: 'The list of all service account IDs. These will be assigned the hidden
''service-account'' role. Note: When using ''OCIS_SERVICE_ACCOUNT_ID'' this will
contain only one value while ''SETTINGS_SERVICE_ACCOUNT_IDS'' can have multiple.
See the ''auth-service'' service description for more details about service accounts.'
introductionVersion: "5.0"
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_SERVICE_ACCOUNT_SECRET:
name: OCIS_SERVICE_ACCOUNT_SECRET;GRAPH_SERVICE_ACCOUNT_SECRET
name: OCIS_SERVICE_ACCOUNT_SECRET;CLIENTLOG_SERVICE_ACCOUNT_SECRET
defaultValue: ""
type: string
description: The service account secret.
@@ -9120,7 +9124,7 @@ OCIS_SERVICE_ACCOUNT_SECRET:
removalVersion: ""
deprecationInfo: ""
OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD:
name: OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD;SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD
name: OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD
defaultValue: "true"
type: bool
description: Set this to true if you want to enforce passwords on all public shares.
@@ -9129,28 +9133,27 @@ OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD:
removalVersion: ""
deprecationInfo: ""
OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD:
name: OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD;SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD
name: OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD
defaultValue: "false"
type: bool
description: Set this to true if you want to enforce passwords on Uploader, Editor
or Contributor shares.
description: Set this to true if you want to enforce passwords for writable shares.
Only effective if the setting for 'passwords on all public shares' is set to false.
introductionVersion: "5.0"
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_SPACES_MAX_QUOTA:
name: OCIS_SPACES_MAX_QUOTA;STORAGE_USERS_OCIS_MAX_QUOTA
name: OCIS_SPACES_MAX_QUOTA;FRONTEND_MAX_QUOTA
defaultValue: "0"
type: uint64
description: Set a global max quota for spaces in bytes. A value of 0 equals unlimited.
If not using the global OCIS_SPACES_MAX_QUOTA, you must define the FRONTEND_MAX_QUOTA
in the frontend service.
description: Set the global max quota value in bytes. A value of 0 equals unlimited.
The value is provided via capabilities.
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_SYSTEM_USER_API_KEY:
name: OCIS_SYSTEM_USER_API_KEY;SHARING_PUBLIC_CS3_SYSTEM_USER_API_KEY
name: OCIS_SYSTEM_USER_API_KEY
defaultValue: ""
type: string
description: API key for the STORAGE-SYSTEM system user.
@@ -9159,7 +9162,7 @@ OCIS_SYSTEM_USER_API_KEY:
removalVersion: ""
deprecationInfo: ""
OCIS_SYSTEM_USER_ID:
name: OCIS_SYSTEM_USER_ID;SHARING_PUBLIC_CS3_SYSTEM_USER_ID
name: OCIS_SYSTEM_USER_ID;SETTINGS_SYSTEM_USER_ID
defaultValue: ""
type: string
description: ID of the oCIS STORAGE-SYSTEM system user. Admins need to set the ID
@@ -9171,7 +9174,7 @@ OCIS_SYSTEM_USER_ID:
removalVersion: ""
deprecationInfo: ""
OCIS_SYSTEM_USER_IDP:
name: OCIS_SYSTEM_USER_IDP;SHARING_PUBLIC_CS3_SYSTEM_USER_IDP
name: OCIS_SYSTEM_USER_IDP;SETTINGS_SYSTEM_USER_IDP
defaultValue: internal
type: string
description: IDP of the oCIS STORAGE-SYSTEM system user.
@@ -9180,7 +9183,7 @@ OCIS_SYSTEM_USER_IDP:
removalVersion: ""
deprecationInfo: ""
OCIS_TRACING_COLLECTOR:
name: OCIS_TRACING_COLLECTOR;SHARING_TRACING_COLLECTOR
name: OCIS_TRACING_COLLECTOR;APP_REGISTRY_TRACING_COLLECTOR
defaultValue: ""
type: string
description: The HTTP endpoint for sending spans directly to a collector, i.e. http://jaeger-collector:14268/api/traces.
@@ -9190,7 +9193,7 @@ OCIS_TRACING_COLLECTOR:
removalVersion: ""
deprecationInfo: ""
OCIS_TRACING_ENABLED:
name: OCIS_TRACING_ENABLED;SHARING_TRACING_ENABLED
name: OCIS_TRACING_ENABLED;APP_REGISTRY_TRACING_ENABLED
defaultValue: "false"
type: bool
description: Activates tracing.
@@ -9199,7 +9202,7 @@ OCIS_TRACING_ENABLED:
removalVersion: ""
deprecationInfo: ""
OCIS_TRACING_ENDPOINT:
name: OCIS_TRACING_ENDPOINT;SHARING_TRACING_ENDPOINT
name: OCIS_TRACING_ENDPOINT;APP_REGISTRY_TRACING_ENDPOINT
defaultValue: ""
type: string
description: The endpoint of the tracing agent.
@@ -9208,7 +9211,7 @@ OCIS_TRACING_ENDPOINT:
removalVersion: ""
deprecationInfo: ""
OCIS_TRACING_TYPE:
name: OCIS_TRACING_TYPE;SHARING_TRACING_TYPE
name: OCIS_TRACING_TYPE;APP_REGISTRY_TRACING_TYPE
defaultValue: ""
type: string
description: The type of tracing. Defaults to '', which is the same as 'jaeger'.
@@ -9221,28 +9224,27 @@ OCIS_TRANSFER_SECRET:
name: OCIS_TRANSFER_SECRET
defaultValue: ""
type: string
description: The storage transfer secret.
description: Transfer secret for signing file up- and download requests.
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_TRANSLATION_PATH:
name: OCIS_TRANSLATION_PATH;GRAPH_TRANSLATION_PATH
name: OCIS_TRANSLATION_PATH;SETTINGS_TRANSLATION_PATH
defaultValue: ""
type: string
description: (optional) Set this to a path with custom translations to overwrite
the builtin translations. Note that file and folder naming rules apply, see the
documentation for more details.
introductionVersion: 7.0.0
introductionVersion: 7.1.0
deprecationVersion: ""
removalVersion: ""
deprecationInfo: ""
OCIS_URL:
name: OCIS_URL;OCIS_OIDC_ISSUER;AUTH_BASIC_IDP_URL
name: OCIS_URL;OCIS_OIDC_ISSUER
defaultValue: https://localhost:9200
type: string
description: The identity provider value to set in the userids of the CS3 user objects
for users returned by this user provider.
description: The OIDC issuer URL to assign to the demo users.
introductionVersion: pre5.0
deprecationVersion: ""
removalVersion: ""
-8
View File
@@ -39,14 +39,6 @@ variables:
default_value: ""
description: ""
do_ignore: true
- rawname: GITHUB_TOKEN
path: tools/ci-reporter/cmd/list-failed-commits/main.go:116
foundincode: true
name: GITHUB_TOKEN
type: ""
default_value: ""
description: ""
do_ignore: true
- rawname: _serverMaxConnectionAgeEnv
path: ocis-pkg/service/grpc/keepalive.go:19
foundincode: true
+156 -3
View File
@@ -1,6 +1,6 @@
---
title: 'Acceptance Testing'
date: 2026-03-18T00:00:00+00:00
title: "Acceptance Testing"
date: 2018-05-02T00:00:00+00:00
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/development
@@ -591,7 +591,160 @@ The sample `fontsMap.json` file is located in `tests/config/drone/fontsMap.json`
## Running Test on Helm Setup
Refer to the [Running API Tests in Kubernetes Cluster](../../../tests/config/k8s/README.md) documentation for running tests against a K8s setup.
The following tools must be installed:
* Install [k3d](https://k3d.io/stable/#install-script)
* Install [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)
* Install [helm](https://helm.sh/docs/intro/install/)
Also, clone the [ocis-charts](https://github.com/owncloud/ocis-charts/) repository.
1. Setup Basicauth\
Enable basic authentication for the proxy in the `ocis-charts` repo:
```bash
cd ocis-charts
# Enable basic auth in proxy deployment
sed -i '/- name: PROXY_HTTP_ADDR/i \
- name: PROXY_ENABLE_BASIC_AUTH \
value: "true"' ./charts/ocis/templates/proxy/deployment.yaml
# copy authbasic service
cp -r <path-to-ocis-repo>/tests/config/drone/k8s/authbasic ./charts/ocis/templates/
# change admin password
sed -i '/- name: IDM_ADMIN_PASSWORD/{n;N;N;N;d;}' ./charts/ocis/templates/idm/deployment.yaml
sed -i '/- name: IDM_ADMIN_PASSWORD/a\\n value: "admin"' ./charts/ocis/templates/idm/deployment.yaml
# Update values.yaml
cp <path-to-ocis-repo>/tests/config/drone/k8s/values.yaml ./charts/ocis/ci/deployment-values.yaml
# Update template values
sed -i '/{{- $_ := set .scope "appNameAuthMachine" "authmachine" -}}/a \
{{- $_ := set .scope "appNameAuthBasic" "authbasic" -}}' \
./charts/ocis/templates/_common/_tplvalues.tpl
```
2. Install Charts Using k3d
```bash
k3d cluster create drone \
--api-port ocis-server:33199 \
-p '80:80@loadbalancer' \
-p '443:443@loadbalancer' \
--k3s-arg '--tls-san=k3d@server:*' \
--k3s-arg '--disable=metrics-server@server:*'
k3d kubeconfig get drone > kubeconfig.yaml
chmod 0600 kubeconfig.yaml
kubectl create configmap coredns-custom \
--namespace kube-system \
--from-literal='rewritehost.override=rewrite name exact ocis-server host.k3d.internal'
kubectl -n kube-system rollout restart deployment coredns
make helm-install-atomic
```
3. Run Test\
To run test you should set `K8S` to true:
```bash
cd <path-to-ocis-repo>
# build and run ocis wrapper
make -C ./tests/ociswrapper
./tests/ociswrapper/bin/ociswrapper serve \
--url https://ocis-server \
--admin-username admin \
--admin-password admin \
--skip-ocis-run
K8S=true TEST_SERVER_URL="https://ocis-server" \
make test-acceptance-api BEHAT_FEATURE=tests/acceptance/features/apiArchiver/downloadById.feature
```
4. Run Test With ociswrapper
```bash
ociswrapper serve \
--url https://ocis-server \
--admin-username admin \
--admin-password admin \
--skip-ocis-run
```
5. Run Antivirus Test\
To run the clamav service, run these commands deploying the helm chart:
```bash
cp -r config/drone/k8s/clamav charts/ocis/templates/
sed -i 's/{{ *\.Values\.features\.virusscan\.infectedFileHandling *| *quote *}}/"delete"/' \
ocis/templates/antivirus/deployment.yaml
sed -i '/name: ANTIVIRUS_SCANNER_TYPE/{n;s/value: *"icap"/value: "clamav"/}' \
charts/ocis/templates/antivirus/deployment.yaml
sed -i '/- name: ANTIVIRUS_SCANNER_TYPE/i \
- name: ANTIVIRUS_CLAMAV_SOCKET\n \
value: "tcp://clamav:3310"' \
charts/ocis/templates/antivirus/deployment.yaml
```
5. Run Email Test\
To run the email service, run these commands deploying the helm chart:
```bash
cp -r <path-to-ocis-repo>/tests/config/drone/k8s/mailpit charts/ocis/templates/
```
After ocis is deployed:
```bash
kubectl port-forward svc/mailpit $EMAIL_PORT:8025 -n ocis
```
6. Run Tika Test\
To run the tika service, run these commands deploying the helm chart:
```bash
cp -r <path-to-ocis-repo>/tests/config/drone/k8s/tika charts/ocis/templates/
```
### Running Core API Test Suites from Pipeline "8"
For running specific core API suites (`coreApiWebdavMove1`, `coreApiWebdavPreviews`, `coreApiWebdavUpload`, `coreApiWebdavUploadTUS`) on k8s:
1. **Additional Configs** (after step 1 above):
```bash
# Create fonts configmaps
echo '{"defaultFont": "/etc/ocis/fonts/NotoSans.ttf"}' > fontsMap.json
kubectl create configmap -n ocis sharing-banned-passwords \
--from-file=banned-password-list.txt=<path-to-ocis-repo>/tests/config/drone/banned-password-list.txt
kubectl create configmap -n ocis ocis-fonts-map --from-file=./fontsMap.json
# Patch sharing for banned passwords
sed -i 's|/etc/ocis/sharing-banned-passwords.txt|/etc/ocis/config/drone/banned-password-list.txt|' ./charts/ocis/templates/sharing/deployment.yaml
sed -i 's|- name: configs|- name: banned-passwords|' ./charts/ocis/templates/sharing/deployment.yaml
sed -i 's|mountPath: /etc/ocis$|mountPath: /etc/ocis/config/drone|' ./charts/ocis/templates/sharing/deployment.yaml
sed -i 's|name: sharing-banned-passwords-{{ .appName }}|name: sharing-banned-passwords|' ./charts/ocis/templates/sharing/deployment.yaml
kubectl create configmap -n ocis sharing-banned-passwords \
--from-file=banned-password-list.txt=<path-to-ocis-repo>/tests/config/drone/banned-password-list.txt
```
2. **Install and Setup** (after step 2 above):
```bash
make helm-install-atomic
```
3. **Run Tests**:
```bash
cd <path-to-ocis-repo>
K8S=true \
TEST_OCIS=true \
TEST_WITH_GRAPH_API=true \
TEST_SERVER_URL="https://ocis-server" \
OCIS_WRAPPER_URL="http://localhost:5200" \
make test-acceptance-api \
BEHAT_FEATURE=tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature
```
## Generating Code Coverage Report by Running Acceptance Tests
+20 -20
View File
@@ -55,8 +55,8 @@ require (
github.com/mitchellh/mapstructure v1.5.0
github.com/mna/pigeon v1.3.0
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826
github.com/nats-io/nats-server/v2 v2.12.6
github.com/nats-io/nats.go v1.49.0
github.com/nats-io/nats-server/v2 v2.12.4
github.com/nats-io/nats.go v1.48.0
github.com/olekukonko/tablewriter v1.1.0
github.com/onsi/ginkgo v1.16.5
github.com/onsi/ginkgo/v2 v2.28.1
@@ -64,7 +64,7 @@ require (
github.com/open-policy-agent/opa v1.12.3
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-20260324082555-823c2f1c2593
github.com/owncloud/reva/v2 v2.0.0-20260316140824-a145e1807968
github.com/pkg/errors v0.9.1
github.com/pkg/xattr v0.4.12
github.com/prometheus/client_golang v1.23.2
@@ -94,16 +94,16 @@ require (
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0
go.opentelemetry.io/otel/sdk v1.40.0
go.opentelemetry.io/otel/trace v1.40.0
golang.org/x/crypto v0.49.0
golang.org/x/crypto v0.48.0
golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b
golang.org/x/image v0.38.0
golang.org/x/net v0.51.0
golang.org/x/image v0.36.0
golang.org/x/net v0.49.0
golang.org/x/oauth2 v0.35.0
golang.org/x/sync v0.20.0
golang.org/x/term v0.41.0
golang.org/x/text v0.35.0
golang.org/x/sync v0.19.0
golang.org/x/term v0.40.0
golang.org/x/text v0.34.0
google.golang.org/genproto/googleapis/api v0.0.0-20260128011058-8636f8732409
google.golang.org/grpc v1.79.3
google.golang.org/grpc v1.79.1
google.golang.org/protobuf v1.36.11
gopkg.in/yaml.v2 v2.4.0
gotest.tools/v3 v3.5.2
@@ -125,7 +125,7 @@ require (
github.com/ajg/form v1.5.1 // indirect
github.com/alexedwards/argon2id v1.0.0 // indirect
github.com/amoghe/go-crypt v0.0.0-20220222110647-20eada5f5964 // indirect
github.com/antithesishq/antithesis-sdk-go v0.6.0-default-no-op // indirect
github.com/antithesishq/antithesis-sdk-go v0.5.0-default-no-op // indirect
github.com/armon/go-radix v1.0.0 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/aws/aws-sdk-go v1.55.8 // indirect
@@ -155,7 +155,7 @@ require (
github.com/ceph/go-ceph v0.38.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cevaris/ordered_map v0.0.0-20190319150403-3adeae072e73 // indirect
github.com/cloudflare/circl v1.6.3 // indirect
github.com/cloudflare/circl v1.6.1 // indirect
github.com/coreos/go-semver v0.3.1 // indirect
github.com/coreos/go-systemd/v22 v22.6.0 // indirect
github.com/cornelk/hashmap v1.0.8 // indirect
@@ -237,7 +237,7 @@ require (
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.4 // indirect
github.com/klauspost/compress v1.18.3 // indirect
github.com/klauspost/cpuid/v2 v2.2.11 // indirect
github.com/klauspost/crc32 v1.3.0 // indirect
github.com/kovidgoyal/go-parallel v1.1.1 // indirect
@@ -273,8 +273,8 @@ require (
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
github.com/mschoch/smat v0.2.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/nats-io/jwt/v2 v2.8.1 // indirect
github.com/nats-io/nkeys v0.4.15 // indirect
github.com/nats-io/jwt/v2 v2.8.0 // indirect
github.com/nats-io/nkeys v0.4.12 // indirect
github.com/nats-io/nuid v1.0.1 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/oklog/run v1.2.0 // indirect
@@ -298,7 +298,7 @@ require (
github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rs/xid v1.6.0 // indirect
github.com/russellhaering/goxmldsig v1.6.0 // indirect
github.com/russellhaering/goxmldsig v1.5.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd // indirect
github.com/segmentio/asm v1.2.1 // indirect
@@ -340,10 +340,10 @@ require (
go.uber.org/zap v1.27.0 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/mod v0.33.0 // indirect
golang.org/x/sys v0.42.0 // indirect
golang.org/x/time v0.15.0 // indirect
golang.org/x/tools v0.42.0 // indirect
golang.org/x/mod v0.32.0 // indirect
golang.org/x/sys v0.41.0 // indirect
golang.org/x/time v0.14.0 // indirect
golang.org/x/tools v0.41.0 // indirect
google.golang.org/genproto v0.0.0-20250303144028-a0af3efb3deb // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409 // indirect
gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect
+40 -40
View File
@@ -92,8 +92,8 @@ github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNg
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4=
github.com/antithesishq/antithesis-sdk-go v0.6.0-default-no-op h1:kpBdlEPbRvff0mDD1gk7o9BhI16b9p5yYAXRlidpqJE=
github.com/antithesishq/antithesis-sdk-go v0.6.0-default-no-op/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl3v2yvUZjmKncl7U91fup7E=
github.com/antithesishq/antithesis-sdk-go v0.5.0-default-no-op h1:Ucf+QxEKMbPogRO5guBNe5cgd9uZgfoJLOYs8WWhtjM=
github.com/antithesishq/antithesis-sdk-go v0.5.0-default-no-op/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl3v2yvUZjmKncl7U91fup7E=
github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q=
github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE=
github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI=
@@ -182,8 +182,8 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
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/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0=
github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/coreos/go-oidc/v3 v3.17.0 h1:hWBGaQfbi0iVviX4ibC7bk8OKT5qNr4klBaCHVNvehc=
github.com/coreos/go-oidc/v3 v3.17.0/go.mod h1:wqPbKFrVnE90vty060SB40FCJ8fTHTxSwyXJqZH+sI8=
@@ -575,8 +575,8 @@ github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4
github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.18.4 h1:RPhnKRAQ4Fh8zU2FY/6ZFDwTVTxgJ/EMydqSTzE9a2c=
github.com/klauspost/compress v1.18.4/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4=
github.com/klauspost/compress v1.18.3 h1:9PJRvfbmTabkOX8moIpXPbMMbYN60bWImDDU7L+/6zw=
github.com/klauspost/compress v1.18.3/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4=
github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/klauspost/cpuid/v2 v2.2.11 h1:0OwqZRYI2rFrjS4kvkDnqJkKHdHaRnCm68/DY4OxRzU=
github.com/klauspost/cpuid/v2 v2.2.11/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
@@ -701,14 +701,14 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/nats-io/jwt/v2 v2.8.1 h1:V0xpGuD/N8Mi+fQNDynXohVvp7ZztevW5io8CUWlPmU=
github.com/nats-io/jwt/v2 v2.8.1/go.mod h1:nWnOEEiVMiKHQpnAy4eXlizVEtSfzacZ1Q43LIRavZg=
github.com/nats-io/nats-server/v2 v2.12.6 h1:Egbx9Vl7Ch8wTtpXPGqbehkZ+IncKqShUxvrt1+Enc8=
github.com/nats-io/nats-server/v2 v2.12.6/go.mod h1:4HPlrvtmSO3yd7KcElDNMx9kv5EBJBnJJzQPptXlheo=
github.com/nats-io/nats.go v1.49.0 h1:yh/WvY59gXqYpgl33ZI+XoVPKyut/IcEaqtsiuTJpoE=
github.com/nats-io/nats.go v1.49.0/go.mod h1:fDCn3mN5cY8HooHwE2ukiLb4p4G4ImmzvXyJt+tGwdw=
github.com/nats-io/nkeys v0.4.15 h1:JACV5jRVO9V856KOapQ7x+EY8Jo3qw1vJt/9Jpwzkk4=
github.com/nats-io/nkeys v0.4.15/go.mod h1:CpMchTXC9fxA5zrMo4KpySxNjiDVvr8ANOSZdiNfUrs=
github.com/nats-io/jwt/v2 v2.8.0 h1:K7uzyz50+yGZDO5o772eRE7atlcSEENpL7P+b74JV1g=
github.com/nats-io/jwt/v2 v2.8.0/go.mod h1:me11pOkwObtcBNR8AiMrUbtVOUGkqYjMQZ6jnSdVUIA=
github.com/nats-io/nats-server/v2 v2.12.4 h1:ZnT10v2LU2Xcoiy8ek9X6Se4YG8EuMfIfvAEuFVx1Ts=
github.com/nats-io/nats-server/v2 v2.12.4/go.mod h1:5MCp/pqm5SEfsvVZ31ll1088ZTwEUdvRX1Hmh/mTTDg=
github.com/nats-io/nats.go v1.48.0 h1:pSFyXApG+yWU/TgbKCjmm5K4wrHu86231/w84qRVR+U=
github.com/nats-io/nats.go v1.48.0/go.mod h1:iRWIPokVIFbVijxuMQq4y9ttaBTMe0SFdlZfMDd+33g=
github.com/nats-io/nkeys v0.4.12 h1:nssm7JKOG9/x4J8II47VWCL1Ds29avyiQDRn0ckMvDc=
github.com/nats-io/nkeys v0.4.12/go.mod h1:MT59A1HYcjIcyQDJStTfaOY6vhy9XTUjOFo+SVsvpBg=
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
@@ -742,8 +742,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-20260324082555-823c2f1c2593 h1:RNHAod2gNBEac0KQJfJ6+PCX1t7g9hFmONTGrXFvFII=
github.com/owncloud/reva/v2 v2.0.0-20260324082555-823c2f1c2593/go.mod h1:+rCy6oGYb2/qs5gmQa8y/pHARw634vB73MZGDY2SBIQ=
github.com/owncloud/reva/v2 v2.0.0-20260316140824-a145e1807968 h1:p5NMF+1kuaZCxMJCf00akd6w+gXAVmnIz0yUzWDmWK8=
github.com/owncloud/reva/v2 v2.0.0-20260316140824-a145e1807968/go.mod h1:+rCy6oGYb2/qs5gmQa8y/pHARw634vB73MZGDY2SBIQ=
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw=
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0=
github.com/pablodz/inotifywaitgo v0.0.9 h1:njquRbBU7fuwIe5rEvtaniVBjwWzcpdUVptSgzFqZsw=
@@ -827,8 +827,8 @@ github.com/rs/xid v1.6.0 h1:fV591PaemRlL6JfRxGDEPl69wICngIQ3shQtzfy2gxU=
github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0=
github.com/rs/zerolog v1.34.0 h1:k43nTLIwcTVQAncfCw4KZ2VY6ukYoZaBPNOE8txlOeY=
github.com/rs/zerolog v1.34.0/go.mod h1:bJsvje4Z08ROH4Nhs5iH600c3IkWhwp44iRc54W6wYQ=
github.com/russellhaering/goxmldsig v1.6.0 h1:8fdWXEPh2k/NZNQBPFNoVfS3JmzS4ZprY/sAOpKQLks=
github.com/russellhaering/goxmldsig v1.6.0/go.mod h1:TrnaquDcYxWXfJrOjeMBTX4mLBeYAqaHEyUeWPxZlBM=
github.com/russellhaering/goxmldsig v1.5.0 h1:AU2UkkYIUOTyZRbe08XMThaOCelArgvNfYapcmSjBNw=
github.com/russellhaering/goxmldsig v1.5.0/go.mod h1:x98CjQNFJcWfMxeOrMnMKg70lvDP6tE0nTaeUnjXDmk=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd h1:CmH9+J6ZSsIjUK3dcGsnCnO41eRBOnY12zwkn5qVwgc=
@@ -1022,8 +1022,8 @@ golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
golang.org/x/crypto v0.49.0 h1:+Ng2ULVvLHnJ/ZFEq4KdcDd/cfjrrjjNSXNzxg0Y4U4=
golang.org/x/crypto v0.49.0/go.mod h1:ErX4dUh2UM+CFYiXZRTcMpEcN8b/1gxEuv3nODoYtCA=
golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts=
golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -1039,8 +1039,8 @@ golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b/go.mod h1:3//PLf8L/X+8b4vuAf
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.18.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E=
golang.org/x/image v0.38.0 h1:5l+q+Y9JDC7mBOMjo4/aPhMDcxEptsX+Tt3GgRQRPuE=
golang.org/x/image v0.38.0/go.mod h1:/3f6vaXC+6CEanU4KJxbcUZyEePbyKbaLoDOe4ehFYY=
golang.org/x/image v0.36.0 h1:Iknbfm1afbgtwPTmHnS2gTM/6PPZfH+z2EFuOkSbqwc=
golang.org/x/image v0.36.0/go.mod h1:YsWD2TyyGKiIX1kZlu9QfKIsQ4nAAK9bdgdrIsE7xy4=
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=
@@ -1065,8 +1065,8 @@ golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8=
golang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w=
golang.org/x/mod v0.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c=
golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -1112,8 +1112,8 @@ golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/net v0.51.0 h1:94R/GTO7mt3/4wIKpcR5gkGmRLOuE/2hNGeWq/GBIFo=
golang.org/x/net v0.51.0/go.mod h1:aamm+2QF5ogm02fjy5Bb7CQ0WMt1/WVM7FtyaTLlA9Y=
golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o=
golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -1140,8 +1140,8 @@ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4=
golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4=
golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -1207,8 +1207,8 @@ golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo=
golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k=
golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
@@ -1219,8 +1219,8 @@ golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
golang.org/x/term v0.41.0 h1:QCgPso/Q3RTJx2Th4bDLqML4W6iJiaXFq2/ftQF13YU=
golang.org/x/term v0.41.0/go.mod h1:3pfBgksrReYfZ5lvYM0kSO0LIkAl4Yl2bXOkKP7Ec2A=
golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg=
golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -1234,13 +1234,13 @@ golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
golang.org/x/text v0.35.0 h1:JOVx6vVDFokkpaq1AEptVzLTpDe9KGpj5tR4/X+ybL8=
golang.org/x/text v0.35.0/go.mod h1:khi/HExzZJ2pGnjenulevKNX1W67CUy0AsXcNubPGCA=
golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk=
golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.15.0 h1:bbrp8t3bGUeFOx08pvsMYRTCVSMk89u4tKbNOZbp88U=
golang.org/x/time v0.15.0/go.mod h1:Y4YMaQmXwGQZoFaVFk4YpCt4FLQMYKZe9oeV/f4MSno=
golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI=
golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
@@ -1290,8 +1290,8 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
golang.org/x/tools v0.42.0 h1:uNgphsn75Tdz5Ji2q36v/nsFSfR/9BRFvqhGBaJGd5k=
golang.org/x/tools v0.42.0/go.mod h1:Ma6lCIwGZvHK6XtgbswSoWroEkhugApmsXyrUmBhfr0=
golang.org/x/tools v0.41.0 h1:a9b8iMweWG+S0OBnlU36rzLp20z1Rp10w+IY2czHTQc=
golang.org/x/tools v0.41.0/go.mod h1:XSY6eDqxVNiYgezAVqqCeihT4j1U2CCsqvH3WhQpnlg=
golang.org/x/tools/godoc v0.1.0-deprecated h1:o+aZ1BOj6Hsx/GBdJO/s815sqftjSnrZZwyYTHODvtk=
golang.org/x/tools/godoc v0.1.0-deprecated/go.mod h1:qM63CriJ961IHWmnWa9CjZnBndniPt4a3CK0PVB9bIg=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -1371,8 +1371,8 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
google.golang.org/grpc v1.79.3 h1:sybAEdRIEtvcD68Gx7dmnwjZKlyfuc61Dyo9pGXXkKE=
google.golang.org/grpc v1.79.3/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ=
google.golang.org/grpc v1.79.1 h1:zGhSi45ODB9/p3VAawt9a+O/MULLl9dpizzNNpq7flY=
google.golang.org/grpc v1.79.1/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ=
google.golang.org/grpc/examples v0.0.0-20211102180624-670c133e568e h1:m7aQHHqd0q89mRwhwS9Bx2rjyl/hsFAeta+uGrHsQaU=
google.golang.org/grpc/examples v0.0.0-20211102180624-670c133e568e/go.mod h1:gID3PKrg7pWKntu9Ss6zTLJ0ttC0X9IHgREOCZwbCVU=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
-8
View File
@@ -27,7 +27,6 @@ import (
"github.com/thejerf/suture/v4"
ociscfg "github.com/owncloud/ocis/v2/ocis-pkg/config"
"github.com/owncloud/ocis/v2/ocis-pkg/config/defaults"
"github.com/owncloud/ocis/v2/ocis-pkg/log"
ogrpc "github.com/owncloud/ocis/v2/ocis-pkg/service/grpc"
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
@@ -371,13 +370,6 @@ func Start(ctx context.Context, o ...Option) error {
return err
}
// Log the effective data and config paths at startup so operators can
// verify that data is written to the expected location.
s.Log.Info().
Str("data_path", defaults.BaseDataPath()).
Str("config_path", defaults.BaseConfigPath()).
Msg("effective data and config paths")
// cancel the context when a signal is received.
var cancel context.CancelFunc = func() {}
if ctx == nil {
-121
View File
@@ -1,121 +0,0 @@
#!/usr/bin/env bash
#
# Wrapper around govulncheck that only fails on fixable, called vulnerabilities.
#
# - CALLED + fixable (non-stdlib) → FAIL (you should bump the dep)
# - CALLED + stdlib fix only → WARN (needs Go toolchain upgrade)
# - CALLED + no fix available → WARN (nothing to do yet)
# - imported/required only → WARN (code doesn't call it)
#
# Usage: scripts/govulncheck-wrapper.sh [govulncheck-binary]
# If no binary is provided, uses 'govulncheck' from PATH.
set -euo pipefail
GOVULNCHECK="${1:-govulncheck}"
TMPFILE=$(mktemp)
trap 'rm -f "$TMPFILE"' EXIT
echo "Running govulncheck..."
"$GOVULNCHECK" -format json ./... > "$TMPFILE" 2>&1 || true
python3 - "$TMPFILE" <<'PYEOF'
import json
import sys
def parse_json_stream(path):
with open(path) as f:
content = f.read()
decoder = json.JSONDecoder()
idx = 0
objects = []
while idx < len(content):
while idx < len(content) and content[idx] in ' \t\n\r':
idx += 1
if idx >= len(content):
break
obj, end_idx = decoder.raw_decode(content, idx)
idx = end_idx
objects.append(obj)
return objects
objects = parse_json_stream(sys.argv[1])
# Collect OSV details
osvs = {}
for obj in objects:
if 'osv' in obj:
osv = obj['osv']
osvs[osv['id']] = osv
# Collect findings
findings = [obj['finding'] for obj in objects if 'finding' in obj]
# Group by vuln ID
from collections import defaultdict
by_vuln = defaultdict(list)
for f in findings:
by_vuln[f['osv']].append(f)
fail_vulns = []
warn_vulns = []
for vid, entries in sorted(by_vuln.items()):
# Check if any trace reaches symbol level (has 'function' in trace frames)
is_called = any(
any('function' in frame for frame in entry.get('trace', []))
for entry in entries
)
fixed_version = entries[0].get('fixed_version', '')
trace = entries[0].get('trace', [])
module = trace[0].get('module', '') if trace else ''
# Determine category
if not is_called:
category = "IMPORTED"
elif not fixed_version:
category = "NO_FIX"
elif module == "stdlib":
category = "STDLIB"
else:
category = "FIXABLE"
osv = osvs.get(vid, {})
summary = osv.get('summary', vid)
info = {
'id': vid,
'category': category,
'module': module,
'fixed_version': fixed_version,
'summary': summary,
}
if category == "FIXABLE":
fail_vulns.append(info)
else:
warn_vulns.append(info)
# Print warnings
if warn_vulns:
print("\n⚠ Vulnerabilities acknowledged (not blocking):")
for v in warn_vulns:
reason = {
'NO_FIX': 'no upstream fix available',
'STDLIB': f'needs Go toolchain upgrade to {v["fixed_version"]}',
'IMPORTED': 'code does not call vulnerable function',
}.get(v['category'], v['category'])
print(f" {v['id']}: {v['summary']}")
print(f" module={v['module']} ({reason})")
# Print failures
if fail_vulns:
print(f"\n✗ {len(fail_vulns)} fixable vulnerability(ies) found:")
for v in fail_vulns:
print(f" {v['id']}: {v['summary']}")
print(f" module={v['module']}, fix: bump to {v['fixed_version']}")
sys.exit(1)
else:
print(f"\n✓ No fixable vulnerabilities found ({len(warn_vulns)} acknowledged warnings)")
sys.exit(0)
PYEOF
@@ -1,109 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# Martin <github@diemattels.at>, 2026
# Miha Podobnik, 2026
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: EMAIL\n"
"POT-Creation-Date: 2026-03-24 00:06+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"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: sl\n"
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
#: pkg/service/response.go:44
msgid "description"
msgstr "opis"
#: pkg/service/response.go:43
msgid "display name"
msgstr "prikazno ime"
#: pkg/service/response.go:42
msgid "expiration date"
msgstr "datum poteka"
#: pkg/service/response.go:41
msgid "password"
msgstr "geslo"
#: pkg/service/response.go:40
msgid "permission"
msgstr "dovoljenje"
#: pkg/service/response.go:45
msgid "shared-with-me"
msgstr "deljeno-z-mano"
#: pkg/service/response.go:39
msgid "some field"
msgstr "neko polje"
#: pkg/service/response.go:26
msgid "{resource} was downloaded via public link {token}"
msgstr "{resource} je bil prenesen prek javne povezave {token}"
#: pkg/service/response.go:24
msgid "{user} added {resource} to {folder}"
msgstr "{user} je dodal {resource} v {folder}"
#: pkg/service/response.go:36
msgid "{user} added {sharee} as member of {space}"
msgstr "{user} je dodal {sharee} kot član {space}"
#: pkg/service/response.go:27
msgid "{user} deleted {resource} from {folder}"
msgstr "{user} je izbrisal {resource} iz {folder}"
#: pkg/service/response.go:28
msgid "{user} moved {resource} to {folder}"
msgstr "{user} je premaknil {resource} v {folder}"
#: pkg/service/response.go:35
msgid "{user} removed link to {resource}"
msgstr "{user} je odstranil povezavo do {resource}"
#: pkg/service/response.go:32
msgid "{user} removed {sharee} from {resource}"
msgstr "{user} je odstranil uporabnika {sharee} iz {resource}"
#: pkg/service/response.go:37
msgid "{user} removed {sharee} from {space}"
msgstr "{user} je odstranil uporabnika {sharee} iz {space}"
#: pkg/service/response.go:29
msgid "{user} renamed {oldResource} to {resource}"
msgstr "{user} je preimenoval/a {oldResource} v {resource}"
#: pkg/service/response.go:33
msgid "{user} shared {resource} via link"
msgstr "{user} je omogočil souporabo {resource} prek povezave"
#: pkg/service/response.go:30
msgid "{user} shared {resource} with {sharee}"
msgstr "Uporabnik {user} je omogočil souporabo {resource} z {sharee}"
#: pkg/service/response.go:34
msgid "{user} updated {field} for a link {token} on {resource}"
msgstr ""
"Uporabnik {user} je posodobil polje {field} za povezavo {token} na viru "
"{resource}"
#: pkg/service/response.go:31
msgid "{user} updated {field} for the {resource}"
msgstr "{user} je preimenoval/a {oldResource} v {resource}"
#: pkg/service/response.go:25
msgid "{user} updated {resource} in {folder}"
msgstr "Uporabnik {user} je posodobil {resource} v {folder}"
+7 -14
View File
@@ -85,18 +85,11 @@ type StorageRegistry struct {
// Cache holds cache config
type Cache struct {
ProviderCacheStore string `yaml:"provider_cache_store" env:"OCIS_CACHE_STORE;GATEWAY_PROVIDER_CACHE_STORE" desc:"The type of the cache store. Supported values are: 'memory', 'redis-sentinel', 'nats-js-kv', 'noop'. See the text description for details." introductionVersion:"pre5.0"`
ProviderCacheNodes []string `yaml:"provider_cache_nodes" env:"OCIS_CACHE_STORE_NODES;GATEWAY_PROVIDER_CACHE_STORE_NODES" desc:"A list of nodes to access the configured store. This has no effect when 'memory' store is configured. Note that the behaviour how nodes are used is dependent on the library of the configured store. See the Environment Variable Types description for more details." introductionVersion:"pre5.0"`
ProviderCacheDatabase string `yaml:"provider_cache_database" env:"OCIS_CACHE_DATABASE" desc:"The database name the configured store should use." introductionVersion:"pre5.0"`
ProviderCacheTTL time.Duration `yaml:"provider_cache_ttl" env:"OCIS_CACHE_TTL;GATEWAY_PROVIDER_CACHE_TTL" desc:"Default time to live for user info in the cache. Only applied when access tokens has no expiration. See the Environment Variable Types description for more details." introductionVersion:"pre5.0"`
ProviderCacheDisablePersistence bool `yaml:"provider_cache_disable_persistence" env:"OCIS_CACHE_DISABLE_PERSISTENCE;GATEWAY_PROVIDER_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the provider cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"5.0"`
ProviderCacheAuthUsername string `yaml:"provider_cache_auth_username" env:"OCIS_CACHE_AUTH_USERNAME;GATEWAY_PROVIDER_CACHE_AUTH_USERNAME" desc:"The username to use for authentication. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
ProviderCacheAuthPassword string `yaml:"provider_cache_auth_password" env:"OCIS_CACHE_AUTH_PASSWORD;GATEWAY_PROVIDER_CACHE_AUTH_PASSWORD" desc:"The password to use for authentication. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
CreateHomeCacheStore string `yaml:"create_home_cache_store" env:"OCIS_CACHE_STORE;GATEWAY_CREATE_HOME_CACHE_STORE" desc:"The type of the cache store. Supported values are: 'memory', 'redis-sentinel', 'nats-js-kv', 'noop'. See the text description for details." introductionVersion:"pre5.0"`
CreateHomeCacheNodes []string `yaml:"create_home_cache_nodes" env:"OCIS_CACHE_STORE_NODES;GATEWAY_CREATE_HOME_CACHE_STORE_NODES" desc:"A list of nodes to access the configured store. This has no effect when 'memory' store is configured. Note that the behaviour how nodes are used is dependent on the library of the configured store. See the Environment Variable Types description for more details." introductionVersion:"pre5.0"`
CreateHomeCacheDatabase string `yaml:"create_home_cache_database" env:"OCIS_CACHE_DATABASE" desc:"The database name the configured store should use." introductionVersion:"pre5.0"`
CreateHomeCacheTTL time.Duration `yaml:"create_home_cache_ttl" env:"OCIS_CACHE_TTL;GATEWAY_CREATE_HOME_CACHE_TTL" desc:"Default time to live for user info in the cache. Only applied when access tokens has no expiration. See the Environment Variable Types description for more details." introductionVersion:"pre5.0"`
CreateHomeCacheDisablePersistence bool `yaml:"create_home_cache_disable_persistence" env:"OCIS_CACHE_DISABLE_PERSISTENCE;GATEWAY_CREATE_HOME_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the create home cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"5.0"`
CreateHomeCacheAuthUsername string `yaml:"create_home_cache_auth_username" env:"OCIS_CACHE_AUTH_USERNAME;GATEWAY_CREATE_HOME_CACHE_AUTH_USERNAME" desc:"The username to use for authentication. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
CreateHomeCacheAuthPassword string `yaml:"create_home_cache_auth_password" env:"OCIS_CACHE_AUTH_PASSWORD;GATEWAY_CREATE_HOME_CACHE_AUTH_PASSWORD" desc:"The password to use for authentication. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
ProviderCacheStore string `yaml:"provider_cache_store" env:"OCIS_CACHE_STORE;GATEWAY_PROVIDER_CACHE_STORE" desc:"The type of the cache store. Supported values are: 'memory', 'redis-sentinel', 'nats-js-kv', 'noop'. See the text description for details." introductionVersion:"pre5.0"`
ProviderCacheNodes []string `yaml:"provider_cache_nodes" env:"OCIS_CACHE_STORE_NODES;GATEWAY_PROVIDER_CACHE_STORE_NODES" desc:"A list of nodes to access the configured store. This has no effect when 'memory' store is configured. Note that the behaviour how nodes are used is dependent on the library of the configured store. See the Environment Variable Types description for more details." introductionVersion:"pre5.0"`
ProviderCacheDatabase string `yaml:"provider_cache_database" env:"OCIS_CACHE_DATABASE" desc:"The database name the configured store should use." introductionVersion:"pre5.0"`
ProviderCacheTTL time.Duration `yaml:"provider_cache_ttl" env:"OCIS_CACHE_TTL;GATEWAY_PROVIDER_CACHE_TTL" desc:"Default time to live for user info in the cache. Only applied when access tokens has no expiration. See the Environment Variable Types description for more details." introductionVersion:"pre5.0"`
ProviderCacheDisablePersistence bool `yaml:"provider_cache_disable_persistence" env:"OCIS_CACHE_DISABLE_PERSISTENCE;GATEWAY_PROVIDER_CACHE_DISABLE_PERSISTENCE" desc:"Disables persistence of the provider cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false." introductionVersion:"5.0"`
ProviderCacheAuthUsername string `yaml:"provider_cache_auth_username" env:"OCIS_CACHE_AUTH_USERNAME;GATEWAY_PROVIDER_CACHE_AUTH_USERNAME" desc:"The username to use for authentication. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
ProviderCacheAuthPassword string `yaml:"provider_cache_auth_password" env:"OCIS_CACHE_AUTH_PASSWORD;GATEWAY_PROVIDER_CACHE_AUTH_PASSWORD" desc:"The password to use for authentication. Only applies when store type 'nats-js-kv' is configured." introductionVersion:"5.0"`
}
@@ -39,14 +39,10 @@ func DefaultConfig() *config.Config {
DisableHomeCreationOnLogin: true,
TransferExpires: 24 * 60 * 60,
Cache: config.Cache{
ProviderCacheStore: "noop",
ProviderCacheNodes: []string{"127.0.0.1:9233"},
ProviderCacheDatabase: "cache-providers",
ProviderCacheTTL: 300 * time.Second,
CreateHomeCacheStore: "memory",
CreateHomeCacheNodes: []string{"127.0.0.1:9233"},
CreateHomeCacheDatabase: "cache-createhome",
CreateHomeCacheTTL: 300 * time.Second,
ProviderCacheStore: "noop",
ProviderCacheNodes: []string{"127.0.0.1:9233"},
ProviderCacheDatabase: "cache-providers",
ProviderCacheTTL: 300 * time.Second,
},
FrontendPublicURL: "https://localhost:9200",
+16 -10
View File
@@ -75,16 +75,6 @@ func GatewayConfigFromStruct(cfg *config.Config, logger log.Logger) map[string]i
"cache_auth_username": cfg.Cache.ProviderCacheAuthUsername,
"cache_auth_password": cfg.Cache.ProviderCacheAuthPassword,
},
"create_personal_space_cache_config": map[string]interface{}{
"cache_store": cfg.Cache.CreateHomeCacheStore,
"cache_nodes": cfg.Cache.CreateHomeCacheNodes,
"cache_database": cfg.Cache.CreateHomeCacheDatabase,
"cache_table": "create_personal_space",
"cache_ttl": cfg.Cache.CreateHomeCacheTTL,
"cache_disable_persistence": cfg.Cache.CreateHomeCacheDisablePersistence,
"cache_auth_username": cfg.Cache.CreateHomeCacheAuthUsername,
"cache_auth_password": cfg.Cache.CreateHomeCacheAuthPassword,
},
},
"authregistry": map[string]interface{}{
"driver": "static",
@@ -162,6 +152,22 @@ func spacesProviders(cfg *config.Config, logger log.Logger) map[string]map[strin
},
},
},
"com.owncloud.api.storage-users-vault": {
// Use the dedicated storage provider for vault
"providerid": utils.VaultStorageProviderID,
"spaces": map[string]interface{}{
"personal": map[string]interface{}{
// The mount point must have the "vault/" prefix to be picked up by the vault storage provider
"mount_point": "/vault/users",
"path_template": "/vault/users/{{.Space.Owner.Id.OpaqueId}}",
},
"project": map[string]interface{}{
// The mount point must have the "vault/" prefix to be picked up by the vault storage provider
"mount_point": "/vault/projects",
"path_template": "/vault/projects/{{.Space.Name}}",
},
},
},
cfg.StorageSharesEndpoint: {
"providerid": utils.ShareStorageProviderID,
"spaces": map[string]interface{}{
+2
View File
@@ -39,6 +39,8 @@ type Config struct {
Validation Validation `yaml:"validation"`
EnableVaultMode bool `yaml:"enable_vault_mode" env:"GRAPH_ENABLE_VAULT_MODE" desc:"Enable vault mode for the graph service runned in addition to the regular graph service. Required the running the storage-users-vault additional service." introductionVersion:"daledda"`
Context context.Context `yaml:"-"`
}
+1 -1
View File
@@ -2,5 +2,5 @@ package config
// Service defines the available service configuration.
type Service struct {
Name string `yaml:"-"`
Name string `yaml:"name" env:"GRAPH_SERVICE_NAME" desc:"The name of the service." introductionVersion:"daledda"`
}
+23
View File
@@ -0,0 +1,23 @@
package middleware
import (
"net/http"
"github.com/owncloud/ocis/v2/ocis-pkg/log"
"github.com/owncloud/ocis/v2/ocis-pkg/mfa"
)
// RequireMFA middleware is used to require the user in context to have MFA satisfied
func RequireMFA(logger log.Logger) func(next http.Handler) http.Handler {
return func(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if !mfa.Has(r.Context()) {
l := logger.SubloggerWithRequestID(r.Context())
l.Error().Str("path", r.URL.Path).Msg("MFA required but not satisfied")
mfa.SetRequiredStatus(w)
return
}
next.ServeHTTP(w, r)
})
}
}
@@ -158,6 +158,11 @@ func (g Graph) GetRootDriveChildren(w http.ResponseWriter, r *http.Request) {
filters = append(filters, listStorageSpacesUserFilter(currentUser.GetId().GetOpaqueId()))
filters = append(filters, listStorageSpacesTypeFilter("personal"))
// force vault storage space if vault mode is enabled
if g.config.EnableVaultMode {
filters = append(filters, listStorageSpacesIDFilter(utils.VaultStorageProviderID))
}
res, err := gatewayClient.ListStorageSpaces(ctx, &storageprovider.ListStorageSpacesRequest{
Filters: filters,
})
+11 -15
View File
@@ -29,7 +29,6 @@ import (
"google.golang.org/protobuf/proto"
"github.com/owncloud/ocis/v2/ocis-pkg/l10n"
"github.com/owncloud/ocis/v2/ocis-pkg/mfa"
v0 "github.com/owncloud/ocis/v2/protogen/gen/ocis/messages/settings/v0"
settingssvc "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/settings/v0"
"github.com/owncloud/ocis/v2/services/graph/pkg/errorcode"
@@ -133,13 +132,6 @@ func (g Graph) GetAllDrives(version APIVersion) http.HandlerFunc {
// GetAllDrivesV1 attempts to retrieve the current users drives;
// it includes another user's drives, if the current user has the permission.
func (g Graph) GetAllDrivesV1(w http.ResponseWriter, r *http.Request) {
if !mfa.Has(r.Context()) {
logger := g.logger.SubloggerWithRequestID(r.Context())
logger.Error().Str("path", r.URL.Path).Msg("MFA required but not satisfied")
mfa.SetRequiredStatus(w)
return
}
spaces, errCode := g.getDrives(r, true, APIVersion_1)
if errCode != nil {
errorcode.RenderError(w, r, errCode)
@@ -160,13 +152,6 @@ func (g Graph) GetAllDrivesV1(w http.ResponseWriter, r *http.Request) {
// it includes the grantedtoV2 property
// it uses unified roles instead of the cs3 representations
func (g Graph) GetAllDrivesV1Beta1(w http.ResponseWriter, r *http.Request) {
if !mfa.Has(r.Context()) {
logger := g.logger.SubloggerWithRequestID(r.Context())
logger.Error().Str("path", r.URL.Path).Msg("MFA required but not satisfied")
mfa.SetRequiredStatus(w)
return
}
drives, errCode := g.getDrives(r, true, APIVersion_1_Beta_1)
if errCode != nil {
errorcode.RenderError(w, r, errCode)
@@ -437,6 +422,11 @@ func (g Graph) createDrive(w http.ResponseWriter, r *http.Request, apiVersion AP
csr.Owner = us
}
// force vault storage space if vault mode is enabled
if g.config.EnableVaultMode {
csr.Opaque = utils.AppendPlainToOpaque(csr.Opaque, "storage_id", utils.VaultStorageProviderID)
}
resp, err := gatewayClient.CreateStorageSpace(ctx, &csr)
if err != nil {
logger.Error().Err(err).Msg("could not create drive: transport error")
@@ -762,6 +752,7 @@ func (g Graph) ListStorageSpacesWithFilters(ctx context.Context, filters []*stor
if err != nil {
return nil, err
}
lReq := &storageprovider.ListStorageSpacesRequest{
Opaque: &types.Opaque{Map: map[string]*types.OpaqueEntry{
"permissions": {
@@ -776,6 +767,11 @@ func (g Graph) ListStorageSpacesWithFilters(ctx context.Context, filters []*stor
Filters: filters,
}
// force vault storage space if vault mode is enabled
if g.config.EnableVaultMode {
utils.AppendPlainToOpaque(lReq.Opaque, "storage_id", utils.VaultStorageProviderID)
}
gatewayClient, err := g.gatewaySelector.Next()
if err != nil {
return nil, err
+3 -3
View File
@@ -113,7 +113,7 @@ var _ = Describe("Graph", func() {
r := httptest.NewRequest(http.MethodGet, "/graph/v1.0/me/drives", nil)
r = r.WithContext(ctx)
rr := httptest.NewRecorder()
svc.GetDrivesV1(rr, r)
svc.ServeHTTP(rr, r)
Expect(rr.Code).To(Equal(http.StatusOK))
})
@@ -126,7 +126,7 @@ var _ = Describe("Graph", func() {
r := httptest.NewRequest(http.MethodGet, "/graph/v1.0/drives", nil)
r = r.WithContext(mfa.Set(ctx, true))
rr := httptest.NewRecorder()
svc.GetAllDrivesV1(rr, r)
svc.ServeHTTP(rr, r)
Expect(rr.Code).To(Equal(http.StatusOK))
})
@@ -138,7 +138,7 @@ var _ = Describe("Graph", func() {
r := httptest.NewRequest(http.MethodGet, "/graph/v1.0/drives", nil)
rr := httptest.NewRecorder()
svc.GetAllDrivesV1(rr, r)
svc.ServeHTTP(rr, r)
Expect(rr.Code).To(Equal(http.StatusForbidden))
Expect(rr.Header().Get("X-Ocis-Mfa-Required")).To(Equal("true"))
})
+7 -2
View File
@@ -203,6 +203,8 @@ func NewService(opts ...Option) (Graph, error) { //nolint:maintidx
requireAdmin = options.RequireAdminMiddleware
}
requireMFA := graphm.RequireMFA(options.Logger)
drivesDriveItemService, err := NewDrivesDriveItemService(options.Logger, options.GatewaySelector)
if err != nil {
return svc, err
@@ -225,6 +227,9 @@ func NewService(opts ...Option) (Graph, error) { //nolint:maintidx
m.Route(options.Config.HTTP.Root, func(r chi.Router) {
r.Use(middleware.StripSlashes)
if options.Config.EnableVaultMode {
r.Use(requireMFA)
}
r.Route("/v1beta1", func(r chi.Router) {
r.Route("/me", func(r chi.Router) {
@@ -235,7 +240,7 @@ func NewService(opts ...Option) (Graph, error) { //nolint:maintidx
})
})
r.Route("/drives", func(r chi.Router) {
r.Get("/", svc.GetAllDrives(APIVersion_1_Beta_1))
r.With(requireMFA).Get("/", svc.GetAllDrives(APIVersion_1_Beta_1))
r.Post("/", svc.CreateDriveV1Beta1)
r.Route("/{driveID}", func(r chi.Router) {
r.Get("/", svc.GetSingleDriveV1Beta1)
@@ -331,7 +336,7 @@ func NewService(opts ...Option) (Graph, error) { //nolint:maintidx
})
})
r.Route("/drives", func(r chi.Router) {
r.Get("/", svc.GetAllDrives(APIVersion_1))
r.With(requireMFA).Get("/", svc.GetAllDrives(APIVersion_1))
r.Post("/", svc.CreateDrive)
r.Route("/{driveID}", func(r chi.Router) {
r.Patch("/", svc.UpdateDrive)
@@ -125,6 +125,7 @@ func (s Service) processEvent(e events.Event) error {
if err := events.Publish(ctx, s.stream, events.PostprocessingStepFinished{
Outcome: outcome,
UploadID: ev.UploadID,
ResourceID: ev.ResourceID,
ExecutingUser: ev.ExecutingUser,
Filename: ev.Filename,
FinishedStep: ev.StepToStart,
@@ -119,6 +119,7 @@ func (pp *Postprocessing) finished(outcome events.PostprocessingOutcome) events.
UploadID: pp.ID,
ExecutingUser: pp.User,
Filename: pp.Filename,
ResourceID: pp.ResourceID,
Outcome: outcome,
ImpersonatingUser: pp.ImpersonatingUser,
}
+1
View File
@@ -373,6 +373,7 @@ func loadMiddlewares(logger log.Logger, cfg *config.Config,
middleware.Logger(logger),
middleware.WithRevaGatewaySelector(gatewaySelector),
middleware.RoleQuotas(cfg.RoleQuotas),
middleware.CreateVaultHome(cfg.CreateVaultHome),
),
// trigger space assignment when a user logs in
middleware.SpaceManager(
+1
View File
@@ -48,6 +48,7 @@ type Config struct {
ClaimSpaceManagement ClaimSpaceManagement `yaml:"claim_space_management"`
MultiFactorAuthentication MFAConfig `yaml:"mfa"`
MultiInstance MultiInstanceConfig `yaml:"multi_instance"`
CreateVaultHome bool `yaml:"create_vault_home" env:"PROXY_CREATE_VAULT_HOME" desc:"Set this to true to automatically create a new vault home for the user if it does not exist." introductionVersion:"daledda"`
Context context.Context `json:"-" yaml:"-"`
}
@@ -273,6 +273,10 @@ func DefaultPolicies() []config.Policy {
Endpoint: "/graph/",
Service: "com.owncloud.web.graph",
},
{
Endpoint: "/vault/graph/",
Service: "com.owncloud.web.graph-vault",
},
{
Endpoint: "/api/v0/settings",
Service: "com.owncloud.web.settings",
+48 -9
View File
@@ -3,15 +3,16 @@ package middleware
import (
"net/http"
"strconv"
"time"
gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1"
userv1beta1 "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1"
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
"github.com/jellydator/ttlcache/v3"
"github.com/owncloud/ocis/v2/ocis-pkg/log"
"github.com/owncloud/ocis/v2/services/graph/pkg/errorcode"
revactx "github.com/owncloud/reva/v2/pkg/ctx"
"github.com/owncloud/reva/v2/pkg/rgrpc/status"
"github.com/owncloud/reva/v2/pkg/rgrpc/todo/pool"
"github.com/owncloud/reva/v2/pkg/utils"
"google.golang.org/grpc/metadata"
@@ -22,12 +23,20 @@ func CreateHome(optionSetters ...Option) func(next http.Handler) http.Handler {
options := newOptions(optionSetters...)
logger := options.Logger
cache := ttlcache.New(
ttlcache.WithTTL[string, string](60*time.Second),
ttlcache.WithDisableTouchOnHit[string, string](),
)
go cache.Start()
return func(next http.Handler) http.Handler {
return &createHome{
next: next,
logger: logger,
revaGatewaySelector: options.RevaGatewaySelector,
roleQuotas: options.RoleQuotas,
createVaultHome: options.CreateVaultHome,
cache: cache,
}
}
}
@@ -37,6 +46,8 @@ type createHome struct {
logger log.Logger
revaGatewaySelector pool.Selectable[gateway.GatewayAPIClient]
roleQuotas map[string]uint64
createVaultHome bool
cache *ttlcache.Cache[string, string]
}
func (m createHome) ServeHTTP(w http.ResponseWriter, req *http.Request) {
@@ -48,7 +59,6 @@ func (m createHome) ServeHTTP(w http.ResponseWriter, req *http.Request) {
token := req.Header.Get("x-access-token")
// we need to pass the token to authenticate the CreateHome request.
//ctx := tokenpkg.ContextSetToken(r.Context(), token)
ctx := metadata.AppendToOutgoingContext(req.Context(), revactx.TokenHeader, token)
createHomeReq := &provider.CreateHomeRequest{}
@@ -69,13 +79,42 @@ func (m createHome) ServeHTTP(w http.ResponseWriter, req *http.Request) {
if err != nil {
m.logger.Err(err).Msg("error selecting next gateway client")
} else {
createHomeRes, err := client.CreateHome(ctx, createHomeReq)
if err != nil {
m.logger.Err(err).Msg("error calling CreateHome")
} else if createHomeRes.Status.Code != rpc.Code_CODE_OK {
err := status.NewErrorFromCode(createHomeRes.Status.Code, "gateway")
if createHomeRes.Status.Code != rpc.Code_CODE_ALREADY_EXISTS {
m.logger.Err(err).Msg("error when calling Createhome")
key := "home" + u.GetId().GetOpaqueId()
if !m.cache.Has(key) {
createHomeRes, err := client.CreateHome(ctx, createHomeReq)
switch {
case err != nil:
m.logger.Err(err).Msg("error calling CreateHome")
case createHomeRes.GetStatus().GetCode() == rpc.Code_CODE_OK:
m.logger.Debug().Interface("userID", u.GetId().GetOpaqueId()).Msg("personal space created")
m.cache.Set(key, "ok", 0)
case createHomeRes.GetStatus().GetCode() == rpc.Code_CODE_ALREADY_EXISTS:
m.logger.Info().Interface("userID", u.GetId().GetOpaqueId()).Interface("status", createHomeRes.GetStatus()).Msg("personal space already exists")
m.cache.Set(key, "ok", 0)
default:
m.logger.Error().Interface("userID", u.GetId().GetOpaqueId()).Interface("status", createHomeRes.GetStatus()).Msg("personal space creation failed")
}
}
if m.createVaultHome {
vaultKey := "vault" + u.GetId().GetOpaqueId()
if !m.cache.Has(vaultKey) {
// Create vault personal space
// Inject storage_id into opaque for vault personal space
createHomeReq.Opaque = utils.AppendPlainToOpaque(createHomeReq.Opaque, "storage_id", utils.VaultStorageProviderID)
cpsRes, err := client.CreateHome(ctx, createHomeReq)
switch {
case err != nil:
m.logger.Err(err).Msg("error calling CreateHome for vault personal")
case cpsRes.GetStatus().GetCode() == rpc.Code_CODE_OK:
m.logger.Debug().Interface("userID", u.GetId().GetOpaqueId()).Msg("vault personal space created")
m.cache.Set(vaultKey, "ok", 0)
case cpsRes.GetStatus().GetCode() == rpc.Code_CODE_ALREADY_EXISTS:
m.logger.Info().Interface("userID", u.GetId().GetOpaqueId()).Interface("status", cpsRes.GetStatus()).Msg("vault personal space already exists")
m.cache.Set(vaultKey, "ok", 0)
default:
m.logger.Error().Interface("userID", u.GetId().GetOpaqueId()).Interface("status", cpsRes.GetStatus()).Msg("vault personal space creation failed")
}
}
}
}
+9
View File
@@ -69,6 +69,8 @@ type Options struct {
// RoleQuotas hold userid:quota mappings. These will be used when provisioning new users.
// The users will get as much quota as is set for their role.
RoleQuotas map[string]uint64
// CreateVaultHome creates a new vault home for the user if it does not exist.
CreateVaultHome bool
// TraceProvider sets the tracing provider.
TraceProvider trace.TracerProvider
// SkipUserInfo prevents the oidc middleware from querying the userinfo endpoint and read any claims directly from the access token instead
@@ -243,6 +245,13 @@ func RoleQuotas(roleQuotas map[string]uint64) Option {
}
}
// CreateVaultHome sets the create vault home flag
func CreateVaultHome(createVaultHome bool) Option {
return func(o *Options) {
o.CreateVaultHome = createVaultHome
}
}
// TraceProvider sets the tracing provider.
func TraceProvider(tp trace.TracerProvider) Option {
return func(o *Options) {
-3
View File
@@ -87,9 +87,6 @@ func HandleEvents(s Searcher, bus events.Consumer, logger log.Logger, cfg *confi
case events.FileUploaded:
indexSpaceDebouncer.Debounce(getSpaceID(ev.Ref))
case events.UploadReady:
if ev.Failed {
return
}
indexSpaceDebouncer.Debounce(getSpaceID(ev.FileRef))
case events.SpaceRenamed:
indexSpaceDebouncer.Debounce(ev.ID)
+2 -5
View File
@@ -469,11 +469,8 @@ func (s *Service) IndexSpace(spaceID *provider.StorageSpaceId) error {
docMtime, parseErr := time.Parse(time.RFC3339Nano, r.Mtime)
if parseErr == nil && !docMtime.Before(fileMtime) {
if info.Type == provider.ResourceType_RESOURCE_TYPE_CONTAINER {
// Always descend into directories — a directory's
// mtime only reflects direct child add/remove, not
// whether all children were successfully indexed.
// With O(1) DocID lookups the cost is negligible.
return nil
s.logger.Debug().Str("path", ref.Path).Msg("subtree hasn't changed. Skipping.")
return filepath.SkipDir
}
s.logger.Debug().Str("path", ref.Path).Msg("element hasn't changed. Skipping.")
return nil
-136
View File
@@ -3,9 +3,6 @@ package search_test
import (
"context"
"errors"
"fmt"
"sync/atomic"
"time"
gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1"
userv1beta1 "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
@@ -203,139 +200,6 @@ var _ = Describe("Searchprovider", func() {
err := s.IndexSpace(&sprovider.StorageSpaceId{OpaqueId: "storageid$spaceid!spaceid"})
Expect(err).ShouldNot(HaveOccurred())
})
It("descends into already-indexed directories to index unvisited children", func() {
// Simulate a large tree where all directories are already indexed
// (mtime matches) but each contains one unindexed file — e.g. after
// a Tika crash interrupted a previous reindex run. The fix ensures
// we never SkipDir for directories, so children are always visited.
//
// 10,000 directories: pessimistic-case benchmark confirming the walker
// scales linearly even when every directory is already indexed.
const numDirs = 10000
gatewayClient.On("GetUserByClaim", mock.Anything, mock.Anything).Return(&userv1beta1.GetUserByClaimResponse{
Status: status.NewOK(context.Background()),
User: user,
}, nil)
extractor.On("Extract", mock.Anything, mock.Anything, mock.Anything).Return(content.Document{}, nil)
// The indexed mtime that the engine returns for directories.
indexedMtime := time.Unix(5000, 0).UTC().Format(time.RFC3339Nano)
// Build root: a container that lists numDirs child directories.
rootInfo := &sprovider.ResourceInfo{
Id: &sprovider.ResourceId{StorageId: "storageid", SpaceId: "spaceid", OpaqueId: "spaceid"},
Type: sprovider.ResourceType_RESOURCE_TYPE_CONTAINER,
Path: ".",
Mtime: &typesv1beta1.Timestamp{Seconds: 5000},
}
dirInfos := make([]*sprovider.ResourceInfo, numDirs)
for i := 0; i < numDirs; i++ {
dirInfos[i] = &sprovider.ResourceInfo{
Id: &sprovider.ResourceId{StorageId: "storageid", SpaceId: "spaceid", OpaqueId: fmt.Sprintf("dir-%d", i)},
Type: sprovider.ResourceType_RESOURCE_TYPE_CONTAINER,
Path: fmt.Sprintf("dir-%d", i),
Mtime: &typesv1beta1.Timestamp{Seconds: 5000},
}
}
// Pre-build file infos for each directory (map for O(1) dispatch).
fileInfoByDir := make(map[string]*sprovider.ResourceInfo, numDirs)
for i := 0; i < numDirs; i++ {
dirID := fmt.Sprintf("dir-%d", i)
fileInfoByDir[dirID] = &sprovider.ResourceInfo{
Id: &sprovider.ResourceId{StorageId: "storageid", SpaceId: "spaceid", OpaqueId: fmt.Sprintf("file-%d", i)},
ParentId: &sprovider.ResourceId{StorageId: "storageid", SpaceId: "spaceid", OpaqueId: dirID},
Type: sprovider.ResourceType_RESOURCE_TYPE_FILE,
Path: fmt.Sprintf("file-%d.pdf", i),
Size: 1024,
Mtime: &typesv1beta1.Timestamp{Seconds: 5000},
}
}
// Build path-to-fileInfo map for O(1) Stat dispatch.
fileInfoByPath := make(map[string]*sprovider.ResourceInfo, numDirs)
for dirID, fi := range fileInfoByDir {
fileInfoByPath["./"+dirID+"/"+fi.Path] = fi
}
// Single Stat mock dispatching via map — avoids 10k separate matchers.
gatewayClient.On("Stat", mock.Anything, mock.Anything).Return(
func(_ context.Context, sreq *sprovider.StatRequest, _ ...grpc.CallOption) *sprovider.StatResponse {
if sreq.Ref.ResourceId != nil && sreq.Ref.ResourceId.OpaqueId == "spaceid" {
return &sprovider.StatResponse{
Status: status.NewOK(context.Background()),
Info: rootInfo,
}
}
if fi, ok := fileInfoByPath[sreq.Ref.Path]; ok {
return &sprovider.StatResponse{
Status: status.NewOK(context.Background()),
Info: fi,
}
}
return &sprovider.StatResponse{Status: status.NewOK(context.Background()), Info: rootInfo}
},
func(_ context.Context, _ *sprovider.StatRequest, _ ...grpc.CallOption) error {
return nil
},
)
// Single ListContainer mock dispatching via map.
gatewayClient.On("ListContainer", mock.Anything, mock.Anything).Return(
func(_ context.Context, req *sprovider.ListContainerRequest, _ ...grpc.CallOption) *sprovider.ListContainerResponse {
opaqueID := req.Ref.ResourceId.OpaqueId
if opaqueID == "spaceid" {
return &sprovider.ListContainerResponse{
Status: status.NewOK(context.Background()),
Infos: dirInfos,
}
}
if fi, ok := fileInfoByDir[opaqueID]; ok {
return &sprovider.ListContainerResponse{
Status: status.NewOK(context.Background()),
Infos: []*sprovider.ResourceInfo{fi},
}
}
return &sprovider.ListContainerResponse{
Status: status.NewOK(context.Background()),
Infos: nil,
}
},
func(_ context.Context, _ *sprovider.ListContainerRequest, _ ...grpc.CallOption) error {
return nil
},
)
// Lookup: root and directories are already indexed with matching mtime.
// Use a map for O(1) lookup instead of linear scan (matters at 10k dirs).
indexedIDs := make(map[string]bool, numDirs+1)
indexedIDs["storageid$spaceid!spaceid"] = true
for i := 0; i < numDirs; i++ {
indexedIDs[fmt.Sprintf("storageid$spaceid!dir-%d", i)] = true
}
indexedResource := &engine.Resource{Document: content.Document{Mtime: indexedMtime}, Extracted: true}
indexClient.On("Lookup", mock.MatchedBy(func(id string) bool {
return indexedIDs[id] || len(id) > 18 // dir-N or file-N IDs
})).Return(func(id string) (*engine.Resource, error) {
if indexedIDs[id] {
return indexedResource, nil
}
// Files are not indexed.
return nil, engine.ErrResourceNotFound
})
// Track Upsert calls — each unindexed file should trigger one.
var upsertCount atomic.Int32
indexClient.On("Upsert", mock.Anything, mock.Anything).Run(func(_ mock.Arguments) {
upsertCount.Add(1)
}).Return(nil)
err := s.IndexSpace(&sprovider.StorageSpaceId{OpaqueId: "storageid$spaceid!spaceid"})
Expect(err).ShouldNot(HaveOccurred())
Expect(int(upsertCount.Load())).To(Equal(numDirs), "every unindexed file inside an already-indexed directory must be visited")
})
})
Describe("UpdateTags", func() {
@@ -45,6 +45,8 @@ type Config struct {
MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;STORAGE_USERS_MACHINE_AUTH_API_KEY" desc:"Machine auth API key used to validate internal requests necessary for the access to resources from other services." introductionVersion:"5.0"`
CliMaxAttemptsRenameFile int `yaml:"max_attempts_rename_file" env:"STORAGE_USERS_CLI_MAX_ATTEMPTS_RENAME_FILE" desc:"The maximum number of attempts to rename a file when a user restores a file to an existing destination with the same name. The minimum value is 100." introductionVersion:"5.0"`
EnableVaultMode bool `yaml:"enable_vault_mode" env:"STORAGE_USERS_ENABLE_VAULT_MODE" desc:"Enable vault mode for the storage-users service runned in addition to the regular storage-users service by owerrwiting the MountID to VaultStorageProviderID. Required the running the storage-users-vault additional service." introductionVersion:"daledda"`
Context context.Context `yaml:"-"`
}
@@ -215,6 +217,7 @@ type Events struct {
TLSRootCaCertPath string `yaml:"tls_root_ca_cert_path" env:"OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE;STORAGE_USERS_EVENTS_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided STORAGE_USERS_EVENTS_TLS_INSECURE will be seen as false." introductionVersion:"pre5.0"`
EnableTLS bool `yaml:"enable_tls" env:"OCIS_EVENTS_ENABLE_TLS;STORAGE_USERS_EVENTS_ENABLE_TLS" desc:"Enable TLS for the connection to the events broker. The events broker is the ocis service which receives and delivers events between the services." introductionVersion:"pre5.0"`
NumConsumers int `yaml:"num_consumers" env:"STORAGE_USERS_EVENTS_NUM_CONSUMERS" desc:"The amount of concurrent event consumers to start. Event consumers are used for post-processing files. Multiple consumers increase parallelisation, but will also increase CPU and memory demands. The setting has no effect when the OCIS_ASYNC_UPLOADS is set to false. The default and minimum value is 1." introductionVersion:"pre5.0"`
ConsumerGroup string `yaml:"consumer_group" env:"STORAGE_USERS_EVENTS_CONSUMER_GROUP" desc:"The consumer group name to use for the event consumers. The consumer group name is used to identify the consumers." introductionVersion:"daledda"`
AuthUsername string `yaml:"username" env:"OCIS_EVENTS_AUTH_USERNAME;STORAGE_USERS_EVENTS_AUTH_USERNAME" desc:"The username to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services." introductionVersion:"5.0"`
AuthPassword string `yaml:"password" env:"OCIS_EVENTS_AUTH_PASSWORD;STORAGE_USERS_EVENTS_AUTH_PASSWORD" desc:"The password to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services." introductionVersion:"5.0"`
}
@@ -8,6 +8,7 @@ import (
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
"github.com/owncloud/ocis/v2/ocis-pkg/structs"
"github.com/owncloud/ocis/v2/services/storage-users/pkg/config"
"github.com/owncloud/reva/v2/pkg/utils"
)
// FullDefaultConfig returns a fully initialized default configuration
@@ -226,6 +227,11 @@ func EnsureDefaults(cfg *config.Config) {
cfg.HTTP.CORS.AllowedOrigins[0] == "https://localhost:9200") {
cfg.HTTP.CORS.AllowedOrigins = []string{cfg.Commons.OcisURL}
}
// set mount id to vault storage provider id
if cfg.EnableVaultMode {
cfg.MountID = utils.VaultStorageProviderID
}
}
// Sanitize sanitized the configuration
@@ -198,7 +198,8 @@ func Ocis(cfg *config.Config) map[string]interface{} {
"cache_auth_password": cfg.IDCache.AuthPassword,
},
"events": map[string]interface{}{
"numconsumers": cfg.Events.NumConsumers,
"numconsumers": cfg.Events.NumConsumers,
"consumer_group": cfg.Events.ConsumerGroup,
},
"tokens": map[string]interface{}{
"transfer_shared_secret": cfg.Commons.TransferSecret,
@@ -321,7 +322,8 @@ func S3NG(cfg *config.Config) map[string]interface{} {
"cache_auth_password": cfg.IDCache.AuthPassword,
},
"events": map[string]interface{}{
"numconsumers": cfg.Events.NumConsumers,
"numconsumers": cfg.Events.NumConsumers,
"consumer_group": cfg.Events.ConsumerGroup,
},
"tokens": map[string]interface{}{
"transfer_shared_secret": cfg.Commons.TransferSecret,
@@ -59,8 +59,8 @@ Feature: List upload sessions via CLI command
Scenario: list and cleanup the expired upload sessions
Given a file "large.zip" with the size of "2GB" has been created locally
And user "Alice" has uploaded a file from "filesForUpload/textfile.txt" to "file.txt" via TUS inside of the space "Personal" using the WebDAV API
And the config "STORAGE_USERS_UPLOAD_EXPIRATION" has been set to "1" for "storageuser" service
And user "Alice" has uploaded a file from "filesForUpload/textfile.txt" to "file.txt" via TUS inside of the space "Personal" using the WebDAV API
And user "Alice" has tried to upload file "filesForUpload/large.zip" to "large.zip" inside space "Personal" via TUS
When the administrator lists all the upload sessions with flag "expired"
Then the command should be successful
@@ -203,8 +203,8 @@ Feature: List upload sessions via CLI command
Scenario: restart expired upload sessions
Given a file "large.zip" with the size of "2GB" has been created locally
And user "Alice" has uploaded a file from "filesForUpload/textfile.txt" to "file.txt" via TUS inside of the space "Personal" using the WebDAV API
And the config "STORAGE_USERS_UPLOAD_EXPIRATION" has been set to "1" for "storageuser" service
And user "Alice" has uploaded a file from "filesForUpload/textfile.txt" to "file.txt" via TUS inside of the space "Personal" using the WebDAV API
And user "Alice" has tried to upload file "filesForUpload/large.zip" to "large.zip" inside space "Personal" via TUS
When the administrator restarts the expired upload sessions using the CLI
Then the command should be successful
-143
View File
@@ -1,143 +0,0 @@
#!/usr/bin/env python3
"""
Run CS3 API validator tests locally and in GitHub Actions CI.
Config sourced from .drone.star cs3ApiTests() — single source of truth.
Usage: python3 tests/acceptance/run-cs3api.py
"""
import os
import shutil
import signal
import subprocess
import sys
import time
from pathlib import Path
# ---------------------------------------------------------------------------
# Constants (mirroring .drone.star)
# ---------------------------------------------------------------------------
# HTTPS — matching drone: ocis init generates a self-signed cert; proxy uses TLS by default.
# Host-side curl calls use -k (insecure) to skip cert verification.
OCIS_URL = "https://127.0.0.1:9200"
CS3API_IMAGE = "owncloud/cs3api-validator:0.2.1"
def get_docker_bridge_ip() -> str:
"""Return the Docker bridge gateway IP, reachable from host and Docker containers."""
r = subprocess.run(
["docker", "network", "inspect", "bridge",
"--format", "{{range .IPAM.Config}}{{.Gateway}}{{end}}"],
capture_output=True, text=True, check=True,
)
return r.stdout.strip()
def base_server_env(repo_root: Path, ocis_config_dir: str, ocis_public_url: str) -> dict:
"""OCIS server environment matching drone ocisServer(deploy_type='cs3api_validator')."""
return {
"OCIS_URL": ocis_public_url,
"OCIS_CONFIG_DIR": ocis_config_dir,
"STORAGE_USERS_DRIVER": "ocis",
"PROXY_ENABLE_BASIC_AUTH": "true",
# No PROXY_TLS override — drone lets ocis use its default TLS (self-signed cert from init)
# IDP excluded: its static assets are absent when running as a host process
"OCIS_EXCLUDE_RUN_SERVICES": "idp",
"OCIS_LOG_LEVEL": "error",
"IDM_CREATE_DEMO_USERS": "true",
"IDM_ADMIN_PASSWORD": "admin",
"FRONTEND_SEARCH_MIN_LENGTH": "2",
"OCIS_ASYNC_UPLOADS": "true",
"OCIS_EVENTS_ENABLE_TLS": "false",
"NATS_NATS_HOST": "0.0.0.0",
"NATS_NATS_PORT": "9233",
"OCIS_JWT_SECRET": "some-ocis-jwt-secret",
"EVENTHISTORY_STORE": "memory",
"WEB_UI_CONFIG_FILE": str(repo_root / "tests/config/drone/ocis-config.json"),
# cs3api_validator extras (drone ocisServer deploy_type="cs3api_validator")
"GATEWAY_GRPC_ADDR": "0.0.0.0:9142",
"OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD": "false",
}
def wait_for(condition_fn, timeout: int, label: str) -> None:
deadline = time.time() + timeout
while not condition_fn():
if time.time() > deadline:
print(f"Timeout waiting for {label}", file=sys.stderr)
sys.exit(1)
time.sleep(1)
def ocis_healthy(ocis_url: str) -> bool:
r = subprocess.run(
["curl", "-sk", "-uadmin:admin",
f"{ocis_url}/graph/v1.0/users/admin",
"-w", "%{http_code}", "-o", "/dev/null"],
capture_output=True, text=True,
)
return r.stdout.strip() == "200"
def main() -> int:
repo_root = Path(__file__).resolve().parents[2]
ocis_bin = repo_root / "ocis/bin/ocis"
ocis_config_dir = Path.home() / ".ocis/config"
subprocess.run(["make", "-C", str(repo_root / "ocis"), "build"], check=True)
# Docker bridge gateway IP: reachable from both the host and Docker containers.
# cs3api-validator connects to the GRPC gateway at {bridge_ip}:9142.
bridge_ip = get_docker_bridge_ip()
print(f"Docker bridge IP: {bridge_ip}", flush=True)
server_env = {**os.environ}
server_env.update(base_server_env(repo_root, str(ocis_config_dir),
f"https://{bridge_ip}:9200"))
subprocess.run(
[str(ocis_bin), "init", "--insecure", "true"],
env=server_env,
check=True,
)
shutil.copy(
repo_root / "tests/config/drone/app-registry.yaml",
ocis_config_dir / "app-registry.yaml",
)
print("Starting ocis...", flush=True)
ocis_proc = subprocess.Popen(
[str(ocis_bin), "server"],
env=server_env,
)
def cleanup(*_):
try:
ocis_proc.terminate()
except Exception:
pass
signal.signal(signal.SIGTERM, cleanup)
signal.signal(signal.SIGINT, cleanup)
try:
wait_for(lambda: ocis_healthy(OCIS_URL), 300, "ocis")
print("ocis ready.", flush=True)
print(f"\nRunning cs3api-validator against {bridge_ip}:9142", flush=True)
result = subprocess.run(
["docker", "run", "--rm",
"--entrypoint", "/usr/bin/cs3api-validator",
CS3API_IMAGE,
"/var/lib/cs3api-validator",
f"--endpoint={bridge_ip}:9142"],
)
return result.returncode
finally:
cleanup()
if __name__ == "__main__":
sys.exit(main())
-688
View File
@@ -1,688 +0,0 @@
#!/usr/bin/env python3
"""
Run ocis acceptance tests locally and in GitHub Actions CI.
Config sourced from .drone.star localApiTests — single source of truth.
Usage: BEHAT_SUITES=apiGraph python3 tests/acceptance/run-github.py
"""
import json
import os
import sys
import subprocess
import signal
import time
import tempfile
import shutil
from pathlib import Path
# ---------------------------------------------------------------------------
# Config sourced from .drone.star
# NOTE: EMAIL_SMTP_HOST is "email" (container name) in drone, "localhost" here
# ---------------------------------------------------------------------------
EMAIL_SMTP_HOST = "localhost"
EMAIL_SMTP_PORT = "1025"
EMAIL_PORT = "8025"
EMAIL_SMTP_SENDER = "ownCloud <noreply@example.com>"
LOCAL_API_TESTS = {
"contractAndLock": {
"suites": ["apiContract", "apiLocks"],
},
"settingsAndNotification": {
"suites": ["apiSettings", "apiNotification", "apiCors"],
"emailNeeded": True,
"extraEnvironment": {
"EMAIL_HOST": EMAIL_SMTP_HOST,
"EMAIL_PORT": EMAIL_PORT,
},
"extraServerEnvironment": {
"OCIS_ADD_RUN_SERVICES": "notifications",
"NOTIFICATIONS_SMTP_HOST": EMAIL_SMTP_HOST,
"NOTIFICATIONS_SMTP_PORT": EMAIL_SMTP_PORT,
"NOTIFICATIONS_SMTP_INSECURE": "true",
"NOTIFICATIONS_SMTP_SENDER": EMAIL_SMTP_SENDER,
"NOTIFICATIONS_DEBUG_ADDR": "0.0.0.0:9174",
},
},
"graphUser": {
"suites": ["apiGraphUser"],
},
"spaces": {
"suites": ["apiSpaces"],
},
"spacesShares": {
"suites": ["apiSpacesShares"],
},
"davOperations": {
"suites": [
"apiSpacesDavOperation", "apiDownloads", "apiAsyncUpload",
"apiDepthInfinity", "apiArchiver", "apiActivities",
],
},
"groupAndSearch1": {
"suites": ["apiSearch1", "apiGraph", "apiGraphGroup"],
},
"search2": {
"suites": ["apiSearch2", "apiSearchContent"],
"tikaNeeded": True,
"extraServerEnvironment": {
"FRONTEND_FULL_TEXT_SEARCH_ENABLED": "true",
"SEARCH_EXTRACTOR_TYPE": "tika",
"SEARCH_EXTRACTOR_TIKA_TIKA_URL": "http://localhost:9998",
"SEARCH_EXTRACTOR_CS3SOURCE_INSECURE": "true",
},
},
"sharingNg1": {
"suites": ["apiSharingNgShares", "apiReshare", "apiSharingNgPermissions"],
},
"sharingNgAdditionalShareRole": {
"suites": ["apiSharingNgAdditionalShareRole"],
},
"sharingNgShareInvitation": {
"suites": ["apiSharingNgDriveInvitation", "apiSharingNgItemInvitation"],
},
"sharingNgLinkShare": {
"suites": [
"apiSharingNgDriveLinkShare", "apiSharingNgItemLinkShare",
"apiSharingNgLinkShareManagement",
],
},
"antivirus": {
"suites": ["apiAntivirus"],
"antivirusNeeded": True,
"extraServerEnvironment": {
"ANTIVIRUS_SCANNER_TYPE": "clamav",
"ANTIVIRUS_CLAMAV_SOCKET": "tcp://clamav:3310",
"POSTPROCESSING_STEPS": "virusscan",
"OCIS_ADD_RUN_SERVICES": "antivirus",
"ANTIVIRUS_DEBUG_ADDR": "0.0.0.0:9277",
},
},
"ocm": {
"suites": ["apiOcm"],
"emailNeeded": True,
"federationServer": True,
"extraEnvironment": {
"EMAIL_HOST": EMAIL_SMTP_HOST,
"EMAIL_PORT": EMAIL_PORT,
},
"extraServerEnvironment": {
"OCIS_ADD_RUN_SERVICES": "ocm,notifications",
"OCIS_ENABLE_OCM": "true",
"OCM_OCM_INVITE_MANAGER_INSECURE": "true",
"OCM_OCM_SHARE_PROVIDER_INSECURE": "true",
"OCM_OCM_STORAGE_PROVIDER_INSECURE": "true",
"OCM_OCM_PROVIDER_AUTHORIZER_PROVIDERS_FILE": "", # set at runtime
"NOTIFICATIONS_SMTP_HOST": EMAIL_SMTP_HOST,
"NOTIFICATIONS_SMTP_PORT": EMAIL_SMTP_PORT,
"NOTIFICATIONS_SMTP_INSECURE": "true",
"NOTIFICATIONS_SMTP_SENDER": EMAIL_SMTP_SENDER,
},
},
"authApp": {
"suites": ["apiAuthApp"],
"extraServerEnvironment": {
"OCIS_ADD_RUN_SERVICES": "auth-app",
"PROXY_ENABLE_APP_AUTH": "true",
},
},
"wopi": {
"suites": ["apiCollaboration"],
"collaborationServiceNeeded": True,
"extraServerEnvironment": {
"GATEWAY_GRPC_ADDR": "0.0.0.0:9142",
},
},
"cliCommands": {
"suites": ["cliCommands", "apiServiceAvailability"],
"antivirusNeeded": True,
"emailNeeded": True,
"extraEnvironment": {
"EMAIL_HOST": EMAIL_SMTP_HOST,
"EMAIL_PORT": EMAIL_PORT,
},
"extraServerEnvironment": {
"NOTIFICATIONS_SMTP_HOST": EMAIL_SMTP_HOST,
"NOTIFICATIONS_SMTP_PORT": EMAIL_SMTP_PORT,
"NOTIFICATIONS_SMTP_INSECURE": "true",
"NOTIFICATIONS_SMTP_SENDER": EMAIL_SMTP_SENDER,
"NOTIFICATIONS_DEBUG_ADDR": "0.0.0.0:9174",
"ANTIVIRUS_SCANNER_TYPE": "clamav",
"ANTIVIRUS_CLAMAV_SOCKET": "tcp://clamav:3310",
"ANTIVIRUS_DEBUG_ADDR": "0.0.0.0:9277",
"OCIS_ADD_RUN_SERVICES": "antivirus,notifications",
},
},
}
# reverse lookup: suite → group config
_SUITE_TO_CONFIG: dict = {}
for _cfg in LOCAL_API_TESTS.values():
for _s in _cfg.get("suites", []):
_SUITE_TO_CONFIG[_s] = _cfg
# GitHub Actions uses --network host: all wopi services share one network namespace.
# Drone gives each service its own container → all can use 9300/9301/9304.
# Assign distinct ports here to avoid collisions.
_WOPI_PORTS = {
"collabora": {"grpc": 9301, "http": 9300, "debug": 9304},
"onlyoffice": {"grpc": 9311, "http": 9310, "debug": 9314},
"fakeoffice": {"grpc": 9321, "http": 9320, "debug": 9324},
}
def merged_config(suites: list) -> dict:
"""Union config for all requested suites."""
merged = {
"emailNeeded": False,
"antivirusNeeded": False,
"tikaNeeded": False,
"federationServer": False,
"collaborationServiceNeeded": False,
"extraServerEnvironment": {},
"extraEnvironment": {},
}
for suite in suites:
cfg = _SUITE_TO_CONFIG.get(suite, {})
for flag in ("emailNeeded", "antivirusNeeded", "tikaNeeded",
"federationServer", "collaborationServiceNeeded"):
if cfg.get(flag):
merged[flag] = True
merged["extraServerEnvironment"].update(cfg.get("extraServerEnvironment", {}))
merged["extraEnvironment"].update(cfg.get("extraEnvironment", {}))
return merged
def base_server_env(repo_root: Path, ocis_url: str, ocis_config_dir: str) -> dict:
"""Base ocis server environment matching drone ocisServer() function."""
return {
"OCIS_URL": ocis_url,
"OCIS_CONFIG_DIR": ocis_config_dir,
"STORAGE_USERS_DRIVER": "ocis",
"PROXY_ENABLE_BASIC_AUTH": "true",
"OCIS_LOG_LEVEL": "error",
"IDM_CREATE_DEMO_USERS": "true",
"IDM_ADMIN_PASSWORD": "admin",
"FRONTEND_SEARCH_MIN_LENGTH": "2",
"OCIS_ASYNC_UPLOADS": "true",
"OCIS_EVENTS_ENABLE_TLS": "false",
"NATS_NATS_HOST": "0.0.0.0",
"NATS_NATS_PORT": "9233",
"OCIS_JWT_SECRET": "some-ocis-jwt-secret",
"EVENTHISTORY_STORE": "memory",
"OCIS_TRANSLATION_PATH": str(repo_root / "tests/config/translations"),
"WEB_UI_CONFIG_FILE": str(repo_root / "tests/config/drone/ocis-config.json"),
"THUMBNAILS_TXT_FONTMAP_FILE": str(repo_root / "tests/config/drone/fontsMap.json"),
# default tika off (overridden by search2 extraServerEnvironment)
"SEARCH_EXTRACTOR_TYPE": "basic",
"FRONTEND_FULL_TEXT_SEARCH_ENABLED": "false",
# debug addresses
"ACTIVITYLOG_DEBUG_ADDR": "0.0.0.0:9197",
"APP_PROVIDER_DEBUG_ADDR": "0.0.0.0:9165",
"APP_REGISTRY_DEBUG_ADDR": "0.0.0.0:9243",
"AUTH_BASIC_DEBUG_ADDR": "0.0.0.0:9147",
"AUTH_MACHINE_DEBUG_ADDR": "0.0.0.0:9167",
"AUTH_SERVICE_DEBUG_ADDR": "0.0.0.0:9198",
"CLIENTLOG_DEBUG_ADDR": "0.0.0.0:9260",
"EVENTHISTORY_DEBUG_ADDR": "0.0.0.0:9270",
"FRONTEND_DEBUG_ADDR": "0.0.0.0:9141",
"GATEWAY_DEBUG_ADDR": "0.0.0.0:9143",
"GRAPH_DEBUG_ADDR": "0.0.0.0:9124",
"GROUPS_DEBUG_ADDR": "0.0.0.0:9161",
"IDM_DEBUG_ADDR": "0.0.0.0:9239",
"IDP_DEBUG_ADDR": "0.0.0.0:9134",
"INVITATIONS_DEBUG_ADDR": "0.0.0.0:9269",
"NATS_DEBUG_ADDR": "0.0.0.0:9234",
"OCDAV_DEBUG_ADDR": "0.0.0.0:9163",
"OCM_DEBUG_ADDR": "0.0.0.0:9281",
"OCS_DEBUG_ADDR": "0.0.0.0:9114",
"POSTPROCESSING_DEBUG_ADDR": "0.0.0.0:9255",
"PROXY_DEBUG_ADDR": "0.0.0.0:9205",
"SEARCH_DEBUG_ADDR": "0.0.0.0:9224",
"SETTINGS_DEBUG_ADDR": "0.0.0.0:9194",
"SHARING_DEBUG_ADDR": "0.0.0.0:9151",
"SSE_DEBUG_ADDR": "0.0.0.0:9139",
"STORAGE_PUBLICLINK_DEBUG_ADDR": "0.0.0.0:9179",
"STORAGE_SHARES_DEBUG_ADDR": "0.0.0.0:9156",
"STORAGE_SYSTEM_DEBUG_ADDR": "0.0.0.0:9217",
"STORAGE_USERS_DEBUG_ADDR": "0.0.0.0:9159",
"THUMBNAILS_DEBUG_ADDR": "0.0.0.0:9189",
"USERLOG_DEBUG_ADDR": "0.0.0.0:9214",
"USERS_DEBUG_ADDR": "0.0.0.0:9145",
"WEB_DEBUG_ADDR": "0.0.0.0:9104",
"WEBDAV_DEBUG_ADDR": "0.0.0.0:9119",
"WEBFINGER_DEBUG_ADDR": "0.0.0.0:9279",
}
def wait_for(condition_fn, timeout: int, label: str, container: str = None) -> None:
start = time.time()
deadline = start + timeout
last_log = start
while not condition_fn():
now = time.time()
if now > deadline:
elapsed = int(now - start)
print(f"Timeout waiting for {label} after {elapsed}s", file=sys.stderr)
# dump docker diagnostics — use explicit container name if provided
cname = container or label
for cmd in (
["docker", "ps", "-a", "--filter", f"name={cname}", "--no-trunc"],
["docker", "logs", "--tail", "50", cname],
):
r = subprocess.run(cmd, capture_output=True, text=True)
if r.stdout.strip():
print(f"--- {' '.join(cmd)} ---", file=sys.stderr)
print(r.stdout, file=sys.stderr)
if r.stderr.strip():
print(r.stderr, file=sys.stderr)
sys.exit(1)
if now - last_log >= 30:
print(f" Waiting for {label}... {int(now - start)}s")
last_log = now
time.sleep(1)
def ocis_healthy(ocis_url: str) -> bool:
r = subprocess.run(
["curl", "-sk", "-uadmin:admin",
f"{ocis_url}/graph/v1.0/users/admin",
"-w", "%{http_code}", "-o", "/dev/null"],
capture_output=True, text=True,
)
return r.stdout.strip() == "200"
def mailpit_healthy() -> bool:
return subprocess.run(
["curl", "-sf", "http://localhost:8025/api/v1/messages"],
capture_output=True,
).returncode == 0
def tika_healthy() -> bool:
return subprocess.run(
["curl", "-sf", "http://localhost:9998"],
capture_output=True,
).returncode == 0
def _tcp_ready(host: str, port: int) -> bool:
"""Check if a TCP port is accepting connections."""
import socket
try:
with socket.create_connection((host, port), timeout=2):
return True
except (ConnectionRefusedError, OSError):
return False
def clamav_healthy() -> bool:
return _tcp_ready("localhost", 3310)
def run(cmd: list, env: dict = None, check: bool = True):
e = {**os.environ, **(env or {})}
return subprocess.run(cmd, env=e, check=check)
def main() -> int:
behat_suites_raw = os.environ.get("BEHAT_SUITES", "").strip()
if not behat_suites_raw:
print("BEHAT_SUITES is required", file=sys.stderr)
return 1
suites = [s.strip() for s in behat_suites_raw.split(",") if s.strip()]
acceptance_test_type = os.environ.get("ACCEPTANCE_TEST_TYPE", "api")
repo_root = Path(__file__).resolve().parents[2]
ocis_bin = repo_root / "ocis/bin/ocis"
wrapper_bin = repo_root / "tests/ociswrapper/bin/ociswrapper"
ocis_url = "https://localhost:9200"
ocis_config_dir = Path.home() / ".ocis/config"
ocis_fed_url = "https://localhost:10200"
cfg = merged_config(suites)
print(f"Suites: {suites}")
print(f"Services: email={cfg['emailNeeded']} tika={cfg['tikaNeeded']} "
f"antivirus={cfg['antivirusNeeded']} federation={cfg['federationServer']} "
f"wopi={cfg['collaborationServiceNeeded']}")
# generate IDP web assets (required for IDP service to start; matches drone ci-node-generate)
run(["make", "-C", str(repo_root / "services/idp"), "ci-node-generate"])
# build (ENABLE_VIPS=true when libvips-dev is installed, matching drone)
build_env = {}
if subprocess.run(["pkg-config", "--exists", "vips"],
capture_output=True).returncode == 0:
build_env["ENABLE_VIPS"] = "true"
run(["make", "-C", str(repo_root / "ocis"), "build"], env=build_env)
run(["make", "-C", str(repo_root / "tests/ociswrapper"), "build"],
env={"GOWORK": "off"})
# php deps
run(["composer", "install", "--no-progress"],
env={"COMPOSER_NO_INTERACTION": "1", "COMPOSER_NO_AUDIT": "1"})
run(["composer", "bin", "behat", "install", "--no-progress"],
env={"COMPOSER_NO_INTERACTION": "1", "COMPOSER_NO_AUDIT": "1"})
# optional services
procs = []
if cfg["emailNeeded"]:
print("Starting mailpit...")
run(["docker", "run", "-d", "--name", "mailpit", "--network", "host",
"axllent/mailpit:v1.22.3"])
wait_for(mailpit_healthy, 60, "mailpit")
print("mailpit ready.")
if cfg["antivirusNeeded"]:
print("Starting clamav...")
run(["docker", "run", "-d", "--name", "clamav", "--network", "host",
"owncloudci/clamavd"])
wait_for(clamav_healthy, 300, "clamav")
print("clamav ready.")
# override socket: drone uses container DNS "clamav", we use localhost
cfg["extraServerEnvironment"]["ANTIVIRUS_CLAMAV_SOCKET"] = "tcp://localhost:3310"
if cfg["tikaNeeded"]:
print("Starting tika...")
run(["docker", "run", "-d", "--name", "tika", "--network", "host",
"apache/tika:3.2.2.0-full"])
wait_for(tika_healthy, 120, "tika")
print("tika ready.")
# OCM federation: rewrite providers.json with localhost URLs
if cfg["federationServer"]:
providers_src = repo_root / "tests/config/drone/providers.json"
providers = json.loads(providers_src.read_text())
for p in providers:
# replace container DNS names with localhost
p["domain"] = p["domain"].replace("ocis-server:9200", "localhost:9200")
p["domain"] = p["domain"].replace("federation-ocis-server:10200", "localhost:10200")
for svc in p.get("services", []):
ep = svc.get("endpoint", {})
ep["path"] = ep.get("path", "").replace("ocis-server:9200", "localhost:9200")
ep["path"] = ep.get("path", "").replace("federation-ocis-server:10200", "localhost:10200")
svc["host"] = svc.get("host", "").replace("ocis-server:9200", "localhost:9200")
svc["host"] = svc.get("host", "").replace("federation-ocis-server:10200", "localhost:10200")
providers_tmp = tempfile.NamedTemporaryFile(
mode="w", suffix=".json", prefix="ocm-providers-", delete=False)
json.dump(providers, providers_tmp)
providers_tmp.close()
cfg["extraServerEnvironment"]["OCM_OCM_PROVIDER_AUTHORIZER_PROVIDERS_FILE"] = providers_tmp.name
# init ocis
run([str(ocis_bin), "init", "--insecure", "true"])
shutil.copy(
repo_root / "tests/config/drone/app-registry.yaml",
ocis_config_dir / "app-registry.yaml",
)
# generate fontsMap.json with correct font path (drone hardcodes /drone/src/...)
font_path = str(repo_root / "tests/config/drone/NotoSans.ttf")
fontmap_tmp = tempfile.NamedTemporaryFile(
mode="w", suffix=".json", prefix="fontsMap-", delete=False)
json.dump({"defaultFont": font_path}, fontmap_tmp)
fontmap_tmp.close()
# assemble ocis server env
server_env = {**os.environ}
server_env.update(base_server_env(repo_root, ocis_url, str(ocis_config_dir)))
server_env["THUMBNAILS_TXT_FONTMAP_FILE"] = fontmap_tmp.name
server_env.update(cfg["extraServerEnvironment"])
# start ociswrapper (primary ocis)
print("Starting ocis...")
wrapper_proc = subprocess.Popen(
[str(wrapper_bin), "serve",
"--bin", str(ocis_bin),
"--url", ocis_url,
"--admin-username", "admin",
"--admin-password", "admin"],
env=server_env,
)
procs.append(wrapper_proc)
# start federation ocis server (second instance on port 10200)
if cfg["federationServer"]:
fed_config_dir = Path.home() / ".ocis-federation/config"
fed_config_dir.mkdir(parents=True, exist_ok=True)
fed_data_dir = Path.home() / ".ocis-federation"
fed_env = {**os.environ}
fed_env.update(base_server_env(repo_root, ocis_fed_url, str(fed_config_dir)))
fed_env.update(cfg["extraServerEnvironment"])
fed_env.update({
"OCIS_URL": ocis_fed_url,
"PROXY_HTTP_ADDR": "0.0.0.0:10200",
"OCIS_BASE_DATA_PATH": str(fed_data_dir),
# use different ports to avoid conflicts with primary
"GATEWAY_GRPC_ADDR": "0.0.0.0:10142",
"NATS_NATS_PORT": "10233",
"NATS_NATS_HOST": "0.0.0.0",
})
# init federation ocis with separate config
run([str(ocis_bin), "init", "--insecure", "true",
"--config-path", str(fed_config_dir)])
shutil.copy(
repo_root / "tests/config/drone/app-registry.yaml",
fed_config_dir / "app-registry.yaml",
)
print("Starting federation ocis...")
fed_proc = subprocess.Popen(
[str(ocis_bin), "server"],
env=fed_env,
)
procs.append(fed_proc)
# ---------------------------------------------------------------------------
# Collaboration service helpers — same names/call pattern as drone.star
# Only deviation: container hostnames → localhost
# ---------------------------------------------------------------------------
def fakeOffice():
# drone: OC_CI_ALPINE container running serve-hosting-discovery.sh with repo at /drone/src
# use same image so BusyBox nc (not OpenBSD nc) handles FIN correctly on stdin EOF
run(["docker", "run", "-d", "--name", "fakeoffice", "--network", "host",
"-v", f"{repo_root}:/drone/src:ro",
"owncloudci/alpine:latest",
"sh", "/drone/src/tests/config/drone/serve-hosting-discovery.sh"])
return []
def collaboraService():
# drone commands copy-pasted verbatim
run(["docker", "run", "-d", "--name", "collabora", "--network", "host",
"-e", "DONT_GEN_SSL_CERT=set",
"-e", f"extra_params=--o:ssl.enable=true --o:ssl.termination=true "
f"--o:welcome.enable=false --o:net.frame_ancestors=https://localhost:9200",
"--entrypoint", "/bin/sh",
"collabora/code:24.04.5.1.1",
"-c", "\n".join([
"set -e",
"coolconfig generate-proof-key",
"bash /start-collabora-online.sh",
])])
return []
def onlyofficeService():
# GitHub runner ships PostgreSQL pre-started on 5432.
# OnlyOffice supervisord starts its own PostgreSQL on 5432 internally.
# With --network host both compete for the same port → OnlyOffice DB never
# starts → docservice stays down → nginx returns 502 forever.
# Drone avoids this because each service has its own network namespace.
subprocess.run(["sudo", "systemctl", "stop", "postgresql"],
capture_output=True)
only_office_json = repo_root / "tests/config/drone/only-office.json"
run(["docker", "run", "-d", "--name", "onlyoffice", "--network", "host",
"-e", "WOPI_ENABLED=true",
"-e", "USE_UNAUTHORIZED_STORAGE=true",
"-v", f"{only_office_json}:/tmp/only-office.json:ro",
"--entrypoint", "/bin/sh",
"onlyoffice/documentserver:9.0.0",
"-c", "\n".join([
"set -e",
"cp /tmp/only-office.json /etc/onlyoffice/documentserver/local.json",
"openssl req -x509 -newkey rsa:4096 -keyout onlyoffice.key -out onlyoffice.crt -sha256 -days 365 -batch -nodes",
"mkdir -p /var/www/onlyoffice/Data/certs",
"cp onlyoffice.key /var/www/onlyoffice/Data/certs/",
"cp onlyoffice.crt /var/www/onlyoffice/Data/certs/",
"chmod 400 /var/www/onlyoffice/Data/certs/onlyoffice.key",
"/app/ds/run-document-server.sh",
])])
return []
def wopiCollaborationService(name, ocis_url=ocis_url):
# drone: startOcisService("collaboration", "wopi-{name}", environment)
# runs: ocis/bin/ocis-debug collaboration server
service_name = "wopi-%s" % name
ports = _WOPI_PORTS[name]
environment = {
**os.environ,
"OCIS_URL": ocis_url,
"MICRO_REGISTRY": "nats-js-kv",
"MICRO_REGISTRY_ADDRESS": "localhost:9233",
"COLLABORATION_LOG_LEVEL": "debug",
"COLLABORATION_GRPC_ADDR": f"0.0.0.0:{ports['grpc']}",
"COLLABORATION_HTTP_ADDR": f"0.0.0.0:{ports['http']}",
"COLLABORATION_DEBUG_ADDR": f"0.0.0.0:{ports['debug']}",
"COLLABORATION_APP_PROOF_DISABLE": "true",
"COLLABORATION_APP_INSECURE": "true",
"COLLABORATION_CS3API_DATAGATEWAY_INSECURE": "true",
"OCIS_JWT_SECRET": "some-ocis-jwt-secret",
"COLLABORATION_WOPI_SECRET": "some-wopi-secret",
}
if name == "collabora":
environment["COLLABORATION_APP_NAME"] = "Collabora"
environment["COLLABORATION_APP_PRODUCT"] = "Collabora"
environment["COLLABORATION_APP_ADDR"] = "https://localhost:9980"
environment["COLLABORATION_APP_ICON"] = "https://localhost:9980/favicon.ico"
elif name == "onlyoffice":
environment["COLLABORATION_APP_NAME"] = "OnlyOffice"
environment["COLLABORATION_APP_PRODUCT"] = "OnlyOffice"
environment["COLLABORATION_APP_ADDR"] = "https://localhost:443"
environment["COLLABORATION_APP_ICON"] = "https://localhost:443/web-apps/apps/documenteditor/main/resources/img/favicon.ico"
elif name == "fakeoffice":
environment["COLLABORATION_APP_NAME"] = "FakeOffice"
environment["COLLABORATION_APP_PRODUCT"] = "Microsoft"
environment["COLLABORATION_APP_ADDR"] = "http://localhost:8080"
environment["COLLABORATION_WOPI_SRC"] = f"http://localhost:{ports['http']}"
print(f"Starting {service_name}...")
return [subprocess.Popen([str(ocis_bin), "collaboration", "server"], env=environment)]
def ocisHealthCheck(name, services=[]):
# drone: curl healthz + readyz on each service (timeout 300s)
for service in services:
host, port = service.rsplit(":", 1)
for endpoint in ("healthz", "readyz"):
wait_for(
lambda h="localhost", p=int(port), ep=endpoint: subprocess.run(
["curl", "-sf", f"http://{h}:{p}/{ep}"], capture_output=True
).returncode == 0,
300, f"{service}/{endpoint}",
)
print(f"health-check-{name}: all services healthy.")
def wopi_discovery_ready(app_url: str) -> bool:
"""Return True once the WOPI app's /hosting/discovery returns HTTP 200."""
url = app_url.rstrip("/") + "/hosting/discovery"
r = subprocess.run(
["curl", "-sfk", url], capture_output=True
)
return r.returncode == 0
# drone.star non-k8s collaborationServiceNeeded path (lines 1195-1196, 1140-1141, 1179-1183)
if cfg["collaborationServiceNeeded"]:
procs += fakeOffice() + collaboraService() + onlyofficeService()
# Wait for each app's /hosting/discovery to return 200 before starting its
# collaboration service. GetAppURLs in server.go calls discovery synchronously
# at startup — non-200 exits the process immediately, healthz never binds.
wait_for(lambda: wopi_discovery_ready("http://localhost:8080"), 300, "fakeoffice discovery", container="fakeoffice")
wait_for(lambda: wopi_discovery_ready("https://localhost:9980"), 300, "collabora discovery", container="collabora")
wait_for(lambda: wopi_discovery_ready("https://localhost:443"), 300, "onlyoffice discovery", container="onlyoffice")
procs += wopiCollaborationService("fakeoffice") + \
wopiCollaborationService("collabora") + \
wopiCollaborationService("onlyoffice")
ocisHealthCheck("wopi", [
f"localhost:{_WOPI_PORTS['collabora']['debug']}",
f"localhost:{_WOPI_PORTS['onlyoffice']['debug']}",
f"localhost:{_WOPI_PORTS['fakeoffice']['debug']}",
])
def cleanup(*_):
for p in procs:
try:
p.terminate()
except Exception:
pass
signal.signal(signal.SIGTERM, cleanup)
signal.signal(signal.SIGINT, cleanup)
try:
wait_for(lambda: ocis_healthy(ocis_url), 300, "ocis")
print("ocis ready.")
if cfg["federationServer"]:
wait_for(lambda: ocis_healthy(ocis_fed_url), 300, "federation ocis")
print("federation ocis ready.")
# expected failures file
if acceptance_test_type == "core-api":
filter_tags = "~@skipOnGraph&&~@skipOnOcis-OCIS-Storage"
base_failures = repo_root / "tests/acceptance/expected-failures-API-on-OCIS-storage.md"
else:
filter_tags = "~@skip&&~@skipOnGraph&&~@skipOnOcis-OCIS-Storage"
base_failures = repo_root / "tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md"
ef_override = os.environ.get("EXPECTED_FAILURES_FILE")
if ef_override:
p = Path(ef_override)
base_failures = p if p.is_absolute() else repo_root / p
# merge expected-failures-without-remotephp.md (drone does this)
tmp = tempfile.NamedTemporaryFile(mode="w", suffix=".md", delete=False)
tmp.write(base_failures.read_text())
without_rphp = repo_root / "tests/acceptance/expected-failures-without-remotephp.md"
if without_rphp.exists():
tmp.write("\n")
tmp.write(without_rphp.read_text())
tmp.close()
# run tests
behat_env = {
**os.environ,
"TEST_SERVER_URL": ocis_url,
"TEST_SERVER_FED_URL": ocis_fed_url,
"OCIS_WRAPPER_URL": "http://localhost:5200",
"BEHAT_SUITES": behat_suites_raw,
"ACCEPTANCE_TEST_TYPE": acceptance_test_type,
"BEHAT_FILTER_TAGS": filter_tags,
"EXPECTED_FAILURES_FILE": tmp.name,
"STORAGE_DRIVER": "ocis",
"UPLOAD_DELETE_WAIT_TIME": "0",
"EMAIL_HOST": "localhost",
"EMAIL_PORT": EMAIL_PORT,
"COLLABORATION_SERVICE_URL": f"http://localhost:{_WOPI_PORTS['fakeoffice']['http']}",
}
behat_env.update(cfg["extraEnvironment"])
print(f"Running suites: {behat_suites_raw} (type: {acceptance_test_type})")
result = subprocess.run(
["make", "-C", str(repo_root), "test-acceptance-api"],
env=behat_env,
)
return result.returncode
finally:
cleanup()
if __name__ == "__main__":
sys.exit(main())
-244
View File
@@ -1,244 +0,0 @@
#!/usr/bin/env python3
"""
Run litmus WebDAV compliance tests locally and in GitHub Actions CI.
Config sourced from .drone.star litmus() / setupForLitmus() — single source of truth.
Usage: python3 tests/acceptance/run-litmus.py
"""
import json
import os
import re
import shutil
import signal
import subprocess
import sys
import time
from pathlib import Path
# ---------------------------------------------------------------------------
# Constants (mirroring .drone.star)
# ---------------------------------------------------------------------------
# HTTPS — matching drone: ocis init generates a self-signed cert; proxy uses TLS by default.
# Host-side curl calls use -k (insecure) to skip cert verification.
OCIS_URL = "https://127.0.0.1:9200"
LITMUS_IMAGE = "owncloudci/litmus:latest"
LITMUS_TESTS = "basic copymove props http"
SHARE_ENDPOINT = "ocs/v2.php/apps/files_sharing/api/v1/shares"
def get_docker_bridge_ip() -> str:
"""Return the Docker bridge gateway IP, reachable from host and Docker containers."""
r = subprocess.run(
["docker", "network", "inspect", "bridge",
"--format", "{{range .IPAM.Config}}{{.Gateway}}{{end}}"],
capture_output=True, text=True, check=True,
)
return r.stdout.strip()
def base_server_env(repo_root: Path, ocis_config_dir: str, ocis_public_url: str) -> dict:
"""OCIS server environment matching drone ocisServer() for litmus."""
return {
"OCIS_URL": ocis_public_url,
"OCIS_CONFIG_DIR": ocis_config_dir,
"STORAGE_USERS_DRIVER": "ocis",
"PROXY_ENABLE_BASIC_AUTH": "true",
# No PROXY_TLS override — drone lets ocis use its default TLS (self-signed cert from init)
# IDP excluded: its static assets are absent when running as a host process
"OCIS_EXCLUDE_RUN_SERVICES": "idp",
"OCIS_LOG_LEVEL": "error",
"IDM_CREATE_DEMO_USERS": "true",
"IDM_ADMIN_PASSWORD": "admin",
"FRONTEND_SEARCH_MIN_LENGTH": "2",
"OCIS_ASYNC_UPLOADS": "true",
"OCIS_EVENTS_ENABLE_TLS": "false",
"NATS_NATS_HOST": "0.0.0.0",
"NATS_NATS_PORT": "9233",
"OCIS_JWT_SECRET": "some-ocis-jwt-secret",
"EVENTHISTORY_STORE": "memory",
"WEB_UI_CONFIG_FILE": str(repo_root / "tests/config/drone/ocis-config.json"),
}
def wait_for(condition_fn, timeout: int, label: str) -> None:
deadline = time.time() + timeout
while not condition_fn():
if time.time() > deadline:
print(f"Timeout waiting for {label}", file=sys.stderr)
sys.exit(1)
time.sleep(1)
def ocis_healthy(ocis_url: str) -> bool:
r = subprocess.run(
["curl", "-sk", "-uadmin:admin",
f"{ocis_url}/graph/v1.0/users/admin",
"-w", "%{http_code}", "-o", "/dev/null"],
capture_output=True, text=True,
)
return r.stdout.strip() == "200"
def setup_for_litmus(ocis_url: str) -> tuple:
"""
Translate tests/config/drone/setup-for-litmus.sh to Python.
Returns (space_id, public_token).
"""
# get personal space ID
r = subprocess.run(
["curl", "-sk", "-uadmin:admin", f"{ocis_url}/graph/v1.0/me/drives"],
capture_output=True, text=True, check=True,
)
drives = json.loads(r.stdout)
space_id = ""
for drive in drives.get("value", []):
if drive.get("driveType") == "personal":
web_dav_url = drive.get("root", {}).get("webDavUrl", "")
# last non-empty path segment (same as cut -d"/" -f6 in bash)
space_id = [p for p in web_dav_url.split("/") if p][-1]
break
if not space_id:
print("ERROR: could not determine personal space ID", file=sys.stderr)
sys.exit(1)
print(f"SPACE_ID={space_id}")
# create test folder as einstein
subprocess.run(
["curl", "-sk", "-ueinstein:relativity", "-X", "MKCOL",
f"{ocis_url}/remote.php/webdav/new_folder"],
capture_output=True, check=True,
)
# create share from einstein to admin
r = subprocess.run(
["curl", "-sk", "-ueinstein:relativity",
f"{ocis_url}/{SHARE_ENDPOINT}",
"-d", "path=/new_folder&shareType=0&permissions=15&name=new_folder&shareWith=admin"],
capture_output=True, text=True, check=True,
)
share_id_match = re.search(r"<id>(.+?)</id>", r.stdout)
if share_id_match:
share_id = share_id_match.group(1)
# accept the share as admin
subprocess.run(
["curl", "-X", "POST", "-sk", "-uadmin:admin",
f"{ocis_url}/{SHARE_ENDPOINT}/pending/{share_id}"],
capture_output=True, check=True,
)
# create public share as einstein
r = subprocess.run(
["curl", "-sk", "-ueinstein:relativity",
f"{ocis_url}/{SHARE_ENDPOINT}",
"-d", "path=/new_folder&shareType=3&permissions=15&name=new_folder"],
capture_output=True, text=True, check=True,
)
public_token = ""
token_match = re.search(r"<token>(.+?)</token>", r.stdout)
if token_match:
public_token = token_match.group(1)
print(f"PUBLIC_TOKEN={public_token}")
return space_id, public_token
def run_litmus(name: str, endpoint: str) -> int:
print(f"\nTesting endpoint [{name}]: {endpoint}", flush=True)
result = subprocess.run(
["docker", "run", "--rm",
"-e", f"LITMUS_URL={endpoint}",
"-e", "LITMUS_USERNAME=admin",
"-e", "LITMUS_PASSWORD=admin",
"-e", f"TESTS={LITMUS_TESTS}",
LITMUS_IMAGE,
# No extra CMD — ENTRYPOINT is already litmus-wrapper; passing it again
# would make the wrapper use the path as LITMUS_URL, overriding the env var.
],
)
return result.returncode
def main() -> int:
repo_root = Path(__file__).resolve().parents[2]
ocis_bin = repo_root / "ocis/bin/ocis"
ocis_config_dir = Path.home() / ".ocis/config"
# build (matching drone: restores binary from cache, then runs ocis server directly)
subprocess.run(["make", "-C", str(repo_root / "ocis"), "build"], check=True)
# Docker bridge gateway IP: reachable from both the host (via docker0 interface)
# and Docker containers (via bridge network default gateway). Use this as OCIS_URL
# so that any redirects OCIS generates stay on a hostname the litmus container
# can follow — matching how drone uses "ocis-server:9200" consistently.
# HTTPS: owncloudci/litmus accepts insecure (self-signed) certs, just like drone does.
bridge_ip = get_docker_bridge_ip()
litmus_base = f"https://{bridge_ip}:9200"
print(f"Docker bridge IP: {bridge_ip}", flush=True)
# assemble server env first — same env vars drone sets on the container before
# running `ocis init`, so IDM_ADMIN_PASSWORD=admin is present during init and
# the config is written with the correct password (not a random one)
server_env = {**os.environ}
server_env.update(base_server_env(repo_root, str(ocis_config_dir), litmus_base))
# init ocis with full server env (mirrors drone: env is set before ocis init runs)
subprocess.run(
[str(ocis_bin), "init", "--insecure", "true"],
env=server_env,
check=True,
)
shutil.copy(
repo_root / "tests/config/drone/app-registry.yaml",
ocis_config_dir / "app-registry.yaml",
)
# start ocis server directly (matching drone: no ociswrapper for litmus)
print("Starting ocis...", flush=True)
ocis_proc = subprocess.Popen(
[str(ocis_bin), "server"],
env=server_env,
)
def cleanup(*_):
try:
ocis_proc.terminate()
except Exception:
pass
signal.signal(signal.SIGTERM, cleanup)
signal.signal(signal.SIGINT, cleanup)
try:
wait_for(lambda: ocis_healthy(OCIS_URL), 300, "ocis")
print("ocis ready.", flush=True)
space_id, _ = setup_for_litmus(OCIS_URL)
endpoints = [
("old-endpoint", f"{litmus_base}/remote.php/webdav"),
("new-endpoint", f"{litmus_base}/remote.php/dav/files/admin"),
("new-shared", f"{litmus_base}/remote.php/dav/files/admin/Shares/new_folder/"),
("old-shared", f"{litmus_base}/remote.php/webdav/Shares/new_folder/"),
("spaces-endpoint", f"{litmus_base}/remote.php/dav/spaces/{space_id}"),
]
failed = []
for name, endpoint in endpoints:
rc = run_litmus(name, endpoint)
if rc != 0:
failed.append(name)
if failed:
print(f"\nFailed endpoints: {', '.join(failed)}", file=sys.stderr)
return 1
print("\nAll litmus tests passed.")
return 0
finally:
cleanup()
if __name__ == "__main__":
sys.exit(main())
-375
View File
@@ -1,375 +0,0 @@
#!/usr/bin/env python3
"""
Run WOPI validator tests locally and in GitHub Actions CI.
Config sourced from .drone.star wopiValidatorTests() — single source of truth.
Usage: python3 tests/acceptance/run-wopi.py --type builtin
python3 tests/acceptance/run-wopi.py --type cs3
"""
import argparse
import json
import os
import re
import shutil
import signal
import socket
import subprocess
import sys
import time
import urllib.parse
from pathlib import Path
# ---------------------------------------------------------------------------
# Constants (mirroring .drone.star)
# ---------------------------------------------------------------------------
# HTTPS — matching drone; host-side curl calls use -k.
OCIS_URL = "https://127.0.0.1:9200"
VALIDATOR_IMAGE = "owncloudci/wopi-validator"
CS3_WOPI_IMAGE = "cs3org/wopiserver:v10.4.0"
FAKEOFFICE_IMAGE = "owncloudci/alpine:latest"
# Testgroups shared between both variants (drone: testgroups list)
SHARED_TESTGROUPS = [
"BaseWopiViewing",
"CheckFileInfoSchema",
"EditFlows",
"Locks",
"AccessTokens",
"GetLock",
"ExtendedLockLength",
"FileVersion",
"Features",
]
# Testgroups only run for builtin (drone: builtinOnlyTestGroups, with -s flag)
BUILTIN_ONLY_TESTGROUPS = [
"PutRelativeFile",
"RenameFileIfCreateChildFileIsNotSupported",
]
def get_docker_bridge_ip() -> str:
r = subprocess.run(
["docker", "network", "inspect", "bridge",
"--format", "{{range .IPAM.Config}}{{.Gateway}}{{end}}"],
capture_output=True, text=True, check=True,
)
return r.stdout.strip()
def wait_for(condition_fn, timeout: int, label: str) -> None:
deadline = time.time() + timeout
while not condition_fn():
if time.time() > deadline:
print(f"Timeout waiting for {label}", file=sys.stderr)
sys.exit(1)
time.sleep(1)
def ocis_healthy(ocis_url: str) -> bool:
r = subprocess.run(
["curl", "-sk", "-uadmin:admin",
f"{ocis_url}/graph/v1.0/users/admin",
"-w", "%{http_code}", "-o", "/dev/null"],
capture_output=True, text=True,
)
return r.stdout.strip() == "200"
def tcp_reachable(host: str, port: int) -> bool:
try:
with socket.create_connection((host, port), timeout=1):
return True
except Exception:
return False
def wopi_discovery_ready(url: str) -> bool:
r = subprocess.run(
["curl", "-sk", "-o", "/dev/null", "-w", "%{http_code}", url],
capture_output=True, text=True,
)
return r.stdout.strip() == "200"
def base_server_env(repo_root: Path, ocis_config_dir: str, ocis_public_url: str,
bridge_ip: str, wopi_type: str) -> dict:
"""
OCIS server environment matching drone ocisServer(deploy_type='wopi_validator').
builtin: also excludes app-provider (collaboration service takes that role).
"""
exclude = "idp,app-provider" if wopi_type == "builtin" else "idp"
return {
"OCIS_URL": ocis_public_url,
"OCIS_CONFIG_DIR": ocis_config_dir,
"STORAGE_USERS_DRIVER": "ocis",
"PROXY_ENABLE_BASIC_AUTH": "true",
# No PROXY_TLS override — drone uses default TLS (self-signed cert from init)
# IDP excluded: static assets absent when running as host process
"OCIS_EXCLUDE_RUN_SERVICES": exclude,
"OCIS_LOG_LEVEL": "error",
"IDM_CREATE_DEMO_USERS": "true",
"IDM_ADMIN_PASSWORD": "admin",
"FRONTEND_SEARCH_MIN_LENGTH": "2",
"OCIS_ASYNC_UPLOADS": "true",
"OCIS_EVENTS_ENABLE_TLS": "false",
"NATS_NATS_HOST": "0.0.0.0",
"NATS_NATS_PORT": "9233",
"OCIS_JWT_SECRET": "some-ocis-jwt-secret",
"EVENTHISTORY_STORE": "memory",
"WEB_UI_CONFIG_FILE": str(repo_root / "tests/config/drone/ocis-config.json"),
# wopi_validator extras (drone ocisServer deploy_type="wopi_validator")
"GATEWAY_GRPC_ADDR": "0.0.0.0:9142",
"APP_PROVIDER_EXTERNAL_ADDR": "com.owncloud.api.app-provider",
"APP_PROVIDER_DRIVER": "wopi",
"APP_PROVIDER_WOPI_APP_NAME": "FakeOffice",
"APP_PROVIDER_WOPI_APP_URL": f"http://{bridge_ip}:8080",
"APP_PROVIDER_WOPI_INSECURE": "true",
"APP_PROVIDER_WOPI_WOPI_SERVER_EXTERNAL_URL": f"http://{bridge_ip}:9300",
"APP_PROVIDER_WOPI_FOLDER_URL_BASE_URL": ocis_public_url,
}
def collab_service_env(bridge_ip: str, ocis_config_dir: str) -> dict:
"""
Environment for 'ocis collaboration server' (builtin wopi-fakeoffice).
Mirrors drone wopiCollaborationService("fakeoffice").
"""
return {
"OCIS_URL": f"https://{bridge_ip}:9200",
"OCIS_CONFIG_DIR": ocis_config_dir,
"MICRO_REGISTRY": "nats-js-kv",
"MICRO_REGISTRY_ADDRESS": "127.0.0.1:9233",
"COLLABORATION_LOG_LEVEL": "debug",
"COLLABORATION_GRPC_ADDR": "0.0.0.0:9301",
"COLLABORATION_HTTP_ADDR": "0.0.0.0:9300",
"COLLABORATION_DEBUG_ADDR": "0.0.0.0:9304",
"COLLABORATION_APP_PROOF_DISABLE": "true",
"COLLABORATION_APP_INSECURE": "true",
"COLLABORATION_CS3API_DATAGATEWAY_INSECURE": "true",
"OCIS_JWT_SECRET": "some-ocis-jwt-secret",
"COLLABORATION_WOPI_SECRET": "some-wopi-secret",
"COLLABORATION_APP_NAME": "FakeOffice",
"COLLABORATION_APP_PRODUCT": "Microsoft",
"COLLABORATION_APP_ADDR": f"http://{bridge_ip}:8080",
# COLLABORATION_WOPI_SRC is what OCIS tells clients to use — must be reachable
# from Docker validator containers (collaboration service runs as host process)
"COLLABORATION_WOPI_SRC": f"http://{bridge_ip}:9300",
}
def prepare_test_file(bridge_ip: str) -> tuple:
"""
Upload test.wopitest via WebDAV, open the WOPI app, extract credentials.
Mirrors the prepare-test-file step from drone.star.
Returns (access_token, access_token_ttl, wopi_src).
"""
headers_file = "/tmp/wopi-headers.txt"
# PUT empty test file (--retry-connrefused/--retry-all-errors matching drone)
subprocess.run(
["curl", "-sk", "-u", "admin:admin", "-X", "PUT",
"--fail", "--retry-connrefused", "--retry", "7", "--retry-all-errors",
f"{OCIS_URL}/remote.php/webdav/test.wopitest",
"-D", headers_file],
check=True,
)
# Extract Oc-Fileid from response headers
headers_text = Path(headers_file).read_text()
print("--- PUT headers ---", flush=True)
print(headers_text[:500], flush=True)
m = re.search(r"Oc-Fileid:\s*(\S+)", headers_text, re.IGNORECASE)
if not m:
print("ERROR: Oc-Fileid not found in PUT response headers", file=sys.stderr)
sys.exit(1)
file_id = m.group(1).strip()
print(f"FILE_ID={file_id}", flush=True)
# POST to app/open to get WOPI access token and wopi src
url = f"{OCIS_URL}/app/open?app_name=FakeOffice&file_id={urllib.parse.quote(file_id, safe='')}"
r = subprocess.run(
["curl", "-sk", "-u", "admin:admin", "-X", "POST",
"--fail", "--retry-connrefused", "--retry", "7", "--retry-all-errors", url],
capture_output=True, text=True, check=True,
)
open_json = json.loads(r.stdout)
print(f"open.json: {r.stdout[:800]}", flush=True)
access_token = open_json["form_parameters"]["access_token"]
access_token_ttl = str(open_json["form_parameters"]["access_token_ttl"])
app_url = open_json.get("app_url", "")
# Construct wopi_src: drone extracts file ID from app_url after 'files%2F',
# then prepends http://wopi-fakeoffice:9300/wopi/files/ — we use bridge_ip instead.
wopi_base = f"http://{bridge_ip}:9300/wopi/files/"
if "files%2F" in app_url:
file_id_encoded = app_url.split("files%2F")[-1].strip().strip('"')
elif "files/" in app_url:
file_id_encoded = app_url.split("files/")[-1].strip().strip('"')
else:
file_id_encoded = urllib.parse.quote(file_id, safe="")
wopi_src = wopi_base + file_id_encoded
print(f"WOPI_SRC={wopi_src}", flush=True)
return access_token, access_token_ttl, wopi_src
def run_validator(group: str, token: str, wopi_src: str, ttl: str,
secure: bool = False) -> int:
print(f"\nRunning testgroup [{group}] secure={secure}", flush=True)
cmd = [
"docker", "run", "--rm",
"--workdir", "/app",
"--entrypoint", "/app/Microsoft.Office.WopiValidator",
VALIDATOR_IMAGE,
]
if secure:
cmd.append("-s")
cmd += ["-t", token, "-w", wopi_src, "-l", ttl, "--testgroup", group]
return subprocess.run(cmd).returncode
def main() -> int:
parser = argparse.ArgumentParser()
parser.add_argument("--type", choices=["builtin", "cs3"], required=True,
help="WOPI server type: builtin (collaboration service) or cs3 (cs3org/wopiserver)")
args = parser.parse_args()
wopi_type = args.type
repo_root = Path(__file__).resolve().parents[2]
ocis_bin = repo_root / "ocis/bin/ocis"
ocis_config_dir = Path.home() / ".ocis/config"
subprocess.run(["make", "-C", str(repo_root / "ocis"), "build"], check=True)
bridge_ip = get_docker_bridge_ip()
print(f"Docker bridge IP: {bridge_ip}", flush=True)
procs = []
containers = []
def cleanup(*_):
for p in procs:
try:
p.terminate()
except Exception:
pass
for name in containers:
subprocess.run(["docker", "rm", "-f", name], capture_output=True)
signal.signal(signal.SIGTERM, cleanup)
signal.signal(signal.SIGINT, cleanup)
try:
# --- fakeoffice: serves hosting-discovery.xml on :8080 ---
# Mirrors drone fakeOffice() — owncloudci/alpine running serve-hosting-discovery.sh.
# Repo is mounted at /drone/src (the path the script uses).
containers.append("wopi-fakeoffice-fake")
subprocess.run(["docker", "rm", "-f", "wopi-fakeoffice-fake"], capture_output=True)
subprocess.run([
"docker", "run", "-d", "--name", "wopi-fakeoffice-fake",
"-p", "8080:8080",
"-v", f"{repo_root}:/drone/src",
FAKEOFFICE_IMAGE,
"sh", "/drone/src/tests/config/drone/serve-hosting-discovery.sh",
], check=True)
wait_for(lambda: tcp_reachable(bridge_ip, 8080), 60, "fakeoffice:8080")
print("fakeoffice ready.", flush=True)
# --- Init and start OCIS ---
ocis_public_url = f"https://{bridge_ip}:9200"
server_env = {**os.environ}
server_env.update(base_server_env(
repo_root, str(ocis_config_dir), ocis_public_url, bridge_ip, wopi_type))
subprocess.run(
[str(ocis_bin), "init", "--insecure", "true"],
env=server_env, check=True,
)
shutil.copy(
repo_root / "tests/config/drone/app-registry.yaml",
ocis_config_dir / "app-registry.yaml",
)
print("Starting ocis...", flush=True)
ocis_proc = subprocess.Popen([str(ocis_bin), "server"], env=server_env)
procs.append(ocis_proc)
wait_for(lambda: ocis_healthy(OCIS_URL), 300, "ocis")
print("ocis ready.", flush=True)
# --- Wait for fakeoffice discovery endpoint before starting WOPI service ---
# ocis collaboration server calls GetAppURLs synchronously at startup;
# if /hosting/discovery returns non-200, the process exits immediately.
wait_for(lambda: wopi_discovery_ready("http://127.0.0.1:8080/hosting/discovery"),
300, "fakeoffice /hosting/discovery")
print("fakeoffice discovery ready.", flush=True)
# --- Start wopi server (after OCIS is healthy so NATS/gRPC are up) ---
if wopi_type == "builtin":
# Run 'ocis collaboration server' as a host process.
# Mirrors drone wopiCollaborationService("fakeoffice") → startOcisService("collaboration").
collab_env = {**os.environ}
collab_env.update(collab_service_env(bridge_ip, str(ocis_config_dir)))
print("Starting collaboration service...", flush=True)
collab_proc = subprocess.Popen(
[str(ocis_bin), "collaboration", "server"],
env=collab_env,
)
procs.append(collab_proc)
else:
# cs3: patch wopiserver.conf (replace container hostname with bridge_ip),
# then run cs3org/wopiserver as a Docker container.
conf_text = (repo_root / "tests/config/drone/wopiserver.conf").read_text()
conf_text = conf_text.replace("ocis-server", bridge_ip)
conf_tmp = Path("/tmp/wopiserver-patched.conf")
conf_tmp.write_text(conf_text)
secret_tmp = Path("/tmp/wopisecret")
secret_tmp.write_text("123\n")
containers.append("wopi-cs3server")
subprocess.run(["docker", "rm", "-f", "wopi-cs3server"], capture_output=True)
subprocess.run([
"docker", "run", "-d", "--name", "wopi-cs3server",
"-p", "9300:9300",
"-v", f"{conf_tmp}:/etc/wopi/wopiserver.conf",
"-v", f"{secret_tmp}:/etc/wopi/wopisecret",
"--entrypoint", "/app/wopiserver.py",
CS3_WOPI_IMAGE,
], check=True)
wait_for(lambda: tcp_reachable(bridge_ip, 9300), 120, "wopi-fakeoffice:9300")
print("wopi server ready.", flush=True)
# --- prepare-test-file: upload file, get WOPI credentials ---
access_token, ttl, wopi_src = prepare_test_file(bridge_ip)
# --- Run validator for each testgroup ---
failed = []
for group in SHARED_TESTGROUPS:
rc = run_validator(group, access_token, wopi_src, ttl, secure=False)
if rc != 0:
failed.append(group)
if wopi_type == "builtin":
for group in BUILTIN_ONLY_TESTGROUPS:
rc = run_validator(group, access_token, wopi_src, ttl, secure=True)
if rc != 0:
failed.append(group)
if failed:
print(f"\nFailed testgroups: {', '.join(failed)}", file=sys.stderr)
return 1
print("\nAll WOPI validator tests passed.")
return 0
finally:
cleanup()
if __name__ == "__main__":
sys.exit(main())
@@ -0,0 +1,19 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: clamav
spec:
replicas: 1
selector:
matchLabels:
app: clamav
template:
metadata:
labels:
app: clamav
spec:
containers:
- name: clamav
image: owncloudci/clamavd
ports:
- containerPort: 3310
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: clamav
spec:
selector:
app: clamav
ports:
- protocol: TCP
port: 3310
targetPort: 3310
@@ -0,0 +1,24 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: mailpit
labels:
app: mailpit
spec:
replicas: 1
selector:
matchLabels:
app: mailpit
template:
metadata:
labels:
app: mailpit
spec:
containers:
- name: mailpit
image: axllent/mailpit:latest
ports:
- containerPort: 1025
name: smtp
- containerPort: 8025
name: web
@@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
name: mailpit
spec:
selector:
app: mailpit
ports:
- name: smtp
port: 1025
targetPort: smtp
protocol: TCP
appProtocol: tcp
- name: web
port: 8025
targetPort: web
protocol: TCP
+72
View File
@@ -0,0 +1,72 @@
#!/bin/bash
set -e
CHART_REPO="$1"
if [[ -z "$CHART_REPO" ]]; then
echo "[ERR] Chart directory argument missing. Usage: $0 <chart-repo-directory>"
exit 1
fi
if [[ ! -d "$CHART_REPO" ]]; then
echo "[ERR] Path not found: $CHART_REPO"
exit 1
fi
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
ROOT="$(cd $SCRIPT_DIR/../../../.. && pwd)"
CFG_DIR="$ROOT/tests/config/drone/k8s"
CHT_DIR="$CHART_REPO/charts/ocis"
TPL_DIR="$CHT_DIR/templates"
# patch ocis service templates
for service in "$TPL_DIR"/*/; do
if [[ -f "$service/deployment.yaml" ]]; then
if grep -qE 'ocis.caEnv' "$service/deployment.yaml"; then
sed -i '/.*ocis.caEnv.*/a\{{- include "ocis.extraEnvs" . | nindent 12 }}' "$service/deployment.yaml"
sed -i '/.*ocis.caPath.*/a\{{- include "ocis.extraVolMounts" . | nindent 12 }}' "$service/deployment.yaml"
sed -i '/.*ocis.caVolume.*/a\{{- include "ocis.extraVolumes" . | nindent 8 }}' "$service/deployment.yaml"
else
sed -i '/env:/a\{{- include "ocis.extraEnvs" . | nindent 12 }}' "$service/deployment.yaml"
sed -i '/volumeMounts:/a\{{- include "ocis.extraVolMounts" . | nindent 12 }}' "$service/deployment.yaml"
sed -i '/volumes:/a\{{- include "ocis.extraVolumes" . | nindent 8 }}' "$service/deployment.yaml"
fi
fi
done
# copy custom template resources
cp -r $CFG_DIR/templates/* $TPL_DIR/
# add authbasic service
sed -i "/{{- define \"ocis.basicServiceTemplates\" -}}/a\ {{- \$_ := set .scope \"appNameAuthBasic\" \"authbasic\" -}}" $TPL_DIR/_common/_tplvalues.tpl
if [[ "$ENABLE_ANTIVIRUS" == "true" ]]; then
sed -i '/virusscan:/{n;s|false|true|}' $CFG_DIR/values.yaml
fi
if [[ "$ENABLE_EMAIL" == "true" ]]; then
sed -i '/emailNotifications:/{n;s|false|true|}' $CFG_DIR/values.yaml
fi
if [[ "$ENABLE_TIKA" == "true" ]]; then
sed -i 's|type: basic|type: tika|' $CFG_DIR/values.yaml
fi
if [[ "$ENABLE_WOPI" == "true" ]]; then
sed -i '/appsIntegration:/{n;s|false|true|}' $CFG_DIR/values.yaml
# patch collaboration service
# - allow dynamic wopi src
sed -i -E "s|value: http://.*:9300|value: {{ \$officeSuite.wopiSrc }}|" $TPL_DIR/collaboration/deployment.yaml
fi
if [[ "$ENABLE_OCM" == "true" ]]; then
sed -i '/ocm:/{n;s|false|true|}' $CFG_DIR/values.yaml
fi
if [[ "$ENABLE_AUTH_APP" == "true" ]]; then
sed -i '/authapp:/{n;s|false|true|}' $CFG_DIR/values.yaml
fi
# move custom values file
cp $CFG_DIR/values.yaml "$CHT_DIR/ci/deployment-values.yaml"
@@ -0,0 +1,19 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: tika
spec:
replicas: 1
selector:
matchLabels:
app: tika
template:
metadata:
labels:
app: tika
spec:
containers:
- name: tika
image: apache/tika:3.2.2.0-full
ports:
- containerPort: 9998
+12
View File
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: tika
spec:
selector:
app: tika
ports:
- protocol: TCP
port: 9998
targetPort: 9998
type: ClusterIP
@@ -1,4 +1,5 @@
---
namespaceOverride: ocis
image:
repository: owncloud/ocis-rolling
tag: master
-2
View File
@@ -1,2 +0,0 @@
logs/
ocis-charts/
-45
View File
@@ -1,45 +0,0 @@
LOGS_DIR := $(abspath ./logs)
CHART_REPO := $(abspath ./ocis-charts)
HOST_IP := $(shell ip route get 1 | awk '{print $$7}')
OCM ?= false
DOMAIN := ocis-server
ifeq ($(OCM), true)
DOMAIN := federation-ocis-server
endif
.PHONY: create-cluster
create-cluster:
@echo $(LOGS_DIR)
@mkdir -p $(LOGS_DIR)
@chmod 777 $(LOGS_DIR)
k3d cluster create local-ocis \
-p '80:80@loadbalancer' -p '443:443@loadbalancer' -p '9100-9399:30100-30399@loadbalancer' \
--k3s-arg '--tls-san=k3d@server:*' --k3s-arg '--disable=metrics-server@server:*' \
--host-alias $(HOST_IP):ocis-server --host-alias $(HOST_IP):federation-ocis-server \
-v $(LOGS_DIR):/logs
.PHONY: prepare-charts
prepare-charts:
@test -d "$(CHART_REPO)" || git clone --single-branch -b main --depth 1 https://github.com/owncloud/ocis-charts.git $(CHART_REPO)
bash setup.sh $(CHART_REPO)
kubectl create namespace $(DOMAIN) || true
kubectl create configmap -n $(DOMAIN) ocis-fonts-ttf --from-file=../drone/NotoSans.ttf || true
.PHONY: deploy-ocis
deploy-ocis:
@sed -i 's|externalDomain:.*|externalDomain: $(DOMAIN)|' $(CHART_REPO)/charts/ocis/ci/deployment-values.yaml
helm install -n $(DOMAIN) --create-namespace \
--values $(CHART_REPO)/charts/ocis/ci/deployment-values.yaml \
--wait --timeout 5m0s ocis $(CHART_REPO)/charts/ocis/
.PHONY: show-logs
show-logs:
@tail -f $(LOGS_DIR)/*.log
.PHONY: cleanup
cleanup:
k3d cluster delete local-ocis
rm -rf $(LOGS_DIR)
rm -rf $(CHART_REPO)
-229
View File
@@ -1,229 +0,0 @@
# Running API Tests in Kubernetes Cluster
## Table of Contents
- [K8s Setup](#k8s-setup)
- [Running API Tests](#running-api-tests)
- [Run General API tests](#run-general-api-tests)
- [Run Notification API tests](#run-notification-api-tests)
- [Run Antivirus API tests](#run-antivirus-api-tests)
- [Run Full Text Search API tests](#run-full-text-search-api-tests)
- [Cleanup the Setup](#cleanup-the-setup)
## K8s Setup
### Pre-requisites
1. Install the following tools:
- [k3d](https://k3d.io/stable/)
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/)
- [helm@v3](https://github.com/helm/helm/releases/tag/v3.20.1) (⚠️ MUST use v3)
2. Add these hosts to your `/etc/hosts` file:
```bash
echo "127.0.0.1 ocis-server federation-ocis-server \
clamav collabora onlyoffice fakeoffice tika \
email" | sudo tee -a /etc/hosts
```
### Deploy oCIS in K8s
1. Change directory to `<ocis-root>/tests/config/k8s`:
```bash
cd <ocis-root>/tests/config/k8s
```
2. Create K8s Cluster
```bash
make create-cluster
```
3. Prepare Charts
```bash
make prepare-charts
```
> [!TIP]
> To run the test suites that require extra services,
> use the following appropriate environment variables:
>
> - `ENABLE_ANTIVIRUS=true`: Antivirus test suites
> - `ENABLE_EMAIL=true`: Notification test suites
> - `ENABLE_TIKA=true`: Content search test suites
> - `ENABLE_WOPI=true`: WOPI test suites
> - `ENABLE_OCM=true`: OCM test suites
> - `ENABLE_AUTH_APP=true`: auth-app test suites
>
> ⚠️ When using the above environment variables,
> make sure you run the necessary external services and expose them to the cluster.
> Check the respective test running sections for more details.
Example:
```bash
ENABLE_EMAIL=true make prepare-charts
```
4. Deploy oCIS
```bash
make deploy-ocis
```
5. Check the ocis logs
```bash
make show-logs
```
## Running API Tests
Build and run the ociswrapper to be able to run the API tests tagged with `@env-config`.
1. Change directory to the ocis root:
```bash
cd <ocis-root>
```
2. Build the ociswrapper:
```bash
make -C tests/ociswrapper build
```
3. Run the ociswrapper:
```bash
tests/ociswrapper/bin/ociswrapper serve \
--url https://ocis-server \
--admin-username admin \
--admin-password admin \
--skip-ocis-run \
-n ocis-server
```
### Run General API tests
```bash
TEST_SERVER_URL=https://ocis-server \
K8S=true \
BEHAT_FEATURE=<test-suites-path>/apiDownloads/download.feature \
make test-acceptance-api
```
### Run Notification API tests
1. Check if setup [step 3](#deploy-ocis-in-k8s) is done correctly. (`ENABLE_EMAIL=true`)
2. Start the email server
```bash
docker run -d -p 1025:1025 -p 8025:8025 axllent/mailpit:v1.22.3
```
3. Expose the email server to the cluster
```bash
bash tests/config/k8s/expose-external-svc.sh email:1025
```
4. Run the tests
```bash
TEST_SERVER_URL=https://ocis-server \
EMAIL_HOST=email \
EMAIL_PORT=8025 \
K8S=true \
BEHAT_FEATURE=<test-suites-path>/apiNotification/notification.feature \
make test-acceptance-api
```
### Run Antivirus API tests
1. Check if setup [step 3](#deploy-ocis-in-k8s) is done correctly. (`ENABLE_ANTIVIRUS=true`)
2. Start the antivirus server
```bash
docker run -d -p 3310:3310 owncloudci/clamavd
```
3. Expose the antivirus server to the cluster
```bash
bash tests/config/k8s/expose-external-svc.sh clamav:3310
```
4. Run the tests
```bash
TEST_SERVER_URL=https://ocis-server \
K8S=true \
BEHAT_FEATURE=<test-suites-path>/apiAntivirus/antivirus.feature \
make test-acceptance-api
```
### Run Full Text Search API tests
1. Check if setup [step 3](#deploy-ocis-in-k8s) is done correctly. (`ENABLE_TIKA=true`)
2. Start the tika server
```bash
docker run -d -p 9998:9998 apache/tika:3.2.2.0-full
```
3. Expose the tika server to the cluster
```bash
bash tests/config/k8s/expose-external-svc.sh tika:9998
```
4. Run the tests
```bash
TEST_SERVER_URL=https://ocis-server \
K8S=true \
BEHAT_FEATURE=<test-suites-path>/apiSearchContent/contentSearch.feature \
make test-acceptance-api
```
### Run OCM tests
For running OCM test suite on k8s, we need to deploy a federation ocis server
in a separate namespace on the same cluster, alongside the ocis server:
1. Check if setup [step 3](#deploy-ocis-in-k8s) is done correctly. (`ENABLE_OCM=true`)
2. Prepare Charts for federation oCIS
```bash
OCM=true make prepare-charts
```
3. Deploy federation oCIS
```bash
OCM=true make deploy-ocis
```
4. Run the tests
```bash
TEST_SERVER_URL=https://ocis-server \
TEST_SERVER_FED_URL=https://federation-ocis-server \
K8S=true \
BEHAT_FEATURE=<test-suites-path>/apiOcm/share.feature \
make test-acceptance-api
```
## Cleanup the Setup
To delete the cluster and all the setup resources, run the following command:
```bash
make -C <ocis-root>/tests/config/k8s cleanup
```
This will delete the K8s cluster, ocis-charts, and ocis logs directory.
-81
View File
@@ -1,81 +0,0 @@
#!/bin/bash
set -e
HOST_IP=$(ip route get 1 | awk '{print $7}')
NAMESPACE="ocis-server"
while [[ $# -gt 0 ]]; do
case "$1" in
-n|--namespace)
NAMESPACE="$2"
shift 2
;;
*)
services="$1"
break
;;
esac
done
if [ -z "$services" ]; then
echo "[ERR] No services provided."
echo "Usage: $0 [-n <namespace>] <svc1:port1,svc2:port2,...>"
exit 1
fi
function expose_svc() {
local k8s_endpoint k8s_service svc port server_ip
svc=$1
port=$2
server_ip=$3
k8s_endpoint=$(cat <<EOF
apiVersion: v1
kind: Endpoints
metadata:
name: $svc
namespace: $NAMESPACE
subsets:
- addresses:
- ip: $server_ip
ports:
- port: $port
EOF
)
echo -e "$k8s_endpoint" | kubectl apply -f -
k8s_service=$(cat <<EOF
apiVersion: v1
kind: Service
metadata:
name: $svc
namespace: $NAMESPACE
spec:
ports:
- port: $port
targetPort: $port
EOF
)
echo -e "$k8s_service" | kubectl apply -f -
}
IFS=',' read -ra ADDR <<< "$services"
for service in "${ADDR[@]}"; do
IFS=':' read -ra SVC <<< "$service"
if [ ${#SVC[@]} -ne 2 ]; then
echo "[ERR] Invalid service format (<svc>:<port>): $service"
exit 1
fi
SERVER_IP=$(getent hosts "${SVC[0]}" | awk '{print $1}')
if [ -z "$SERVER_IP" ]; then
echo "[ERR] Could not resolve IP for service ${SVC[0]}"
exit 1
fi
# for localhost services, use the host IP
if [[ "$SERVER_IP" == "127.0.0.1" ]]; then
SERVER_IP="$HOST_IP"
fi
expose_svc "${SVC[0]}" "${SVC[1]}" "$SERVER_IP"
done
-83
View File
@@ -1,83 +0,0 @@
#!/bin/bash
set -e
CHART_REPO="$1"
if [[ -z "$CHART_REPO" ]]; then
echo "[ERR] Chart directory argument missing. Usage: $0 <chart-repo-directory>"
exit 1
fi
if [[ ! -d "$CHART_REPO" ]]; then
echo "[ERR] Path not found: $CHART_REPO"
exit 1
fi
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
ROOT="$(cd $SCRIPT_DIR/../../.. && pwd)"
CFG_DIR="$ROOT/tests/config/k8s"
CHT_DIR="$CHART_REPO/charts/ocis"
TPL_DIR="$CHT_DIR/templates"
function patch_templates(){
# patch ocis service templates
for service in "$TPL_DIR"/*/; do
if [[ -f "$service/deployment.yaml" ]]; then
if grep -qE 'ocis.caEnv' "$service/deployment.yaml"; then
sed -i '/.*ocis.caEnv.*/a\{{- include "ocis.extraEnvs" . | nindent 12 }}' "$service/deployment.yaml"
sed -i '/.*ocis.caPath.*/a\{{- include "ocis.extraVolMounts" . | nindent 12 }}' "$service/deployment.yaml"
sed -i '/.*ocis.caVolume.*/a\{{- include "ocis.extraVolumes" . | nindent 8 }}' "$service/deployment.yaml"
else
sed -i '/env:/a\{{- include "ocis.extraEnvs" . | nindent 12 }}' "$service/deployment.yaml"
sed -i '/volumeMounts:/a\{{- include "ocis.extraVolMounts" . | nindent 12 }}' "$service/deployment.yaml"
sed -i '/volumes:/a\{{- include "ocis.extraVolumes" . | nindent 8 }}' "$service/deployment.yaml"
fi
fi
done
# copy custom template resources
cp -r $CFG_DIR/templates/* $TPL_DIR/
# add authbasic service
sed -i "/{{- define \"ocis.basicServiceTemplates\" -}}/a\ {{- \$_ := set .scope \"appNameAuthBasic\" \"authbasic\" -}}" $TPL_DIR/_common/_tplvalues.tpl
# [NOTE]
# Remove schema validation to add extra configs in values.yaml.
# Also this allows us to use fakeoffice as web-office server
rm "$CHT_DIR/values.schema.json"
}
if [[ -f "$CHT_DIR/values.schema.json" ]]; then
patch_templates
fi
if [[ "$ENABLE_ANTIVIRUS" == "true" ]]; then
sed -i '/virusscan:/{n;s|false|true|}' $CFG_DIR/values.yaml
fi
if [[ "$ENABLE_EMAIL" == "true" ]]; then
sed -i '/emailNotifications:/{n;s|false|true|}' $CFG_DIR/values.yaml
fi
if [[ "$ENABLE_TIKA" == "true" ]]; then
sed -i 's|type: basic|type: tika|' $CFG_DIR/values.yaml
fi
if [[ "$ENABLE_WOPI" == "true" ]]; then
sed -i '/appsIntegration:/{n;s|false|true|}' $CFG_DIR/values.yaml
# patch collaboration service
# - allow dynamic wopi src
sed -i -E "s|value: http://.*:9300|value: {{ \$officeSuite.wopiSrc }}|" $TPL_DIR/collaboration/deployment.yaml
fi
if [[ "$ENABLE_OCM" == "true" ]]; then
sed -i '/ocm:/{n;s|false|true|}' $CFG_DIR/values.yaml
fi
if [[ "$ENABLE_AUTH_APP" == "true" ]]; then
sed -i '/authapp:/{n;s|false|true|}' $CFG_DIR/values.yaml
fi
# copy custom values file
cp $CFG_DIR/values.yaml "$CHT_DIR/ci/deployment-values.yaml"
-2
View File
@@ -35,7 +35,6 @@ func serveCmd() *cobra.Command {
ocisConfig.Set("retry", cmd.Flag("retry").Value.String())
ocisConfig.Set("adminUsername", cmd.Flag("admin-username").Value.String())
ocisConfig.Set("adminPassword", cmd.Flag("admin-password").Value.String())
ocisConfig.Set("namespace", cmd.Flag("namespace").Value.String())
if cmd.Flag("skip-ocis-run").Value.String() == "false" {
go ocis.Start(nil)
@@ -53,7 +52,6 @@ func serveCmd() *cobra.Command {
serveCmd.Flags().StringP("admin-username", "", "", "admin username for oCIS server")
serveCmd.Flags().StringP("admin-password", "", "", "admin password for oCIS server")
serveCmd.Flags().Bool("skip-ocis-run", false, "Skip running oCIS server")
serveCmd.Flags().StringP("namespace", "n", ocisConfig.Get("namespace"), "K8s namespace of oCIS server")
return serveCmd
}
-1
View File
@@ -6,7 +6,6 @@ var config = map[string]string{
"retry": "5",
"adminUsername": "",
"adminPassword": "",
"namespace": "ocis",
}
var services = map[string]int{
+1 -1
View File
@@ -3,7 +3,7 @@ package internal
// --------------------------------------------------------------------------------
// Versions
// --------------------------------------------------------------------------------
const SDK_Version = "0.6.0"
const SDK_Version = "0.5.0"
const Protocol_Version = "1.1.0"
// --------------------------------------------------------------------------------
Loaded 100 of 231 files, more files were not shown because too many files have changed in this diff. Show more