Compare commits
82
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2926d21b90 | ||
|
|
4fe4f822a2 | ||
|
|
5908d90dfc | ||
|
|
b00ef30aab | ||
|
|
12a694e487 | ||
|
|
aa7c040d90 | ||
|
|
0f3fb51de2 | ||
|
|
2acd51259d | ||
|
|
a1f732836d | ||
|
|
571977947b | ||
|
|
31b9a19177 | ||
|
|
77bd5974ab | ||
|
|
0883d5d4e2 | ||
|
|
ac7f054633 | ||
|
|
9ac0452d61 | ||
|
|
2a163e7075 | ||
|
|
d45fd2221a | ||
|
|
8aaadc4bb4 | ||
|
|
95250276cc | ||
|
|
ba41ba62b0 | ||
|
|
f62acb2f38 | ||
|
|
2f55302d9f | ||
|
|
9ca2c016be | ||
|
|
aec2f4b0c0 | ||
|
|
846b391c65 | ||
|
|
5ccb09f4d2 | ||
|
|
8386760598 | ||
|
|
be86a9513d | ||
|
|
fdf7e502be | ||
|
|
5063c80536 | ||
|
|
ac5dfc01ec | ||
|
|
48dd8ff19f | ||
|
|
7087d771c9 | ||
|
|
224c0e6244 | ||
|
|
9bcf14a897 | ||
|
|
e227983a9f | ||
|
|
9336a1bfed | ||
|
|
df4b6a337a | ||
|
|
0e5233dd50 | ||
|
|
2cc1640085 | ||
|
|
0cfa1ad3f0 | ||
|
|
eb9fae42fd | ||
|
|
4a2004784c | ||
|
|
c778609044 | ||
|
|
a087a99da0 | ||
|
|
eb9cc2bffd | ||
|
|
3c51128d3e | ||
|
|
b588579ff7 | ||
|
|
31ce8a68a7 | ||
|
|
0be2bd11aa | ||
|
|
3030491395 | ||
|
|
5308fb916c | ||
|
|
3ac19ca463 | ||
|
|
297a00fc44 | ||
|
|
953dc0f319 | ||
|
|
e687a05800 | ||
|
|
0c6e574d15 | ||
|
|
0d95d40f7c | ||
|
|
90655c56a3 | ||
|
|
dd99e6daf1 | ||
|
|
eb357f820d | ||
|
|
728a7b4d8d | ||
|
|
6270553209 | ||
|
|
1a5aeeb2e9 | ||
|
|
39192c7bea | ||
|
|
15b1c38e38 | ||
|
|
0ca881b400 | ||
|
|
c65dff7fac | ||
|
|
d4367fb224 | ||
|
|
1d2c329e66 | ||
|
|
d8984c4c06 | ||
|
|
ece1043ca2 | ||
|
|
4fba74c1f7 | ||
|
|
296609da98 | ||
|
|
03bfabec55 | ||
|
|
983dc5f7b5 | ||
|
|
d65dd806de | ||
|
|
b52af29f8e | ||
|
|
b1218d868a | ||
|
|
8471094c1d | ||
|
|
d5e3e16397 | ||
|
|
4b7349037f |
No files matched your search
+97
-234
@@ -119,6 +119,7 @@ config = {
|
||||
],
|
||||
"skip": False,
|
||||
"withRemotePhp": [False],
|
||||
"k8s": True,
|
||||
"emailNeeded": True,
|
||||
"extraEnvironment": {
|
||||
"EMAIL_HOST": EMAIL_SMTP_HOST,
|
||||
@@ -165,6 +166,7 @@ config = {
|
||||
"apiActivities",
|
||||
],
|
||||
"skip": False,
|
||||
"k8s": True,
|
||||
},
|
||||
"groupAndSearch1": {
|
||||
"suites": [
|
||||
@@ -209,6 +211,7 @@ config = {
|
||||
],
|
||||
"skip": False,
|
||||
"withRemotePhp": [False],
|
||||
"k8s": True,
|
||||
},
|
||||
"sharingNgLinkShare": {
|
||||
"suites": [
|
||||
@@ -307,6 +310,7 @@ config = {
|
||||
"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",
|
||||
},
|
||||
},
|
||||
@@ -372,6 +376,7 @@ config = {
|
||||
"coreApiWebdavMove2",
|
||||
],
|
||||
"skip": False,
|
||||
"k8s": True,
|
||||
},
|
||||
"7": {
|
||||
"suites": [
|
||||
@@ -894,6 +899,7 @@ def uploadScanResults(ctx):
|
||||
"git checkout $DRONE_COMMIT",
|
||||
],
|
||||
},
|
||||
] + skipIfUnchanged(ctx, "unit-tests") + [
|
||||
{
|
||||
"name": "sync-from-cache",
|
||||
"image": MINIO_MC,
|
||||
@@ -1125,19 +1131,28 @@ def localApiTestPipeline(ctx):
|
||||
# SETUP STEPS #
|
||||
####################
|
||||
setup_steps = skipIfUnchanged(ctx, "acceptance-tests")
|
||||
if params["tikaNeeded"]:
|
||||
setup_steps += waitForServices("tika", ["tika:9998"])
|
||||
if params["antivirusNeeded"]:
|
||||
setup_steps += waitForServices("clamav", ["clamav:3310"])
|
||||
if params["emailNeeded"]:
|
||||
setup_steps += waitForServices("email", ["%s:%s" % (EMAIL_SMTP_HOST, EMAIL_PORT)])
|
||||
if params["collaborationServiceNeeded"]:
|
||||
setup_steps += waitForServices("online-offices", ["collabora:9980", "onlyoffice:443", "fakeoffice:8080"])
|
||||
|
||||
if run_on_k8s:
|
||||
enable_auth_app = False
|
||||
if "OCIS_ADD_RUN_SERVICES" in params["extraServerEnvironment"]:
|
||||
enable_auth_app = "auth-app" in params["extraServerEnvironment"]["OCIS_ADD_RUN_SERVICES"]
|
||||
setup_steps += ocisServerK8s(
|
||||
params["federationServer"],
|
||||
params["antivirusNeeded"],
|
||||
params["emailNeeded"],
|
||||
params["tikaNeeded"],
|
||||
params["collaborationServiceNeeded"],
|
||||
enable_auth_app,
|
||||
)
|
||||
|
||||
if params["antivirusNeeded"]:
|
||||
setup_steps += exposeAntivirusServiceK8s()
|
||||
if params["emailNeeded"]:
|
||||
setup_steps += exposeEmailServiceK8s()
|
||||
if params["collaborationServiceNeeded"]:
|
||||
setup_steps += exposeNodePortsK8s([
|
||||
["collaboration-collabora", 9300],
|
||||
@@ -1147,15 +1162,6 @@ def localApiTestPipeline(ctx):
|
||||
])
|
||||
else:
|
||||
setup_steps += restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin")
|
||||
if params["tikaNeeded"]:
|
||||
setup_steps += tikaService()
|
||||
if params["collaborationServiceNeeded"]:
|
||||
setup_steps += waitForServices("online-offices", ["collabora:9980", "onlyoffice:443", "fakeoffice:8080"])
|
||||
if params["antivirusNeeded"]:
|
||||
setup_steps += waitForClamavService()
|
||||
if params["emailNeeded"]:
|
||||
setup_steps += waitForEmailService()
|
||||
|
||||
setup_steps += ocisServer(
|
||||
storage,
|
||||
extra_server_environment = params["extraServerEnvironment"],
|
||||
@@ -1180,17 +1186,18 @@ def localApiTestPipeline(ctx):
|
||||
# SERVICES #
|
||||
####################
|
||||
services = []
|
||||
if params["tikaNeeded"]:
|
||||
services += tikaService()
|
||||
if params["emailNeeded"]:
|
||||
services += emailService()
|
||||
if params["antivirusNeeded"]:
|
||||
services += clamavService()
|
||||
if params["collaborationServiceNeeded"]:
|
||||
services += fakeOffice() + collaboraService() + onlyofficeService()
|
||||
if run_on_k8s:
|
||||
services += k3sCluster(ocm = params["federationServer"])
|
||||
if params["federationServer"]:
|
||||
services += k3sCluster(name = FED_OCIS_SERVER_NAME, ocm = True)
|
||||
else:
|
||||
if params["emailNeeded"]:
|
||||
services += emailService()
|
||||
if params["antivirusNeeded"]:
|
||||
services += clamavService()
|
||||
if params["collaborationServiceNeeded"]:
|
||||
services += fakeOffice() + collaboraService() + onlyofficeService()
|
||||
|
||||
####################
|
||||
# PIPELINE #
|
||||
@@ -1301,9 +1308,6 @@ def localApiTests(name, suites, storage = "ocis", extra_environment = {}, with_r
|
||||
}
|
||||
|
||||
for item in extra_environment:
|
||||
if item == "EMAIL_HOST" and k8s:
|
||||
environment[item] = OCIS_SERVER_NAME
|
||||
continue
|
||||
environment[item] = extra_environment[item]
|
||||
|
||||
return [{
|
||||
@@ -1511,23 +1515,20 @@ def coreApiTestPipeline(ctx):
|
||||
# SETUP STEPS #
|
||||
####################
|
||||
setup_steps = skipIfUnchanged(ctx, "acceptance-tests")
|
||||
if params["tikaNeeded"]:
|
||||
setup_steps += waitForServices("tika", ["tika:9998"])
|
||||
if params["antivirusNeeded"]:
|
||||
setup_steps += waitForServices("clamav", ["clamav:3310"])
|
||||
if params["emailNeeded"]:
|
||||
setup_steps += waitForServices("email", ["%s:%s" % (EMAIL_SMTP_HOST, EMAIL_PORT)])
|
||||
|
||||
if run_on_k8s:
|
||||
ocis_url = OCIS_URL_K8S
|
||||
wrapper_url = "http://ociswrapper:5200"
|
||||
|
||||
setup_steps += ocisServerK8s(antivirus = params["antivirusNeeded"], email = params["emailNeeded"])
|
||||
if params["antivirusNeeded"]:
|
||||
setup_steps += exposeAntivirusServiceK8s()
|
||||
if params["emailNeeded"]:
|
||||
setup_steps += exposeEmailServiceK8s()
|
||||
else:
|
||||
setup_steps += restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin")
|
||||
if params["tikaNeeded"]:
|
||||
setup_steps += tikaService()
|
||||
if params["antivirusNeeded"]:
|
||||
setup_steps += waitForClamavService()
|
||||
if params["emailNeeded"]:
|
||||
setup_steps += waitForEmailService()
|
||||
setup_steps += ocisServer(
|
||||
storage,
|
||||
extra_server_environment = params["extraServerEnvironment"],
|
||||
@@ -1540,13 +1541,14 @@ def coreApiTestPipeline(ctx):
|
||||
# SERVICES #
|
||||
####################
|
||||
services = []
|
||||
if params["tikaNeeded"]:
|
||||
services += tikaService()
|
||||
if params["emailNeeded"]:
|
||||
services += emailService()
|
||||
if params["antivirusNeeded"]:
|
||||
services += clamavService()
|
||||
if run_on_k8s:
|
||||
services += k3sCluster()
|
||||
else:
|
||||
if params["emailNeeded"]:
|
||||
services += emailService()
|
||||
if params["antivirusNeeded"]:
|
||||
services += clamavService()
|
||||
|
||||
####################
|
||||
# PIPELINE #
|
||||
@@ -1697,13 +1699,14 @@ def e2eTestPipeline(ctx):
|
||||
})
|
||||
|
||||
services = postgresService() if params["keycloakNeeded"] else []
|
||||
services += tikaService() if params["tikaNeeded"] else []
|
||||
|
||||
steps_before = \
|
||||
skipIfUnchanged(ctx, "e2e-tests") + \
|
||||
restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin/ocis") + \
|
||||
restoreWebCache() + \
|
||||
restoreWebPnpmCache() + \
|
||||
(tikaService() if params["tikaNeeded"] else []) + \
|
||||
(waitForServices("tika", ["tika:9998"]) if params["tikaNeeded"] else []) + \
|
||||
(keycloakService() if params["keycloakNeeded"] else []) + \
|
||||
ocisServer(extra_server_environment = extra_server_environment, with_wrapper = not params["keycloakNeeded"], tika_enabled = params["tikaNeeded"], debug = False, external_idp = params["keycloakNeeded"])
|
||||
|
||||
@@ -1847,7 +1850,7 @@ def multiServiceE2ePipeline(ctx):
|
||||
restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin/ocis") + \
|
||||
restoreWebCache() + \
|
||||
restoreWebPnpmCache() + \
|
||||
tikaService() + \
|
||||
waitForServices("tika", ["tika:9998"]) + \
|
||||
ocisServer(extra_server_environment = extra_server_environment, tika_enabled = params["tikaNeeded"], debug = False) + \
|
||||
storage_users_services + \
|
||||
[{
|
||||
@@ -1881,6 +1884,7 @@ def multiServiceE2ePipeline(ctx):
|
||||
},
|
||||
pipelineVolumeGo,
|
||||
],
|
||||
"services": tikaService(),
|
||||
})
|
||||
return pipelines
|
||||
|
||||
@@ -2865,41 +2869,52 @@ def startOcisService(service = None, name = None, environment = {}, volumes = []
|
||||
},
|
||||
]
|
||||
|
||||
def ocisServerK8s(federation = False, antivirus = False, email = False, tika = False, wopi = False):
|
||||
def ocisServerK8s(federation = False, antivirus = False, email = False, tika = False, wopi = False, auth_app = False):
|
||||
name = OCIS_SERVER_NAME
|
||||
url = OCIS_URL_K8S
|
||||
fed_name = FED_OCIS_SERVER_NAME
|
||||
fed_url = OCIS_FED_URL_K8S
|
||||
|
||||
steps = []
|
||||
expose_ext_server_step = []
|
||||
external_servers = []
|
||||
|
||||
steps = prepareOcisDeployment()
|
||||
environment = {
|
||||
"ENABLE_ANTIVIRUS": antivirus,
|
||||
"ENABLE_EMAIL": email,
|
||||
"ENABLE_TIKA": tika,
|
||||
"ENABLE_WOPI": wopi,
|
||||
"ENABLE_OCM": federation,
|
||||
"ENABLE_AUTH_APP": auth_app,
|
||||
}
|
||||
|
||||
if antivirus:
|
||||
steps += enableAntivirusServiceK8s()
|
||||
if email:
|
||||
steps += enableEmailServiceK8s()
|
||||
external_servers.append(["clamav", 3310])
|
||||
if tika:
|
||||
steps += enableTikaServiceK8s()
|
||||
external_servers.append(["tika", 9998])
|
||||
if email:
|
||||
external_servers.append([EMAIL_SMTP_HOST, EMAIL_SMTP_PORT])
|
||||
if wopi:
|
||||
steps += enableAppsIntegrationK8s()
|
||||
external_servers += [["collabora", 9980], ["fakeoffice", 8080], ["onlyoffice", 443]]
|
||||
|
||||
if external_servers:
|
||||
expose_ext_server_step = exposeExternalServersK8s(external_servers)
|
||||
|
||||
steps += prepareChartsK8s(environment)
|
||||
|
||||
steps += waitK3sCluster(name) + \
|
||||
(waitK3sCluster(fed_name) if federation else []) + \
|
||||
setupOcisConfigMaps(name) + \
|
||||
(setupOcisConfigMaps(fed_name) if federation else []) + \
|
||||
setupConfigMapsK8s(name) + \
|
||||
(setupConfigMapsK8s(fed_name) if federation else []) + \
|
||||
expose_ext_server_step + \
|
||||
deployOcis(name) + \
|
||||
(deployOcis(fed_name) if federation else []) + \
|
||||
streamK8sOcisLogs(name) + \
|
||||
deployOcisK8s(name) + \
|
||||
(deployOcisK8s(fed_name) if federation else []) + \
|
||||
streamOcisLogsK8s(name) + \
|
||||
(streamOcisLogsK8s(fed_name) if federation else []) + \
|
||||
waitForOcis(name, url) + \
|
||||
(waitForOcis(fed_name, fed_url) if federation else [])
|
||||
|
||||
return steps + ociswrapperK8s(name)
|
||||
(waitForOcis(fed_name, fed_url) if federation else []) + \
|
||||
ociswrapperK8s(name)
|
||||
return steps
|
||||
|
||||
def redis():
|
||||
return [
|
||||
@@ -3593,30 +3608,12 @@ def emailService():
|
||||
"image": AXLLENT_MAILPIT,
|
||||
}]
|
||||
|
||||
def waitForEmailService():
|
||||
return [{
|
||||
"name": "wait-for-email",
|
||||
"image": OC_CI_WAIT_FOR,
|
||||
"commands": [
|
||||
"wait-for -it email:%s -t 600" % EMAIL_PORT,
|
||||
],
|
||||
}]
|
||||
|
||||
def clamavService():
|
||||
return [{
|
||||
"name": "clamav",
|
||||
"image": OC_CI_CLAMAVD,
|
||||
}]
|
||||
|
||||
def waitForClamavService():
|
||||
return [{
|
||||
"name": "wait-for-clamav",
|
||||
"image": OC_CI_WAIT_FOR,
|
||||
"commands": [
|
||||
"wait-for -it clamav:3310 -t 600",
|
||||
],
|
||||
}]
|
||||
|
||||
def fakeOffice():
|
||||
return [
|
||||
{
|
||||
@@ -3672,13 +3669,6 @@ def tikaService():
|
||||
"name": "tika",
|
||||
"type": "docker",
|
||||
"image": APACHE_TIKA,
|
||||
"detach": True,
|
||||
}, {
|
||||
"name": "wait-for-tika-service",
|
||||
"image": OC_CI_WAIT_FOR,
|
||||
"commands": [
|
||||
"wait-for -it tika:9998 -t 300",
|
||||
],
|
||||
}]
|
||||
|
||||
def apiTestFailureLog():
|
||||
@@ -3967,7 +3957,7 @@ def k3sCluster(name = OCIS_SERVER_NAME, ocm = False):
|
||||
"mkdir -p %s && chmod 777 %s" % (log_dir, log_dir),
|
||||
# create cluster
|
||||
"k3d cluster create %s --api-port %s:33199 " % (name, name) +
|
||||
"-p '80:80@loadbalancer' -p '443:443@loadbalancer' -p '8025:32025@loadbalancer' -p '9100-9399:30100-30399@loadbalancer' " +
|
||||
"-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:*' " +
|
||||
"-v %s:/logs" % log_dir,
|
||||
# wait for services to be ready
|
||||
@@ -3985,18 +3975,10 @@ def k3sCluster(name = OCIS_SERVER_NAME, ocm = False):
|
||||
if ocm:
|
||||
commands.extend([
|
||||
# wait for peer
|
||||
"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,
|
||||
"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),
|
||||
])
|
||||
|
||||
commands.extend([
|
||||
@@ -4020,56 +4002,28 @@ def waitK3sCluster(name = OCIS_SERVER_NAME):
|
||||
"image": K3D_IMAGE,
|
||||
"user": "root",
|
||||
"commands": [
|
||||
"export KUBECONFIG=kubeconfig-$${DRONE_BUILD_NUMBER}-" + OCIS_SERVER_NAME + ".yaml",
|
||||
"export KUBECONFIG=kubeconfig-$${DRONE_BUILD_NUMBER}-%s.yaml" % name,
|
||||
"timeout 300 bash -c 'until test -f $${KUBECONFIG}; do sleep 1; done'",
|
||||
"kubectl config view",
|
||||
"kubectl get pods -A",
|
||||
],
|
||||
}]
|
||||
|
||||
def prepareOcisDeployment():
|
||||
def prepareChartsK8s(environment = []):
|
||||
commands = [
|
||||
# build ocis wrapper
|
||||
"make -C %s build" % dirs["ocisWrapper"],
|
||||
# get ocis charts
|
||||
"if [ ! -d %s/ocis-charts ]; then git clone --single-branch -b main --depth 1 https://github.com/owncloud/ocis-charts.git; fi" % dirs["base"],
|
||||
# move CI values file
|
||||
"mv %s/tests/config/drone/k8s/values.yaml %s/ocis-charts/charts/ocis/ci/deployment-values.yaml" % (dirs["base"], dirs["base"]),
|
||||
# enable authbasic service
|
||||
"cp -r %s/tests/config/drone/k8s/authbasic %s/ocis-charts/charts/ocis/templates/" % (dirs["base"], dirs["base"]),
|
||||
# copy override template
|
||||
"cp tests/config/drone/k8s/_zoverride.tpl ocis-charts/charts/ocis/templates/_common/",
|
||||
"cd ocis-charts",
|
||||
# patch activitylog service
|
||||
"sed -i '/env:/a\\\\{{- include \"ocis.caEnv\" $ | nindent 12}}' ./charts/ocis/templates/activitylog/deployment.yaml",
|
||||
"sed -i '/volumeMounts:/a\\\\{{- include \"ocis.caPath\" $ | nindent 12}}' ./charts/ocis/templates/activitylog/deployment.yaml",
|
||||
"sed -i '/volumes:/a\\\\{{- include \"ocis.caVolume\" $ | nindent 8}}' ./charts/ocis/templates/activitylog/deployment.yaml",
|
||||
# disable audit logs in console
|
||||
"sed -i '/AUDIT_LOG_TO_CONSOLE/{n;s/true/false/;}' ./charts/ocis/templates/audit/deployment.yaml",
|
||||
"sed -i '/{{- define \"ocis.basicServiceTemplates\" -}}/a\\\\ {{- $_ := set .scope \"appNameAuthBasic\" \"authbasic\" -}}' ./charts/ocis/templates/_common/_tplvalues.tpl",
|
||||
"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",
|
||||
"sed -i '/- name: STORAGE_PUBLICLINK_DEBUG_ADDR/i\\\\ {{- include \"ocis.persistentStore\" . | nindent 12 }}\\\n' ./charts/ocis/templates/storagepubliclink/deployment.yaml",
|
||||
"sed -i '/- name: PROXY_HTTP_ADDR/i\\\\ - name: PROXY_ENABLE_BASIC_AUTH\\\n value: \"true\"' ./charts/ocis/templates/proxy/deployment.yaml",
|
||||
"sed -i 's|/etc/ocis/sharing-banned-passwords.txt|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",
|
||||
"sed -i 's|/etc/ocis/sharing-banned-passwords.txt|config/drone/banned-password-list.txt|' ./charts/ocis/templates/frontend/deployment.yaml",
|
||||
"sed -i 's|- name: configs|- name: banned-passwords|' ./charts/ocis/templates/frontend/deployment.yaml",
|
||||
"sed -i 's|mountPath: /etc/ocis$|mountPath: /etc/ocis/config/drone|' ./charts/ocis/templates/frontend/deployment.yaml",
|
||||
"sed -i 's|name: sharing-banned-passwords-{{ .appName }}|name: sharing-banned-passwords|' ./charts/ocis/templates/frontend/deployment.yaml",
|
||||
# Patch thumbnails deployment to mount Unicode fonts (ConfigMaps created in k3sCluster)
|
||||
"sed -i '/- name: THUMBNAILS_TRANSFER_TOKEN/i\\\\ - name: THUMBNAILS_TXT_FONTMAP_FILE\\\n value: /etc/ocis/fontsMap.json\\\n' ./charts/ocis/templates/thumbnails/deployment.yaml",
|
||||
"sed -i '/volumeMounts:/a\\\\ - name: ocis-fonts-ttf\\\n mountPath: /etc/ocis/fonts\\\n - name: ocis-fonts-map\\\n mountPath: /etc/ocis/fontsMap.json\\\n subPath: fontsMap.json' ./charts/ocis/templates/thumbnails/deployment.yaml",
|
||||
"sed -i '/volumes:/a\\\\ - name: ocis-fonts-ttf\\\n configMap:\\\n name: ocis-fonts-ttf\\\n - name: ocis-fonts-map\\\n configMap:\\\n name: ocis-fonts-map' ./charts/ocis/templates/thumbnails/deployment.yaml",
|
||||
"sed -i -E 's|value: http:\\\\/\\\\/.*:9300|value: {{ $officeSuite.wopiSrc }}|' ./charts/ocis/templates/collaboration/deployment.yaml",
|
||||
"cat ./charts/ocis/templates/collaboration/deployment.yaml",
|
||||
"[ ! -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"]),
|
||||
]
|
||||
|
||||
return [{
|
||||
"name": "prepare-ocis-deployment",
|
||||
"image": OC_CI_GOLANG,
|
||||
"environment": environment,
|
||||
"commands": commands,
|
||||
"volumes": [
|
||||
{
|
||||
@@ -4079,18 +4033,15 @@ def prepareOcisDeployment():
|
||||
],
|
||||
}]
|
||||
|
||||
def setupOcisConfigMaps(name = OCIS_SERVER_NAME):
|
||||
def setupConfigMapsK8s(name = OCIS_SERVER_NAME):
|
||||
step_name = "setup-configmaps-" + name
|
||||
|
||||
commands = [
|
||||
"export KUBECONFIG=%s/kubeconfig-$${DRONE_BUILD_NUMBER}-%s.yaml" % (dirs["base"], name),
|
||||
# Create namespace for oCIS deployment
|
||||
"kubectl create namespace ocis || true",
|
||||
"kubectl create configmap -n ocis sharing-banned-passwords --from-file=banned-password-list.txt=%s/tests/config/drone/banned-password-list.txt" % dirs["base"],
|
||||
# Setup Unicode font support for thumbnails - create ConfigMaps
|
||||
"echo '{\"defaultFont\": \"/etc/ocis/fonts/NotoSans.ttf\"}' > %s/fontsMap.json" % dirs["base"],
|
||||
"kubectl create configmap -n ocis ocis-fonts-ttf --from-file=%s/tests/config/drone/NotoSans.ttf" % dirs["base"],
|
||||
"kubectl create configmap -n ocis ocis-fonts-map --from-file=%s/fontsMap.json" % dirs["base"],
|
||||
]
|
||||
|
||||
return [{
|
||||
@@ -4100,39 +4051,23 @@ def setupOcisConfigMaps(name = OCIS_SERVER_NAME):
|
||||
"commands": commands,
|
||||
}]
|
||||
|
||||
def deployOcis(name = OCIS_SERVER_NAME):
|
||||
def deployOcisK8s(name = OCIS_SERVER_NAME):
|
||||
step_name = "deploy-" + name
|
||||
|
||||
commands = [
|
||||
"export KUBECONFIG=%s/kubeconfig-$${DRONE_BUILD_NUMBER}-%s.yaml" % (dirs["base"], name),
|
||||
"cd %s/ocis-charts" % dirs["base"],
|
||||
]
|
||||
|
||||
if name == FED_OCIS_SERVER_NAME:
|
||||
commands.extend([
|
||||
"sed -i 's|externalDomain: ocis-server|externalDomain: %s|' ./charts/ocis/ci/deployment-values.yaml" % FED_OCIS_SERVER_NAME,
|
||||
])
|
||||
|
||||
commands.extend([
|
||||
# [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",
|
||||
"make helm-install-atomic",
|
||||
])
|
||||
return [{
|
||||
"name": step_name,
|
||||
"image": OC_CI_GOLANG,
|
||||
"commands": commands,
|
||||
"volumes": [
|
||||
{
|
||||
"name": "gopath",
|
||||
"path": "/go",
|
||||
},
|
||||
"commands": [
|
||||
"export KUBECONFIG=%s/kubeconfig-$${DRONE_BUILD_NUMBER}-%s.yaml" % (dirs["base"], name),
|
||||
"cd %s/ocis-charts" % dirs["base"],
|
||||
# update external domain
|
||||
"sed -i 's|externalDomain:.*|externalDomain: %s|' ./charts/ocis/ci/deployment-values.yaml" % name,
|
||||
# deploy ocis
|
||||
"make helm-install-atomic",
|
||||
],
|
||||
}]
|
||||
|
||||
def streamK8sOcisLogs(name = OCIS_SERVER_NAME):
|
||||
def streamOcisLogsK8s(name = OCIS_SERVER_NAME):
|
||||
return [{
|
||||
"name": "%s-logs" % name,
|
||||
"image": OC_CI_ALPINE,
|
||||
@@ -4143,62 +4078,6 @@ def streamK8sOcisLogs(name = OCIS_SERVER_NAME):
|
||||
],
|
||||
}]
|
||||
|
||||
def enableAntivirusServiceK8s():
|
||||
return [{
|
||||
"name": "enable-antivirus-service",
|
||||
"image": OC_CI_ALPINE,
|
||||
"commands": [
|
||||
"cp -r %s/tests/config/drone/k8s/clamav %s/ocis-charts/charts/ocis/templates/" % (dirs["base"], dirs["base"]),
|
||||
"sed -i '/^ virusscan:/,/^ *[^ ]/ s/enabled: .*/enabled: true/' %s/ocis-charts/charts/ocis/ci/deployment-values.yaml" % dirs["base"],
|
||||
"sed -i '/name: ANTIVIRUS_SCANNER_TYPE/{n;s/value: *\"icap\"/value: \"clamav\"/}' %s/ocis-charts/charts/ocis/templates/antivirus/deployment.yaml" % dirs["base"],
|
||||
"sed -i '/- name: ANTIVIRUS_SCANNER_TYPE/i\\\\ - name: ANTIVIRUS_CLAMAV_SOCKET\\\n value: \"tcp://clamav:3310\"' %s/ocis-charts/charts/ocis/templates/antivirus/deployment.yaml" % dirs["base"],
|
||||
],
|
||||
}]
|
||||
|
||||
def enableAppsIntegrationK8s():
|
||||
return [{
|
||||
"name": "enable-apps-integration",
|
||||
"image": OC_CI_ALPINE,
|
||||
"commands": [
|
||||
"sed -i '/^ appsIntegration:/,/^ *[^ ]/ s/enabled: .*/enabled: true/' %s/ocis-charts/charts/ocis/ci/deployment-values.yaml" % dirs["base"],
|
||||
],
|
||||
}]
|
||||
|
||||
def enableEmailServiceK8s():
|
||||
return [{
|
||||
"name": "copy-%s-service" % EMAIL_SMTP_HOST,
|
||||
"image": OC_CI_ALPINE,
|
||||
"commands": [
|
||||
"cp -r %s/tests/config/drone/k8s/mailpit %s/ocis-charts/charts/ocis/templates/" % (dirs["base"], dirs["base"]),
|
||||
],
|
||||
}]
|
||||
|
||||
def exposeEmailServiceK8s(name = OCIS_SERVER_NAME):
|
||||
return [{
|
||||
"name": EMAIL_SMTP_HOST,
|
||||
"image": K3D_IMAGE,
|
||||
"commands": [
|
||||
"export KUBECONFIG=%s/kubeconfig-$${DRONE_BUILD_NUMBER}-%s.yaml" % (dirs["base"], name),
|
||||
"until test -f $${KUBECONFIG}; do sleep 1s; done",
|
||||
"kubectl -n ocis expose deployment mailpit --type=NodePort --port=8025 --name=mailpit-np",
|
||||
"kubectl -n ocis patch svc mailpit-np -p '{\"spec\":{\"ports\":[{\"port\":8025,\"nodePort\":32025,\"targetPort\":8025}]}}'",
|
||||
],
|
||||
"detach": True,
|
||||
}]
|
||||
|
||||
def exposeAntivirusServiceK8s(name = OCIS_SERVER_NAME):
|
||||
return [{
|
||||
"name": "expose-antivirus-service",
|
||||
"image": K3D_IMAGE,
|
||||
"commands": [
|
||||
"export KUBECONFIG=kubeconfig-$${DRONE_BUILD_NUMBER}-%s.yaml" % name,
|
||||
"until test -f $${KUBECONFIG}; do sleep 1s; done",
|
||||
# expose antivirus service via NodePort
|
||||
"kubectl -n ocis expose deployment antivirus --type=NodePort --port=9277 --name=antivirus-np",
|
||||
"kubectl -n ocis patch svc antivirus-np -p '{\"spec\":{\"ports\":[{\"port\":9277,\"nodePort\":30277}]}}'",
|
||||
],
|
||||
}]
|
||||
|
||||
def ociswrapperK8s(name = OCIS_SERVER_NAME, ocis_url = OCIS_URL_K8S):
|
||||
return [{
|
||||
"name": "ociswrapper",
|
||||
@@ -4219,18 +4098,6 @@ def ociswrapperK8s(name = OCIS_SERVER_NAME, ocis_url = OCIS_URL_K8S):
|
||||
],
|
||||
}]
|
||||
|
||||
def enableTikaServiceK8s():
|
||||
return [{
|
||||
"name": "tika",
|
||||
"type": "docker",
|
||||
"image": OC_CI_ALPINE,
|
||||
"commands": [
|
||||
"until test -f %s/ocis-charts/charts/ocis/templates/search/deployment.yaml; do sleep 1s; done" % dirs["base"],
|
||||
"cp -r %s/tests/config/drone/k8s/tika %s/ocis-charts/charts/ocis/templates/" % (dirs["base"], dirs["base"]),
|
||||
"sed -i '/^[[:space:]]*storagesystem:/i\\\\ search:\\\n extractor:\\\n type: \"tika\"\\\n tika:\\\n url: \"http://tika:9998\"\\\n persistence:\\\n enabled: true\\\n accessModes:\\\n - ReadWriteOnce' %s/ocis-charts/charts/ocis/ci/deployment-values.yaml" % dirs["base"],
|
||||
],
|
||||
}]
|
||||
|
||||
def exposeNodePortsK8s(services = [], name = OCIS_SERVER_NAME):
|
||||
commands = []
|
||||
for idx, service in enumerate(services):
|
||||
@@ -4255,15 +4122,10 @@ def exposeNodePortsK8s(services = [], name = OCIS_SERVER_NAME):
|
||||
}]
|
||||
|
||||
def exposeExternalServersK8s(servers = [], name = OCIS_SERVER_NAME):
|
||||
commands = []
|
||||
servers_arg = []
|
||||
for server in servers:
|
||||
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))
|
||||
servers_arg.append("%s:%s" % (server[0], str(server[1])))
|
||||
servers_arg = ",".join(servers_arg)
|
||||
|
||||
return [{
|
||||
"name": "expose-external-servers",
|
||||
@@ -4271,5 +4133,6 @@ 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",
|
||||
] + commands,
|
||||
"bash %s/tests/config/k8s/expose-external-svc.sh -n ocis %s" % (dirs["base"], servers_arg),
|
||||
],
|
||||
}]
|
||||
@@ -64,3 +64,4 @@ go.work.sum
|
||||
.envrc
|
||||
CLAUDE.md
|
||||
.claude/
|
||||
.agents/
|
||||
@@ -1,42 +1,67 @@
|
||||
#!/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
|
||||
#
|
||||
# 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"
|
||||
# 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
|
||||
}
|
||||
|
||||
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-]*"
|
||||
|
||||
QUERY_INTRO=$(git grep -n "env:" -- '*.go' |grep -v -P "introductionVersion:\"($SEMVER_REGEX|(pre5\\.0)|($ALPHA_REGEX))\""|grep -v "_test.go"|grep -v "vendor/")
|
||||
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")
|
||||
|
||||
RESULTS_INTRO=$(echo "${QUERY_INTRO}"|wc -l)
|
||||
|
||||
echo "Checking introductionVersion annotations"
|
||||
|
||||
if [ "${QUERY_INTRO}" != "" ] && [ "${RESULTS_INTRO}" -gt 0 ]; then
|
||||
echo
|
||||
echo "==============================================================================================="
|
||||
echo "The following ${RESULTS_INTRO} items contain an invalid or missing introductionVersion annotation:"
|
||||
echo ${RED}"The following ${RESULTS_INTRO} items contain invalid or missing introductionVersion annotation(s):"${NORM}
|
||||
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
|
||||
@@ -45,9 +70,13 @@ 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 "The following ${RESULTS_DESC} items contain an invalid or missing description annotation:"
|
||||
echo ${RED}"The following ${RESULTS_DESC} items contain invalid or missing description annotation:"${NORM}
|
||||
echo "==============================================================================================="
|
||||
echo "$QUERY_DESC"
|
||||
ERROR=1
|
||||
|
||||
+158
@@ -69,6 +69,7 @@ The following sections list the changes for unreleased.
|
||||
|
||||
## Summary
|
||||
|
||||
* Security - Add X-XSS-Protection header: [#12092](https://github.com/owncloud/ocis/pull/12092)
|
||||
* Bugfix - Fix postprocessing resume command --restart flag: [#11692](https://github.com/owncloud/ocis/issues/11692)
|
||||
* Bugfix - Don't use hardcoded groupOfNames in group creation: [#11776](https://github.com/owncloud/ocis/pull/11776)
|
||||
* Bugfix - Translation for some email notifications: [#11979](https://github.com/owncloud/ocis/pull/11979)
|
||||
@@ -76,16 +77,37 @@ The following sections list the changes for unreleased.
|
||||
* Bugfix - Extract metadata from oversized files and fix ISO field: [#12000](https://github.com/owncloud/ocis/pull/12000)
|
||||
* Bugfix - Make tag unassignment idempotent and handle publish failures: [#12001](https://github.com/owncloud/ocis/pull/12001)
|
||||
* Bugfix - Expose the signature-auth attribute: [#12016](https://github.com/owncloud/ocis/pull/12016)
|
||||
* Bugfix - Fix CSP blocking bundled KaTeX font: [#12070](https://github.com/owncloud/ocis/pull/12070)
|
||||
* Bugfix - Fix case-sensitive photo metadata search: [#12078](https://github.com/owncloud/ocis/pull/12078)
|
||||
* 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)
|
||||
* Enhancement - Add space ID to incoming shares: [#12024](https://github.com/owncloud/ocis/pull/12024)
|
||||
* Enhancement - Add spaceid to REPORT: [#12028](https://github.com/owncloud/ocis/pull/12028)
|
||||
* Enhancement - Bump Reva version: [#12051](https://github.com/owncloud/ocis/pull/12051)
|
||||
* Enhancement - Add ResourceID field to UploadReady event: [#12060](https://github.com/owncloud/ocis/pull/12060)
|
||||
* 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
|
||||
|
||||
* Security - Add X-XSS-Protection header: [#12092](https://github.com/owncloud/ocis/pull/12092)
|
||||
|
||||
Added the X-XSS-Protection header set to "0" to explicitly disable the
|
||||
deprecated browser XSS filter, which can introduce side-channel vulnerabilities.
|
||||
Modern XSS protection is provided through the Content-Security-Policy header.
|
||||
|
||||
This change addresses security audit findings requiring explicit configuration
|
||||
of HTTP security headers per OWASP recommendations.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12092
|
||||
|
||||
* Bugfix - Fix postprocessing resume command --restart flag: [#11692](https://github.com/owncloud/ocis/issues/11692)
|
||||
|
||||
The `--restart` / `-r` flag for `ocis postprocessing resume` was broken due to a
|
||||
@@ -163,6 +185,16 @@ The following sections list the changes for unreleased.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12016
|
||||
|
||||
* Bugfix - Fix CSP blocking bundled KaTeX font: [#12070](https://github.com/owncloud/ocis/pull/12070)
|
||||
|
||||
The default Content Security Policy blocked the bundled KaTeX math font (used by
|
||||
the md-editor) because it is inlined as a `data:` URI in the Web UI CSS. Added
|
||||
`data:` to the `font-src` directive to resolve the console error on every page
|
||||
load. Users with custom CSP files (`PROXY_CSP_CONFIG_FILE_LOCATION`) will need
|
||||
to add `data:` to their `font-src` directive manually.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12070
|
||||
|
||||
* Bugfix - Fix case-sensitive photo metadata search: [#12078](https://github.com/owncloud/ocis/pull/12078)
|
||||
|
||||
Searching for photo metadata fields like camera make/model was case-sensitive,
|
||||
@@ -173,6 +205,62 @@ The following sections list the changes for unreleased.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12078
|
||||
|
||||
* Bugfix - Prevent incomplete Tika extractions from permanently blocking re-index: [#12095](https://github.com/owncloud/ocis/pull/12095)
|
||||
|
||||
When Tika returned HTTP 200 but its child processes (OCR, ImageMagick) failed
|
||||
due to resource limits, the search index received metadata but no content. The
|
||||
document was written to Bleve with the correct mtime, and subsequent reindexes
|
||||
skipped it because the id+mtime check passed. This left files permanently stuck
|
||||
as "indexed" with no searchable content.
|
||||
|
||||
Two fixes are applied:
|
||||
|
||||
1. Validate Tika responses: if `MetaRecursive()` returns an empty metadata list,
|
||||
it is now treated as an extraction error so the document is not written to the
|
||||
index.
|
||||
|
||||
2. Add an `Extracted` field to indexed resources. It is set to `true` only after
|
||||
successful extraction. The reindex skip check now requires `Extracted:true`, so
|
||||
incompletely indexed documents are automatically re-processed on the next
|
||||
reindex run.
|
||||
|
||||
Note: existing search indexes will trigger a full re-extraction on the next
|
||||
reindex because documents written before this change lack the `Extracted` field.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/12093
|
||||
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)
|
||||
|
||||
The `IndexSpace` bulk reindexer was using a full KQL search query per file to
|
||||
check whether re-extraction was needed. On large indexes this query took
|
||||
600–950ms each, making a 61,000-file space take ~13.5 hours just to walk.
|
||||
Replaced the per-file `Search()` call with an O(1) `Lookup()` using Bleve's
|
||||
`DocIDQuery`, then comparing mtime and extraction status in memory. This reduces
|
||||
per-file check time from ~800ms to <1ms.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/12093
|
||||
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)
|
||||
|
||||
The `babel-preset-react-app` preset defaults to `absoluteRuntime: true`, which
|
||||
hardcodes absolute paths to `@babel/runtime` helpers. These paths fail to
|
||||
resolve on non-Linux platforms like FreeBSD. Setting `absoluteRuntime: false`
|
||||
makes Babel resolve the runtime relative to the source file, which works across
|
||||
all platforms.
|
||||
|
||||
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
|
||||
@@ -224,6 +312,76 @@ The following sections list the changes for unreleased.
|
||||
https://github.com/owncloud/ocis/pull/12051
|
||||
https://github.com/owncloud/ocis/pull/12087
|
||||
|
||||
* Enhancement - Add ResourceID field to UploadReady event: [#12060](https://github.com/owncloud/ocis/pull/12060)
|
||||
|
||||
The UploadReady NATS event now includes a `ResourceID` field containing the
|
||||
file's actual resource identifier (with the correct node OpaqueId). Previously,
|
||||
only `FileRef` was available, whose `ResourceId.OpaqueId` is set to the space
|
||||
root ID (required for CS3 gateway path resolution). Consumers that need the
|
||||
file's unique identifier for Graph API or WebDAV operations can now use
|
||||
`ResourceID.OpaqueId` directly.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/12056
|
||||
https://github.com/owncloud/ocis/pull/12060
|
||||
https://github.com/owncloud/reva/pull/547
|
||||
https://github.com/owncloud/reva/pull/560
|
||||
|
||||
* Enhancement - Support numeric range queries in KQL: [#12094](https://github.com/owncloud/ocis/pull/12094)
|
||||
|
||||
The KQL parser now supports numeric range queries using comparison operators
|
||||
(>=, <=, >, <) on numeric fields. Previously, range operators only worked with
|
||||
DateTime values, causing queries like `size>=1048576` or `photo.iso>=100` to
|
||||
silently fail by falling through to free-text search.
|
||||
|
||||
Affected numeric fields: Size, photo.iso, photo.fNumber, photo.focalLength,
|
||||
photo.orientation.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/12093
|
||||
https://github.com/owncloud/ocis/pull/12094
|
||||
|
||||
* Enhancement - Add blobstore CLI commands to storage-users service: [#12102](https://github.com/owncloud/ocis/pull/12102)
|
||||
|
||||
Added two new CLI commands under `ocis storage-users blobstore` to help
|
||||
operators verify and inspect the configured blobstore without needing direct
|
||||
access to the underlying storage system.
|
||||
|
||||
`blobstore check` performs a full upload/download/delete round-trip using a
|
||||
random payload. The payload size is configurable via `--blob-size` and accepts
|
||||
human-readable values such as `64`, `1KB` or `4MiB` (default: 64 bytes).
|
||||
|
||||
`blobstore get` downloads a specific blob by its ID to verify it is readable.
|
||||
The blob can be identified either with `--blob-id` and `--space-id`, or by
|
||||
passing the raw blob path from a log line directly via `--path`. Both the s3ng
|
||||
key format (`<spaceID>/<pathified_blobID>`) and the ocis filesystem path format
|
||||
(`…/spaces/<pathified_spaceID>/blobs/<pathified_blobID>`) are accepted. When
|
||||
using the s3ng driver without a known blob size, an automatic retry with the
|
||||
actual size is performed on a size mismatch.
|
||||
|
||||
Both commands read the existing service configuration, so they always target the
|
||||
same blobstore as the running service. Only the `ocis` and `s3ng` storage
|
||||
drivers are supported.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12102
|
||||
|
||||
* Enhancement - Optimize search index after bulk reindexing: [#12104](https://github.com/owncloud/ocis/pull/12104)
|
||||
|
||||
After an `IndexSpace` walk completes, the search engine now triggers a segment
|
||||
merge (compaction) on the bleve index. Over time, writes create multiple index
|
||||
segments that degrade query performance. The new `Optimize()` method calls
|
||||
bleve's `ForceMerge` to consolidate all segments into one, improving subsequent
|
||||
search and lookup speed. This is especially beneficial after bulk reindexing
|
||||
large spaces.
|
||||
|
||||
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.
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
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
|
||||
@@ -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
|
||||
@@ -0,0 +1,5 @@
|
||||
Enhancement: Add Keycloak to the ocis_full deployment example
|
||||
|
||||
Added Keycloak to the ocis_full deployment example.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12139
|
||||
@@ -0,0 +1,13 @@
|
||||
Enhancement: Support numeric range queries in KQL
|
||||
|
||||
The KQL parser now supports numeric range queries using comparison
|
||||
operators (>=, <=, >, <) on numeric fields. Previously, range operators
|
||||
only worked with DateTime values, causing queries like `size>=1048576`
|
||||
or `photo.iso>=100` to silently fail by falling through to free-text
|
||||
search.
|
||||
|
||||
Affected numeric fields: Size, photo.iso, photo.fNumber,
|
||||
photo.focalLength, photo.orientation.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12094
|
||||
https://github.com/owncloud/ocis/issues/12093
|
||||
@@ -0,0 +1,11 @@
|
||||
Enhancement: Optimize search index after bulk reindexing
|
||||
|
||||
After an `IndexSpace` walk completes, the search engine now triggers a
|
||||
segment merge (compaction) on the bleve index. Over time, writes create
|
||||
multiple index segments that degrade query performance. The new
|
||||
`Optimize()` method calls bleve's `ForceMerge` to consolidate all
|
||||
segments into one, improving subsequent search and lookup speed. This is
|
||||
especially beneficial after bulk reindexing large spaces.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12104
|
||||
https://github.com/owncloud/ocis/issues/12093
|
||||
@@ -0,0 +1,24 @@
|
||||
Enhancement: Add blobstore CLI commands to storage-users service
|
||||
|
||||
Added two new CLI commands under `ocis storage-users blobstore` to help
|
||||
operators verify and inspect the configured blobstore without needing
|
||||
direct access to the underlying storage system.
|
||||
|
||||
`blobstore check` performs a full upload/download/delete round-trip using
|
||||
a random payload. The payload size is configurable via `--blob-size` and
|
||||
accepts human-readable values such as `64`, `1KB` or `4MiB` (default: 64 bytes).
|
||||
|
||||
`blobstore get` downloads a specific blob by its ID to verify it is
|
||||
readable. The blob can be identified either with `--blob-id` and
|
||||
`--space-id`, or by passing the raw blob path from a log line directly
|
||||
via `--path`. Both the s3ng key format
|
||||
(`<spaceID>/<pathified_blobID>`) and the ocis filesystem path format
|
||||
(`…/spaces/<pathified_spaceID>/blobs/<pathified_blobID>`) are accepted.
|
||||
When using the s3ng driver without a known blob size, an automatic retry
|
||||
with the actual size is performed on a size mismatch.
|
||||
|
||||
Both commands read the existing service configuration, so they always
|
||||
target the same blobstore as the running service. Only the `ocis` and
|
||||
`s3ng` storage drivers are supported.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12102
|
||||
@@ -0,0 +1,5 @@
|
||||
Bugfix: Fix CSP blocking bundled KaTeX font
|
||||
|
||||
The default Content Security Policy blocked the bundled KaTeX math font (used by the md-editor) because it is inlined as a `data:` URI in the Web UI CSS. Added `data:` to the `font-src` directive to resolve the console error on every page load. Users with custom CSP files (`PROXY_CSP_CONFIG_FILE_LOCATION`) will need to add `data:` to their `font-src` directive manually.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12070
|
||||
@@ -0,0 +1,10 @@
|
||||
Bugfix: Fix IDP build on FreeBSD by disabling absolute Babel runtime
|
||||
|
||||
The `babel-preset-react-app` preset defaults to `absoluteRuntime: true`,
|
||||
which hardcodes absolute paths to `@babel/runtime` helpers. These paths
|
||||
fail to resolve on non-Linux platforms like FreeBSD. Setting
|
||||
`absoluteRuntime: false` makes Babel resolve the runtime relative to
|
||||
the source file, which works across all platforms.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12114
|
||||
https://github.com/owncloud/ocis/issues/12065
|
||||
@@ -0,0 +1,10 @@
|
||||
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
|
||||
@@ -0,0 +1,26 @@
|
||||
Bugfix: Prevent incomplete Tika extractions from permanently blocking re-index
|
||||
|
||||
When Tika returned HTTP 200 but its child processes (OCR, ImageMagick)
|
||||
failed due to resource limits, the search index received metadata but
|
||||
no content. The document was written to Bleve with the correct mtime,
|
||||
and subsequent reindexes skipped it because the id+mtime check passed.
|
||||
This left files permanently stuck as "indexed" with no searchable
|
||||
content.
|
||||
|
||||
Two fixes are applied:
|
||||
|
||||
1. Validate Tika responses: if `MetaRecursive()` returns an empty
|
||||
metadata list, it is now treated as an extraction error so the
|
||||
document is not written to the index.
|
||||
|
||||
2. Add an `Extracted` field to indexed resources. It is set to `true`
|
||||
only after successful extraction. The reindex skip check now requires
|
||||
`Extracted:true`, so incompletely indexed documents are automatically
|
||||
re-processed on the next reindex run.
|
||||
|
||||
Note: existing search indexes will trigger a full re-extraction on the
|
||||
next reindex because documents written before this change lack the
|
||||
`Extracted` field.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12095
|
||||
https://github.com/owncloud/ocis/issues/12093
|
||||
@@ -0,0 +1,11 @@
|
||||
Bugfix: Use O(1) document lookup instead of full search during reindexing
|
||||
|
||||
The `IndexSpace` bulk reindexer was using a full KQL search query per file
|
||||
to check whether re-extraction was needed. On large indexes this query
|
||||
took 600–950ms each, making a 61,000-file space take ~13.5 hours just to
|
||||
walk. Replaced the per-file `Search()` call with an O(1) `Lookup()` using
|
||||
Bleve's `DocIDQuery`, then comparing mtime and extraction status in memory.
|
||||
This reduces per-file check time from ~800ms to <1ms.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12096
|
||||
https://github.com/owncloud/ocis/issues/12093
|
||||
@@ -0,0 +1,11 @@
|
||||
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
|
||||
@@ -0,0 +1,11 @@
|
||||
Security: Add X-XSS-Protection header
|
||||
|
||||
Added the X-XSS-Protection header set to "0" to explicitly disable the
|
||||
deprecated browser XSS filter, which can introduce side-channel
|
||||
vulnerabilities. Modern XSS protection is provided through the
|
||||
Content-Security-Policy header.
|
||||
|
||||
This change addresses security audit findings requiring explicit
|
||||
configuration of HTTP security headers per OWASP recommendations.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12092
|
||||
@@ -0,0 +1,13 @@
|
||||
Enhancement: Add ResourceID field to UploadReady event
|
||||
|
||||
The UploadReady NATS event now includes a `ResourceID` field containing the
|
||||
file's actual resource identifier (with the correct node OpaqueId). Previously,
|
||||
only `FileRef` was available, whose `ResourceId.OpaqueId` is set to the space
|
||||
root ID (required for CS3 gateway path resolution). Consumers that need the
|
||||
file's unique identifier for Graph API or WebDAV operations can now use
|
||||
`ResourceID.OpaqueId` directly.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12060
|
||||
https://github.com/owncloud/ocis/issues/12056
|
||||
https://github.com/owncloud/reva/pull/547
|
||||
https://github.com/owncloud/reva/pull/560
|
||||
@@ -0,0 +1,6 @@
|
||||
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
|
||||
@@ -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.7
|
||||
TRAEFIK_DOCKER_TAG=v3.6.10
|
||||
# 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=
|
||||
OCIS_DOCKER_TAG=latest
|
||||
# Domain of oCIS, where you can find the frontend.
|
||||
# Defaults to "ocis.owncloud.test"
|
||||
OCIS_DOMAIN=
|
||||
@@ -94,6 +94,9 @@ 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=
|
||||
|
||||
@@ -164,6 +167,26 @@ 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 ###
|
||||
@@ -171,8 +194,8 @@ COMPANION_ONEDRIVE_SECRET=
|
||||
# Note: the leading colon is required to enable the service.
|
||||
TIKA=:tika.yml
|
||||
# Set the desired docker image tag or digest.
|
||||
# Defaults to "latest"
|
||||
TIKA_IMAGE=
|
||||
# Defaults to "latest-full"
|
||||
TIKA_DOCKER_TAG=latest-full
|
||||
|
||||
### IMPORTANT Note for Online Office Apps ###
|
||||
# To avoid app interlocking issues, you should select only one app to be active/configured.
|
||||
@@ -185,7 +208,7 @@ TIKA_IMAGE=
|
||||
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.8.1.1
|
||||
COLLABORA_DOCKER_TAG=25.04.9.3.1
|
||||
# Domain of Collabora, where you can find the frontend.
|
||||
# Defaults to "collabora.owncloud.test"
|
||||
COLLABORA_DOMAIN=
|
||||
@@ -217,7 +240,7 @@ COLLABORA_SSL_VERIFICATION=false
|
||||
#CLAMAV=:clamav.yml
|
||||
# Image version of the ClamAV container.
|
||||
# Defaults to "latest"
|
||||
CLAMAV_DOCKER_TAG=
|
||||
CLAMAV_DOCKER_TAG=latest
|
||||
|
||||
|
||||
### OnlyOffice Settings ###
|
||||
@@ -230,7 +253,7 @@ CLAMAV_DOCKER_TAG=
|
||||
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.2.1.1
|
||||
ONLYOFFICE_DOCKER_TAG=9.3.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.
|
||||
@@ -257,7 +280,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.28.0
|
||||
MAIL_SERVER_DOCKER_TAG=v1.29.3
|
||||
|
||||
|
||||
### Debugging - Monitoring ###
|
||||
@@ -274,4 +297,4 @@ MAIL_SERVER_DOCKER_TAG=v1.28.0
|
||||
# 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:-}
|
||||
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:-}
|
||||
@@ -15,4 +15,11 @@ 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.
|
||||
@@ -13,7 +13,7 @@ services:
|
||||
- "clamav-socket:/var/run/clamav"
|
||||
|
||||
clamav:
|
||||
image: clamav/clamav:${CLAMAV_DOCKER_TAG:-latest}
|
||||
image: clamav/clamav:${CLAMAV_DOCKER_TAG}
|
||||
# release notes: https://blog.clamav.net
|
||||
networks:
|
||||
ocis-net:
|
||||
|
||||
@@ -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:-latest}
|
||||
image: ${OCIS_DOCKER_IMAGE:-owncloud/ocis}:${OCIS_DOCKER_TAG}
|
||||
networks:
|
||||
ocis-net:
|
||||
depends_on:
|
||||
@@ -49,7 +49,7 @@ services:
|
||||
restart: always
|
||||
|
||||
collabora:
|
||||
image: collabora/code:${COLLABORA_DOCKER_TAG:-latest}
|
||||
image: collabora/code:${COLLABORA_DOCKER_TAG}
|
||||
networks:
|
||||
ocis-net:
|
||||
environment:
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/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,12 +7,15 @@ 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:
|
||||
- '''none'''
|
||||
font-src:
|
||||
- '''self'''
|
||||
- 'data:'
|
||||
frame-ancestors:
|
||||
- '''self'''
|
||||
frame-src:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
services:
|
||||
traefik:
|
||||
image: traefik:${TRAEFIK_DOCKER_TAG:-latest}
|
||||
image: traefik:${TRAEFIK_DOCKER_TAG}
|
||||
networks:
|
||||
ocis-net:
|
||||
command:
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
---
|
||||
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:-latest}
|
||||
image: axllent/mailpit:${MAIL_SERVER_DOCKER_TAG}
|
||||
networks:
|
||||
- ocis-net
|
||||
ports:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
services:
|
||||
minio:
|
||||
image: minio/minio:latest
|
||||
image: minio/minio:${MINIO_DOCKER_TAG}
|
||||
# release notes: https://github.com/minio/minio/releases
|
||||
networks:
|
||||
ocis-net:
|
||||
|
||||
@@ -6,7 +6,7 @@ services:
|
||||
aliases:
|
||||
- ${OCIS_DOMAIN:-ocis.owncloud.test}
|
||||
ocis:
|
||||
image: ${OCIS_DOCKER_IMAGE:-owncloud/ocis}:${OCIS_DOCKER_TAG:-latest}
|
||||
image: ${OCIS_DOCKER_IMAGE:-owncloud/ocis}:${OCIS_DOCKER_TAG}
|
||||
# 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:-latest}
|
||||
image: ${OCIS_DOCKER_IMAGE:-owncloud/ocis}:${OCIS_DOCKER_TAG}
|
||||
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:-latest}
|
||||
image: ${ONLYOFFICE_IMAGE:-onlyoffice/documentserver}:${ONLYOFFICE_DOCKER_TAG}
|
||||
networks:
|
||||
ocis-net:
|
||||
entrypoint:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
services:
|
||||
tika:
|
||||
image: ${TIKA_IMAGE:-apache/tika:latest-full}
|
||||
image: apache/tika:${TIKA_DOCKER_TAG}
|
||||
# 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.1.0
|
||||
image: owncloud/web-extensions:advanced-search-0.2.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.1.0
|
||||
image: owncloud/web-extensions:photo-addon-0.2.0
|
||||
user: root
|
||||
volumes:
|
||||
- ocis-apps:/apps
|
||||
|
||||
@@ -11,6 +11,7 @@ directives:
|
||||
- '''none'''
|
||||
font-src:
|
||||
- '''self'''
|
||||
- 'data:'
|
||||
frame-ancestors:
|
||||
- '''none'''
|
||||
frame-src:
|
||||
|
||||
@@ -10,6 +10,7 @@ directives:
|
||||
- '''none'''
|
||||
font-src:
|
||||
- '''self'''
|
||||
- 'data:'
|
||||
frame-ancestors:
|
||||
- '''self'''
|
||||
frame-src:
|
||||
|
||||
@@ -11,6 +11,7 @@ directives:
|
||||
- '''none'''
|
||||
font-src:
|
||||
- '''self'''
|
||||
- 'data:'
|
||||
frame-ancestors:
|
||||
- '''none'''
|
||||
frame-src:
|
||||
|
||||
@@ -9,6 +9,7 @@ directives:
|
||||
- '''none'''
|
||||
font-src:
|
||||
- '''self'''
|
||||
- 'data:'
|
||||
frame-ancestors:
|
||||
- '''self'''
|
||||
frame-src:
|
||||
|
||||
@@ -9,6 +9,7 @@ directives:
|
||||
- '''none'''
|
||||
font-src:
|
||||
- '''self'''
|
||||
- 'data:'
|
||||
frame-ancestors:
|
||||
- '''self'''
|
||||
frame-src:
|
||||
|
||||
@@ -9,6 +9,7 @@ directives:
|
||||
- '''none'''
|
||||
font-src:
|
||||
- '''self'''
|
||||
- 'data:'
|
||||
frame-ancestors:
|
||||
- '''self'''
|
||||
frame-src:
|
||||
|
||||
+126
-128
@@ -7912,7 +7912,7 @@ OCIS_ASYNC_UPLOADS:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_CACHE_AUTH_PASSWORD:
|
||||
name: OCIS_CACHE_AUTH_PASSWORD;SETTINGS_CACHE_AUTH_PASSWORD
|
||||
name: OCIS_CACHE_AUTH_PASSWORD;GRAPH_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;SETTINGS_CACHE_AUTH_USERNAME
|
||||
name: OCIS_CACHE_AUTH_USERNAME;GRAPH_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: settings-cache
|
||||
defaultValue: cache-userinfo
|
||||
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;SETTINGS_CACHE_DISABLE_PERSISTENCE
|
||||
name: OCIS_CACHE_DISABLE_PERSISTENCE;GRAPH_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;SETTINGS_CACHE_STORE
|
||||
name: OCIS_CACHE_STORE;GRAPH_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;SETTINGS_CACHE_STORE_NODES
|
||||
name: OCIS_CACHE_STORE_NODES;GRAPH_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 is configured. Note that the behaviour how nodes are used
|
||||
when 'memory' store are 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,12 +7973,11 @@ OCIS_CACHE_STORE_NODES:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_CACHE_TTL:
|
||||
name: OCIS_CACHE_TTL;SETTINGS_CACHE_TTL
|
||||
defaultValue: 10m0s
|
||||
name: OCIS_CACHE_TTL;GRAPH_CACHE_TTL
|
||||
defaultValue: 336h0m0s
|
||||
type: Duration
|
||||
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.
|
||||
description: Time to live for cache records in the graph. Defaults to '336h' (2
|
||||
weeks). See the Environment Variable Types description for more details.
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
@@ -8021,45 +8020,46 @@ OCIS_CLAIM_MANAGED_SPACES_REGEXP:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_CORS_ALLOW_CREDENTIALS:
|
||||
name: OCIS_CORS_ALLOW_CREDENTIALS;SETTINGS_CORS_ALLOW_CREDENTIALS
|
||||
name: OCIS_CORS_ALLOW_CREDENTIALS;THUMBNAILS_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: pre5.0
|
||||
introductionVersion: "6.0"
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_CORS_ALLOW_HEADERS:
|
||||
name: OCIS_CORS_ALLOW_HEADERS;SETTINGS_CORS_ALLOW_HEADERS
|
||||
defaultValue: '[Authorization Origin Content-Type Accept X-Requested-With X-Request-Id]'
|
||||
name: OCIS_CORS_ALLOW_HEADERS;THUMBNAILS_CORS_ALLOW_HEADERS
|
||||
defaultValue: '[Authorization Origin Content-Type Accept X-Requested-With X-Request-Id
|
||||
Cache-Control]'
|
||||
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: pre5.0
|
||||
introductionVersion: "6.0"
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_CORS_ALLOW_METHODS:
|
||||
name: OCIS_CORS_ALLOW_METHODS;SETTINGS_CORS_ALLOW_METHODS
|
||||
name: OCIS_CORS_ALLOW_METHODS;THUMBNAILS_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: pre5.0
|
||||
introductionVersion: "6.0"
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_CORS_ALLOW_ORIGINS:
|
||||
name: OCIS_CORS_ALLOW_ORIGINS;SETTINGS_CORS_ALLOW_ORIGINS
|
||||
name: OCIS_CORS_ALLOW_ORIGINS;THUMBNAILS_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: pre5.0
|
||||
introductionVersion: "6.0"
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
@@ -8176,38 +8176,36 @@ OCIS_ENABLE_OCM:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_EVENTS_AUTH_PASSWORD:
|
||||
name: OCIS_EVENTS_AUTH_PASSWORD;SSE_EVENTS_AUTH_PASSWORD
|
||||
name: OCIS_EVENTS_AUTH_PASSWORD;SHARING_EVENTS_AUTH_PASSWORD
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: The password to authenticate with the events broker. The events broker
|
||||
is the ocis service which receives and delivers events between the services.
|
||||
description: Password for the events broker.
|
||||
introductionVersion: "5.0"
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_EVENTS_AUTH_USERNAME:
|
||||
name: OCIS_EVENTS_AUTH_USERNAME;SSE_EVENTS_AUTH_USERNAME
|
||||
name: OCIS_EVENTS_AUTH_USERNAME;SHARING_EVENTS_AUTH_USERNAME
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: The username to authenticate with the events broker. The events broker
|
||||
is the ocis service which receives and delivers events between the services.
|
||||
description: Username for the events broker.
|
||||
introductionVersion: "5.0"
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_EVENTS_CLUSTER:
|
||||
name: OCIS_EVENTS_CLUSTER;SSE_EVENTS_CLUSTER
|
||||
name: OCIS_EVENTS_CLUSTER;SHARING_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: "5.0"
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_EVENTS_ENABLE_TLS:
|
||||
name: OCIS_EVENTS_ENABLE_TLS;NATS_EVENTS_ENABLE_TLS
|
||||
name: OCIS_EVENTS_ENABLE_TLS;SHARING_EVENTS_ENABLE_TLS
|
||||
defaultValue: "false"
|
||||
type: bool
|
||||
description: Enable TLS for the connection to the events broker. The events broker
|
||||
@@ -8217,22 +8215,22 @@ OCIS_EVENTS_ENABLE_TLS:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_EVENTS_ENDPOINT:
|
||||
name: OCIS_EVENTS_ENDPOINT;SSE_EVENTS_ENDPOINT
|
||||
name: OCIS_EVENTS_ENDPOINT;SHARING_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: "5.0"
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE:
|
||||
name: OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE;SSE_EVENTS_TLS_ROOT_CA_CERTIFICATE
|
||||
name: OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE;SHARING_EVENTS_TLS_ROOT_CA_CERTIFICATE
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: The root CA certificate used to validate the server's TLS certificate.
|
||||
If provided SSE_EVENTS_TLS_INSECURE will be seen as false.
|
||||
introductionVersion: "5.0"
|
||||
If provided SHARING_EVENTS_TLS_INSECURE will be seen as false.
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
@@ -8269,7 +8267,7 @@ OCIS_GRPC_CLIENT_TLS_MODE:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_GRPC_PROTOCOL:
|
||||
name: OCIS_GRPC_PROTOCOL;APP_REGISTRY_GRPC_PROTOCOL
|
||||
name: OCIS_GRPC_PROTOCOL;SHARING_GRPC_PROTOCOL
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: The transport protocol of the GRPC service.
|
||||
@@ -8309,17 +8307,16 @@ OCIS_HTTP_TLS_KEY:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_INSECURE:
|
||||
name: OCIS_INSECURE;NATS_TLS_SKIP_VERIFY_CLIENT_CERT
|
||||
name: OCIS_INSECURE;SHARING_EVENTS_TLS_INSECURE
|
||||
defaultValue: "false"
|
||||
type: bool
|
||||
description: Whether the NATS server should skip the client certificate verification
|
||||
during the TLS handshake.
|
||||
description: Whether to verify the server TLS certificates.
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_JWT_SECRET:
|
||||
name: OCIS_JWT_SECRET;APP_REGISTRY_JWT_SECRET
|
||||
name: OCIS_JWT_SECRET;SHARING_JWT_SECRET
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: The secret to mint and validate jwt tokens.
|
||||
@@ -8383,7 +8380,7 @@ OCIS_KEYCLOAK_USER_REALM:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_BIND_DN:
|
||||
name: OCIS_LDAP_BIND_DN;USERS_LDAP_BIND_DN
|
||||
name: OCIS_LDAP_BIND_DN;AUTH_BASIC_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
|
||||
@@ -8393,7 +8390,7 @@ OCIS_LDAP_BIND_DN:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_BIND_PASSWORD:
|
||||
name: OCIS_LDAP_BIND_PASSWORD;USERS_LDAP_BIND_PASSWORD
|
||||
name: OCIS_LDAP_BIND_PASSWORD;AUTH_BASIC_LDAP_BIND_PASSWORD
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: Password to use for authenticating the 'bind_dn'.
|
||||
@@ -8402,7 +8399,7 @@ OCIS_LDAP_BIND_PASSWORD:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_CACERT:
|
||||
name: OCIS_LDAP_CACERT;USERS_LDAP_CACERT
|
||||
name: OCIS_LDAP_CACERT;AUTH_BASIC_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
|
||||
@@ -8423,7 +8420,7 @@ OCIS_LDAP_CROSS_INSTANCE_REFERENCE_TEMPLATE:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_DISABLE_USER_MECHANISM:
|
||||
name: OCIS_LDAP_DISABLE_USER_MECHANISM;USERS_LDAP_DISABLE_USER_MECHANISM
|
||||
name: OCIS_LDAP_DISABLE_USER_MECHANISM;AUTH_BASIC_DISABLE_USER_MECHANISM
|
||||
defaultValue: attribute
|
||||
type: string
|
||||
description: An option to control the behavior for disabling users. Valid options
|
||||
@@ -8436,7 +8433,7 @@ OCIS_LDAP_DISABLE_USER_MECHANISM:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_DISABLED_USERS_GROUP_DN:
|
||||
name: OCIS_LDAP_DISABLED_USERS_GROUP_DN;USERS_LDAP_DISABLED_USERS_GROUP_DN
|
||||
name: OCIS_LDAP_DISABLED_USERS_GROUP_DN;AUTH_BASIC_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
|
||||
@@ -8456,7 +8453,7 @@ OCIS_LDAP_GROUP_AFFILIATION_ATTRIBUTE:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_GROUP_BASE_DN:
|
||||
name: OCIS_LDAP_GROUP_BASE_DN;USERS_LDAP_GROUP_BASE_DN
|
||||
name: OCIS_LDAP_GROUP_BASE_DN;AUTH_BASIC_LDAP_GROUP_BASE_DN
|
||||
defaultValue: ou=groups,o=libregraph-idm
|
||||
type: string
|
||||
description: Search base DN for looking up LDAP groups.
|
||||
@@ -8465,7 +8462,7 @@ OCIS_LDAP_GROUP_BASE_DN:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_GROUP_FILTER:
|
||||
name: OCIS_LDAP_GROUP_FILTER;USERS_LDAP_GROUP_FILTER
|
||||
name: OCIS_LDAP_GROUP_FILTER;AUTH_BASIC_LDAP_GROUP_FILTER
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: LDAP filter to add to the default filters for group searches.
|
||||
@@ -8474,17 +8471,17 @@ OCIS_LDAP_GROUP_FILTER:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_GROUP_OBJECTCLASS:
|
||||
name: OCIS_LDAP_GROUP_OBJECTCLASS;USERS_LDAP_GROUP_OBJECTCLASS
|
||||
name: OCIS_LDAP_GROUP_OBJECTCLASS;AUTH_BASIC_LDAP_GROUP_OBJECTCLASS
|
||||
defaultValue: groupOfNames
|
||||
type: string
|
||||
description: The object class to use for groups in the default group search filter
|
||||
like 'groupOfNames'.
|
||||
('groupOfNames').
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_GROUP_SCHEMA_DISPLAYNAME:
|
||||
name: OCIS_LDAP_GROUP_SCHEMA_DISPLAYNAME;USERS_LDAP_GROUP_SCHEMA_DISPLAYNAME
|
||||
name: OCIS_LDAP_GROUP_SCHEMA_DISPLAYNAME;AUTH_BASIC_LDAP_GROUP_SCHEMA_DISPLAYNAME
|
||||
defaultValue: cn
|
||||
type: string
|
||||
description: LDAP Attribute to use for the displayname of groups (often the same
|
||||
@@ -8494,7 +8491,7 @@ OCIS_LDAP_GROUP_SCHEMA_DISPLAYNAME:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_GROUP_SCHEMA_GROUPNAME:
|
||||
name: OCIS_LDAP_GROUP_SCHEMA_GROUPNAME;USERS_LDAP_GROUP_SCHEMA_GROUPNAME
|
||||
name: OCIS_LDAP_GROUP_SCHEMA_GROUPNAME;AUTH_BASIC_LDAP_GROUP_SCHEMA_GROUPNAME
|
||||
defaultValue: cn
|
||||
type: string
|
||||
description: LDAP Attribute to use for the name of groups.
|
||||
@@ -8503,28 +8500,28 @@ OCIS_LDAP_GROUP_SCHEMA_GROUPNAME:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_GROUP_SCHEMA_ID:
|
||||
name: OCIS_LDAP_GROUP_SCHEMA_ID;USERS_LDAP_GROUP_SCHEMA_ID
|
||||
name: OCIS_LDAP_GROUP_SCHEMA_ID;AUTH_BASIC_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 like a UUID.
|
||||
description: LDAP Attribute to use as the unique id for groups. This should be a
|
||||
stable globally unique id (e.g. a UUID).
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_GROUP_SCHEMA_ID_IS_OCTETSTRING:
|
||||
name: OCIS_LDAP_GROUP_SCHEMA_ID_IS_OCTETSTRING;USERS_LDAP_GROUP_SCHEMA_ID_IS_OCTETSTRING
|
||||
name: OCIS_LDAP_GROUP_SCHEMA_ID_IS_OCTETSTRING;AUTH_BASIC_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 ID's.
|
||||
of Active Directory for the group IDs.
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_GROUP_SCHEMA_MAIL:
|
||||
name: OCIS_LDAP_GROUP_SCHEMA_MAIL;USERS_LDAP_GROUP_SCHEMA_MAIL
|
||||
name: OCIS_LDAP_GROUP_SCHEMA_MAIL;AUTH_BASIC_LDAP_GROUP_SCHEMA_MAIL
|
||||
defaultValue: mail
|
||||
type: string
|
||||
description: LDAP Attribute to use for the email address of groups (can be empty).
|
||||
@@ -8533,7 +8530,7 @@ OCIS_LDAP_GROUP_SCHEMA_MAIL:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_GROUP_SCHEMA_MEMBER:
|
||||
name: OCIS_LDAP_GROUP_SCHEMA_MEMBER;USERS_LDAP_GROUP_SCHEMA_MEMBER
|
||||
name: OCIS_LDAP_GROUP_SCHEMA_MEMBER;AUTH_BASIC_LDAP_GROUP_SCHEMA_MEMBER
|
||||
defaultValue: member
|
||||
type: string
|
||||
description: LDAP Attribute that is used for group members.
|
||||
@@ -8542,7 +8539,7 @@ OCIS_LDAP_GROUP_SCHEMA_MEMBER:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_GROUP_SCOPE:
|
||||
name: OCIS_LDAP_GROUP_SCOPE;USERS_LDAP_GROUP_SCOPE
|
||||
name: OCIS_LDAP_GROUP_SCOPE;AUTH_BASIC_LDAP_GROUP_SCOPE
|
||||
defaultValue: sub
|
||||
type: string
|
||||
description: LDAP search scope to use when looking up groups. Supported values are
|
||||
@@ -8552,7 +8549,7 @@ OCIS_LDAP_GROUP_SCOPE:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_INSECURE:
|
||||
name: OCIS_LDAP_INSECURE;USERS_LDAP_INSECURE
|
||||
name: OCIS_LDAP_INSECURE;AUTH_BASIC_LDAP_INSECURE
|
||||
defaultValue: "false"
|
||||
type: bool
|
||||
description: Disable TLS certificate validation for the LDAP connections. Do not
|
||||
@@ -8632,7 +8629,7 @@ OCIS_LDAP_SERVER_WRITE_ENABLED:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_URI:
|
||||
name: OCIS_LDAP_URI;USERS_LDAP_URI
|
||||
name: OCIS_LDAP_URI;AUTH_BASIC_LDAP_URI
|
||||
defaultValue: ldaps://localhost:9235
|
||||
type: string
|
||||
description: URI of the LDAP Server to connect to. Supported URI schemes are 'ldaps://'
|
||||
@@ -8642,7 +8639,7 @@ OCIS_LDAP_URI:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_USER_BASE_DN:
|
||||
name: OCIS_LDAP_USER_BASE_DN;USERS_LDAP_USER_BASE_DN
|
||||
name: OCIS_LDAP_USER_BASE_DN;AUTH_BASIC_LDAP_USER_BASE_DN
|
||||
defaultValue: ou=users,o=libregraph-idm
|
||||
type: string
|
||||
description: Search base DN for looking up LDAP users.
|
||||
@@ -8651,7 +8648,7 @@ OCIS_LDAP_USER_BASE_DN:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_USER_ENABLED_ATTRIBUTE:
|
||||
name: OCIS_LDAP_USER_ENABLED_ATTRIBUTE;USERS_LDAP_USER_ENABLED_ATTRIBUTE
|
||||
name: OCIS_LDAP_USER_ENABLED_ATTRIBUTE;AUTH_BASIC_LDAP_USER_ENABLED_ATTRIBUTE
|
||||
defaultValue: ownCloudUserEnabled
|
||||
type: string
|
||||
description: LDAP attribute to use as a flag telling if the user is enabled or disabled.
|
||||
@@ -8660,7 +8657,7 @@ OCIS_LDAP_USER_ENABLED_ATTRIBUTE:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_USER_FILTER:
|
||||
name: OCIS_LDAP_USER_FILTER;USERS_LDAP_USER_FILTER
|
||||
name: OCIS_LDAP_USER_FILTER;AUTH_BASIC_LDAP_USER_FILTER
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: LDAP filter to add to the default filters for user search like '(objectclass=ownCloud)'.
|
||||
@@ -8689,24 +8686,24 @@ OCIS_LDAP_USER_MEMBER_ATTRIBUTE:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_USER_OBJECTCLASS:
|
||||
name: OCIS_LDAP_USER_OBJECTCLASS;USERS_LDAP_USER_OBJECTCLASS
|
||||
name: OCIS_LDAP_USER_OBJECTCLASS;AUTH_BASIC_LDAP_USER_OBJECTCLASS
|
||||
defaultValue: inetOrgPerson
|
||||
type: string
|
||||
description: The object class to use for users in the default user search filter
|
||||
like 'inetOrgPerson'.
|
||||
('inetOrgPerson').
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_USER_SCHEMA_DISPLAYNAME:
|
||||
name: OCIS_LDAP_USER_SCHEMA_DISPLAYNAME;USERS_LDAP_USER_SCHEMA_DISPLAYNAME
|
||||
name: OCIS_LDAP_USER_SCHEMA_DISPLAYNAME;AUTH_BASIC_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
|
||||
@@ -8719,7 +8716,7 @@ OCIS_LDAP_USER_SCHEMA_EXTERNAL_ID:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_USER_SCHEMA_ID:
|
||||
name: OCIS_LDAP_USER_SCHEMA_ID;USERS_LDAP_USER_SCHEMA_ID
|
||||
name: OCIS_LDAP_USER_SCHEMA_ID;AUTH_BASIC_LDAP_USER_SCHEMA_ID
|
||||
defaultValue: ownclouduuid
|
||||
type: string
|
||||
description: LDAP Attribute to use as the unique ID for users. This should be a
|
||||
@@ -8729,18 +8726,18 @@ OCIS_LDAP_USER_SCHEMA_ID:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_USER_SCHEMA_ID_IS_OCTETSTRING:
|
||||
name: OCIS_LDAP_USER_SCHEMA_ID_IS_OCTETSTRING;USERS_LDAP_USER_SCHEMA_ID_IS_OCTETSTRING
|
||||
name: OCIS_LDAP_USER_SCHEMA_ID_IS_OCTETSTRING;AUTH_BASIC_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 ID's.
|
||||
of Active Directory for the user IDs.
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_USER_SCHEMA_MAIL:
|
||||
name: OCIS_LDAP_USER_SCHEMA_MAIL;USERS_LDAP_USER_SCHEMA_MAIL
|
||||
name: OCIS_LDAP_USER_SCHEMA_MAIL;AUTH_BASIC_LDAP_USER_SCHEMA_MAIL
|
||||
defaultValue: mail
|
||||
type: string
|
||||
description: LDAP Attribute to use for the email address of users.
|
||||
@@ -8749,7 +8746,7 @@ OCIS_LDAP_USER_SCHEMA_MAIL:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_USER_SCHEMA_USER_TYPE:
|
||||
name: OCIS_LDAP_USER_SCHEMA_USER_TYPE;USERS_LDAP_USER_TYPE_ATTRIBUTE
|
||||
name: OCIS_LDAP_USER_SCHEMA_USER_TYPE;GRAPH_LDAP_USER_TYPE_ATTRIBUTE
|
||||
defaultValue: ownCloudUserType
|
||||
type: string
|
||||
description: LDAP Attribute to distinguish between 'Member' and 'Guest' users. Default
|
||||
@@ -8759,7 +8756,7 @@ OCIS_LDAP_USER_SCHEMA_USER_TYPE:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_USER_SCHEMA_USERNAME:
|
||||
name: OCIS_LDAP_USER_SCHEMA_USERNAME;USERS_LDAP_USER_SCHEMA_USERNAME
|
||||
name: OCIS_LDAP_USER_SCHEMA_USERNAME;AUTH_BASIC_LDAP_USER_SCHEMA_USERNAME
|
||||
defaultValue: uid
|
||||
type: string
|
||||
description: LDAP Attribute to use for username of users.
|
||||
@@ -8768,7 +8765,7 @@ OCIS_LDAP_USER_SCHEMA_USERNAME:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_USER_SCOPE:
|
||||
name: OCIS_LDAP_USER_SCOPE;USERS_LDAP_USER_SCOPE
|
||||
name: OCIS_LDAP_USER_SCOPE;AUTH_BASIC_LDAP_USER_SCOPE
|
||||
defaultValue: sub
|
||||
type: string
|
||||
description: LDAP search scope to use when looking up users. Supported values are
|
||||
@@ -8778,7 +8775,7 @@ OCIS_LDAP_USER_SCOPE:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LOG_COLOR:
|
||||
name: OCIS_LOG_COLOR;APP_REGISTRY_LOG_COLOR
|
||||
name: OCIS_LOG_COLOR;SHARING_LOG_COLOR
|
||||
defaultValue: "false"
|
||||
type: bool
|
||||
description: Activates colorized log output.
|
||||
@@ -8787,7 +8784,7 @@ OCIS_LOG_COLOR:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LOG_FILE:
|
||||
name: OCIS_LOG_FILE;APP_REGISTRY_LOG_FILE
|
||||
name: OCIS_LOG_FILE;SHARING_LOG_FILE
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: The path to the log file. Activates logging to this file if set.
|
||||
@@ -8796,7 +8793,7 @@ OCIS_LOG_FILE:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LOG_LEVEL:
|
||||
name: OCIS_LOG_LEVEL;APP_REGISTRY_LOG_LEVEL
|
||||
name: OCIS_LOG_LEVEL;SHARING_LOG_LEVEL
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: 'The log level. Valid values are: ''panic'', ''fatal'', ''error'',
|
||||
@@ -8806,7 +8803,7 @@ OCIS_LOG_LEVEL:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LOG_PRETTY:
|
||||
name: OCIS_LOG_PRETTY;APP_REGISTRY_LOG_PRETTY
|
||||
name: OCIS_LOG_PRETTY;SHARING_LOG_PRETTY
|
||||
defaultValue: "false"
|
||||
type: bool
|
||||
description: Activates pretty log output.
|
||||
@@ -8815,7 +8812,7 @@ OCIS_LOG_PRETTY:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_MACHINE_AUTH_API_KEY:
|
||||
name: OCIS_MACHINE_AUTH_API_KEY;AUTH_MACHINE_API_KEY
|
||||
name: OCIS_MACHINE_AUTH_API_KEY;IDP_MACHINE_AUTH_API_KEY
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: Machine auth API key used to validate internal requests necessary for
|
||||
@@ -8825,7 +8822,7 @@ OCIS_MACHINE_AUTH_API_KEY:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_MAX_CONCURRENCY:
|
||||
name: OCIS_MAX_CONCURRENCY;USERLOG_MAX_CONCURRENCY
|
||||
name: OCIS_MAX_CONCURRENCY;SHARING_USER_JSONCS3_MAX_CONCURRENCY
|
||||
defaultValue: "1"
|
||||
type: int
|
||||
description: Maximum number of concurrent go-routines. Higher values can potentially
|
||||
@@ -8935,16 +8932,17 @@ OCIS_OIDC_CLIENT_ID:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_OIDC_ISSUER:
|
||||
name: OCIS_URL;OCIS_OIDC_ISSUER
|
||||
name: OCIS_URL;OCIS_OIDC_ISSUER;AUTH_BASIC_IDP_URL
|
||||
defaultValue: https://localhost:9200
|
||||
type: string
|
||||
description: The OIDC issuer URL to assign to the demo users.
|
||||
description: The identity provider value to set in the userids of the CS3 user objects
|
||||
for users returned by this user provider.
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_PASSWORD_POLICY_BANNED_PASSWORDS_LIST:
|
||||
name: OCIS_PASSWORD_POLICY_BANNED_PASSWORDS_LIST;FRONTEND_PASSWORD_POLICY_BANNED_PASSWORDS_LIST
|
||||
name: OCIS_PASSWORD_POLICY_BANNED_PASSWORDS_LIST;SHARING_PASSWORD_POLICY_BANNED_PASSWORDS_LIST
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: Path to the 'banned passwords list' file. This only impacts public
|
||||
@@ -8954,7 +8952,7 @@ OCIS_PASSWORD_POLICY_BANNED_PASSWORDS_LIST:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_PASSWORD_POLICY_DISABLED:
|
||||
name: OCIS_PASSWORD_POLICY_DISABLED;FRONTEND_PASSWORD_POLICY_DISABLED
|
||||
name: OCIS_PASSWORD_POLICY_DISABLED;SHARING_PASSWORD_POLICY_DISABLED
|
||||
defaultValue: "false"
|
||||
type: bool
|
||||
description: Disable the password policy. Defaults to false if not set.
|
||||
@@ -8963,7 +8961,7 @@ OCIS_PASSWORD_POLICY_DISABLED:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_PASSWORD_POLICY_MIN_CHARACTERS:
|
||||
name: OCIS_PASSWORD_POLICY_MIN_CHARACTERS;FRONTEND_PASSWORD_POLICY_MIN_CHARACTERS
|
||||
name: OCIS_PASSWORD_POLICY_MIN_CHARACTERS;SHARING_PASSWORD_POLICY_MIN_CHARACTERS
|
||||
defaultValue: "8"
|
||||
type: int
|
||||
description: Define the minimum password length. Defaults to 8 if not set.
|
||||
@@ -8972,7 +8970,7 @@ OCIS_PASSWORD_POLICY_MIN_CHARACTERS:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_PASSWORD_POLICY_MIN_DIGITS:
|
||||
name: OCIS_PASSWORD_POLICY_MIN_DIGITS;FRONTEND_PASSWORD_POLICY_MIN_DIGITS
|
||||
name: OCIS_PASSWORD_POLICY_MIN_DIGITS;SHARING_PASSWORD_POLICY_MIN_DIGITS
|
||||
defaultValue: "1"
|
||||
type: int
|
||||
description: Define the minimum number of digits. Defaults to 1 if not set.
|
||||
@@ -8981,7 +8979,7 @@ OCIS_PASSWORD_POLICY_MIN_DIGITS:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS:
|
||||
name: OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS;FRONTEND_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS
|
||||
name: OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS;SHARING_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS
|
||||
defaultValue: "1"
|
||||
type: int
|
||||
description: Define the minimum number of uppercase letters. Defaults to 1 if not
|
||||
@@ -8991,7 +8989,7 @@ OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS:
|
||||
name: OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS;FRONTEND_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS
|
||||
name: OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS;SHARING_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS
|
||||
defaultValue: "1"
|
||||
type: int
|
||||
description: Define the minimum number of characters from the special characters
|
||||
@@ -9001,7 +8999,7 @@ OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS:
|
||||
name: OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS;FRONTEND_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS
|
||||
name: OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS;SHARING_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS
|
||||
defaultValue: "1"
|
||||
type: int
|
||||
description: Define the minimum number of lowercase letters. Defaults to 1 if not
|
||||
@@ -9011,54 +9009,54 @@ OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_PERSISTENT_STORE:
|
||||
name: OCIS_PERSISTENT_STORE;STORAGE_PUBLICLINK_STORE_STORE
|
||||
name: OCIS_PERSISTENT_STORE;COLLABORATION_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: 8.0.0
|
||||
introductionVersion: 7.0.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_PERSISTENT_STORE_AUTH_PASSWORD:
|
||||
name: OCIS_PERSISTENT_STORE_AUTH_PASSWORD;STORAGE_PUBLICLINK_STORE_AUTH_PASSWORD
|
||||
name: OCIS_PERSISTENT_STORE_AUTH_PASSWORD;COLLABORATION_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: 8.0.0
|
||||
introductionVersion: 7.0.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_PERSISTENT_STORE_AUTH_USERNAME:
|
||||
name: OCIS_PERSISTENT_STORE_AUTH_USERNAME;STORAGE_PUBLICLINK_STORE_AUTH_USERNAME
|
||||
name: OCIS_PERSISTENT_STORE_AUTH_USERNAME;COLLABORATION_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: 8.0.0
|
||||
introductionVersion: 7.0.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_PERSISTENT_STORE_NODES:
|
||||
name: OCIS_PERSISTENT_STORE_NODES;STORAGE_PUBLICLINK_STORE_NODES
|
||||
name: OCIS_PERSISTENT_STORE_NODES;COLLABORATION_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: 8.0.0
|
||||
introductionVersion: 7.0.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_PERSISTENT_STORE_TTL:
|
||||
name: OCIS_PERSISTENT_STORE_TTL;USERLOG_STORE_TTL
|
||||
defaultValue: 336h0m0s
|
||||
name: OCIS_PERSISTENT_STORE_TTL;COLLABORATION_STORE_TTL
|
||||
defaultValue: 30m0s
|
||||
type: Duration
|
||||
description: Time to live for events in the store. Defaults to '336h' (2 weeks).
|
||||
description: Time to live for events in the store. Defaults to '30m' (30 minutes).
|
||||
See the Environment Variable Types description for more details.
|
||||
introductionVersion: pre5.0
|
||||
introductionVersion: 7.0.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
@@ -9103,19 +9101,17 @@ OCIS_REVA_GATEWAY_TLS_MODE:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_SERVICE_ACCOUNT_ID:
|
||||
name: SETTINGS_SERVICE_ACCOUNT_IDS;OCIS_SERVICE_ACCOUNT_ID
|
||||
name: OCIS_SERVICE_ACCOUNT_ID;GRAPH_SERVICE_ACCOUNT_ID
|
||||
defaultValue: ""
|
||||
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.'
|
||||
type: string
|
||||
description: The ID of the service account the service should use. See the 'auth-service'
|
||||
service description for more details.
|
||||
introductionVersion: "5.0"
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_SERVICE_ACCOUNT_SECRET:
|
||||
name: OCIS_SERVICE_ACCOUNT_SECRET;CLIENTLOG_SERVICE_ACCOUNT_SECRET
|
||||
name: OCIS_SERVICE_ACCOUNT_SECRET;GRAPH_SERVICE_ACCOUNT_SECRET
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: The service account secret.
|
||||
@@ -9124,7 +9120,7 @@ OCIS_SERVICE_ACCOUNT_SECRET:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD:
|
||||
name: OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD
|
||||
name: OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD;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.
|
||||
@@ -9133,27 +9129,28 @@ 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
|
||||
name: OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD;SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD
|
||||
defaultValue: "false"
|
||||
type: bool
|
||||
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.
|
||||
description: Set this to true if you want to enforce passwords on Uploader, Editor
|
||||
or Contributor shares.
|
||||
introductionVersion: "5.0"
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_SPACES_MAX_QUOTA:
|
||||
name: OCIS_SPACES_MAX_QUOTA;FRONTEND_MAX_QUOTA
|
||||
name: OCIS_SPACES_MAX_QUOTA;STORAGE_USERS_OCIS_MAX_QUOTA
|
||||
defaultValue: "0"
|
||||
type: uint64
|
||||
description: Set the global max quota value in bytes. A value of 0 equals unlimited.
|
||||
The value is provided via capabilities.
|
||||
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.
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_SYSTEM_USER_API_KEY:
|
||||
name: OCIS_SYSTEM_USER_API_KEY
|
||||
name: OCIS_SYSTEM_USER_API_KEY;SHARING_PUBLIC_CS3_SYSTEM_USER_API_KEY
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: API key for the STORAGE-SYSTEM system user.
|
||||
@@ -9162,7 +9159,7 @@ OCIS_SYSTEM_USER_API_KEY:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_SYSTEM_USER_ID:
|
||||
name: OCIS_SYSTEM_USER_ID;SETTINGS_SYSTEM_USER_ID
|
||||
name: OCIS_SYSTEM_USER_ID;SHARING_PUBLIC_CS3_SYSTEM_USER_ID
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: ID of the oCIS STORAGE-SYSTEM system user. Admins need to set the ID
|
||||
@@ -9174,7 +9171,7 @@ OCIS_SYSTEM_USER_ID:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_SYSTEM_USER_IDP:
|
||||
name: OCIS_SYSTEM_USER_IDP;SETTINGS_SYSTEM_USER_IDP
|
||||
name: OCIS_SYSTEM_USER_IDP;SHARING_PUBLIC_CS3_SYSTEM_USER_IDP
|
||||
defaultValue: internal
|
||||
type: string
|
||||
description: IDP of the oCIS STORAGE-SYSTEM system user.
|
||||
@@ -9183,7 +9180,7 @@ OCIS_SYSTEM_USER_IDP:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_TRACING_COLLECTOR:
|
||||
name: OCIS_TRACING_COLLECTOR;APP_REGISTRY_TRACING_COLLECTOR
|
||||
name: OCIS_TRACING_COLLECTOR;SHARING_TRACING_COLLECTOR
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: The HTTP endpoint for sending spans directly to a collector, i.e. http://jaeger-collector:14268/api/traces.
|
||||
@@ -9193,7 +9190,7 @@ OCIS_TRACING_COLLECTOR:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_TRACING_ENABLED:
|
||||
name: OCIS_TRACING_ENABLED;APP_REGISTRY_TRACING_ENABLED
|
||||
name: OCIS_TRACING_ENABLED;SHARING_TRACING_ENABLED
|
||||
defaultValue: "false"
|
||||
type: bool
|
||||
description: Activates tracing.
|
||||
@@ -9202,7 +9199,7 @@ OCIS_TRACING_ENABLED:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_TRACING_ENDPOINT:
|
||||
name: OCIS_TRACING_ENDPOINT;APP_REGISTRY_TRACING_ENDPOINT
|
||||
name: OCIS_TRACING_ENDPOINT;SHARING_TRACING_ENDPOINT
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: The endpoint of the tracing agent.
|
||||
@@ -9211,7 +9208,7 @@ OCIS_TRACING_ENDPOINT:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_TRACING_TYPE:
|
||||
name: OCIS_TRACING_TYPE;APP_REGISTRY_TRACING_TYPE
|
||||
name: OCIS_TRACING_TYPE;SHARING_TRACING_TYPE
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: The type of tracing. Defaults to '', which is the same as 'jaeger'.
|
||||
@@ -9224,27 +9221,28 @@ OCIS_TRANSFER_SECRET:
|
||||
name: OCIS_TRANSFER_SECRET
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: Transfer secret for signing file up- and download requests.
|
||||
description: The storage transfer secret.
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_TRANSLATION_PATH:
|
||||
name: OCIS_TRANSLATION_PATH;SETTINGS_TRANSLATION_PATH
|
||||
name: OCIS_TRANSLATION_PATH;GRAPH_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.1.0
|
||||
introductionVersion: 7.0.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_URL:
|
||||
name: OCIS_URL;OCIS_OIDC_ISSUER
|
||||
name: OCIS_URL;OCIS_OIDC_ISSUER;AUTH_BASIC_IDP_URL
|
||||
defaultValue: https://localhost:9200
|
||||
type: string
|
||||
description: The OIDC issuer URL to assign to the demo users.
|
||||
description: The identity provider value to set in the userids of the CS3 user objects
|
||||
for users returned by this user provider.
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
|
||||
@@ -39,6 +39,14 @@ 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Acceptance Testing"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
title: 'Acceptance Testing'
|
||||
date: 2026-03-18T00:00:00+00:00
|
||||
weight: 20
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/ocis/development
|
||||
@@ -591,160 +591,7 @@ The sample `fontsMap.json` file is located in `tests/config/drone/fontsMap.json`
|
||||
|
||||
## Running Test on Helm 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
|
||||
```
|
||||
Refer to the [Running API Tests in Kubernetes Cluster](../../../tests/config/k8s/README.md) documentation for running tests against a K8s setup.
|
||||
|
||||
## Generating Code Coverage Report by Running Acceptance Tests
|
||||
|
||||
|
||||
@@ -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-20260304131727-ce3149532498
|
||||
github.com/owncloud/reva/v2 v2.0.0-20260324082555-823c2f1c2593
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/pkg/xattr v0.4.12
|
||||
github.com/prometheus/client_golang v1.23.2
|
||||
|
||||
@@ -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-20260304131727-ce3149532498 h1:ozyudPff1XLWSeTDW4ajT1tCoSQf18cFQRxtLWFCNbk=
|
||||
github.com/owncloud/reva/v2 v2.0.0-20260304131727-ce3149532498/go.mod h1:+rCy6oGYb2/qs5gmQa8y/pHARw634vB73MZGDY2SBIQ=
|
||||
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/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=
|
||||
|
||||
@@ -60,6 +60,14 @@ type DateTimeNode struct {
|
||||
Value time.Time
|
||||
}
|
||||
|
||||
// NumericNode represents a float64 value with a comparison operator
|
||||
type NumericNode struct {
|
||||
*Base
|
||||
Key string
|
||||
Operator *OperatorNode
|
||||
Value float64
|
||||
}
|
||||
|
||||
// OperatorNode represents an operator value like
|
||||
// AND, OR, NOT, =, <= ... and so on
|
||||
type OperatorNode struct {
|
||||
@@ -81,6 +89,8 @@ func NodeKey(n Node) string {
|
||||
return node.Key
|
||||
case *DateTimeNode:
|
||||
return node.Key
|
||||
case *NumericNode:
|
||||
return node.Key
|
||||
case *BooleanNode:
|
||||
return node.Key
|
||||
case *GroupNode:
|
||||
@@ -97,6 +107,8 @@ func NodeValue(n Node) interface{} {
|
||||
return node.Value
|
||||
case *DateTimeNode:
|
||||
return node.Value
|
||||
case *NumericNode:
|
||||
return node.Value
|
||||
case *BooleanNode:
|
||||
return node.Value
|
||||
case *GroupNode:
|
||||
|
||||
@@ -21,6 +21,7 @@ func DiffAst(x, y interface{}, opts ...cmp.Option) string {
|
||||
cmpopts.IgnoreFields(ast.GroupNode{}, "Base"),
|
||||
cmpopts.IgnoreFields(ast.BooleanNode{}, "Base"),
|
||||
cmpopts.IgnoreFields(ast.DateTimeNode{}, "Base"),
|
||||
cmpopts.IgnoreFields(ast.NumericNode{}, "Base"),
|
||||
)...,
|
||||
)
|
||||
}
|
||||
+11
-1
@@ -2,6 +2,7 @@ package kql
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/jinzhu/now"
|
||||
@@ -25,7 +26,7 @@ func toNodes[T ast.Node](in interface{}) ([]T, error) {
|
||||
return []T{v}, nil
|
||||
case []T:
|
||||
return v, nil
|
||||
case []*ast.OperatorNode, []*ast.DateTimeNode:
|
||||
case []*ast.OperatorNode, []*ast.DateTimeNode, []*ast.NumericNode:
|
||||
return toNodes[T](v)
|
||||
case []interface{}:
|
||||
var nodes []T
|
||||
@@ -70,6 +71,15 @@ func toString(in interface{}) (string, error) {
|
||||
}
|
||||
}
|
||||
|
||||
func toFloat64(in interface{}) (float64, error) {
|
||||
s, err := toString(in)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
return strconv.ParseFloat(s, 64)
|
||||
}
|
||||
|
||||
func toTime(in interface{}) (time.Time, error) {
|
||||
ts, err := toString(in)
|
||||
if err != nil {
|
||||
|
||||
@@ -40,6 +40,7 @@ GroupNode <-
|
||||
PropertyRestrictionNodes <-
|
||||
YesNoPropertyRestrictionNode /
|
||||
DateTimeRestrictionNode /
|
||||
NumericRestrictionNode /
|
||||
TextPropertyRestrictionNode
|
||||
|
||||
YesNoPropertyRestrictionNode <-
|
||||
@@ -69,6 +70,16 @@ DateTimeRestrictionNode <-
|
||||
return buildNaturalLanguageDateTimeNodes(k, v, c.text, c.pos)
|
||||
}
|
||||
|
||||
NumericRestrictionNode <-
|
||||
k:Char+ o:(
|
||||
OperatorGreaterOrEqualNode /
|
||||
OperatorLessOrEqualNode /
|
||||
OperatorGreaterNode /
|
||||
OperatorLessNode
|
||||
) v:Number {
|
||||
return buildNumericNode(k, o, v, c.text, c.pos)
|
||||
}
|
||||
|
||||
TextPropertyRestrictionNode <-
|
||||
k:Char+ (OperatorColonNode / OperatorEqualNode) v:(String / [^ ()]+){
|
||||
return buildStringNode(k, v, c.text, c.pos)
|
||||
@@ -224,6 +235,11 @@ String <-
|
||||
return v, nil
|
||||
}
|
||||
|
||||
Number <-
|
||||
[0-9]+ ("." [0-9]+)? {
|
||||
return c.text, nil
|
||||
}
|
||||
|
||||
Digit <-
|
||||
[0-9] {
|
||||
return c.text, nil
|
||||
|
||||
+1856
-2564
File diff suppressed because it is too large.
Load diff
@@ -858,6 +858,97 @@ func TestParse_DateTimeRestrictionNode(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestParse_NumericRestrictionNode(t *testing.T) {
|
||||
tests := []testCase{
|
||||
{
|
||||
name: `size>=1048576`,
|
||||
ast: &ast.Ast{
|
||||
Nodes: []ast.Node{
|
||||
&ast.NumericNode{
|
||||
Key: "size",
|
||||
Operator: &ast.OperatorNode{Value: ">="},
|
||||
Value: 1048576,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: `size<=10485760`,
|
||||
ast: &ast.Ast{
|
||||
Nodes: []ast.Node{
|
||||
&ast.NumericNode{
|
||||
Key: "size",
|
||||
Operator: &ast.OperatorNode{Value: "<="},
|
||||
Value: 10485760,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: `size>=1024 AND size<=2048`,
|
||||
query: `size>=1024 AND size<=2048`,
|
||||
ast: &ast.Ast{
|
||||
Nodes: []ast.Node{
|
||||
&ast.NumericNode{
|
||||
Key: "size",
|
||||
Operator: &ast.OperatorNode{Value: ">="},
|
||||
Value: 1024,
|
||||
},
|
||||
&ast.OperatorNode{Value: kql.BoolAND},
|
||||
&ast.NumericNode{
|
||||
Key: "size",
|
||||
Operator: &ast.OperatorNode{Value: "<="},
|
||||
Value: 2048,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: `photo.fNumber>=2.8`,
|
||||
ast: &ast.Ast{
|
||||
Nodes: []ast.Node{
|
||||
&ast.NumericNode{
|
||||
Key: "photo.fNumber",
|
||||
Operator: &ast.OperatorNode{Value: ">="},
|
||||
Value: 2.8,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: `photo.iso>100`,
|
||||
ast: &ast.Ast{
|
||||
Nodes: []ast.Node{
|
||||
&ast.NumericNode{
|
||||
Key: "photo.iso",
|
||||
Operator: &ast.OperatorNode{Value: ">"},
|
||||
Value: 100,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: `photo.focalLength<50`,
|
||||
ast: &ast.Ast{
|
||||
Nodes: []ast.Node{
|
||||
&ast.NumericNode{
|
||||
Key: "photo.focalLength",
|
||||
Operator: &ast.OperatorNode{Value: "<"},
|
||||
Value: 50,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
tc := tc
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
testKQL(t, tc)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestParse_Errors(t *testing.T) {
|
||||
tests := []testCase{
|
||||
{
|
||||
|
||||
@@ -73,6 +73,35 @@ func buildStringNode(k, v interface{}, text []byte, pos position) (*ast.StringNo
|
||||
}, nil
|
||||
}
|
||||
|
||||
func buildNumericNode(k, o, v interface{}, text []byte, pos position) (*ast.NumericNode, error) {
|
||||
b, err := base(text, pos)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
operator, err := toNode[*ast.OperatorNode](o)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
key, err := toString(k)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
value, err := toFloat64(v)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &ast.NumericNode{
|
||||
Base: b,
|
||||
Key: key,
|
||||
Operator: operator,
|
||||
Value: value,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func buildDateTimeNode(k, o, v interface{}, text []byte, pos position) (*ast.DateTimeNode, error) {
|
||||
b, err := base(text, pos)
|
||||
if err != nil {
|
||||
|
||||
@@ -27,6 +27,7 @@ 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"
|
||||
@@ -370,6 +371,13 @@ 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 {
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
# 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}"
|
||||
@@ -16,7 +16,7 @@
|
||||
},
|
||||
"babel": {
|
||||
"presets": [
|
||||
"react-app"
|
||||
["react-app", { "absoluteRuntime": false }]
|
||||
]
|
||||
},
|
||||
"browserslist": {
|
||||
|
||||
@@ -9,6 +9,7 @@ directives:
|
||||
- '''none'''
|
||||
font-src:
|
||||
- '''self'''
|
||||
- 'data:'
|
||||
frame-ancestors:
|
||||
- '''self'''
|
||||
frame-src:
|
||||
|
||||
@@ -58,6 +58,7 @@ func Security(cfg *config.Config, cspConfig *config.CSP) func(h http.Handler) ht
|
||||
ContentSecurityPolicy: cspBuilder.MustBuild(),
|
||||
ContentTypeNosniff: true,
|
||||
CustomFrameOptionsValue: "SAMEORIGIN",
|
||||
CustomBrowserXssValue: "0",
|
||||
FrameDeny: true,
|
||||
ReferrerPolicy: "no-referrer",
|
||||
STSSeconds: 315360000,
|
||||
|
||||
@@ -84,3 +84,27 @@ func TestStrictTransportSecurity_ForceOnHTTP(t *testing.T) {
|
||||
expected := "max-age=315360000; includeSubDomains; preload"
|
||||
assert.Equal(t, stsHeader, expected)
|
||||
}
|
||||
|
||||
func TestXXSSProtection(t *testing.T) {
|
||||
// Reference: Penetration test audit Section 2.2, Table 2 Row 3
|
||||
// X-XSS-Protection header must be explicitly set to "0" to disable
|
||||
// the deprecated browser XSS filter which can introduce vulnerabilities
|
||||
handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
})
|
||||
cspConfig := &config.CSP{
|
||||
Directives: map[string][]string{
|
||||
"default-src": {"'none'"},
|
||||
},
|
||||
}
|
||||
cfg := &config.Config{HTTP: config.HTTP{ForceStrictTransportSecurity: false}}
|
||||
securityMiddleware := Security(cfg, cspConfig)
|
||||
|
||||
req := httptest.NewRequest("GET", "https://example.com/", nil)
|
||||
rr := httptest.NewRecorder()
|
||||
securityMiddleware(handler).ServeHTTP(rr, req)
|
||||
|
||||
xssHeader := rr.Header().Get("X-XSS-Protection")
|
||||
expected := "0"
|
||||
assert.Equal(t, xssHeader, expected, "X-XSS-Protection must be '0' to disable deprecated XSS filter (audit requirement)")
|
||||
}
|
||||
@@ -87,6 +87,10 @@ func (t Tika) Extract(ctx context.Context, ri *provider.ResourceInfo) (Document,
|
||||
return doc, err
|
||||
}
|
||||
|
||||
if len(metas) == 0 {
|
||||
return doc, fmt.Errorf("tika returned empty metadata for %q", ri.Name)
|
||||
}
|
||||
|
||||
for _, meta := range metas {
|
||||
if title, err := getFirstValue(meta, "title"); err == nil {
|
||||
doc.Title = strings.TrimSpace(fmt.Sprintf("%s %s", doc.Title, title))
|
||||
|
||||
@@ -2,6 +2,7 @@ package engine
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"math"
|
||||
"path"
|
||||
"reflect"
|
||||
@@ -15,6 +16,7 @@ import (
|
||||
"github.com/blevesearch/bleve/v2/analysis/token/porter"
|
||||
"github.com/blevesearch/bleve/v2/analysis/tokenizer/single"
|
||||
"github.com/blevesearch/bleve/v2/analysis/tokenizer/unicode"
|
||||
"github.com/blevesearch/bleve/v2/index/scorch/mergeplan"
|
||||
"github.com/blevesearch/bleve/v2/mapping"
|
||||
"github.com/blevesearch/bleve/v2/search/query"
|
||||
storageProvider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
|
||||
@@ -315,6 +317,18 @@ func (b *Bleve) Update(id string, mutateFn func(*Resource)) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Lookup retrieves a resource by its document ID using an O(1) DocIDQuery.
|
||||
// Returns ErrResourceNotFound if the resource is not in the index.
|
||||
func (b *Bleve) Lookup(id string) (*Resource, error) {
|
||||
bleveIndex, closeFn, err := b.indexGetter.GetIndex(bleveEngine.ReadOnly(true))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer closeFn()
|
||||
|
||||
return b.getResource(bleveIndex, id)
|
||||
}
|
||||
|
||||
// Move updates the resource location and all of its necessary fields.
|
||||
func (b *Bleve) Move(id string, parentid string, target string) error {
|
||||
bleveIndex, closeFn, err := b.indexGetter.GetIndex()
|
||||
@@ -402,6 +416,33 @@ func (b *Bleve) Purge(id string) error {
|
||||
return bleveIndex.Delete(id)
|
||||
}
|
||||
|
||||
// Optimize triggers a force merge of the bleve index segments into a single
|
||||
// segment, improving query performance. This is an expensive I/O operation
|
||||
// and should be called during low-usage periods (e.g., after bulk indexing).
|
||||
func (b *Bleve) Optimize(ctx context.Context) error {
|
||||
bleveIndex, closeFn, err := b.indexGetter.GetIndex()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer closeFn()
|
||||
|
||||
internal, err := bleveIndex.Advanced()
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to access internal index: %w", err)
|
||||
}
|
||||
|
||||
type forceMerger interface {
|
||||
ForceMerge(ctx context.Context, mo *mergeplan.MergePlanOptions) error
|
||||
}
|
||||
|
||||
fm, ok := internal.(forceMerger)
|
||||
if !ok {
|
||||
return fmt.Errorf("index implementation does not support force merge")
|
||||
}
|
||||
|
||||
return fm.ForceMerge(ctx, nil)
|
||||
}
|
||||
|
||||
// DocCount returns the number of resources in the index.
|
||||
func (b *Bleve) DocCount() (uint64, error) {
|
||||
bleveIndex, closeFn, err := b.indexGetter.GetIndex(bleveEngine.ReadOnly(true))
|
||||
@@ -427,12 +468,13 @@ func (b *Bleve) getResource(bleveIndex bleve.Index, id string) (*Resource, error
|
||||
fields := res.Hits[0].Fields
|
||||
|
||||
return &Resource{
|
||||
ID: getFieldValue[string](fields, "ID"),
|
||||
RootID: getFieldValue[string](fields, "RootID"),
|
||||
Path: getFieldValue[string](fields, "Path"),
|
||||
ParentID: getFieldValue[string](fields, "ParentID"),
|
||||
Type: uint64(getFieldValue[float64](fields, "Type")),
|
||||
Deleted: getFieldValue[bool](fields, "Deleted"),
|
||||
ID: getFieldValue[string](fields, "ID"),
|
||||
RootID: getFieldValue[string](fields, "RootID"),
|
||||
Path: getFieldValue[string](fields, "Path"),
|
||||
ParentID: getFieldValue[string](fields, "ParentID"),
|
||||
Type: uint64(getFieldValue[float64](fields, "Type")),
|
||||
Deleted: getFieldValue[bool](fields, "Deleted"),
|
||||
Extracted: getFieldValue[bool](fields, "Extracted"),
|
||||
Document: content.Document{
|
||||
Name: getFieldValue[string](fields, "Name"),
|
||||
Title: getFieldValue[string](fields, "Title"),
|
||||
|
||||
@@ -23,6 +23,7 @@ type Engine interface {
|
||||
Search(ctx context.Context, req *searchService.SearchIndexRequest) (*searchService.SearchIndexResponse, error)
|
||||
Upsert(id string, r Resource) error
|
||||
Update(id string, mutateFn func(*Resource)) error
|
||||
Lookup(id string) (*Resource, error)
|
||||
Move(id string, parentid string, target string) error
|
||||
Delete(id string) error
|
||||
Restore(id string) error
|
||||
@@ -30,17 +31,24 @@ type Engine interface {
|
||||
DocCount() (uint64, error)
|
||||
}
|
||||
|
||||
// Optimizer is an optional interface that Engine implementations may support
|
||||
// to trigger index compaction. Callers should type-assert before use.
|
||||
type Optimizer interface {
|
||||
Optimize(ctx context.Context) error
|
||||
}
|
||||
|
||||
// Resource is the entity that is stored in the index.
|
||||
type Resource struct {
|
||||
content.Document
|
||||
|
||||
ID string
|
||||
RootID string
|
||||
Path string
|
||||
ParentID string
|
||||
Type uint64
|
||||
Deleted bool
|
||||
Hidden bool
|
||||
ID string
|
||||
RootID string
|
||||
Path string
|
||||
ParentID string
|
||||
Type uint64
|
||||
Deleted bool
|
||||
Hidden bool
|
||||
Extracted bool
|
||||
}
|
||||
|
||||
func resourceIDtoSearchID(id storageProvider.ResourceId) *searchMessage.ResourceID {
|
||||
|
||||
@@ -125,6 +125,67 @@ func (_c *Engine_DocCount_Call) RunAndReturn(run func() (uint64, error)) *Engine
|
||||
return _c
|
||||
}
|
||||
|
||||
// Lookup provides a mock function with given fields: id
|
||||
func (_m *Engine) Lookup(id string) (*engine.Resource, error) {
|
||||
ret := _m.Called(id)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Lookup")
|
||||
}
|
||||
|
||||
var r0 *engine.Resource
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(0).(func(string) (*engine.Resource, error)); ok {
|
||||
return rf(id)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(string) *engine.Resource); ok {
|
||||
r0 = rf(id)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*engine.Resource)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(string) error); ok {
|
||||
r1 = rf(id)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// Engine_Lookup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Lookup'
|
||||
type Engine_Lookup_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// Lookup is a helper method to define mock.On call
|
||||
// - id string
|
||||
func (_e *Engine_Expecter) Lookup(id interface{}) *Engine_Lookup_Call {
|
||||
return &Engine_Lookup_Call{Call: _e.mock.On("Lookup", id)}
|
||||
}
|
||||
|
||||
// Run sets a handler to be called when the Lookup mock is matched.
|
||||
func (_c *Engine_Lookup_Call) Run(run func(id string)) *Engine_Lookup_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(string))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
// Return specifies the return values for the Lookup mock.
|
||||
func (_c *Engine_Lookup_Call) Return(_a0 *engine.Resource, _a1 error) *Engine_Lookup_Call {
|
||||
_c.Call.Return(_a0, _a1)
|
||||
return _c
|
||||
}
|
||||
|
||||
// RunAndReturn sets a handler that is called and whose return values are used as the mock's return values.
|
||||
func (_c *Engine_Lookup_Call) RunAndReturn(run func(string) (*engine.Resource, error)) *Engine_Lookup_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// Move provides a mock function with given fields: id, parentid, target
|
||||
func (_m *Engine) Move(id string, parentid string, target string) error {
|
||||
ret := _m.Called(id, parentid, target)
|
||||
|
||||
@@ -124,35 +124,20 @@ func walk(offset int, nodes []ast.Node) (bleveQuery.Query, int, error) {
|
||||
next = q
|
||||
}
|
||||
case *ast.DateTimeNode:
|
||||
q := &bleveQuery.DateRangeQuery{
|
||||
Start: bleveQuery.BleveQueryTime{},
|
||||
End: bleveQuery.BleveQueryTime{},
|
||||
InclusiveStart: nil,
|
||||
InclusiveEnd: nil,
|
||||
FieldVal: getField(n.Key),
|
||||
}
|
||||
|
||||
if n.Operator == nil {
|
||||
q := dateTimeQuery(n)
|
||||
if q == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
switch n.Operator.Value {
|
||||
case ">":
|
||||
q.Start.Time = n.Value
|
||||
q.InclusiveStart = &[]bool{false}[0]
|
||||
case ">=":
|
||||
q.Start.Time = n.Value
|
||||
q.InclusiveStart = &[]bool{true}[0]
|
||||
case "<":
|
||||
q.End.Time = n.Value
|
||||
q.InclusiveEnd = &[]bool{false}[0]
|
||||
case "<=":
|
||||
q.End.Time = n.Value
|
||||
q.InclusiveEnd = &[]bool{true}[0]
|
||||
default:
|
||||
if prev == nil {
|
||||
prev = q
|
||||
} else {
|
||||
next = q
|
||||
}
|
||||
case *ast.NumericNode:
|
||||
q := numericQuery(n)
|
||||
if q == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
if prev == nil {
|
||||
prev = q
|
||||
} else {
|
||||
@@ -370,6 +355,68 @@ func mimeType(k, v string) (bleveQuery.Query, bool) {
|
||||
}
|
||||
}
|
||||
|
||||
func dateTimeQuery(n *ast.DateTimeNode) bleveQuery.Query {
|
||||
if n.Operator == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
q := &bleveQuery.DateRangeQuery{
|
||||
Start: bleveQuery.BleveQueryTime{},
|
||||
End: bleveQuery.BleveQueryTime{},
|
||||
FieldVal: getField(n.Key),
|
||||
}
|
||||
|
||||
switch n.Operator.Value {
|
||||
case ">":
|
||||
q.Start.Time = n.Value
|
||||
q.InclusiveStart = &[]bool{false}[0]
|
||||
case ">=":
|
||||
q.Start.Time = n.Value
|
||||
q.InclusiveStart = &[]bool{true}[0]
|
||||
case "<":
|
||||
q.End.Time = n.Value
|
||||
q.InclusiveEnd = &[]bool{false}[0]
|
||||
case "<=":
|
||||
q.End.Time = n.Value
|
||||
q.InclusiveEnd = &[]bool{true}[0]
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
|
||||
return q
|
||||
}
|
||||
|
||||
func numericQuery(n *ast.NumericNode) bleveQuery.Query {
|
||||
if n.Operator == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
var minVal, maxVal *float64
|
||||
var minInclusive, maxInclusive *bool
|
||||
val := n.Value
|
||||
|
||||
switch n.Operator.Value {
|
||||
case ">":
|
||||
minVal = &val
|
||||
minInclusive = &[]bool{false}[0]
|
||||
case ">=":
|
||||
minVal = &val
|
||||
minInclusive = &[]bool{true}[0]
|
||||
case "<":
|
||||
maxVal = &val
|
||||
maxInclusive = &[]bool{false}[0]
|
||||
case "<=":
|
||||
maxVal = &val
|
||||
maxInclusive = &[]bool{true}[0]
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
|
||||
q := bleve.NewNumericRangeInclusiveQuery(minVal, maxVal, minInclusive, maxInclusive)
|
||||
q.SetField(getField(n.Key))
|
||||
return q
|
||||
}
|
||||
|
||||
func newQueryStringQueryList(k string, v ...string) []bleveQuery.Query {
|
||||
list := make([]bleveQuery.Query, len(v))
|
||||
for i := 0; i < len(v); i++ {
|
||||
|
||||
@@ -565,6 +565,107 @@ func Test_compile(t *testing.T) {
|
||||
}),
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: `size>=1048576`,
|
||||
args: &ast.Ast{
|
||||
Nodes: []ast.Node{
|
||||
&ast.NumericNode{
|
||||
Key: "size",
|
||||
Operator: &ast.OperatorNode{Value: ">="},
|
||||
Value: 1048576,
|
||||
},
|
||||
},
|
||||
},
|
||||
want: query.NewConjunctionQuery([]query.Query{
|
||||
func() query.Query {
|
||||
min := 1048576.0
|
||||
inclusive := true
|
||||
q := query.NewNumericRangeInclusiveQuery(&min, nil, &inclusive, nil)
|
||||
q.SetField("Size")
|
||||
return q
|
||||
}(),
|
||||
}),
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: `size<=10485760`,
|
||||
args: &ast.Ast{
|
||||
Nodes: []ast.Node{
|
||||
&ast.NumericNode{
|
||||
Key: "size",
|
||||
Operator: &ast.OperatorNode{Value: "<="},
|
||||
Value: 10485760,
|
||||
},
|
||||
},
|
||||
},
|
||||
want: query.NewConjunctionQuery([]query.Query{
|
||||
func() query.Query {
|
||||
max := 10485760.0
|
||||
inclusive := true
|
||||
q := query.NewNumericRangeInclusiveQuery(nil, &max, nil, &inclusive)
|
||||
q.SetField("Size")
|
||||
return q
|
||||
}(),
|
||||
}),
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: `photo.iso>100 AND photo.iso<3200`,
|
||||
args: &ast.Ast{
|
||||
Nodes: []ast.Node{
|
||||
&ast.NumericNode{
|
||||
Key: "photo.iso",
|
||||
Operator: &ast.OperatorNode{Value: ">"},
|
||||
Value: 100,
|
||||
},
|
||||
&ast.OperatorNode{Value: "AND"},
|
||||
&ast.NumericNode{
|
||||
Key: "photo.iso",
|
||||
Operator: &ast.OperatorNode{Value: "<"},
|
||||
Value: 3200,
|
||||
},
|
||||
},
|
||||
},
|
||||
want: query.NewConjunctionQuery([]query.Query{
|
||||
func() query.Query {
|
||||
min := 100.0
|
||||
inclusive := false
|
||||
q := query.NewNumericRangeInclusiveQuery(&min, nil, &inclusive, nil)
|
||||
q.SetField("photo.iso")
|
||||
return q
|
||||
}(),
|
||||
func() query.Query {
|
||||
max := 3200.0
|
||||
inclusive := false
|
||||
q := query.NewNumericRangeInclusiveQuery(nil, &max, nil, &inclusive)
|
||||
q.SetField("photo.iso")
|
||||
return q
|
||||
}(),
|
||||
}),
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: `photo.fNumber>=2.8`,
|
||||
args: &ast.Ast{
|
||||
Nodes: []ast.Node{
|
||||
&ast.NumericNode{
|
||||
Key: "photo.fNumber",
|
||||
Operator: &ast.OperatorNode{Value: ">="},
|
||||
Value: 2.8,
|
||||
},
|
||||
},
|
||||
},
|
||||
want: query.NewConjunctionQuery([]query.Query{
|
||||
func() query.Query {
|
||||
min := 2.8
|
||||
inclusive := true
|
||||
q := query.NewNumericRangeInclusiveQuery(&min, nil, &inclusive, nil)
|
||||
q.SetField("photo.fNumber")
|
||||
return q
|
||||
}(),
|
||||
}),
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: `photo.cameraMake:canon`,
|
||||
args: &ast.Ast{
|
||||
|
||||
@@ -87,6 +87,9 @@ 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)
|
||||
|
||||
@@ -462,17 +462,22 @@ func (s *Service) IndexSpace(spaceID *provider.StorageSpaceId) error {
|
||||
}
|
||||
s.logger.Debug().Str("path", ref.Path).Msg("Walking tree")
|
||||
|
||||
searchRes, err := s.engine.Search(ownerCtx, &searchsvc.SearchIndexRequest{
|
||||
Query: "id:" + storagespace.FormatResourceID(info.Id) + ` mtime>=` + utils.TSToTime(info.Mtime).Format(time.RFC3339Nano),
|
||||
})
|
||||
|
||||
if err == nil && len(searchRes.Matches) >= 1 {
|
||||
if info.Type == provider.ResourceType_RESOURCE_TYPE_CONTAINER {
|
||||
s.logger.Debug().Str("path", ref.Path).Msg("subtree hasn't changed. Skipping.")
|
||||
return filepath.SkipDir
|
||||
resourceID := storagespace.FormatResourceID(info.Id)
|
||||
r, err := s.engine.Lookup(resourceID)
|
||||
if err == nil && r.Extracted {
|
||||
fileMtime := utils.TSToTime(info.Mtime)
|
||||
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("element hasn't changed. Skipping.")
|
||||
return nil
|
||||
}
|
||||
s.logger.Debug().Str("path", ref.Path).Msg("element hasn't changed. Skipping.")
|
||||
return nil
|
||||
}
|
||||
|
||||
s.UpsertItem(ref)
|
||||
@@ -486,6 +491,13 @@ func (s *Service) IndexSpace(spaceID *provider.StorageSpaceId) error {
|
||||
|
||||
logDocCount(s.engine, s.logger)
|
||||
|
||||
if opt, ok := s.engine.(engine.Optimizer); ok {
|
||||
s.logger.Info().Msg("optimizing search index after space walk")
|
||||
if err := opt.Optimize(ownerCtx); err != nil {
|
||||
s.logger.Warn().Err(err).Msg("index optimization failed")
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -531,9 +543,10 @@ func (s *Service) UpsertItem(ref *provider.Reference) {
|
||||
OpaqueId: stat.Info.Id.SpaceId,
|
||||
SpaceId: stat.Info.Id.SpaceId,
|
||||
}),
|
||||
Path: utils.MakeRelativePath(path),
|
||||
Type: uint64(stat.Info.Type),
|
||||
Document: doc,
|
||||
Path: utils.MakeRelativePath(path),
|
||||
Type: uint64(stat.Info.Type),
|
||||
Document: doc,
|
||||
Extracted: true,
|
||||
}
|
||||
r.Hidden = strings.HasPrefix(r.Path, ".")
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@ 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"
|
||||
@@ -163,7 +166,7 @@ var _ = Describe("Searchprovider", func() {
|
||||
indexClient.On("Upsert", mock.Anything, mock.MatchedBy(func(r engine.Resource) bool {
|
||||
return r.ID == "storageid$spaceid!opaqueid" && r.Path == "./foo.pdf"
|
||||
})).Return(nil)
|
||||
indexClient.On("Search", mock.Anything, mock.Anything).Return(&searchsvc.SearchIndexResponse{}, nil)
|
||||
indexClient.On("Lookup", mock.Anything).Return(nil, engine.ErrResourceNotFound)
|
||||
gatewayClient.On("Stat", mock.Anything, mock.MatchedBy(func(sreq *sprovider.StatRequest) bool {
|
||||
return sreq.Ref.ResourceId.StorageId == "storageid" &&
|
||||
sreq.Ref.ResourceId.OpaqueId == "spaceid" &&
|
||||
@@ -200,6 +203,139 @@ 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() {
|
||||
|
||||
@@ -184,6 +184,92 @@ ocis storage-users uploads delete-stale-nodes --dry-run=false --verbose
|
||||
```
|
||||
|
||||
|
||||
### Check and Inspect the Blobstore
|
||||
|
||||
The `blobstore` command group provides tools to verify connectivity to the configured blobstore and to inspect individual blobs. Both the `ocis` and `s3ng` storage drivers are supported.
|
||||
|
||||
```bash
|
||||
ocis storage-users blobstore <command>
|
||||
```
|
||||
|
||||
```plaintext
|
||||
COMMANDS:
|
||||
check check blobstore connectivity via an upload/download/delete round-trip
|
||||
get get a blob from the blobstore by ID
|
||||
```
|
||||
|
||||
#### Check
|
||||
|
||||
Verifies that the blobstore is reachable and fully operational by uploading a random blob, downloading and verifying it, then deleting it again. All three steps must succeed.
|
||||
|
||||
```bash
|
||||
ocis storage-users blobstore check [command options]
|
||||
```
|
||||
|
||||
```
|
||||
OPTIONS:
|
||||
--blob-size value size of the random blob to upload, e.g. 64, 1KB, 1MB, 4MiB (default: "64")
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
**Examples:**
|
||||
|
||||
```bash
|
||||
# Basic connectivity check using the default 64-byte payload
|
||||
ocis storage-users blobstore check
|
||||
|
||||
# Use a larger payload to also stress-test throughput
|
||||
ocis storage-users blobstore check --blob-size=4MiB
|
||||
```
|
||||
|
||||
```plaintext
|
||||
Uploading test blob: spaceID=a5c9bd5c-7348-4e9e-a462-d4d9e5287d01 blobID=3f1e5a82-b7e3-4c91-a110-1d5e2f3a4b6c
|
||||
Upload: OK
|
||||
Download and verify: OK
|
||||
Delete: OK
|
||||
Blobstore check successful.
|
||||
```
|
||||
|
||||
#### Get
|
||||
|
||||
Downloads a single blob by its ID to verify it exists and is readable. Useful when investigating errors in log lines that contain a blob path such as:
|
||||
|
||||
```
|
||||
decomposedfs: error download blob '04ba5496-...': blob path: b19ec764-.../61/03/ab/c3/-b08a-...: The specified key does not exist.
|
||||
```
|
||||
|
||||
The blob can be identified either by passing the raw path from the log line with `--path`, or by supplying `--blob-id` and `--space-id` individually.
|
||||
|
||||
```bash
|
||||
ocis storage-users blobstore get [command options]
|
||||
```
|
||||
|
||||
```
|
||||
OPTIONS:
|
||||
--path value blobstore path as it appears in log lines; spaceID and blobID are extracted automatically.
|
||||
Supports both s3ng format ("<spaceID>/<pathified_blobID>") and ocis format
|
||||
("…/spaces/<pathified_spaceID>/blobs/<pathified_blobID>").
|
||||
--blob-id value blob ID to download (required when --path is not set)
|
||||
--space-id value space ID the blob belongs to (required when --path is not set)
|
||||
--blob-size value expected blob size in bytes; only needed for the s3ng driver when the size is known
|
||||
upfront. If omitted or wrong, a size mismatch triggers one automatic retry with the
|
||||
actual size returned by s3ng. (default: 0)
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
**Examples:**
|
||||
|
||||
```bash
|
||||
# Identify a blob using the path from a log line (s3ng)
|
||||
ocis storage-users blobstore get --path="b19ec764-5398-458a-8ff1-1925bd906999/61/03/ab/c3/-b08a-4556-9937-2bf3065c1202"
|
||||
|
||||
# Identify a blob using the full filesystem path from a log line (ocis driver)
|
||||
ocis storage-users blobstore get --path="/var/lib/ocis/storage/users/spaces/b1/9ec764-5398-458a-8ff1-1925bd906999/blobs/61/03/ab/c3/-b08a-4556-9937-2bf3065c1202"
|
||||
|
||||
# Identify a blob using explicit IDs
|
||||
ocis storage-users blobstore get --space-id=b19ec764-5398-458a-8ff1-1925bd906999 --blob-id=6103abc3-b08a-4556-9937-2bf3065c1202
|
||||
```
|
||||
|
||||
### Manage Spaces
|
||||
|
||||
This command set provides commands to manage spaces, including purging disabled spaces that exceed the retention period.
|
||||
|
||||
@@ -0,0 +1,286 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/rand"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/services/storage-users/pkg/config"
|
||||
"github.com/owncloud/ocis/v2/services/storage-users/pkg/config/parser"
|
||||
"github.com/owncloud/reva/v2/pkg/bytesize"
|
||||
ocisbs "github.com/owncloud/reva/v2/pkg/storage/fs/ocis/blobstore"
|
||||
s3bs "github.com/owncloud/reva/v2/pkg/storage/fs/s3ng/blobstore"
|
||||
"github.com/owncloud/reva/v2/pkg/storage/utils/decomposedfs/node"
|
||||
"github.com/owncloud/reva/v2/pkg/storage/utils/decomposedfs/tree"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
// Blobstore is the entry point for the blobstore command group.
|
||||
func Blobstore(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "blobstore",
|
||||
Usage: "manage the blobstore",
|
||||
Subcommands: []*cli.Command{
|
||||
BlobstoreCheck(cfg),
|
||||
BlobstoreGet(cfg),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// BlobstoreCheck uploads random bytes to a random path, downloads and
|
||||
// verifies them, then deletes them again. All three steps must succeed.
|
||||
func BlobstoreCheck(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "check",
|
||||
Usage: "check blobstore connectivity via an upload/download/delete round-trip",
|
||||
Flags: []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "blob-size",
|
||||
Usage: "size of the random blob to upload, e.g. 64, 1KB, 1MB, 4MiB",
|
||||
Value: "64",
|
||||
},
|
||||
},
|
||||
Before: func(c *cli.Context) error {
|
||||
return configlog.ReturnFatal(parser.ParseConfig(cfg))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
bs, err := initBlobstore(cfg)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
size, err := bytesize.Parse(c.String("blob-size"))
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid --blob-size %q: %w", c.String("blob-size"), err)
|
||||
}
|
||||
return runBlobstoreRoundTrip(bs, int(size))
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// BlobstoreGet downloads a specific blob by its ID to verify it is readable.
|
||||
func BlobstoreGet(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "get",
|
||||
Usage: "get a blob from the blobstore by ID",
|
||||
Flags: []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "path",
|
||||
Usage: "blobstore path as it appears in log lines (e.g. \"<spaceID>/<pathified_blobID>\" for s3ng or \"…/spaces/<pathified_spaceID>/blobs/<pathified_blobID>\" for ocis); extracts --blob-id and --space-id automatically",
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "blob-id",
|
||||
Usage: "blob ID to download (required when --path is not set)",
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "space-id",
|
||||
Usage: "space ID the blob belongs to (required when --path is not set)",
|
||||
},
|
||||
&cli.Int64Flag{
|
||||
Name: "blob-size",
|
||||
Usage: "expected blob size in bytes; only needed for the s3ng driver when the size is known upfront. " +
|
||||
"If omitted or wrong, a size mismatch will trigger one automatic retry with the actual size returned by s3ng.",
|
||||
},
|
||||
},
|
||||
Before: func(c *cli.Context) error {
|
||||
return configlog.ReturnFatal(parser.ParseConfig(cfg))
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
bs, err := initBlobstore(cfg)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
blobID, spaceID := c.String("blob-id"), c.String("space-id")
|
||||
if c.IsSet("path") {
|
||||
spaceID, blobID, err = parseBlobPath(c.String("path"))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if blobID == "" || spaceID == "" {
|
||||
return fmt.Errorf("either --path or both --blob-id and --space-id must be set")
|
||||
}
|
||||
return downloadBlob(bs, blobID, spaceID, c.Int64("blob-size"))
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// parseBlobPath extracts spaceID and blobID from a blobstore path as it
|
||||
// appears in log lines. Two formats are supported:
|
||||
//
|
||||
// - S3NG: "<spaceID>/<pathified_blobID>"
|
||||
// e.g. "b19ec764-5398-458a-8ff1-1925bd906999/61/03/ab/c3/-b08a-4556-9937-2bf3065c1202"
|
||||
//
|
||||
// - OCIS: any path containing "/spaces/<pathified_spaceID>/blobs/<pathified_blobID>"
|
||||
// e.g. "/var/lib/ocis/storage/users/spaces/b1/9ec764-.../blobs/61/03/ab/c3/-b08a-..."
|
||||
func parseBlobPath(path string) (spaceID, blobID string, err error) {
|
||||
// OCIS paths contain both /spaces/ and /blobs/ as structural markers.
|
||||
if _, rest, ok := strings.Cut(path, "/spaces/"); ok {
|
||||
pathifiedSpaceID, pathifiedBlobID, ok := strings.Cut(rest, "/blobs/")
|
||||
if !ok {
|
||||
return "", "", fmt.Errorf("cannot parse ocis blob path %q: missing /blobs/ segment", path)
|
||||
}
|
||||
spaceID = depathify(pathifiedSpaceID, 1)
|
||||
blobID = depathify(pathifiedBlobID, 4)
|
||||
return
|
||||
}
|
||||
|
||||
// S3NG paths: <spaceID>/<pathified_blobID>
|
||||
var pathifiedBlobID string
|
||||
spaceID, pathifiedBlobID, _ = strings.Cut(path, "/")
|
||||
if pathifiedBlobID == "" {
|
||||
return "", "", fmt.Errorf("cannot parse s3ng blob path %q: expected <spaceID>/<pathified_blobID>", path)
|
||||
}
|
||||
blobID = depathify(pathifiedBlobID, 4)
|
||||
return
|
||||
}
|
||||
|
||||
// depathify reverses the effect of lookup.Pathify(id, depth, 2):
|
||||
// it strips the directory separators that were inserted every two characters
|
||||
// up to the given depth.
|
||||
// e.g. depathify("61/03/ab/c3/-b08a-4556-9937-2bf3065c1202", 4)
|
||||
//
|
||||
// → "6103abc3-b08a-4556-9937-2bf3065c1202"
|
||||
func depathify(path string, depth int) string {
|
||||
parts := strings.SplitN(path, "/", depth+1)
|
||||
return strings.Join(parts, "")
|
||||
}
|
||||
|
||||
// initBlobstore builds a tree.Blobstore from the service configuration.
|
||||
// Only the "ocis" and "s3ng" drivers are supported.
|
||||
func initBlobstore(cfg *config.Config) (tree.Blobstore, error) {
|
||||
switch cfg.Driver {
|
||||
case "ocis":
|
||||
return ocisbs.New(cfg.Drivers.OCIS.Root)
|
||||
case "s3ng":
|
||||
return s3bs.New(
|
||||
cfg.Drivers.S3NG.Endpoint,
|
||||
cfg.Drivers.S3NG.Region,
|
||||
cfg.Drivers.S3NG.Bucket,
|
||||
cfg.Drivers.S3NG.AccessKey,
|
||||
cfg.Drivers.S3NG.SecretKey,
|
||||
s3bs.Options{
|
||||
DisableContentSha256: cfg.Drivers.S3NG.DisableContentSha256,
|
||||
DisableMultipart: cfg.Drivers.S3NG.DisableMultipart,
|
||||
SendContentMd5: cfg.Drivers.S3NG.SendContentMd5,
|
||||
ConcurrentStreamParts: cfg.Drivers.S3NG.ConcurrentStreamParts,
|
||||
NumThreads: cfg.Drivers.S3NG.NumThreads,
|
||||
PartSize: cfg.Drivers.S3NG.PartSize,
|
||||
},
|
||||
)
|
||||
default:
|
||||
return nil, fmt.Errorf("blobstore operations are not supported for driver '%s'", cfg.Driver)
|
||||
}
|
||||
}
|
||||
|
||||
// blobSizeMismatchRe matches the error produced by the s3ng blobstore when the
|
||||
// retrieved object size does not match node.Blobsize, and captures the actual size.
|
||||
var blobSizeMismatchRe = regexp.MustCompile(`blob has unexpected size\. \d+ bytes expected, got (\d+) bytes`)
|
||||
|
||||
// downloadBlob downloads a single blob identified by blobID, drains the reader
|
||||
// to surface any streaming errors, then closes it.
|
||||
// If the s3ng blobstore rejects the download due to a size mismatch, the actual
|
||||
// size is extracted from the error and the download is retried with the correct value.
|
||||
func downloadBlob(bs tree.Blobstore, blobID, spaceID string, blobSize int64) error {
|
||||
n := &node.Node{
|
||||
BlobID: blobID,
|
||||
SpaceID: spaceID,
|
||||
Blobsize: blobSize,
|
||||
}
|
||||
rc, err := bs.Download(n)
|
||||
if err != nil {
|
||||
if m := blobSizeMismatchRe.FindStringSubmatch(err.Error()); m != nil {
|
||||
fmt.Printf("blob size mismatch, retrying with actual size %s bytes\n", m[1])
|
||||
if _, err := fmt.Sscan(m[1], &n.Blobsize); err != nil {
|
||||
return fmt.Errorf("download failed: could not parse actual blob size %q: %w", m[1], err)
|
||||
}
|
||||
rc, err = bs.Download(n)
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("download failed: %w", err)
|
||||
}
|
||||
}
|
||||
defer func() {
|
||||
if cerr := rc.Close(); cerr != nil {
|
||||
fmt.Fprintf(os.Stderr, "warning: failed to close blob reader for blob %s in space %s: %v\n", blobID, spaceID, cerr)
|
||||
}
|
||||
}()
|
||||
if _, err := io.Copy(io.Discard, rc); err != nil {
|
||||
return fmt.Errorf("download failed while reading: %w", err)
|
||||
}
|
||||
fmt.Println("Download: OK")
|
||||
return nil
|
||||
}
|
||||
|
||||
// runBlobstoreRoundTrip uploads random data, verifies it can be retrieved, and
|
||||
// then removes it again. All three steps must succeed for the check to pass.
|
||||
func runBlobstoreRoundTrip(bs tree.Blobstore, blobSize int) error {
|
||||
// 1. Generate random bytes that serve as the test payload.
|
||||
data := make([]byte, blobSize)
|
||||
if _, err := rand.Read(data); err != nil {
|
||||
return fmt.Errorf("failed to generate random data: %w", err)
|
||||
}
|
||||
|
||||
// Write the payload to a temporary file. The OCIS blobstore may rename
|
||||
// (move) this file into the blobstore, so os.Remove in the defer is a
|
||||
// no-op for that driver – which is fine.
|
||||
tmpFile, err := os.CreateTemp("", "ocis-blobstore-check-*")
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create temp file: %w", err)
|
||||
}
|
||||
tmpPath := tmpFile.Name()
|
||||
defer os.Remove(tmpPath) // best-effort cleanup
|
||||
|
||||
if _, err := tmpFile.Write(data); err != nil {
|
||||
tmpFile.Close()
|
||||
return fmt.Errorf("failed to write temp file: %w", err)
|
||||
}
|
||||
if err := tmpFile.Close(); err != nil {
|
||||
return fmt.Errorf("failed to close temp file: %w", err)
|
||||
}
|
||||
|
||||
// 2. Build a test node with random identifiers.
|
||||
testNode := &node.Node{
|
||||
SpaceID: uuid.New().String(),
|
||||
BlobID: uuid.New().String(),
|
||||
Blobsize: int64(len(data)),
|
||||
}
|
||||
fmt.Printf("Uploading test blob: spaceID=%s blobID=%s\n", testNode.SpaceID, testNode.BlobID)
|
||||
|
||||
// 3. Upload.
|
||||
if err := bs.Upload(testNode, tmpPath); err != nil {
|
||||
return fmt.Errorf("upload failed: %w", err)
|
||||
}
|
||||
fmt.Println("Upload: OK")
|
||||
|
||||
// 4. Download and verify.
|
||||
rc, err := bs.Download(testNode)
|
||||
if err != nil {
|
||||
_ = bs.Delete(testNode)
|
||||
return fmt.Errorf("download failed: %w", err)
|
||||
}
|
||||
downloaded, err := io.ReadAll(rc)
|
||||
rc.Close()
|
||||
if err != nil {
|
||||
_ = bs.Delete(testNode)
|
||||
return fmt.Errorf("failed to read downloaded data: %w", err)
|
||||
}
|
||||
if !bytes.Equal(data, downloaded) {
|
||||
_ = bs.Delete(testNode)
|
||||
return fmt.Errorf("data integrity check failed: downloaded content does not match uploaded content")
|
||||
}
|
||||
fmt.Println("Download and verify: OK")
|
||||
|
||||
// 5. Delete.
|
||||
if err := bs.Delete(testNode); err != nil {
|
||||
return fmt.Errorf("delete failed: %w", err)
|
||||
}
|
||||
fmt.Println("Delete: OK")
|
||||
fmt.Println("Blobstore check successful.")
|
||||
return nil
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func Test_depathify(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
path string
|
||||
depth int
|
||||
want string
|
||||
}{
|
||||
{
|
||||
name: "blob id depth 4",
|
||||
path: "61/03/ab/c3/-b08a-4556-9937-2bf3065c1202",
|
||||
depth: 4,
|
||||
want: "6103abc3-b08a-4556-9937-2bf3065c1202",
|
||||
},
|
||||
{
|
||||
name: "space id depth 1",
|
||||
path: "b1/9ec764-5398-458a-8ff1-1925bd906999",
|
||||
depth: 1,
|
||||
want: "b19ec764-5398-458a-8ff1-1925bd906999",
|
||||
},
|
||||
{
|
||||
name: "depth 0 is a no-op",
|
||||
path: "abcd-1234",
|
||||
depth: 0,
|
||||
want: "abcd-1234",
|
||||
},
|
||||
{
|
||||
name: "fewer segments than depth leaves remainder intact",
|
||||
path: "ab/cd",
|
||||
depth: 4,
|
||||
want: "abcd",
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
got := depathify(tt.path, tt.depth)
|
||||
if got != tt.want {
|
||||
t.Errorf("depathify(%q, %d) = %q, want %q", tt.path, tt.depth, got, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_parseBlobPath(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
path string
|
||||
wantSpaceID string
|
||||
wantBlobID string
|
||||
wantErr bool
|
||||
}{
|
||||
{
|
||||
// s3ng: <spaceID>/<pathified_blobID>
|
||||
name: "s3ng format",
|
||||
path: "b19ec764-5398-458a-8ff1-1925bd906999/61/03/ab/c3/-b08a-4556-9937-2bf3065c1202",
|
||||
wantSpaceID: "b19ec764-5398-458a-8ff1-1925bd906999",
|
||||
wantBlobID: "6103abc3-b08a-4556-9937-2bf3065c1202",
|
||||
},
|
||||
{
|
||||
// ocis: …/spaces/<pathified_spaceID>/blobs/<pathified_blobID>
|
||||
name: "ocis filesystem format",
|
||||
path: "/var/lib/ocis/storage/users/spaces/b1/9ec764-5398-458a-8ff1-1925bd906999/blobs/61/03/ab/c3/-b08a-4556-9937-2bf3065c1202",
|
||||
wantSpaceID: "b19ec764-5398-458a-8ff1-1925bd906999",
|
||||
wantBlobID: "6103abc3-b08a-4556-9937-2bf3065c1202",
|
||||
},
|
||||
{
|
||||
name: "ocis format missing /blobs/ segment",
|
||||
path: "/var/lib/ocis/storage/users/spaces/b1/9ec764-5398-458a-8ff1-1925bd906999/noblobs/61/03/ab/c3",
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "s3ng format missing blob id (no slash after spaceID)",
|
||||
path: "b19ec764-5398-458a-8ff1-1925bd906999",
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "empty path",
|
||||
path: "",
|
||||
wantErr: true,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
gotSpaceID, gotBlobID, err := parseBlobPath(tt.path)
|
||||
if (err != nil) != tt.wantErr {
|
||||
t.Fatalf("parseBlobPath(%q) error = %v, wantErr %v", tt.path, err, tt.wantErr)
|
||||
}
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
if gotSpaceID != tt.wantSpaceID {
|
||||
t.Errorf("parseBlobPath(%q) spaceID = %q, want %q", tt.path, gotSpaceID, tt.wantSpaceID)
|
||||
}
|
||||
if gotBlobID != tt.wantBlobID {
|
||||
t.Errorf("parseBlobPath(%q) blobID = %q, want %q", tt.path, gotBlobID, tt.wantBlobID)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@ func GetCommands(cfg *config.Config) cli.Commands {
|
||||
Uploads(cfg),
|
||||
TrashBin(cfg),
|
||||
Spaces(cfg),
|
||||
Blobstore(cfg),
|
||||
|
||||
// infos about this service
|
||||
Health(cfg),
|
||||
|
||||
@@ -131,7 +131,7 @@ class EmailContext implements Context {
|
||||
$response = EmailHelper::searchEmails($query);
|
||||
$emails = $this->featureContext->getJsonDecodedResponse($response);
|
||||
if ($emails["messages_count"] <= $count) {
|
||||
echo "[INFO] Mailbox is empty...\n";
|
||||
echo "[INFO] Mailbox is empty. Retrying...\n";
|
||||
// Wait for 1 second and try again
|
||||
// the mailbox might not be created yet
|
||||
sleep(1);
|
||||
|
||||
@@ -322,7 +322,7 @@ class NotificationContext implements Context {
|
||||
if (isset($this->featureContext->getJsonDecodedResponseBodyContent($response)->ocs->data)) {
|
||||
$responseBody = $this->featureContext->getJsonDecodedResponseBodyContent($response)->ocs->data;
|
||||
foreach ($responseBody as $value) {
|
||||
if (isset($value->subject) && $value->subject === $subject) {
|
||||
if (isset($value->subject) && trim($value->subject, ".") === trim($subject, ".")) {
|
||||
// set notificationId
|
||||
$this->notificationIds[] = $value->notification_id;
|
||||
return $value;
|
||||
@@ -356,7 +356,7 @@ class NotificationContext implements Context {
|
||||
|
||||
$notifications = $responseObject->ocs->data;
|
||||
foreach ($notifications as $notification) {
|
||||
if (isset($notification->subject) && $notification->subject === $subject
|
||||
if (isset($notification->subject) && trim($notification->subject, ".") === trim($subject, ".")
|
||||
&& isset($notification->messageRichParameters->resource->name)
|
||||
&& $notification->messageRichParameters->resource->name === $resource
|
||||
) {
|
||||
|
||||
@@ -236,8 +236,12 @@ class OcisConfigContext implements Context {
|
||||
*/
|
||||
public function theConfigHasBeenSetToPath(string $configVariable, string $path, ?string $serviceName = null): void {
|
||||
if (getenv("K8S") === "true") {
|
||||
// In K8s, use the path where the ConfigMap is mounted
|
||||
// For example: The banned-password-list.txt is mounted at /etc/ocis/config/drone/
|
||||
if ($configVariable === "SHARING_PASSWORD_POLICY_BANNED_PASSWORDS_LIST") {
|
||||
// The banned password list is already configured in K8s setup.
|
||||
return;
|
||||
}
|
||||
// In K8s, we MUST use the mounted paths
|
||||
// All files for test MUST be mounted in '/etc/ocis/' + $path
|
||||
$k8sPath = "/etc/ocis/" . $path;
|
||||
$envs = [
|
||||
$serviceName => [$configVariable => $k8sPath],
|
||||
|
||||
@@ -292,9 +292,9 @@ The expected failures in this file are from features in the owncloud/ocis repo.
|
||||
|
||||
#### [Readiness check for some services returns 500 status code](https://github.com/owncloud/ocis/issues/10661)
|
||||
|
||||
- [apiServiceAvailability/serviceAvailabilityCheck.feature:111](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiServiceAvailability/serviceAvailabilityCheck.feature#L111)
|
||||
- [apiServiceAvailability/serviceAvailabilityCheck.feature:120](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiServiceAvailability/serviceAvailabilityCheck.feature#L120)
|
||||
- [apiServiceAvailability/serviceAvailabilityCheck.feature:131](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiServiceAvailability/serviceAvailabilityCheck.feature#L131)
|
||||
- [apiServiceAvailability/serviceAvailabilityCheck.feature:115](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiServiceAvailability/serviceAvailabilityCheck.feature#L115)
|
||||
- [apiServiceAvailability/serviceAvailabilityCheck.feature:124](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiServiceAvailability/serviceAvailabilityCheck.feature#L124)
|
||||
- [apiServiceAvailability/serviceAvailabilityCheck.feature:135](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiServiceAvailability/serviceAvailabilityCheck.feature#L135)
|
||||
|
||||
#### [[OCM] Hide & Enable Sync fail with received federated shares](https://github.com/owncloud/ocis/issues/10719)
|
||||
|
||||
@@ -401,6 +401,5 @@ The expected failures in this file are from features in the owncloud/ocis repo.
|
||||
- [apiGraphUser/getUser.feature:696](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUser/getUser.feature#L696)
|
||||
- [apiGraphUser/getUser.feature:700](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUser/getUser.feature#L700)
|
||||
|
||||
|
||||
Note: always have an empty line at the end of this file.
|
||||
The bash script that processes this file requires that the last line has a newline on the end.
|
||||
@@ -1,15 +0,0 @@
|
||||
Feature: service health check
|
||||
|
||||
|
||||
Scenario: check service health
|
||||
When a user requests these URLs with "GET" and no authentication
|
||||
| endpoint | service |
|
||||
| http://%base_url_hostname%:9277/healthz | antivirus |
|
||||
Then the HTTP status code of responses on all endpoints should be "200"
|
||||
|
||||
|
||||
Scenario: check service readiness
|
||||
When a user requests these URLs with "GET" and no authentication
|
||||
| endpoint | service |
|
||||
| http://%base_url_hostname%:9277/readyz | antivirus |
|
||||
Then the HTTP status code of responses on all endpoints should be "200"
|
||||
@@ -375,7 +375,7 @@ Feature: Notification
|
||||
|
||||
@env-config @email
|
||||
Scenario Outline: group members gets an in-app and mail notifications in default language when someone shares a file with the group
|
||||
Given the config "OCIS_DEFAULT_LANGUAGE" has been set to "de" for "notifications" service
|
||||
Given the config "OCIS_DEFAULT_LANGUAGE" has been set to "de" for "settings" service
|
||||
And group "group1" has been created
|
||||
And user "Brian" has been added to group "group1"
|
||||
And user "Carol" has been added to group "group1"
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
Feature: service health check
|
||||
|
||||
|
||||
Scenario: check service health
|
||||
When a user requests these URLs with "GET" and no authentication
|
||||
| endpoint | service |
|
||||
| http://%base_url_hostname%:9174/healthz | notification |
|
||||
Then the HTTP status code of responses on all endpoints should be "200"
|
||||
|
||||
|
||||
Scenario: check service readiness
|
||||
When a user requests these URLs with "GET" and no authentication
|
||||
| endpoint | service |
|
||||
| http://%base_url_hostname%:9174/readyz | notification |
|
||||
Then the HTTP status code of responses on all endpoints should be "200"
|
||||
@@ -38,6 +38,8 @@ Feature: service health check
|
||||
| http://%base_url_hostname%:9104/healthz | web |
|
||||
| http://%base_url_hostname%:9119/healthz | webdav |
|
||||
| http://%base_url_hostname%:9279/healthz | webfinger |
|
||||
| http://%base_url_hostname%:9277/healthz | antivirus |
|
||||
| http://%base_url_hostname%:9174/healthz | notification |
|
||||
Then the HTTP status code of responses on all endpoints should be "200"
|
||||
|
||||
@env-config
|
||||
@@ -90,6 +92,8 @@ Feature: service health check
|
||||
| http://%base_url_hostname%:9104/readyz | web |
|
||||
| http://%base_url_hostname%:9119/readyz | webdav |
|
||||
| http://%base_url_hostname%:9279/readyz | webfinger |
|
||||
| http://%base_url_hostname%:9277/readyz | antivirus |
|
||||
| http://%base_url_hostname%:9174/readyz | notification |
|
||||
Then the HTTP status code of responses on all endpoints should be "200"
|
||||
|
||||
@env-config
|
||||
|
||||
@@ -219,7 +219,7 @@ Feature: download file
|
||||
And the following headers should be set
|
||||
| header | value |
|
||||
| Content-Disposition | attachment; filename*=UTF-8''<encoded-file-name>; filename="<file-name>" |
|
||||
| Content-Security-Policy | child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; default-src 'none'; font-src 'self'; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline' |
|
||||
| Content-Security-Policy | child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; default-src 'none'; font-src 'self' data:; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline' |
|
||||
| X-Content-Type-Options | nosniff |
|
||||
| X-Frame-Options | SAMEORIGIN |
|
||||
| X-Permitted-Cross-Domain-Policies | none |
|
||||
@@ -246,7 +246,7 @@ Feature: download file
|
||||
And the following headers should be set
|
||||
| header | value |
|
||||
| Content-Disposition | attachment; filename*=UTF-8''%22quote%22double%22.txt; filename=""quote"double".txt" |
|
||||
| Content-Security-Policy | child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; default-src 'none'; font-src 'self'; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline' |
|
||||
| Content-Security-Policy | child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; default-src 'none'; font-src 'self' data:; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline' |
|
||||
| X-Content-Type-Options | nosniff |
|
||||
| X-Frame-Options | SAMEORIGIN |
|
||||
| X-Permitted-Cross-Domain-Policies | none |
|
||||
|
||||
@@ -11,8 +11,9 @@ directives:
|
||||
- '''none'''
|
||||
font-src:
|
||||
- '''self'''
|
||||
- 'data:'
|
||||
frame-ancestors:
|
||||
- '''none'''
|
||||
- '''self'''
|
||||
frame-src:
|
||||
- '''self'''
|
||||
- 'blob:'
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
{{/*
|
||||
|
||||
DO NOT RENAME THIS FILE
|
||||
|
||||
Filename: _zoverride.tpl
|
||||
|
||||
Override filename starts with 'z'
|
||||
to make sure it is loaded after all other templates.
|
||||
|
||||
Using the existing variable definitions
|
||||
which are already included in most of the templates.
|
||||
*/}}
|
||||
|
||||
{{- define "ocis.caPath" -}}
|
||||
- name: logdir
|
||||
mountPath: /logs
|
||||
{{- end -}}
|
||||
|
||||
{{- define "ocis.caVolume" -}}
|
||||
- name: logdir
|
||||
hostPath:
|
||||
path: /logs
|
||||
type: Directory
|
||||
{{- end -}}
|
||||
|
||||
{{- define "ocis.caEnv" -}}
|
||||
- name: OCIS_LOG_FILE
|
||||
value: /logs/ocis.log
|
||||
{{- end -}}
|
||||
@@ -1,19 +0,0 @@
|
||||
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
|
||||
@@ -1,11 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: clamav
|
||||
spec:
|
||||
selector:
|
||||
app: clamav
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 3310
|
||||
targetPort: 3310
|
||||
@@ -1,24 +0,0 @@
|
||||
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
|
||||
@@ -1,17 +0,0 @@
|
||||
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
|
||||
@@ -1,19 +0,0 @@
|
||||
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
|
||||
@@ -1,12 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: tika
|
||||
spec:
|
||||
selector:
|
||||
app: tika
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 9998
|
||||
targetPort: 9998
|
||||
type: ClusterIP
|
||||
@@ -1,221 +0,0 @@
|
||||
---
|
||||
namespaceOverride: ocis
|
||||
image:
|
||||
repository: owncloud/ocis-rolling
|
||||
tag: master
|
||||
ingress:
|
||||
enabled: true
|
||||
ingressClassName: traefik
|
||||
externalDomain: ocis-server
|
||||
extraResources:
|
||||
- |
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: ocmproviders
|
||||
namespace: {{ template "ocis.namespace" . }}
|
||||
labels:
|
||||
{{- include "ocis.labels" . | nindent 8 }}
|
||||
data:
|
||||
ocmproviders.json: |
|
||||
[
|
||||
{
|
||||
"name": "ocis",
|
||||
"full_name": "ocis server",
|
||||
"organization": "ownCloud",
|
||||
"domain": "ocis-server",
|
||||
"homepage": "https://ocis-server",
|
||||
"services": [
|
||||
{
|
||||
"endpoint": {
|
||||
"type": {
|
||||
"name": "OCM",
|
||||
"description": "ownCloud Open Cloud Mesh API"
|
||||
},
|
||||
"name": "ocis-server - OCM API",
|
||||
"path": "https://ocis-server/ocm/",
|
||||
"is_monitored": true
|
||||
},
|
||||
"api_version": "0.0.1",
|
||||
"host": "https://ocis-server"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "federation ocis",
|
||||
"full_name": "federation ocis server",
|
||||
"organization": "ownCloud",
|
||||
"domain": "federation-ocis-server",
|
||||
"homepage": "https://federation-ocis-server",
|
||||
"services": [
|
||||
{
|
||||
"endpoint": {
|
||||
"type": {
|
||||
"name": "OCM",
|
||||
"description": "federation ownCloud Open Cloud Mesh API"
|
||||
},
|
||||
"name": "federation-ocis-server - OCM API",
|
||||
"path": "https://federation-ocis-server/ocm/",
|
||||
"is_monitored": true
|
||||
},
|
||||
"api_version": "0.0.1",
|
||||
"host": "https://federation-ocis-server"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
logging:
|
||||
level: error
|
||||
insecure:
|
||||
oidcIdpInsecure: true
|
||||
ocisHttpApiInsecure: true
|
||||
ocmInsecure: true
|
||||
features:
|
||||
authapp:
|
||||
enabled: true
|
||||
emailNotifications:
|
||||
enabled: true
|
||||
smtp:
|
||||
host: mailpit
|
||||
port: 1025
|
||||
sender: 'oCIS <noreply@local.test>'
|
||||
authentication: none
|
||||
encryption: none
|
||||
branding:
|
||||
enabled: false
|
||||
virusscan:
|
||||
enabled: false
|
||||
infectedFileHandling: delete
|
||||
policies:
|
||||
enabled: false
|
||||
ocm:
|
||||
enabled: true
|
||||
providersConfigRef: "ocmproviders"
|
||||
sharing:
|
||||
passwordPolicies:
|
||||
bannedPasswords:
|
||||
- "password"
|
||||
- "123"
|
||||
- "12345678"
|
||||
- "ownCloud"
|
||||
- "owncloud-1"
|
||||
quotas:
|
||||
default: "1000000000"
|
||||
max: "0"
|
||||
appsIntegration:
|
||||
enabled: false
|
||||
wopiIntegration:
|
||||
officeSuites:
|
||||
- name: "Collabora"
|
||||
uri: "https://collabora:9980"
|
||||
wopiSrc: "http://ocis-server:9300"
|
||||
product: "Collabora"
|
||||
enabled: true
|
||||
insecure: true
|
||||
disableProof: true
|
||||
secureViewEnabled: false
|
||||
disableChat: true
|
||||
ingress:
|
||||
enabled: false
|
||||
- name: "FakeOffice"
|
||||
uri: "http://fakeoffice:8080"
|
||||
wopiSrc: "http://ocis-server:9301"
|
||||
product: "FakeOffice"
|
||||
enabled: true
|
||||
insecure: true
|
||||
disableProof: true
|
||||
secureViewEnabled: false
|
||||
disableChat: true
|
||||
ingress:
|
||||
enabled: false
|
||||
- name: "OnlyOffice"
|
||||
uri: "https://onlyoffice"
|
||||
wopiSrc: "http://ocis-server:9302"
|
||||
product: "OnlyOffice"
|
||||
enabled: true
|
||||
insecure: true
|
||||
disableProof: true
|
||||
secureViewEnabled: false
|
||||
disableChat: true
|
||||
ingress:
|
||||
enabled: false
|
||||
|
||||
http:
|
||||
cors:
|
||||
allow_origins: []
|
||||
csp:
|
||||
directives:
|
||||
childSrc:
|
||||
- "'self'"
|
||||
connectSrc:
|
||||
- "'self'"
|
||||
- "blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/"
|
||||
defaultSrc:
|
||||
- "'none'"
|
||||
fontSrc:
|
||||
- "'self'"
|
||||
frameAncestors:
|
||||
- "'self'"
|
||||
frameSrc:
|
||||
- "'self'"
|
||||
- "data: blob: https://embed.diagrams.net/"
|
||||
imgSrc:
|
||||
- "'self'"
|
||||
- "blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/"
|
||||
manifestSrc:
|
||||
- "'self'"
|
||||
mediaSrc:
|
||||
- "'self'"
|
||||
objectSrc:
|
||||
- "'self'"
|
||||
- "blob:"
|
||||
scriptSrc:
|
||||
- "'self'"
|
||||
- "'unsafe-inline'"
|
||||
styleSrc:
|
||||
- "'self'"
|
||||
- "'unsafe-inline'"
|
||||
|
||||
services:
|
||||
idm:
|
||||
persistence:
|
||||
enabled: true
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
nats:
|
||||
persistence:
|
||||
enabled: true
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storagesystem:
|
||||
persistence:
|
||||
enabled: true
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageusers:
|
||||
persistence:
|
||||
enabled: true
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
ocm:
|
||||
persistence:
|
||||
enabled: true
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
thumbnails:
|
||||
persistence:
|
||||
enabled: true
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
web:
|
||||
persistence:
|
||||
enabled: true
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
antivirus:
|
||||
events:
|
||||
consumer:
|
||||
concurrency: 10
|
||||
secretRefs:
|
||||
notificationsSmtpSecretRef: notifications-smtp-secret
|
||||
@@ -0,0 +1,2 @@
|
||||
logs/
|
||||
ocis-charts/
|
||||
@@ -0,0 +1,45 @@
|
||||
|
||||
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)
|
||||
@@ -0,0 +1,229 @@
|
||||
# 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.
|
||||
@@ -0,0 +1,81 @@
|
||||
#!/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
|
||||
@@ -0,0 +1,83 @@
|
||||
#!/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"
|
||||
Loaded 100 of 118 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user