Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a01bafcdde |
No files matched your search
+234
-97
@@ -119,7 +119,6 @@ config = {
|
||||
],
|
||||
"skip": False,
|
||||
"withRemotePhp": [False],
|
||||
"k8s": True,
|
||||
"emailNeeded": True,
|
||||
"extraEnvironment": {
|
||||
"EMAIL_HOST": EMAIL_SMTP_HOST,
|
||||
@@ -166,7 +165,6 @@ config = {
|
||||
"apiActivities",
|
||||
],
|
||||
"skip": False,
|
||||
"k8s": True,
|
||||
},
|
||||
"groupAndSearch1": {
|
||||
"suites": [
|
||||
@@ -211,7 +209,6 @@ config = {
|
||||
],
|
||||
"skip": False,
|
||||
"withRemotePhp": [False],
|
||||
"k8s": True,
|
||||
},
|
||||
"sharingNgLinkShare": {
|
||||
"suites": [
|
||||
@@ -310,7 +307,6 @@ 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",
|
||||
},
|
||||
},
|
||||
@@ -376,7 +372,6 @@ config = {
|
||||
"coreApiWebdavMove2",
|
||||
],
|
||||
"skip": False,
|
||||
"k8s": True,
|
||||
},
|
||||
"7": {
|
||||
"suites": [
|
||||
@@ -899,7 +894,6 @@ def uploadScanResults(ctx):
|
||||
"git checkout $DRONE_COMMIT",
|
||||
],
|
||||
},
|
||||
] + skipIfUnchanged(ctx, "unit-tests") + [
|
||||
{
|
||||
"name": "sync-from-cache",
|
||||
"image": MINIO_MC,
|
||||
@@ -1131,28 +1125,19 @@ 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],
|
||||
@@ -1162,6 +1147,15 @@ 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"],
|
||||
@@ -1186,18 +1180,17 @@ 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 #
|
||||
@@ -1308,6 +1301,9 @@ 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 [{
|
||||
@@ -1515,20 +1511,23 @@ 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"],
|
||||
@@ -1541,14 +1540,13 @@ 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 #
|
||||
@@ -1699,14 +1697,13 @@ 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() + \
|
||||
(waitForServices("tika", ["tika:9998"]) if params["tikaNeeded"] else []) + \
|
||||
(tikaService() 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"])
|
||||
|
||||
@@ -1850,7 +1847,7 @@ def multiServiceE2ePipeline(ctx):
|
||||
restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin/ocis") + \
|
||||
restoreWebCache() + \
|
||||
restoreWebPnpmCache() + \
|
||||
waitForServices("tika", ["tika:9998"]) + \
|
||||
tikaService() + \
|
||||
ocisServer(extra_server_environment = extra_server_environment, tika_enabled = params["tikaNeeded"], debug = False) + \
|
||||
storage_users_services + \
|
||||
[{
|
||||
@@ -1884,7 +1881,6 @@ def multiServiceE2ePipeline(ctx):
|
||||
},
|
||||
pipelineVolumeGo,
|
||||
],
|
||||
"services": tikaService(),
|
||||
})
|
||||
return pipelines
|
||||
|
||||
@@ -2869,52 +2865,41 @@ def startOcisService(service = None, name = None, environment = {}, volumes = []
|
||||
},
|
||||
]
|
||||
|
||||
def ocisServerK8s(federation = False, antivirus = False, email = False, tika = False, wopi = False, auth_app = False):
|
||||
def ocisServerK8s(federation = False, antivirus = False, email = False, tika = False, wopi = 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 = []
|
||||
|
||||
environment = {
|
||||
"ENABLE_ANTIVIRUS": antivirus,
|
||||
"ENABLE_EMAIL": email,
|
||||
"ENABLE_TIKA": tika,
|
||||
"ENABLE_WOPI": wopi,
|
||||
"ENABLE_OCM": federation,
|
||||
"ENABLE_AUTH_APP": auth_app,
|
||||
}
|
||||
|
||||
steps = prepareOcisDeployment()
|
||||
if antivirus:
|
||||
external_servers.append(["clamav", 3310])
|
||||
if tika:
|
||||
external_servers.append(["tika", 9998])
|
||||
steps += enableAntivirusServiceK8s()
|
||||
if email:
|
||||
external_servers.append([EMAIL_SMTP_HOST, EMAIL_SMTP_PORT])
|
||||
steps += enableEmailServiceK8s()
|
||||
if tika:
|
||||
steps += enableTikaServiceK8s()
|
||||
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 []) + \
|
||||
setupConfigMapsK8s(name) + \
|
||||
(setupConfigMapsK8s(fed_name) if federation else []) + \
|
||||
setupOcisConfigMaps(name) + \
|
||||
(setupOcisConfigMaps(fed_name) if federation else []) + \
|
||||
expose_ext_server_step + \
|
||||
deployOcisK8s(name) + \
|
||||
(deployOcisK8s(fed_name) if federation else []) + \
|
||||
streamOcisLogsK8s(name) + \
|
||||
(streamOcisLogsK8s(fed_name) if federation else []) + \
|
||||
deployOcis(name) + \
|
||||
(deployOcis(fed_name) if federation else []) + \
|
||||
streamK8sOcisLogs(name) + \
|
||||
waitForOcis(name, url) + \
|
||||
(waitForOcis(fed_name, fed_url) if federation else []) + \
|
||||
ociswrapperK8s(name)
|
||||
return steps
|
||||
(waitForOcis(fed_name, fed_url) if federation else [])
|
||||
|
||||
return steps + ociswrapperK8s(name)
|
||||
|
||||
def redis():
|
||||
return [
|
||||
@@ -3608,12 +3593,30 @@ 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 [
|
||||
{
|
||||
@@ -3669,6 +3672,13 @@ 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():
|
||||
@@ -3957,7 +3967,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 '9100-9399:30100-30399@loadbalancer' " +
|
||||
"-p '80:80@loadbalancer' -p '443:443@loadbalancer' -p '8025:32025@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
|
||||
@@ -3975,10 +3985,18 @@ def k3sCluster(name = OCIS_SERVER_NAME, ocm = False):
|
||||
if ocm:
|
||||
commands.extend([
|
||||
# wait for peer
|
||||
"until getent hosts %s >/dev/null 2>&1; do echo 'Waiting for %s...'; sleep 2; done" % (peer_name, peer_name),
|
||||
# create namespace
|
||||
"kubectl create namespace ocis || true",
|
||||
"bash %s/tests/config/k8s/expose-external-svc.sh -n ocis %s:443" % (dirs["base"], peer_name),
|
||||
"echo 'Waiting for %s to be available...'" % peer_name,
|
||||
"for i in {1..60}; do if getent hosts %s > /dev/null 2>&1; then break; fi; echo 'Waiting for %s... attempt '$i; sleep 2; done" % (peer_name, peer_name),
|
||||
# get the IP of peer
|
||||
"PEER_IP=$(getent hosts %s | awk '{ print $1 }')" % peer_name,
|
||||
"echo \"%s IP: $PEER_IP\"" % peer_name,
|
||||
# create namespace for ocis
|
||||
"kubectl create namespace ocis --dry-run=client -o yaml | kubectl apply -f -",
|
||||
# create service in the 'ocis' namespace
|
||||
"cat <<EOF | kubectl apply -f -\napiVersion: v1\nkind: Service\nmetadata:\n name: %s\n namespace: ocis\nspec:\n type: ClusterIP\n clusterIP: None\n ports:\n - port: 443\n protocol: TCP\n---\napiVersion: v1\nkind: Endpoints\nmetadata:\n name: %s\n namespace: ocis\nsubsets:\n- addresses:\n - ip: $PEER_IP\n ports:\n - port: 443\n protocol: TCP\nEOF" % (peer_name, peer_name),
|
||||
# verify
|
||||
"kubectl get svc %s -n ocis" % peer_name,
|
||||
"kubectl get endpoints %s -n ocis" % peer_name,
|
||||
])
|
||||
|
||||
commands.extend([
|
||||
@@ -4002,28 +4020,56 @@ def waitK3sCluster(name = OCIS_SERVER_NAME):
|
||||
"image": K3D_IMAGE,
|
||||
"user": "root",
|
||||
"commands": [
|
||||
"export KUBECONFIG=kubeconfig-$${DRONE_BUILD_NUMBER}-%s.yaml" % name,
|
||||
"export KUBECONFIG=kubeconfig-$${DRONE_BUILD_NUMBER}-" + OCIS_SERVER_NAME + ".yaml",
|
||||
"timeout 300 bash -c 'until test -f $${KUBECONFIG}; do sleep 1; done'",
|
||||
"kubectl config view",
|
||||
"kubectl get pods -A",
|
||||
],
|
||||
}]
|
||||
|
||||
def prepareChartsK8s(environment = []):
|
||||
def prepareOcisDeployment():
|
||||
commands = [
|
||||
# build ocis wrapper
|
||||
"make -C %s build" % dirs["ocisWrapper"],
|
||||
# get ocis charts
|
||||
"[ ! -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"]),
|
||||
"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",
|
||||
]
|
||||
|
||||
return [{
|
||||
"name": "prepare-ocis-deployment",
|
||||
"image": OC_CI_GOLANG,
|
||||
"environment": environment,
|
||||
"commands": commands,
|
||||
"volumes": [
|
||||
{
|
||||
@@ -4033,15 +4079,18 @@ def prepareChartsK8s(environment = []):
|
||||
],
|
||||
}]
|
||||
|
||||
def setupConfigMapsK8s(name = OCIS_SERVER_NAME):
|
||||
def setupOcisConfigMaps(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 [{
|
||||
@@ -4051,23 +4100,39 @@ def setupConfigMapsK8s(name = OCIS_SERVER_NAME):
|
||||
"commands": commands,
|
||||
}]
|
||||
|
||||
def deployOcisK8s(name = OCIS_SERVER_NAME):
|
||||
def deployOcis(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": [
|
||||
"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",
|
||||
"commands": commands,
|
||||
"volumes": [
|
||||
{
|
||||
"name": "gopath",
|
||||
"path": "/go",
|
||||
},
|
||||
],
|
||||
}]
|
||||
|
||||
def streamOcisLogsK8s(name = OCIS_SERVER_NAME):
|
||||
def streamK8sOcisLogs(name = OCIS_SERVER_NAME):
|
||||
return [{
|
||||
"name": "%s-logs" % name,
|
||||
"image": OC_CI_ALPINE,
|
||||
@@ -4078,6 +4143,62 @@ def streamOcisLogsK8s(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",
|
||||
@@ -4098,6 +4219,18 @@ 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):
|
||||
@@ -4122,10 +4255,15 @@ def exposeNodePortsK8s(services = [], name = OCIS_SERVER_NAME):
|
||||
}]
|
||||
|
||||
def exposeExternalServersK8s(servers = [], name = OCIS_SERVER_NAME):
|
||||
servers_arg = []
|
||||
commands = []
|
||||
for server in servers:
|
||||
servers_arg.append("%s:%s" % (server[0], str(server[1])))
|
||||
servers_arg = ",".join(servers_arg)
|
||||
server_name = server[0]
|
||||
server_port = str(server[1])
|
||||
commands.append("SERVER_IP=$(getent hosts %s | awk '{print $1}')" % server_name)
|
||||
commands.append('echo -e "apiVersion: v1\nkind: Endpoints\nmetadata:\n name: %s\n namespace: ocis\n' % server_name +
|
||||
'subsets:\n- addresses:\n - ip: $SERVER_IP\n ports:\n - port: %s" | kubectl apply -f -' % server_port)
|
||||
commands.append('echo -e "apiVersion: v1\nkind: Service\nmetadata:\n name: %s\n namespace: ocis\n' % server_name +
|
||||
'spec:\n ports:\n - port: %s\n targetPort: %s" | kubectl apply -f -' % (server_port, server_port))
|
||||
|
||||
return [{
|
||||
"name": "expose-external-servers",
|
||||
@@ -4133,6 +4271,5 @@ def exposeExternalServersK8s(servers = [], name = OCIS_SERVER_NAME):
|
||||
"commands": [
|
||||
"export KUBECONFIG=kubeconfig-$${DRONE_BUILD_NUMBER}-%s.yaml" % name,
|
||||
"until test -f $${KUBECONFIG}; do sleep 1s; done",
|
||||
"bash %s/tests/config/k8s/expose-external-svc.sh -n ocis %s" % (dirs["base"], servers_arg),
|
||||
],
|
||||
] + commands,
|
||||
}]
|
||||
@@ -64,4 +64,3 @@ go.work.sum
|
||||
.envrc
|
||||
CLAUDE.md
|
||||
.claude/
|
||||
.agents/
|
||||
@@ -1,67 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
# The following grep will filter out every line containing an `env` annotation.
|
||||
# It will ignore every line that already has a valid `introductionVersion` annotation.
|
||||
|
||||
RED=$(echo -e "\033[0;31m")
|
||||
GREEN=$(echo -e "\033[0;32m")
|
||||
NORM=$(echo -e "\033[0m")
|
||||
|
||||
# create a here doc function to be printed in case of introductionVersion annotation errors
|
||||
# note that tabs are used intentionally. they are removed by cat but are required to make the code readable.
|
||||
print_introduction_version_examples() {
|
||||
cat <<-EOL
|
||||
${GREEN}Valid examples:${NORM}
|
||||
|
||||
introductionVersion:"pre5.0"
|
||||
introductionVersion:"5.0"
|
||||
introductionVersion:"4.9.3-rc5"
|
||||
introductionVersion:"5.0.1-cheesecake"
|
||||
introductionVersion:"5.10.100.15"
|
||||
introductionVersion:"0.0"
|
||||
introductionVersion:"releaseX" # acceptable alphabetical version
|
||||
introductionVersion:"Addams" # another alphabetical example such as a release name
|
||||
|
||||
${RED}Invalid examples:${NORM}
|
||||
|
||||
introductionVersion:"5.0cheesecake"
|
||||
introductionVersion:"5"
|
||||
introductionVersion:"5blueberry"
|
||||
introductionVersion:"5-lasagna"
|
||||
introductionVersion:"4.9.3rc5"
|
||||
|
||||
See the dev docs for more details: https://owncloud.dev/services/general-info/envvars/envvar-naming-scopes/
|
||||
EOL
|
||||
}
|
||||
# The following grep will filter out every line containing an `env` annotation
|
||||
# it will ignore every line that already has a valid `introductionVersion` annotation
|
||||
#
|
||||
# valid examples:
|
||||
#
|
||||
# introductionVersion:"pre5.0"
|
||||
# introductionVersion:"5.0"
|
||||
# introductionVersion:"4.9.3-rc5"
|
||||
# introductionVersion:"5.0.1-cheesecake"
|
||||
# introductionVersion:"5.10.100.15"
|
||||
# introductionVersion:"0.0"
|
||||
# introductionVersion:"releaseX" # acceptable alphabetical version
|
||||
# introductionVersion:"Addams" # another alphabetical example
|
||||
#
|
||||
# invalid examples:
|
||||
#
|
||||
# introductionVersion:"5.0cheesecake"
|
||||
# introductionVersion:"5"
|
||||
# introductionVersion:"5blueberry"
|
||||
# introductionVersion:"5-lasagna"
|
||||
# introductionVersion:"4.9.3rc5"
|
||||
|
||||
ERROR=0
|
||||
|
||||
SEMVER_REGEX="([0-9]|[1-9][0-9]*)(\.([0-9]|[1-9][0-9]*)){1,2}(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?"
|
||||
ALPHA_REGEX="[A-Za-z]+[A-Za-z0-9-]*"
|
||||
|
||||
QI=$(git grep -n "env:" -- '*.go' |grep -v -P "introductionVersion:\"($SEMVER_REGEX|(pre5\\.0)|($ALPHA_REGEX))\""|grep -v "_test.go"|grep -v "vendor/")
|
||||
|
||||
# add a new line after each hit, eol identified via "´ which only appears at the end of each envvar string definition
|
||||
QUERY_INTRO=$(echo "${QI}" | sed "s#\"\`#\"\`\n#g")
|
||||
|
||||
QUERY_INTRO=$(git grep -n "env:" -- '*.go' |grep -v -P "introductionVersion:\"($SEMVER_REGEX|(pre5\\.0)|($ALPHA_REGEX))\""|grep -v "_test.go"|grep -v "vendor/")
|
||||
RESULTS_INTRO=$(echo "${QUERY_INTRO}"|wc -l)
|
||||
|
||||
echo "Checking introductionVersion annotations"
|
||||
|
||||
if [ "${QUERY_INTRO}" != "" ] && [ "${RESULTS_INTRO}" -gt 0 ]; then
|
||||
echo
|
||||
echo "==============================================================================================="
|
||||
echo ${RED}"The following ${RESULTS_INTRO} items contain invalid or missing introductionVersion annotation(s):"${NORM}
|
||||
echo "The following ${RESULTS_INTRO} items contain an invalid or missing introductionVersion annotation:"
|
||||
echo "==============================================================================================="
|
||||
echo
|
||||
echo "$QUERY_INTRO"
|
||||
echo
|
||||
print_introduction_version_examples
|
||||
echo
|
||||
ERROR=1
|
||||
else
|
||||
echo "All introductionVersion annotations are valid"
|
||||
echo
|
||||
fi
|
||||
|
||||
# The following grep will filter out every line containing an `env` annotation
|
||||
@@ -70,13 +45,9 @@ fi
|
||||
QUERY_DESC=$(git grep -n "env:" -- '*.go' |grep -v -P "desc:\".{10,}\""|grep -v "_test.go"|grep -v "vendor/")
|
||||
|
||||
RESULTS_DESC=$(echo "${QUERY_DESC}"|wc -l)
|
||||
|
||||
echo "Checking description annotations"
|
||||
|
||||
if [ "${QUERY_DESC}" != "" ] && [ "${RESULTS_DESC}" -gt 0 ]; then
|
||||
echo
|
||||
echo "==============================================================================================="
|
||||
echo ${RED}"The following ${RESULTS_DESC} items contain invalid or missing description annotation:"${NORM}
|
||||
echo "The following ${RESULTS_DESC} items contain an invalid or missing description annotation:"
|
||||
echo "==============================================================================================="
|
||||
echo "$QUERY_DESC"
|
||||
ERROR=1
|
||||
|
||||
-158
@@ -69,7 +69,6 @@ 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)
|
||||
@@ -77,37 +76,16 @@ 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
|
||||
@@ -185,16 +163,6 @@ 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,
|
||||
@@ -205,62 +173,6 @@ 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
|
||||
@@ -312,76 +224,6 @@ 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.
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
Bugfix: Don't index failed uploads
|
||||
|
||||
The search service was indexing uploads even when they failed. This caused
|
||||
unnecessary index operations for incomplete or errored file transfers. The fix
|
||||
skips indexing when the UploadReady event indicates the upload has failed.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12121
|
||||
@@ -4,4 +4,4 @@ bumped reva version
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12051
|
||||
https://github.com/owncloud/ocis/pull/12087
|
||||
https://github.com/owncloud/ocis/pull/12137
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
Enhancement: Add Keycloak to the ocis_full deployment example
|
||||
|
||||
Added Keycloak to the ocis_full deployment example.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12139
|
||||
@@ -1,13 +0,0 @@
|
||||
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
|
||||
@@ -1,11 +0,0 @@
|
||||
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
|
||||
@@ -1,24 +0,0 @@
|
||||
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
|
||||
@@ -1,5 +0,0 @@
|
||||
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
|
||||
@@ -1,10 +0,0 @@
|
||||
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
|
||||
@@ -1,10 +0,0 @@
|
||||
Enhancement: Log effective data and config paths at startup
|
||||
|
||||
oCIS now logs the effective data path and config path at startup so
|
||||
operators can immediately verify that data is written to the expected
|
||||
location. This helps catch misconfigured Docker volume mounts where
|
||||
data silently falls back to an ephemeral container path instead of
|
||||
the intended persistent mount.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12117
|
||||
https://github.com/owncloud/ocis/issues/12044
|
||||
@@ -1,26 +0,0 @@
|
||||
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
|
||||
@@ -1,11 +0,0 @@
|
||||
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
|
||||
@@ -1,11 +0,0 @@
|
||||
Bugfix: Always descend into directories during space reindexing
|
||||
|
||||
The search indexer's `IndexSpace` walk previously used `filepath.SkipDir`
|
||||
to skip entire directory subtrees when the directory itself was already
|
||||
indexed. After a failed or interrupted indexing run (e.g. Tika crash),
|
||||
this caused thousands of unindexed files to be permanently skipped
|
||||
because the parent directory's mtime had not changed. The indexer now
|
||||
always descends into directories, relying on the O(1) per-file DocID
|
||||
lookup to skip already-indexed files efficiently.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12119
|
||||
@@ -1,11 +0,0 @@
|
||||
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
|
||||
@@ -1,13 +0,0 @@
|
||||
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
|
||||
@@ -1,6 +0,0 @@
|
||||
Enhancement: Update images in the ocis_full deployment example
|
||||
|
||||
- Update the docker images for core services and web-extensions
|
||||
- Moving all default image definitions (latest) into the .env file for consistency
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12123
|
||||
@@ -12,7 +12,7 @@ INSECURE=true
|
||||
# Note: Traefik is always enabled and can't be disabled.
|
||||
# The recommended (and tested) version to pull. If no version is used, it pulls "latest"
|
||||
# release notes: https://github.com/traefik/traefik/releases
|
||||
TRAEFIK_DOCKER_TAG=v3.6.10
|
||||
TRAEFIK_DOCKER_TAG=v3.6.7
|
||||
# Serve Traefik dashboard.
|
||||
# Defaults to "false".
|
||||
TRAEFIK_DASHBOARD=
|
||||
@@ -45,7 +45,7 @@ OCIS=:ocis.yml
|
||||
OCIS_DOCKER_IMAGE=owncloud/ocis
|
||||
# The oCIS container version.
|
||||
# Defaults to "latest" and points to the latest stable tag.
|
||||
OCIS_DOCKER_TAG=latest
|
||||
OCIS_DOCKER_TAG=
|
||||
# Domain of oCIS, where you can find the frontend.
|
||||
# Defaults to "ocis.owncloud.test"
|
||||
OCIS_DOMAIN=
|
||||
@@ -94,9 +94,6 @@ S3NG_BUCKET=
|
||||
# For testing purposes, add local minio S3 storage to the docker-compose file.
|
||||
# The leading colon is required to enable the service.
|
||||
#S3NG_MINIO=:minio.yml
|
||||
# Set the desired docker image tag or digest.
|
||||
# Defaults to "latest"
|
||||
MINIO_DOCKER_TAG=latest
|
||||
# Minio domain. Defaults to "minio.owncloud.test".
|
||||
MINIO_DOMAIN=
|
||||
|
||||
@@ -167,26 +164,6 @@ COMPANION_ONEDRIVE_KEY=
|
||||
COMPANION_ONEDRIVE_SECRET=
|
||||
|
||||
|
||||
### Keycloak Settings ###
|
||||
# The recommended (and tested) version to pull. If no version is used, it pulls "latest"
|
||||
# release notes: https://github.com/keycloak/keycloak/releases
|
||||
KEYCLOAK_DOCKER_TAG=26.2.5
|
||||
# Domain of Keycloak, where you can find the management and authentication frontend. Defaults to "keycloak.owncloud.test"
|
||||
KEYCLOAK_DOMAIN=
|
||||
# Realm which to be used with oCIS. Defaults to "oCIS"
|
||||
KEYCLOAK_REALM=
|
||||
# Admin user login name. Defaults to "admin"
|
||||
KEYCLOAK_ADMIN_USER=
|
||||
# Admin user login password. Defaults to "admin"
|
||||
KEYCLOAK_ADMIN_PASSWORD=
|
||||
# Enable tracing in Keycloak. Traces will be sent to "http://jaeger:4317". Defaults to "false"
|
||||
KEYCLOAK_TRACING=
|
||||
|
||||
# Enable Keycloak manually if you want to use it
|
||||
# Note: the leading colon is required to enable the service.
|
||||
#KEYCLOAK=:keycloak.yml
|
||||
|
||||
|
||||
## Default Enabled Services ##
|
||||
|
||||
### Apache Tika Content Analysis Toolkit ###
|
||||
@@ -194,8 +171,8 @@ KEYCLOAK_TRACING=
|
||||
# Note: the leading colon is required to enable the service.
|
||||
TIKA=:tika.yml
|
||||
# Set the desired docker image tag or digest.
|
||||
# Defaults to "latest-full"
|
||||
TIKA_DOCKER_TAG=latest-full
|
||||
# Defaults to "latest"
|
||||
TIKA_IMAGE=
|
||||
|
||||
### IMPORTANT Note for Online Office Apps ###
|
||||
# To avoid app interlocking issues, you should select only one app to be active/configured.
|
||||
@@ -208,7 +185,7 @@ TIKA_DOCKER_TAG=latest-full
|
||||
COLLABORA=:collabora.yml
|
||||
# The recommended (and tested) version to pull. If no version is used, it pulls "latest"
|
||||
# release notes: https://www.collaboraonline.com/release-notes/
|
||||
COLLABORA_DOCKER_TAG=25.04.9.3.1
|
||||
COLLABORA_DOCKER_TAG=25.04.8.1.1
|
||||
# Domain of Collabora, where you can find the frontend.
|
||||
# Defaults to "collabora.owncloud.test"
|
||||
COLLABORA_DOMAIN=
|
||||
@@ -240,7 +217,7 @@ COLLABORA_SSL_VERIFICATION=false
|
||||
#CLAMAV=:clamav.yml
|
||||
# Image version of the ClamAV container.
|
||||
# Defaults to "latest"
|
||||
CLAMAV_DOCKER_TAG=latest
|
||||
CLAMAV_DOCKER_TAG=
|
||||
|
||||
|
||||
### OnlyOffice Settings ###
|
||||
@@ -253,7 +230,7 @@ CLAMAV_DOCKER_TAG=latest
|
||||
ONLYOFFICE_IMAGE=onlyoffice/documentserver
|
||||
# The recommended (and tested) version to pull. If no version is used, it pulls "latest"
|
||||
# release notes: https://github.com/ONLYOFFICE/DocumentServer/releases
|
||||
ONLYOFFICE_DOCKER_TAG=9.3.1.1
|
||||
ONLYOFFICE_DOCKER_TAG=9.2.1.1
|
||||
|
||||
# EE only: the path to your license file on the host.
|
||||
# To activate a license file, comment ONLYOFFICE_DEACTIVATE_LICENSE. Otherwise, it <must> stay uncommented.
|
||||
@@ -280,7 +257,7 @@ ONLYOFFICE_DOMAIN=
|
||||
MAIL_SERVER_DOMAIN=
|
||||
# The recommended (and tested) version to pull. If no version is used, it pulls "latest"
|
||||
# release notes: https://github.com/axllent/mailpit/releases
|
||||
MAIL_SERVER_DOCKER_TAG=v1.29.3
|
||||
MAIL_SERVER_DOCKER_TAG=v1.28.0
|
||||
|
||||
|
||||
### Debugging - Monitoring ###
|
||||
@@ -297,4 +274,4 @@ MAIL_SERVER_DOCKER_TAG=v1.29.3
|
||||
# This MUST be the last line as it assembles the supplemental compose files to be used.
|
||||
# ALL supplemental configs must be added here, whether commented or not.
|
||||
# Each var must either be empty or contain :path/file.yml
|
||||
COMPOSE_FILE=docker-compose.yml${OCIS:-}${TIKA:-}${S3NG:-}${S3NG_MINIO:-}${COLLABORA:-}${IMPORTER:-}${CLAMAV:-}${ONLYOFFICE:-}${EXTENSIONS:-}${UNZIP:-}${DRAWIO:-}${JSONVIEWER:-}${PROGRESSBARS:-}${EXTERNALSITES:-}${PHOTOADDON:-}${ADVANCEDSEARCH:-}${MAIL_SERVER:-}${MONITORING:-}${KEYCLOAK:-}
|
||||
COMPOSE_FILE=docker-compose.yml${OCIS:-}${TIKA:-}${S3NG:-}${S3NG_MINIO:-}${COLLABORA:-}${IMPORTER:-}${CLAMAV:-}${ONLYOFFICE:-}${EXTENSIONS:-}${UNZIP:-}${DRAWIO:-}${JSONVIEWER:-}${PROGRESSBARS:-}${EXTERNALSITES:-}${PHOTOADDON:-}${ADVANCEDSEARCH:-}${MAIL_SERVER:-}${MONITORING:-}
|
||||
@@ -15,11 +15,4 @@ This deployment example is documented in two locations for different audiences:
|
||||
Providing details which are more developer focused. This description can also be used when deviating from the default.\
|
||||
Note that this examples uses self signed certificates and is intended for testing purposes.
|
||||
|
||||
## Optional Services
|
||||
|
||||
### Keycloak
|
||||
|
||||
Keycloak can be optionally enabled by uncommenting the corresponding variables in the `.env` file:
|
||||
- `KEYCLOAK=:keycloak.yml`
|
||||
|
||||
Note that Keycloak requires the default `ocis` Identity Provider to be disabled, which is automatically handled when the `keycloak.yml` configuration is used.
|
||||
@@ -13,7 +13,7 @@ services:
|
||||
- "clamav-socket:/var/run/clamav"
|
||||
|
||||
clamav:
|
||||
image: clamav/clamav:${CLAMAV_DOCKER_TAG}
|
||||
image: clamav/clamav:${CLAMAV_DOCKER_TAG:-latest}
|
||||
# release notes: https://blog.clamav.net
|
||||
networks:
|
||||
ocis-net:
|
||||
|
||||
@@ -12,7 +12,7 @@ services:
|
||||
GRAPH_AVAILABLE_ROLES: "b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5,a8d5fe5e-96e3-418d-825b-534dbdf22b99,fb6c3e19-e378-47e5-b277-9732f9de6e21,58c63c02-1d89-4572-916a-870abc5a1b7d,2d00ce52-1fc2-4dbc-8b95-a73b73395f5a,1c996275-f1c9-4e71-abdf-a42f6495e960,312c0871-5ef7-4b3a-85b6-0e4074c64049,aa97fe03-7980-45ac-9e50-b325749fd7e6"
|
||||
|
||||
collaboration:
|
||||
image: ${OCIS_DOCKER_IMAGE:-owncloud/ocis}:${OCIS_DOCKER_TAG}
|
||||
image: ${OCIS_DOCKER_IMAGE:-owncloud/ocis}:${OCIS_DOCKER_TAG:-latest}
|
||||
networks:
|
||||
ocis-net:
|
||||
depends_on:
|
||||
@@ -49,7 +49,7 @@ services:
|
||||
restart: always
|
||||
|
||||
collabora:
|
||||
image: collabora/code:${COLLABORA_DOCKER_TAG}
|
||||
image: collabora/code:${COLLABORA_DOCKER_TAG:-latest}
|
||||
networks:
|
||||
ocis-net:
|
||||
environment:
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
{
|
||||
"clientId": "e4rAsNUSIUs0lF4nbv9FmCeUkTlV9GdgTLDH1b5uie7syb90SzEVrbN7HIpmWJeD",
|
||||
"name": "ownCloud Android app",
|
||||
"surrogateAuthRequired": false,
|
||||
"enabled": true,
|
||||
"alwaysDisplayInConsole": false,
|
||||
"clientAuthenticatorType": "client-secret",
|
||||
"secret": "dInFYGV33xKzhbRmpqQltYNdfLdJIfJ9L5ISoKhNoT9qZftpdWSP71VrpGR9pmoD",
|
||||
"redirectUris": [
|
||||
"oc://android.owncloud.com"
|
||||
],
|
||||
"webOrigins": [],
|
||||
"notBefore": 0,
|
||||
"bearerOnly": false,
|
||||
"consentRequired": false,
|
||||
"standardFlowEnabled": true,
|
||||
"implicitFlowEnabled": false,
|
||||
"directAccessGrantsEnabled": true,
|
||||
"serviceAccountsEnabled": false,
|
||||
"publicClient": false,
|
||||
"frontchannelLogout": false,
|
||||
"protocol": "openid-connect",
|
||||
"attributes": {
|
||||
"saml.assertion.signature": "false",
|
||||
"saml.force.post.binding": "false",
|
||||
"saml.multivalued.roles": "false",
|
||||
"saml.encrypt": "false",
|
||||
"post.logout.redirect.uris": "+",
|
||||
"backchannel.logout.revoke.offline.tokens": "false",
|
||||
"saml.server.signature": "false",
|
||||
"saml.server.signature.keyinfo.ext": "false",
|
||||
"exclude.session.state.from.auth.response": "false",
|
||||
"backchannel.logout.session.required": "true",
|
||||
"client_credentials.use_refresh_token": "false",
|
||||
"saml_force_name_id_format": "false",
|
||||
"saml.client.signature": "false",
|
||||
"tls.client.certificate.bound.access.tokens": "false",
|
||||
"saml.authnstatement": "false",
|
||||
"display.on.consent.screen": "false",
|
||||
"saml.onetimeuse.condition": "false"
|
||||
},
|
||||
"authenticationFlowBindingOverrides": {},
|
||||
"fullScopeAllowed": true,
|
||||
"nodeReRegistrationTimeout": -1,
|
||||
"defaultClientScopes": [
|
||||
"web-origins",
|
||||
"profile",
|
||||
"roles",
|
||||
"groups",
|
||||
"basic",
|
||||
"email"
|
||||
],
|
||||
"optionalClientScopes": [
|
||||
"address",
|
||||
"phone",
|
||||
"offline_access",
|
||||
"microprofile-jwt"
|
||||
],
|
||||
"access": {
|
||||
"view": true,
|
||||
"configure": true,
|
||||
"manage": true
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
{
|
||||
"clientId": "3keLfua0olYvW1zKXTDB3OjAMPEYWEQNuiscli395GKJOiPnPURNQWGvGCJZf4Hw",
|
||||
"name": "Cyberduck",
|
||||
"description": "",
|
||||
"surrogateAuthRequired": false,
|
||||
"enabled": true,
|
||||
"alwaysDisplayInConsole": false,
|
||||
"clientAuthenticatorType": "client-secret",
|
||||
"secret": "yoqICbLIeYbpZPqDH4D8k4NKb04HqnrWBntEeVZEQ5gO1RmaUlln0Aqu1dj2UoF4",
|
||||
"redirectUris": [
|
||||
"x-cyberduck-action:oauth",
|
||||
"x-mountainduck-action:oauth"
|
||||
],
|
||||
"webOrigins": [],
|
||||
"notBefore": 0,
|
||||
"bearerOnly": false,
|
||||
"consentRequired": false,
|
||||
"standardFlowEnabled": true,
|
||||
"implicitFlowEnabled": false,
|
||||
"directAccessGrantsEnabled": true,
|
||||
"serviceAccountsEnabled": false,
|
||||
"publicClient": false,
|
||||
"frontchannelLogout": false,
|
||||
"protocol": "openid-connect",
|
||||
"attributes": {
|
||||
"saml.assertion.signature": "false",
|
||||
"saml.force.post.binding": "false",
|
||||
"saml.multivalued.roles": "false",
|
||||
"saml.encrypt": "false",
|
||||
"oauth2.device.authorization.grant.enabled": "false",
|
||||
"backchannel.logout.revoke.offline.tokens": "false",
|
||||
"saml.server.signature": "false",
|
||||
"saml.server.signature.keyinfo.ext": "false",
|
||||
"exclude.session.state.from.auth.response": "false",
|
||||
"oidc.ciba.grant.enabled": "false",
|
||||
"backchannel.logout.session.required": "true",
|
||||
"client_credentials.use_refresh_token": "false",
|
||||
"saml_force_name_id_format": "false",
|
||||
"saml.client.signature": "false",
|
||||
"tls.client.certificate.bound.access.tokens": "false",
|
||||
"saml.authnstatement": "false",
|
||||
"display.on.consent.screen": "false",
|
||||
"saml.onetimeuse.condition": "false"
|
||||
},
|
||||
"authenticationFlowBindingOverrides": {},
|
||||
"fullScopeAllowed": true,
|
||||
"nodeReRegistrationTimeout": -1,
|
||||
"defaultClientScopes": [
|
||||
"web-origins",
|
||||
"profile",
|
||||
"roles",
|
||||
"groups",
|
||||
"basic",
|
||||
"email"
|
||||
],
|
||||
"optionalClientScopes": [
|
||||
"address",
|
||||
"phone",
|
||||
"offline_access",
|
||||
"microprofile-jwt"
|
||||
],
|
||||
"access": {
|
||||
"view": true,
|
||||
"configure": true,
|
||||
"manage": true
|
||||
}
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
{
|
||||
"clientId": "xdXOt13JKxym1B1QcEncf2XDkLAexMBFwiT9j6EfhhHFJhs2KM9jbjTmf8JBXE69",
|
||||
"name": "ownCloud Desktop Client",
|
||||
"surrogateAuthRequired": false,
|
||||
"enabled": true,
|
||||
"alwaysDisplayInConsole": false,
|
||||
"clientAuthenticatorType": "client-secret",
|
||||
"secret": "UBntmLjC2yYCeHwsyj73Uwo9TAaecAetRwMw0xYcvNL9yRdLSUi0hUAHfvCHFeFh",
|
||||
"redirectUris": [
|
||||
"http://127.0.0.1:*",
|
||||
"http://localhost:*"
|
||||
],
|
||||
"webOrigins": [],
|
||||
"notBefore": 0,
|
||||
"bearerOnly": false,
|
||||
"consentRequired": false,
|
||||
"standardFlowEnabled": true,
|
||||
"implicitFlowEnabled": false,
|
||||
"directAccessGrantsEnabled": true,
|
||||
"serviceAccountsEnabled": false,
|
||||
"publicClient": false,
|
||||
"frontchannelLogout": false,
|
||||
"protocol": "openid-connect",
|
||||
"attributes": {
|
||||
"saml.assertion.signature": "false",
|
||||
"saml.force.post.binding": "false",
|
||||
"saml.multivalued.roles": "false",
|
||||
"saml.encrypt": "false",
|
||||
"post.logout.redirect.uris": "+",
|
||||
"backchannel.logout.revoke.offline.tokens": "false",
|
||||
"saml.server.signature": "false",
|
||||
"saml.server.signature.keyinfo.ext": "false",
|
||||
"exclude.session.state.from.auth.response": "false",
|
||||
"backchannel.logout.session.required": "true",
|
||||
"client_credentials.use_refresh_token": "false",
|
||||
"saml_force_name_id_format": "false",
|
||||
"saml.client.signature": "false",
|
||||
"tls.client.certificate.bound.access.tokens": "false",
|
||||
"saml.authnstatement": "false",
|
||||
"display.on.consent.screen": "false",
|
||||
"saml.onetimeuse.condition": "false"
|
||||
},
|
||||
"authenticationFlowBindingOverrides": {},
|
||||
"fullScopeAllowed": true,
|
||||
"nodeReRegistrationTimeout": -1,
|
||||
"defaultClientScopes": [
|
||||
"web-origins",
|
||||
"profile",
|
||||
"roles",
|
||||
"groups",
|
||||
"basic",
|
||||
"email"
|
||||
],
|
||||
"optionalClientScopes": [
|
||||
"address",
|
||||
"phone",
|
||||
"offline_access",
|
||||
"microprofile-jwt"
|
||||
],
|
||||
"access": {
|
||||
"view": true,
|
||||
"configure": true,
|
||||
"manage": true
|
||||
}
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
{
|
||||
"clientId": "mxd5OQDk6es5LzOzRvidJNfXLUZS2oN3oUFeXPP8LpPrhx3UroJFduGEYIBOxkY1",
|
||||
"name": "ownCloud iOS app",
|
||||
"surrogateAuthRequired": false,
|
||||
"enabled": true,
|
||||
"alwaysDisplayInConsole": false,
|
||||
"clientAuthenticatorType": "client-secret",
|
||||
"secret": "KFeFWWEZO9TkisIQzR3fo7hfiMXlOpaqP8CFuTbSHzV1TUuGECglPxpiVKJfOXIx",
|
||||
"redirectUris": [
|
||||
"oc://ios.owncloud.com"
|
||||
],
|
||||
"webOrigins": [],
|
||||
"notBefore": 0,
|
||||
"bearerOnly": false,
|
||||
"consentRequired": false,
|
||||
"standardFlowEnabled": true,
|
||||
"implicitFlowEnabled": false,
|
||||
"directAccessGrantsEnabled": true,
|
||||
"serviceAccountsEnabled": false,
|
||||
"publicClient": false,
|
||||
"frontchannelLogout": false,
|
||||
"protocol": "openid-connect",
|
||||
"attributes": {
|
||||
"saml.assertion.signature": "false",
|
||||
"saml.force.post.binding": "false",
|
||||
"saml.multivalued.roles": "false",
|
||||
"saml.encrypt": "false",
|
||||
"post.logout.redirect.uris": "+",
|
||||
"backchannel.logout.revoke.offline.tokens": "false",
|
||||
"saml.server.signature": "false",
|
||||
"saml.server.signature.keyinfo.ext": "false",
|
||||
"exclude.session.state.from.auth.response": "false",
|
||||
"backchannel.logout.session.required": "true",
|
||||
"client_credentials.use_refresh_token": "false",
|
||||
"saml_force_name_id_format": "false",
|
||||
"saml.client.signature": "false",
|
||||
"tls.client.certificate.bound.access.tokens": "false",
|
||||
"saml.authnstatement": "false",
|
||||
"display.on.consent.screen": "false",
|
||||
"saml.onetimeuse.condition": "false"
|
||||
},
|
||||
"authenticationFlowBindingOverrides": {},
|
||||
"fullScopeAllowed": true,
|
||||
"nodeReRegistrationTimeout": -1,
|
||||
"defaultClientScopes": [
|
||||
"web-origins",
|
||||
"profile",
|
||||
"roles",
|
||||
"groups",
|
||||
"basic",
|
||||
"email"
|
||||
],
|
||||
"optionalClientScopes": [
|
||||
"address",
|
||||
"phone",
|
||||
"offline_access",
|
||||
"microprofile-jwt"
|
||||
],
|
||||
"access": {
|
||||
"view": true,
|
||||
"configure": true,
|
||||
"manage": true
|
||||
}
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
{
|
||||
"clientId": "web",
|
||||
"name": "",
|
||||
"description": "",
|
||||
"rootUrl": "https://ocis.owncloud.test",
|
||||
"adminUrl": "https://ocis.owncloud.test",
|
||||
"baseUrl": "",
|
||||
"surrogateAuthRequired": false,
|
||||
"enabled": true,
|
||||
"alwaysDisplayInConsole": false,
|
||||
"clientAuthenticatorType": "client-secret",
|
||||
"redirectUris": [
|
||||
"https://ocis.owncloud.test/*"
|
||||
],
|
||||
"webOrigins": [
|
||||
"https://ocis.owncloud.test"
|
||||
],
|
||||
"notBefore": 0,
|
||||
"bearerOnly": false,
|
||||
"consentRequired": false,
|
||||
"standardFlowEnabled": true,
|
||||
"implicitFlowEnabled": false,
|
||||
"directAccessGrantsEnabled": true,
|
||||
"serviceAccountsEnabled": false,
|
||||
"publicClient": true,
|
||||
"frontchannelLogout": false,
|
||||
"protocol": "openid-connect",
|
||||
"attributes": {
|
||||
"saml.assertion.signature": "false",
|
||||
"saml.force.post.binding": "false",
|
||||
"saml.multivalued.roles": "false",
|
||||
"saml.encrypt": "false",
|
||||
"post.logout.redirect.uris": "+",
|
||||
"oauth2.device.authorization.grant.enabled": "false",
|
||||
"backchannel.logout.revoke.offline.tokens": "false",
|
||||
"saml.server.signature": "false",
|
||||
"saml.server.signature.keyinfo.ext": "false",
|
||||
"exclude.session.state.from.auth.response": "false",
|
||||
"oidc.ciba.grant.enabled": "false",
|
||||
"backchannel.logout.url": "https://ocis.owncloud.test/backchannel_logout",
|
||||
"backchannel.logout.session.required": "true",
|
||||
"client_credentials.use_refresh_token": "false",
|
||||
"saml_force_name_id_format": "false",
|
||||
"saml.client.signature": "false",
|
||||
"tls.client.certificate.bound.access.tokens": "false",
|
||||
"saml.authnstatement": "false",
|
||||
"display.on.consent.screen": "false",
|
||||
"saml.onetimeuse.condition": "false"
|
||||
},
|
||||
"authenticationFlowBindingOverrides": {},
|
||||
"fullScopeAllowed": true,
|
||||
"nodeReRegistrationTimeout": -1,
|
||||
"defaultClientScopes": [
|
||||
"web-origins",
|
||||
"profile",
|
||||
"roles",
|
||||
"groups",
|
||||
"basic",
|
||||
"email"
|
||||
],
|
||||
"optionalClientScopes": [
|
||||
"address",
|
||||
"phone",
|
||||
"offline_access",
|
||||
"microprofile-jwt"
|
||||
],
|
||||
"access": {
|
||||
"view": true,
|
||||
"configure": true,
|
||||
"manage": true
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
printenv
|
||||
# replace oCIS domain in keycloak realm import
|
||||
mkdir /opt/keycloak/data/import
|
||||
sed -e "s/ocis.owncloud.test/${OCIS_DOMAIN}/g" /opt/keycloak/data/import-dist/ocis-realm.json > /opt/keycloak/data/import/oCIS-realm.json
|
||||
|
||||
# run original docker-entrypoint
|
||||
/opt/keycloak/bin/kc.sh "$@"
|
||||
File diff suppressed because it is too large.
Load diff
@@ -7,15 +7,12 @@ 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}
|
||||
image: traefik:${TRAEFIK_DOCKER_TAG:-latest}
|
||||
networks:
|
||||
ocis-net:
|
||||
command:
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
---
|
||||
services:
|
||||
traefik:
|
||||
networks:
|
||||
ocis-net:
|
||||
aliases:
|
||||
- ${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}
|
||||
|
||||
ocis:
|
||||
environment:
|
||||
# Keycloak IDP specific configuration
|
||||
PROXY_AUTOPROVISION_ACCOUNTS: "true"
|
||||
PROXY_ROLE_ASSIGNMENT_DRIVER: "oidc"
|
||||
OCIS_OIDC_ISSUER: https://${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}/realms/${KEYCLOAK_REALM:-oCIS}
|
||||
PROXY_OIDC_REWRITE_WELLKNOWN: "true"
|
||||
WEB_OIDC_CLIENT_ID: ${OCIS_OIDC_CLIENT_ID:-web}
|
||||
PROXY_USER_OIDC_CLAIM: "preferred_username"
|
||||
PROXY_USER_CS3_CLAIM: "username"
|
||||
OCIS_EXCLUDE_RUN_SERVICES: "idp"
|
||||
GRAPH_ASSIGN_DEFAULT_USER_ROLE: "false"
|
||||
GRAPH_USERNAME_MATCH: "none"
|
||||
KEYCLOAK_DOMAIN: ${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}
|
||||
WEB_OIDC_SCOPE: "openid profile email acr"
|
||||
|
||||
postgres:
|
||||
image: postgres:alpine
|
||||
networks:
|
||||
ocis-net:
|
||||
volumes:
|
||||
- keycloak_postgres_data:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_DB: keycloak
|
||||
POSTGRES_USER: keycloak
|
||||
POSTGRES_PASSWORD: keycloak
|
||||
logging:
|
||||
driver: ${LOG_DRIVER:-local}
|
||||
restart: always
|
||||
|
||||
keycloak:
|
||||
image: quay.io/keycloak/keycloak:${KEYCLOAK_DOCKER_TAG}
|
||||
networks:
|
||||
ocis-net:
|
||||
command: ["start", "--spi-connections-http-client-default-disable-trust-manager=${INSECURE:-false}", "--import-realm"]
|
||||
entrypoint: ["/bin/sh", "/opt/keycloak/bin/docker-entrypoint-override.sh"]
|
||||
volumes:
|
||||
- "./config/keycloak/docker-entrypoint-override.sh:/opt/keycloak/bin/docker-entrypoint-override.sh"
|
||||
- "./config/keycloak/ocis-realm.dist.json:/opt/keycloak/data/import-dist/ocis-realm.json"
|
||||
environment:
|
||||
OCIS_DOMAIN: ${OCIS_DOMAIN:-ocis.owncloud.test}
|
||||
KC_HOSTNAME: ${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}
|
||||
KC_DB: postgres
|
||||
KC_DB_URL: "jdbc:postgresql://postgres:5432/keycloak"
|
||||
KC_DB_USERNAME: keycloak
|
||||
KC_DB_PASSWORD: keycloak
|
||||
KC_FEATURES: impersonation,opentelemetry
|
||||
KC_BOOTSTRAP_ADMIN_USERNAME: ${KEYCLOAK_ADMIN_USER:-admin}
|
||||
KC_BOOTSTRAP_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD:-admin}
|
||||
# as replacement of --proxy=edge
|
||||
KC_PROXY_HEADERS: xforwarded
|
||||
KC_HTTP_ENABLED: true
|
||||
# tracing
|
||||
KC_TRACING_ENABLED: ${KEYCLOAK_TRACING:-false}
|
||||
KC_TRACING_ENDPOINT: http://jaeger:4317
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.keycloak.entrypoints=https"
|
||||
- "traefik.http.routers.keycloak.rule=Host(`${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}`)"
|
||||
- "traefik.http.routers.keycloak.tls.certresolver=http"
|
||||
- "traefik.http.routers.keycloak.service=keycloak"
|
||||
- "traefik.http.services.keycloak.loadbalancer.server.port=8080"
|
||||
depends_on:
|
||||
- postgres
|
||||
logging:
|
||||
driver: ${LOG_DRIVER:-local}
|
||||
restart: always
|
||||
|
||||
volumes:
|
||||
keycloak_postgres_data:
|
||||
@@ -8,7 +8,7 @@ services:
|
||||
NOTIFICATIONS_SMTP_INSECURE: "true"
|
||||
|
||||
mailserver:
|
||||
image: axllent/mailpit:${MAIL_SERVER_DOCKER_TAG}
|
||||
image: axllent/mailpit:${MAIL_SERVER_DOCKER_TAG:-latest}
|
||||
networks:
|
||||
- ocis-net
|
||||
ports:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
services:
|
||||
minio:
|
||||
image: minio/minio:${MINIO_DOCKER_TAG}
|
||||
image: minio/minio:latest
|
||||
# release notes: https://github.com/minio/minio/releases
|
||||
networks:
|
||||
ocis-net:
|
||||
|
||||
@@ -6,7 +6,7 @@ services:
|
||||
aliases:
|
||||
- ${OCIS_DOMAIN:-ocis.owncloud.test}
|
||||
ocis:
|
||||
image: ${OCIS_DOCKER_IMAGE:-owncloud/ocis}:${OCIS_DOCKER_TAG}
|
||||
image: ${OCIS_DOCKER_IMAGE:-owncloud/ocis}:${OCIS_DOCKER_TAG:-latest}
|
||||
# changelog: https://github.com/owncloud/ocis/tree/master/changelog
|
||||
# release notes: https://doc.owncloud.com/ocis_release_notes.html
|
||||
networks:
|
||||
|
||||
@@ -7,7 +7,7 @@ services:
|
||||
- ${ONLYOFFICE_DOMAIN:-onlyoffice.owncloud.test}
|
||||
|
||||
collaboration-oo:
|
||||
image: ${OCIS_DOCKER_IMAGE:-owncloud/ocis}:${OCIS_DOCKER_TAG}
|
||||
image: ${OCIS_DOCKER_IMAGE:-owncloud/ocis}:${OCIS_DOCKER_TAG:-latest}
|
||||
networks:
|
||||
ocis-net:
|
||||
depends_on:
|
||||
@@ -45,7 +45,7 @@ services:
|
||||
|
||||
onlyoffice:
|
||||
# note, you also need to add a volume when using the enterprise version, see below
|
||||
image: ${ONLYOFFICE_IMAGE:-onlyoffice/documentserver}:${ONLYOFFICE_DOCKER_TAG}
|
||||
image: ${ONLYOFFICE_IMAGE:-onlyoffice/documentserver}:${ONLYOFFICE_DOCKER_TAG:-latest}
|
||||
networks:
|
||||
ocis-net:
|
||||
entrypoint:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
services:
|
||||
tika:
|
||||
image: apache/tika:${TIKA_DOCKER_TAG}
|
||||
image: ${TIKA_IMAGE:-apache/tika:latest-full}
|
||||
# release notes: https://tika.apache.org
|
||||
networks:
|
||||
ocis-net:
|
||||
|
||||
@@ -6,7 +6,7 @@ services:
|
||||
condition: service_completed_successfully
|
||||
|
||||
advanced-search-init:
|
||||
image: owncloud/web-extensions:advanced-search-0.2.0
|
||||
image: owncloud/web-extensions:advanced-search-0.1.0
|
||||
user: root
|
||||
volumes:
|
||||
- ocis-apps:/apps
|
||||
|
||||
@@ -6,7 +6,7 @@ services:
|
||||
condition: service_completed_successfully
|
||||
|
||||
photo-addon-init:
|
||||
image: owncloud/web-extensions:photo-addon-0.2.0
|
||||
image: owncloud/web-extensions:photo-addon-0.1.0
|
||||
user: root
|
||||
volumes:
|
||||
- ocis-apps:/apps
|
||||
|
||||
@@ -11,7 +11,6 @@ directives:
|
||||
- '''none'''
|
||||
font-src:
|
||||
- '''self'''
|
||||
- 'data:'
|
||||
frame-ancestors:
|
||||
- '''none'''
|
||||
frame-src:
|
||||
|
||||
@@ -18,4 +18,16 @@ Demo User have different roles on different instances
|
||||
|
||||
Users can be invited to instances they are not member of by using their exact email address in space membership or share dialog.
|
||||
|
||||
## Master-ID Configuration
|
||||
|
||||
**Configuration:**
|
||||
- **Master-ID Value**: `11111111-1111-1111-1111-111111111111`
|
||||
- **Environment Variable**: `OCIS_MULTI_INSTANCE_MASTER_ID`
|
||||
- **User**: admin (configured in config/ldap/ldif/20_users.ldif)
|
||||
- **Purpose**: Users with this ID in their `owncloudMemberOf` or `owncloudGuestOf` claims can login to any instance
|
||||
|
||||
Users with the master-id are granted member access to all instances without maintaining instance-specific IDs. The feature is optional and disabled when `OCIS_MULTI_INSTANCE_MASTER_ID` is empty.
|
||||
|
||||
**Security Note:** Master-id grants member status only (not admin privileges). Regular users require specific instance IDs for access control.
|
||||
|
||||
|
||||
@@ -126,7 +126,6 @@ uidNumber: 20004
|
||||
gidNumber: 30000
|
||||
homeDirectory: /home/admin
|
||||
ownCloudUUID: ddc2004c-0977-11eb-9d3f-a793888cd0f8
|
||||
owncloudMemberOf: ec730a6c-1b63-4b45-b83b-9e2311afdf85
|
||||
owncloudMemberOf: 8d24cb5f-6ee6-4b98-86df-c4c268dddb46
|
||||
owncloudMemberOf: 11111111-1111-1111-1111-111111111111
|
||||
ownCloudRole: ocisAdmin
|
||||
userPassword:: e1NTSEF9UWhmaFB3dERydTUydURoWFFObDRMbzVIckI3TkI5Nmo=
|
||||
@@ -41,6 +41,11 @@ olcAttributeTypes: ( ownCloudOid:1.1.9 NAME 'ownCloudRole'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
|
||||
olcAttributeTypes: ( ownCloudOid:1.1.10 NAME 'owncloudExternalID'
|
||||
DESC 'External ID for the user'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
|
||||
olcObjectClasses: ( ownCloudOid:1.2.1 NAME 'ownCloud'
|
||||
DESC 'ownCloud LDAP Schema'
|
||||
AUXILIARY
|
||||
@@ -49,7 +54,7 @@ olcObjectClasses: ( ownCloudOid:1.2.2 NAME 'ownCloudUser'
|
||||
DESC 'ownCloud User LDAP Schema'
|
||||
SUP ownCloud
|
||||
AUXILIARY
|
||||
MAY ( ocExternalIdentity $ ownCloudUserEnabled $ ownCloudUserType $ ocLastSignInTimestamp $ ownCloudMemberOf $ ownCloudGuestOf $ ownCloudRole) )
|
||||
MAY ( ocExternalIdentity $ ownCloudUserEnabled $ ownCloudUserType $ ocLastSignInTimestamp $ ownCloudMemberOf $ ownCloudGuestOf $ ownCloudRole $ owncloudExternalID) )
|
||||
olcObjectClasses: ( ownCloudOid:1.2.3 NAME 'ownCloudGroup'
|
||||
DESC 'ownCloud Group LDAP Schema'
|
||||
SUP groupOfNames
|
||||
|
||||
@@ -10,7 +10,6 @@ directives:
|
||||
- '''none'''
|
||||
font-src:
|
||||
- '''self'''
|
||||
- 'data:'
|
||||
frame-ancestors:
|
||||
- '''self'''
|
||||
frame-src:
|
||||
|
||||
@@ -11,7 +11,6 @@ directives:
|
||||
- '''none'''
|
||||
font-src:
|
||||
- '''self'''
|
||||
- 'data:'
|
||||
frame-ancestors:
|
||||
- '''none'''
|
||||
frame-src:
|
||||
|
||||
@@ -105,7 +105,8 @@ services:
|
||||
# Multi-Instance Configuration
|
||||
OCIS_MULTI_INSTANCE_ENABLED: true
|
||||
OCIS_MULTI_INSTANCE_INSTANCEID: "ec730a6c-1b63-4b45-b83b-9e2311afdf85"
|
||||
OCIS_LDAP_USER_FILTER: "(&(objectclass=owncloud)(|(ownCloudMemberOf=ec730a6c-1b63-4b45-b83b-9e2311afdf85)(ownCloudGuestOf=ec730a6c-1b63-4b45-b83b-9e2311afdf85)))"
|
||||
OCIS_MULTI_INSTANCE_MASTER_ID: "11111111-1111-1111-1111-111111111111"
|
||||
OCIS_LDAP_USER_FILTER: "(&(objectclass=owncloud)(|(ownCloudMemberOf=ec730a6c-1b63-4b45-b83b-9e2311afdf85)(ownCloudGuestOf=ec730a6c-1b63-4b45-b83b-9e2311afdf85)(ownCloudMemberOf=11111111-1111-1111-1111-111111111111)))"
|
||||
OCIS_LDAP_GROUP_FILTER: "(&(objectclass=owncloud)(ownCloudMemberOf=ec730a6c-1b63-4b45-b83b-9e2311afdf85))"
|
||||
OCIS_LDAP_USER_MEMBER_ATTRIBUTE: "owncloudMemberOf"
|
||||
OCIS_LDAP_USER_GUEST_ATTRIBUTE: "ownCloudGuestOf"
|
||||
@@ -206,7 +207,8 @@ services:
|
||||
# Multi-Instance
|
||||
OCIS_MULTI_INSTANCE_ENABLED: true
|
||||
OCIS_MULTI_INSTANCE_INSTANCEID: "8d24cb5f-6ee6-4b98-86df-c4c268dddb46"
|
||||
OCIS_LDAP_USER_FILTER: "(&(objectclass=owncloud)(|(ownCloudMemberOf=8d24cb5f-6ee6-4b98-86df-c4c268dddb46)(ownCloudGuestOf=8d24cb5f-6ee6-4b98-86df-c4c268dddb46)))"
|
||||
OCIS_MULTI_INSTANCE_MASTER_ID: "11111111-1111-1111-1111-111111111111"
|
||||
OCIS_LDAP_USER_FILTER: "(&(objectclass=owncloud)(|(ownCloudMemberOf=8d24cb5f-6ee6-4b98-86df-c4c268dddb46)(ownCloudGuestOf=8d24cb5f-6ee6-4b98-86df-c4c268dddb46)(ownCloudMemberOf=11111111-1111-1111-1111-111111111111)))"
|
||||
OCIS_LDAP_GROUP_FILTER: "(&(objectclass=owncloud)(ownCloudMemberOf=8d24cb5f-6ee6-4b98-86df-c4c268dddb46))"
|
||||
OCIS_LDAP_USER_MEMBER_ATTRIBUTE: "owncloudMemberOf"
|
||||
OCIS_LDAP_USER_GUEST_ATTRIBUTE: "ownCloudGuestOf"
|
||||
|
||||
@@ -9,7 +9,6 @@ directives:
|
||||
- '''none'''
|
||||
font-src:
|
||||
- '''self'''
|
||||
- 'data:'
|
||||
frame-ancestors:
|
||||
- '''self'''
|
||||
frame-src:
|
||||
|
||||
@@ -9,7 +9,6 @@ directives:
|
||||
- '''none'''
|
||||
font-src:
|
||||
- '''self'''
|
||||
- 'data:'
|
||||
frame-ancestors:
|
||||
- '''self'''
|
||||
frame-src:
|
||||
|
||||
@@ -9,7 +9,6 @@ directives:
|
||||
- '''none'''
|
||||
font-src:
|
||||
- '''self'''
|
||||
- 'data:'
|
||||
frame-ancestors:
|
||||
- '''self'''
|
||||
frame-src:
|
||||
|
||||
+128
-126
@@ -7912,7 +7912,7 @@ OCIS_ASYNC_UPLOADS:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_CACHE_AUTH_PASSWORD:
|
||||
name: OCIS_CACHE_AUTH_PASSWORD;GRAPH_CACHE_AUTH_PASSWORD
|
||||
name: OCIS_CACHE_AUTH_PASSWORD;SETTINGS_CACHE_AUTH_PASSWORD
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: The password to authenticate with the cache. Only applies when store
|
||||
@@ -7922,7 +7922,7 @@ OCIS_CACHE_AUTH_PASSWORD:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_CACHE_AUTH_USERNAME:
|
||||
name: OCIS_CACHE_AUTH_USERNAME;GRAPH_CACHE_AUTH_USERNAME
|
||||
name: OCIS_CACHE_AUTH_USERNAME;SETTINGS_CACHE_AUTH_USERNAME
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: The username to authenticate with the cache. Only applies when store
|
||||
@@ -7933,7 +7933,7 @@ OCIS_CACHE_AUTH_USERNAME:
|
||||
deprecationInfo: ""
|
||||
OCIS_CACHE_DATABASE:
|
||||
name: OCIS_CACHE_DATABASE
|
||||
defaultValue: cache-userinfo
|
||||
defaultValue: settings-cache
|
||||
type: string
|
||||
description: The database name the configured store should use.
|
||||
introductionVersion: pre5.0
|
||||
@@ -7941,7 +7941,7 @@ OCIS_CACHE_DATABASE:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_CACHE_DISABLE_PERSISTENCE:
|
||||
name: OCIS_CACHE_DISABLE_PERSISTENCE;GRAPH_CACHE_DISABLE_PERSISTENCE
|
||||
name: OCIS_CACHE_DISABLE_PERSISTENCE;SETTINGS_CACHE_DISABLE_PERSISTENCE
|
||||
defaultValue: "false"
|
||||
type: bool
|
||||
description: Disables persistence of the cache. Only applies when store type 'nats-js-kv'
|
||||
@@ -7951,7 +7951,7 @@ OCIS_CACHE_DISABLE_PERSISTENCE:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_CACHE_STORE:
|
||||
name: OCIS_CACHE_STORE;GRAPH_CACHE_STORE
|
||||
name: OCIS_CACHE_STORE;SETTINGS_CACHE_STORE
|
||||
defaultValue: memory
|
||||
type: string
|
||||
description: 'The type of the cache store. Supported values are: ''memory'', ''redis-sentinel'',
|
||||
@@ -7961,11 +7961,11 @@ OCIS_CACHE_STORE:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_CACHE_STORE_NODES:
|
||||
name: OCIS_CACHE_STORE_NODES;GRAPH_CACHE_STORE_NODES
|
||||
name: OCIS_CACHE_STORE_NODES;SETTINGS_CACHE_STORE_NODES
|
||||
defaultValue: '[127.0.0.1:9233]'
|
||||
type: '[]string'
|
||||
description: A list of nodes to access the configured store. This has no effect
|
||||
when 'memory' store are configured. Note that the behaviour how nodes are used
|
||||
when 'memory' store is configured. Note that the behaviour how nodes are used
|
||||
is dependent on the library of the configured store. See the Environment Variable
|
||||
Types description for more details.
|
||||
introductionVersion: pre5.0
|
||||
@@ -7973,11 +7973,12 @@ OCIS_CACHE_STORE_NODES:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_CACHE_TTL:
|
||||
name: OCIS_CACHE_TTL;GRAPH_CACHE_TTL
|
||||
defaultValue: 336h0m0s
|
||||
name: OCIS_CACHE_TTL;SETTINGS_CACHE_TTL
|
||||
defaultValue: 10m0s
|
||||
type: Duration
|
||||
description: Time to live for cache records in the graph. Defaults to '336h' (2
|
||||
weeks). See the Environment Variable Types description for more details.
|
||||
description: Default time to live for entries in the cache. Only applied when access
|
||||
tokens has no expiration. See the Environment Variable Types description for more
|
||||
details.
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
@@ -8020,46 +8021,45 @@ OCIS_CLAIM_MANAGED_SPACES_REGEXP:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_CORS_ALLOW_CREDENTIALS:
|
||||
name: OCIS_CORS_ALLOW_CREDENTIALS;THUMBNAILS_CORS_ALLOW_CREDENTIALS
|
||||
name: OCIS_CORS_ALLOW_CREDENTIALS;SETTINGS_CORS_ALLOW_CREDENTIALS
|
||||
defaultValue: "true"
|
||||
type: bool
|
||||
description: 'Allow credentials for CORS.See following chapter for more details:
|
||||
*Access-Control-Allow-Credentials* at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials.'
|
||||
introductionVersion: "6.0"
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_CORS_ALLOW_HEADERS:
|
||||
name: OCIS_CORS_ALLOW_HEADERS;THUMBNAILS_CORS_ALLOW_HEADERS
|
||||
defaultValue: '[Authorization Origin Content-Type Accept X-Requested-With X-Request-Id
|
||||
Cache-Control]'
|
||||
name: OCIS_CORS_ALLOW_HEADERS;SETTINGS_CORS_ALLOW_HEADERS
|
||||
defaultValue: '[Authorization Origin Content-Type Accept X-Requested-With X-Request-Id]'
|
||||
type: '[]string'
|
||||
description: 'A list of allowed CORS headers. See following chapter for more details:
|
||||
*Access-Control-Request-Headers* at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Request-Headers.
|
||||
See the Environment Variable Types description for more details.'
|
||||
introductionVersion: "6.0"
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_CORS_ALLOW_METHODS:
|
||||
name: OCIS_CORS_ALLOW_METHODS;THUMBNAILS_CORS_ALLOW_METHODS
|
||||
name: OCIS_CORS_ALLOW_METHODS;SETTINGS_CORS_ALLOW_METHODS
|
||||
defaultValue: '[GET POST PUT PATCH DELETE OPTIONS]'
|
||||
type: '[]string'
|
||||
description: 'A list of allowed CORS methods. See following chapter for more details:
|
||||
*Access-Control-Request-Method* at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Request-Method.
|
||||
See the Environment Variable Types description for more details.'
|
||||
introductionVersion: "6.0"
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_CORS_ALLOW_ORIGINS:
|
||||
name: OCIS_CORS_ALLOW_ORIGINS;THUMBNAILS_CORS_ALLOW_ORIGINS
|
||||
name: OCIS_CORS_ALLOW_ORIGINS;SETTINGS_CORS_ALLOW_ORIGINS
|
||||
defaultValue: '[*]'
|
||||
type: '[]string'
|
||||
description: 'A list of allowed CORS origins. See following chapter for more details:
|
||||
*Access-Control-Allow-Origin* at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin.
|
||||
See the Environment Variable Types description for more details.'
|
||||
introductionVersion: "6.0"
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
@@ -8176,36 +8176,38 @@ OCIS_ENABLE_OCM:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_EVENTS_AUTH_PASSWORD:
|
||||
name: OCIS_EVENTS_AUTH_PASSWORD;SHARING_EVENTS_AUTH_PASSWORD
|
||||
name: OCIS_EVENTS_AUTH_PASSWORD;SSE_EVENTS_AUTH_PASSWORD
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: Password for the events broker.
|
||||
description: The password to authenticate with the events broker. The events broker
|
||||
is the ocis service which receives and delivers events between the services.
|
||||
introductionVersion: "5.0"
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_EVENTS_AUTH_USERNAME:
|
||||
name: OCIS_EVENTS_AUTH_USERNAME;SHARING_EVENTS_AUTH_USERNAME
|
||||
name: OCIS_EVENTS_AUTH_USERNAME;SSE_EVENTS_AUTH_USERNAME
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: Username for the events broker.
|
||||
description: The username to authenticate with the events broker. The events broker
|
||||
is the ocis service which receives and delivers events between the services.
|
||||
introductionVersion: "5.0"
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_EVENTS_CLUSTER:
|
||||
name: OCIS_EVENTS_CLUSTER;SHARING_EVENTS_CLUSTER
|
||||
name: OCIS_EVENTS_CLUSTER;SSE_EVENTS_CLUSTER
|
||||
defaultValue: ocis-cluster
|
||||
type: string
|
||||
description: The clusterID of the event system. The event system is the message
|
||||
queuing service. It is used as message broker for the microservice architecture.
|
||||
Mandatory when using NATS as event system.
|
||||
introductionVersion: pre5.0
|
||||
introductionVersion: "5.0"
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_EVENTS_ENABLE_TLS:
|
||||
name: OCIS_EVENTS_ENABLE_TLS;SHARING_EVENTS_ENABLE_TLS
|
||||
name: OCIS_EVENTS_ENABLE_TLS;NATS_EVENTS_ENABLE_TLS
|
||||
defaultValue: "false"
|
||||
type: bool
|
||||
description: Enable TLS for the connection to the events broker. The events broker
|
||||
@@ -8215,22 +8217,22 @@ OCIS_EVENTS_ENABLE_TLS:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_EVENTS_ENDPOINT:
|
||||
name: OCIS_EVENTS_ENDPOINT;SHARING_EVENTS_ENDPOINT
|
||||
name: OCIS_EVENTS_ENDPOINT;SSE_EVENTS_ENDPOINT
|
||||
defaultValue: 127.0.0.1:9233
|
||||
type: string
|
||||
description: The address of the event system. The event system is the message queuing
|
||||
service. It is used as message broker for the microservice architecture.
|
||||
introductionVersion: pre5.0
|
||||
introductionVersion: "5.0"
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE:
|
||||
name: OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE;SHARING_EVENTS_TLS_ROOT_CA_CERTIFICATE
|
||||
name: OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE;SSE_EVENTS_TLS_ROOT_CA_CERTIFICATE
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: The root CA certificate used to validate the server's TLS certificate.
|
||||
If provided SHARING_EVENTS_TLS_INSECURE will be seen as false.
|
||||
introductionVersion: pre5.0
|
||||
If provided SSE_EVENTS_TLS_INSECURE will be seen as false.
|
||||
introductionVersion: "5.0"
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
@@ -8267,7 +8269,7 @@ OCIS_GRPC_CLIENT_TLS_MODE:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_GRPC_PROTOCOL:
|
||||
name: OCIS_GRPC_PROTOCOL;SHARING_GRPC_PROTOCOL
|
||||
name: OCIS_GRPC_PROTOCOL;APP_REGISTRY_GRPC_PROTOCOL
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: The transport protocol of the GRPC service.
|
||||
@@ -8307,16 +8309,17 @@ OCIS_HTTP_TLS_KEY:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_INSECURE:
|
||||
name: OCIS_INSECURE;SHARING_EVENTS_TLS_INSECURE
|
||||
name: OCIS_INSECURE;NATS_TLS_SKIP_VERIFY_CLIENT_CERT
|
||||
defaultValue: "false"
|
||||
type: bool
|
||||
description: Whether to verify the server TLS certificates.
|
||||
description: Whether the NATS server should skip the client certificate verification
|
||||
during the TLS handshake.
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_JWT_SECRET:
|
||||
name: OCIS_JWT_SECRET;SHARING_JWT_SECRET
|
||||
name: OCIS_JWT_SECRET;APP_REGISTRY_JWT_SECRET
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: The secret to mint and validate jwt tokens.
|
||||
@@ -8380,7 +8383,7 @@ OCIS_KEYCLOAK_USER_REALM:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_BIND_DN:
|
||||
name: OCIS_LDAP_BIND_DN;AUTH_BASIC_LDAP_BIND_DN
|
||||
name: OCIS_LDAP_BIND_DN;USERS_LDAP_BIND_DN
|
||||
defaultValue: uid=reva,ou=sysusers,o=libregraph-idm
|
||||
type: string
|
||||
description: LDAP DN to use for simple bind authentication with the target LDAP
|
||||
@@ -8390,7 +8393,7 @@ OCIS_LDAP_BIND_DN:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_BIND_PASSWORD:
|
||||
name: OCIS_LDAP_BIND_PASSWORD;AUTH_BASIC_LDAP_BIND_PASSWORD
|
||||
name: OCIS_LDAP_BIND_PASSWORD;USERS_LDAP_BIND_PASSWORD
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: Password to use for authenticating the 'bind_dn'.
|
||||
@@ -8399,7 +8402,7 @@ OCIS_LDAP_BIND_PASSWORD:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_CACERT:
|
||||
name: OCIS_LDAP_CACERT;AUTH_BASIC_LDAP_CACERT
|
||||
name: OCIS_LDAP_CACERT;USERS_LDAP_CACERT
|
||||
defaultValue: /var/lib/ocis/idm/ldap.crt
|
||||
type: string
|
||||
description: Path/File name for the root CA certificate (in PEM format) used to
|
||||
@@ -8420,7 +8423,7 @@ OCIS_LDAP_CROSS_INSTANCE_REFERENCE_TEMPLATE:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_DISABLE_USER_MECHANISM:
|
||||
name: OCIS_LDAP_DISABLE_USER_MECHANISM;AUTH_BASIC_DISABLE_USER_MECHANISM
|
||||
name: OCIS_LDAP_DISABLE_USER_MECHANISM;USERS_LDAP_DISABLE_USER_MECHANISM
|
||||
defaultValue: attribute
|
||||
type: string
|
||||
description: An option to control the behavior for disabling users. Valid options
|
||||
@@ -8433,7 +8436,7 @@ OCIS_LDAP_DISABLE_USER_MECHANISM:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_DISABLED_USERS_GROUP_DN:
|
||||
name: OCIS_LDAP_DISABLED_USERS_GROUP_DN;AUTH_BASIC_DISABLED_USERS_GROUP_DN
|
||||
name: OCIS_LDAP_DISABLED_USERS_GROUP_DN;USERS_LDAP_DISABLED_USERS_GROUP_DN
|
||||
defaultValue: cn=DisabledUsersGroup,ou=groups,o=libregraph-idm
|
||||
type: string
|
||||
description: The distinguished name of the group to which added users will be classified
|
||||
@@ -8453,7 +8456,7 @@ OCIS_LDAP_GROUP_AFFILIATION_ATTRIBUTE:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_GROUP_BASE_DN:
|
||||
name: OCIS_LDAP_GROUP_BASE_DN;AUTH_BASIC_LDAP_GROUP_BASE_DN
|
||||
name: OCIS_LDAP_GROUP_BASE_DN;USERS_LDAP_GROUP_BASE_DN
|
||||
defaultValue: ou=groups,o=libregraph-idm
|
||||
type: string
|
||||
description: Search base DN for looking up LDAP groups.
|
||||
@@ -8462,7 +8465,7 @@ OCIS_LDAP_GROUP_BASE_DN:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_GROUP_FILTER:
|
||||
name: OCIS_LDAP_GROUP_FILTER;AUTH_BASIC_LDAP_GROUP_FILTER
|
||||
name: OCIS_LDAP_GROUP_FILTER;USERS_LDAP_GROUP_FILTER
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: LDAP filter to add to the default filters for group searches.
|
||||
@@ -8471,17 +8474,17 @@ OCIS_LDAP_GROUP_FILTER:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_GROUP_OBJECTCLASS:
|
||||
name: OCIS_LDAP_GROUP_OBJECTCLASS;AUTH_BASIC_LDAP_GROUP_OBJECTCLASS
|
||||
name: OCIS_LDAP_GROUP_OBJECTCLASS;USERS_LDAP_GROUP_OBJECTCLASS
|
||||
defaultValue: groupOfNames
|
||||
type: string
|
||||
description: The object class to use for groups in the default group search filter
|
||||
('groupOfNames').
|
||||
like 'groupOfNames'.
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_GROUP_SCHEMA_DISPLAYNAME:
|
||||
name: OCIS_LDAP_GROUP_SCHEMA_DISPLAYNAME;AUTH_BASIC_LDAP_GROUP_SCHEMA_DISPLAYNAME
|
||||
name: OCIS_LDAP_GROUP_SCHEMA_DISPLAYNAME;USERS_LDAP_GROUP_SCHEMA_DISPLAYNAME
|
||||
defaultValue: cn
|
||||
type: string
|
||||
description: LDAP Attribute to use for the displayname of groups (often the same
|
||||
@@ -8491,7 +8494,7 @@ OCIS_LDAP_GROUP_SCHEMA_DISPLAYNAME:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_GROUP_SCHEMA_GROUPNAME:
|
||||
name: OCIS_LDAP_GROUP_SCHEMA_GROUPNAME;AUTH_BASIC_LDAP_GROUP_SCHEMA_GROUPNAME
|
||||
name: OCIS_LDAP_GROUP_SCHEMA_GROUPNAME;USERS_LDAP_GROUP_SCHEMA_GROUPNAME
|
||||
defaultValue: cn
|
||||
type: string
|
||||
description: LDAP Attribute to use for the name of groups.
|
||||
@@ -8500,28 +8503,28 @@ OCIS_LDAP_GROUP_SCHEMA_GROUPNAME:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_GROUP_SCHEMA_ID:
|
||||
name: OCIS_LDAP_GROUP_SCHEMA_ID;AUTH_BASIC_LDAP_GROUP_SCHEMA_ID
|
||||
name: OCIS_LDAP_GROUP_SCHEMA_ID;USERS_LDAP_GROUP_SCHEMA_ID
|
||||
defaultValue: ownclouduuid
|
||||
type: string
|
||||
description: LDAP Attribute to use as the unique id for groups. This should be a
|
||||
stable globally unique id (e.g. a UUID).
|
||||
description: LDAP Attribute to use as the unique ID for groups. This should be a
|
||||
stable globally unique ID like a UUID.
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_GROUP_SCHEMA_ID_IS_OCTETSTRING:
|
||||
name: OCIS_LDAP_GROUP_SCHEMA_ID_IS_OCTETSTRING;AUTH_BASIC_LDAP_GROUP_SCHEMA_ID_IS_OCTETSTRING
|
||||
name: OCIS_LDAP_GROUP_SCHEMA_ID_IS_OCTETSTRING;USERS_LDAP_GROUP_SCHEMA_ID_IS_OCTETSTRING
|
||||
defaultValue: "false"
|
||||
type: bool
|
||||
description: Set this to true if the defined 'id' attribute for groups is of the
|
||||
'OCTETSTRING' syntax. This is e.g. required when using the 'objectGUID' attribute
|
||||
of Active Directory for the group IDs.
|
||||
of Active Directory for the group ID's.
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_GROUP_SCHEMA_MAIL:
|
||||
name: OCIS_LDAP_GROUP_SCHEMA_MAIL;AUTH_BASIC_LDAP_GROUP_SCHEMA_MAIL
|
||||
name: OCIS_LDAP_GROUP_SCHEMA_MAIL;USERS_LDAP_GROUP_SCHEMA_MAIL
|
||||
defaultValue: mail
|
||||
type: string
|
||||
description: LDAP Attribute to use for the email address of groups (can be empty).
|
||||
@@ -8530,7 +8533,7 @@ OCIS_LDAP_GROUP_SCHEMA_MAIL:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_GROUP_SCHEMA_MEMBER:
|
||||
name: OCIS_LDAP_GROUP_SCHEMA_MEMBER;AUTH_BASIC_LDAP_GROUP_SCHEMA_MEMBER
|
||||
name: OCIS_LDAP_GROUP_SCHEMA_MEMBER;USERS_LDAP_GROUP_SCHEMA_MEMBER
|
||||
defaultValue: member
|
||||
type: string
|
||||
description: LDAP Attribute that is used for group members.
|
||||
@@ -8539,7 +8542,7 @@ OCIS_LDAP_GROUP_SCHEMA_MEMBER:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_GROUP_SCOPE:
|
||||
name: OCIS_LDAP_GROUP_SCOPE;AUTH_BASIC_LDAP_GROUP_SCOPE
|
||||
name: OCIS_LDAP_GROUP_SCOPE;USERS_LDAP_GROUP_SCOPE
|
||||
defaultValue: sub
|
||||
type: string
|
||||
description: LDAP search scope to use when looking up groups. Supported values are
|
||||
@@ -8549,7 +8552,7 @@ OCIS_LDAP_GROUP_SCOPE:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_INSECURE:
|
||||
name: OCIS_LDAP_INSECURE;AUTH_BASIC_LDAP_INSECURE
|
||||
name: OCIS_LDAP_INSECURE;USERS_LDAP_INSECURE
|
||||
defaultValue: "false"
|
||||
type: bool
|
||||
description: Disable TLS certificate validation for the LDAP connections. Do not
|
||||
@@ -8629,7 +8632,7 @@ OCIS_LDAP_SERVER_WRITE_ENABLED:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_URI:
|
||||
name: OCIS_LDAP_URI;AUTH_BASIC_LDAP_URI
|
||||
name: OCIS_LDAP_URI;USERS_LDAP_URI
|
||||
defaultValue: ldaps://localhost:9235
|
||||
type: string
|
||||
description: URI of the LDAP Server to connect to. Supported URI schemes are 'ldaps://'
|
||||
@@ -8639,7 +8642,7 @@ OCIS_LDAP_URI:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_USER_BASE_DN:
|
||||
name: OCIS_LDAP_USER_BASE_DN;AUTH_BASIC_LDAP_USER_BASE_DN
|
||||
name: OCIS_LDAP_USER_BASE_DN;USERS_LDAP_USER_BASE_DN
|
||||
defaultValue: ou=users,o=libregraph-idm
|
||||
type: string
|
||||
description: Search base DN for looking up LDAP users.
|
||||
@@ -8648,7 +8651,7 @@ OCIS_LDAP_USER_BASE_DN:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_USER_ENABLED_ATTRIBUTE:
|
||||
name: OCIS_LDAP_USER_ENABLED_ATTRIBUTE;AUTH_BASIC_LDAP_USER_ENABLED_ATTRIBUTE
|
||||
name: OCIS_LDAP_USER_ENABLED_ATTRIBUTE;USERS_LDAP_USER_ENABLED_ATTRIBUTE
|
||||
defaultValue: ownCloudUserEnabled
|
||||
type: string
|
||||
description: LDAP attribute to use as a flag telling if the user is enabled or disabled.
|
||||
@@ -8657,7 +8660,7 @@ OCIS_LDAP_USER_ENABLED_ATTRIBUTE:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_USER_FILTER:
|
||||
name: OCIS_LDAP_USER_FILTER;AUTH_BASIC_LDAP_USER_FILTER
|
||||
name: OCIS_LDAP_USER_FILTER;USERS_LDAP_USER_FILTER
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: LDAP filter to add to the default filters for user search like '(objectclass=ownCloud)'.
|
||||
@@ -8686,24 +8689,24 @@ OCIS_LDAP_USER_MEMBER_ATTRIBUTE:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_USER_OBJECTCLASS:
|
||||
name: OCIS_LDAP_USER_OBJECTCLASS;AUTH_BASIC_LDAP_USER_OBJECTCLASS
|
||||
name: OCIS_LDAP_USER_OBJECTCLASS;USERS_LDAP_USER_OBJECTCLASS
|
||||
defaultValue: inetOrgPerson
|
||||
type: string
|
||||
description: The object class to use for users in the default user search filter
|
||||
('inetOrgPerson').
|
||||
like 'inetOrgPerson'.
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_USER_SCHEMA_DISPLAYNAME:
|
||||
name: OCIS_LDAP_USER_SCHEMA_DISPLAYNAME;AUTH_BASIC_LDAP_USER_SCHEMA_DISPLAYNAME
|
||||
name: OCIS_LDAP_USER_SCHEMA_DISPLAYNAME;USERS_LDAP_USER_SCHEMA_DISPLAYNAME
|
||||
defaultValue: displayname
|
||||
type: string
|
||||
description: LDAP Attribute to use for the displayname of users.
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: 'LDAP_USER_SCHEMA_DISPLAY_NAME changing name for consistency | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '
|
||||
deprecationInfo: 'LDAP_USER_SCHEMA_DISPLAY_NAME changing name for consistency | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '
|
||||
OCIS_LDAP_USER_SCHEMA_EXTERNAL_ID:
|
||||
name: OCIS_LDAP_USER_SCHEMA_EXTERNAL_ID;GRAPH_LDAP_EXTERNAL_ID_ATTRIBUTE
|
||||
defaultValue: owncloudExternalID
|
||||
@@ -8716,7 +8719,7 @@ OCIS_LDAP_USER_SCHEMA_EXTERNAL_ID:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_USER_SCHEMA_ID:
|
||||
name: OCIS_LDAP_USER_SCHEMA_ID;AUTH_BASIC_LDAP_USER_SCHEMA_ID
|
||||
name: OCIS_LDAP_USER_SCHEMA_ID;USERS_LDAP_USER_SCHEMA_ID
|
||||
defaultValue: ownclouduuid
|
||||
type: string
|
||||
description: LDAP Attribute to use as the unique ID for users. This should be a
|
||||
@@ -8726,18 +8729,18 @@ OCIS_LDAP_USER_SCHEMA_ID:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_USER_SCHEMA_ID_IS_OCTETSTRING:
|
||||
name: OCIS_LDAP_USER_SCHEMA_ID_IS_OCTETSTRING;AUTH_BASIC_LDAP_USER_SCHEMA_ID_IS_OCTETSTRING
|
||||
name: OCIS_LDAP_USER_SCHEMA_ID_IS_OCTETSTRING;USERS_LDAP_USER_SCHEMA_ID_IS_OCTETSTRING
|
||||
defaultValue: "false"
|
||||
type: bool
|
||||
description: Set this to true if the defined 'ID' attribute for users is of the
|
||||
'OCTETSTRING' syntax. This is e.g. required when using the 'objectGUID' attribute
|
||||
of Active Directory for the user IDs.
|
||||
of Active Directory for the user ID's.
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_USER_SCHEMA_MAIL:
|
||||
name: OCIS_LDAP_USER_SCHEMA_MAIL;AUTH_BASIC_LDAP_USER_SCHEMA_MAIL
|
||||
name: OCIS_LDAP_USER_SCHEMA_MAIL;USERS_LDAP_USER_SCHEMA_MAIL
|
||||
defaultValue: mail
|
||||
type: string
|
||||
description: LDAP Attribute to use for the email address of users.
|
||||
@@ -8746,7 +8749,7 @@ OCIS_LDAP_USER_SCHEMA_MAIL:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_USER_SCHEMA_USER_TYPE:
|
||||
name: OCIS_LDAP_USER_SCHEMA_USER_TYPE;GRAPH_LDAP_USER_TYPE_ATTRIBUTE
|
||||
name: OCIS_LDAP_USER_SCHEMA_USER_TYPE;USERS_LDAP_USER_TYPE_ATTRIBUTE
|
||||
defaultValue: ownCloudUserType
|
||||
type: string
|
||||
description: LDAP Attribute to distinguish between 'Member' and 'Guest' users. Default
|
||||
@@ -8756,7 +8759,7 @@ OCIS_LDAP_USER_SCHEMA_USER_TYPE:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_USER_SCHEMA_USERNAME:
|
||||
name: OCIS_LDAP_USER_SCHEMA_USERNAME;AUTH_BASIC_LDAP_USER_SCHEMA_USERNAME
|
||||
name: OCIS_LDAP_USER_SCHEMA_USERNAME;USERS_LDAP_USER_SCHEMA_USERNAME
|
||||
defaultValue: uid
|
||||
type: string
|
||||
description: LDAP Attribute to use for username of users.
|
||||
@@ -8765,7 +8768,7 @@ OCIS_LDAP_USER_SCHEMA_USERNAME:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LDAP_USER_SCOPE:
|
||||
name: OCIS_LDAP_USER_SCOPE;AUTH_BASIC_LDAP_USER_SCOPE
|
||||
name: OCIS_LDAP_USER_SCOPE;USERS_LDAP_USER_SCOPE
|
||||
defaultValue: sub
|
||||
type: string
|
||||
description: LDAP search scope to use when looking up users. Supported values are
|
||||
@@ -8775,7 +8778,7 @@ OCIS_LDAP_USER_SCOPE:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LOG_COLOR:
|
||||
name: OCIS_LOG_COLOR;SHARING_LOG_COLOR
|
||||
name: OCIS_LOG_COLOR;APP_REGISTRY_LOG_COLOR
|
||||
defaultValue: "false"
|
||||
type: bool
|
||||
description: Activates colorized log output.
|
||||
@@ -8784,7 +8787,7 @@ OCIS_LOG_COLOR:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LOG_FILE:
|
||||
name: OCIS_LOG_FILE;SHARING_LOG_FILE
|
||||
name: OCIS_LOG_FILE;APP_REGISTRY_LOG_FILE
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: The path to the log file. Activates logging to this file if set.
|
||||
@@ -8793,7 +8796,7 @@ OCIS_LOG_FILE:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LOG_LEVEL:
|
||||
name: OCIS_LOG_LEVEL;SHARING_LOG_LEVEL
|
||||
name: OCIS_LOG_LEVEL;APP_REGISTRY_LOG_LEVEL
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: 'The log level. Valid values are: ''panic'', ''fatal'', ''error'',
|
||||
@@ -8803,7 +8806,7 @@ OCIS_LOG_LEVEL:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_LOG_PRETTY:
|
||||
name: OCIS_LOG_PRETTY;SHARING_LOG_PRETTY
|
||||
name: OCIS_LOG_PRETTY;APP_REGISTRY_LOG_PRETTY
|
||||
defaultValue: "false"
|
||||
type: bool
|
||||
description: Activates pretty log output.
|
||||
@@ -8812,7 +8815,7 @@ OCIS_LOG_PRETTY:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_MACHINE_AUTH_API_KEY:
|
||||
name: OCIS_MACHINE_AUTH_API_KEY;IDP_MACHINE_AUTH_API_KEY
|
||||
name: OCIS_MACHINE_AUTH_API_KEY;AUTH_MACHINE_API_KEY
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: Machine auth API key used to validate internal requests necessary for
|
||||
@@ -8822,7 +8825,7 @@ OCIS_MACHINE_AUTH_API_KEY:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_MAX_CONCURRENCY:
|
||||
name: OCIS_MAX_CONCURRENCY;SHARING_USER_JSONCS3_MAX_CONCURRENCY
|
||||
name: OCIS_MAX_CONCURRENCY;USERLOG_MAX_CONCURRENCY
|
||||
defaultValue: "1"
|
||||
type: int
|
||||
description: Maximum number of concurrent go-routines. Higher values can potentially
|
||||
@@ -8932,17 +8935,16 @@ OCIS_OIDC_CLIENT_ID:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_OIDC_ISSUER:
|
||||
name: OCIS_URL;OCIS_OIDC_ISSUER;AUTH_BASIC_IDP_URL
|
||||
name: OCIS_URL;OCIS_OIDC_ISSUER
|
||||
defaultValue: https://localhost:9200
|
||||
type: string
|
||||
description: The identity provider value to set in the userids of the CS3 user objects
|
||||
for users returned by this user provider.
|
||||
description: The OIDC issuer URL to assign to the demo users.
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_PASSWORD_POLICY_BANNED_PASSWORDS_LIST:
|
||||
name: OCIS_PASSWORD_POLICY_BANNED_PASSWORDS_LIST;SHARING_PASSWORD_POLICY_BANNED_PASSWORDS_LIST
|
||||
name: OCIS_PASSWORD_POLICY_BANNED_PASSWORDS_LIST;FRONTEND_PASSWORD_POLICY_BANNED_PASSWORDS_LIST
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: Path to the 'banned passwords list' file. This only impacts public
|
||||
@@ -8952,7 +8954,7 @@ OCIS_PASSWORD_POLICY_BANNED_PASSWORDS_LIST:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_PASSWORD_POLICY_DISABLED:
|
||||
name: OCIS_PASSWORD_POLICY_DISABLED;SHARING_PASSWORD_POLICY_DISABLED
|
||||
name: OCIS_PASSWORD_POLICY_DISABLED;FRONTEND_PASSWORD_POLICY_DISABLED
|
||||
defaultValue: "false"
|
||||
type: bool
|
||||
description: Disable the password policy. Defaults to false if not set.
|
||||
@@ -8961,7 +8963,7 @@ OCIS_PASSWORD_POLICY_DISABLED:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_PASSWORD_POLICY_MIN_CHARACTERS:
|
||||
name: OCIS_PASSWORD_POLICY_MIN_CHARACTERS;SHARING_PASSWORD_POLICY_MIN_CHARACTERS
|
||||
name: OCIS_PASSWORD_POLICY_MIN_CHARACTERS;FRONTEND_PASSWORD_POLICY_MIN_CHARACTERS
|
||||
defaultValue: "8"
|
||||
type: int
|
||||
description: Define the minimum password length. Defaults to 8 if not set.
|
||||
@@ -8970,7 +8972,7 @@ OCIS_PASSWORD_POLICY_MIN_CHARACTERS:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_PASSWORD_POLICY_MIN_DIGITS:
|
||||
name: OCIS_PASSWORD_POLICY_MIN_DIGITS;SHARING_PASSWORD_POLICY_MIN_DIGITS
|
||||
name: OCIS_PASSWORD_POLICY_MIN_DIGITS;FRONTEND_PASSWORD_POLICY_MIN_DIGITS
|
||||
defaultValue: "1"
|
||||
type: int
|
||||
description: Define the minimum number of digits. Defaults to 1 if not set.
|
||||
@@ -8979,7 +8981,7 @@ OCIS_PASSWORD_POLICY_MIN_DIGITS:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS:
|
||||
name: OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS;SHARING_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS
|
||||
name: OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS;FRONTEND_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS
|
||||
defaultValue: "1"
|
||||
type: int
|
||||
description: Define the minimum number of uppercase letters. Defaults to 1 if not
|
||||
@@ -8989,7 +8991,7 @@ OCIS_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS:
|
||||
name: OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS;SHARING_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS
|
||||
name: OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS;FRONTEND_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS
|
||||
defaultValue: "1"
|
||||
type: int
|
||||
description: Define the minimum number of characters from the special characters
|
||||
@@ -8999,7 +9001,7 @@ OCIS_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS:
|
||||
name: OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS;SHARING_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS
|
||||
name: OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS;FRONTEND_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS
|
||||
defaultValue: "1"
|
||||
type: int
|
||||
description: Define the minimum number of lowercase letters. Defaults to 1 if not
|
||||
@@ -9009,54 +9011,54 @@ OCIS_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_PERSISTENT_STORE:
|
||||
name: OCIS_PERSISTENT_STORE;COLLABORATION_STORE
|
||||
name: OCIS_PERSISTENT_STORE;STORAGE_PUBLICLINK_STORE_STORE
|
||||
defaultValue: nats-js-kv
|
||||
type: string
|
||||
description: 'The type of the store. Supported values are: ''memory'', ''nats-js-kv'',
|
||||
''redis-sentinel'', ''noop''. See the text description for details.'
|
||||
introductionVersion: 7.0.0
|
||||
introductionVersion: 8.0.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_PERSISTENT_STORE_AUTH_PASSWORD:
|
||||
name: OCIS_PERSISTENT_STORE_AUTH_PASSWORD;COLLABORATION_STORE_AUTH_PASSWORD
|
||||
name: OCIS_PERSISTENT_STORE_AUTH_PASSWORD;STORAGE_PUBLICLINK_STORE_AUTH_PASSWORD
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: The password to authenticate with the store. Only applies when store
|
||||
type 'nats-js-kv' is configured.
|
||||
introductionVersion: 7.0.0
|
||||
introductionVersion: 8.0.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_PERSISTENT_STORE_AUTH_USERNAME:
|
||||
name: OCIS_PERSISTENT_STORE_AUTH_USERNAME;COLLABORATION_STORE_AUTH_USERNAME
|
||||
name: OCIS_PERSISTENT_STORE_AUTH_USERNAME;STORAGE_PUBLICLINK_STORE_AUTH_USERNAME
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: The username to authenticate with the store. Only applies when store
|
||||
type 'nats-js-kv' is configured.
|
||||
introductionVersion: 7.0.0
|
||||
introductionVersion: 8.0.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_PERSISTENT_STORE_NODES:
|
||||
name: OCIS_PERSISTENT_STORE_NODES;COLLABORATION_STORE_NODES
|
||||
name: OCIS_PERSISTENT_STORE_NODES;STORAGE_PUBLICLINK_STORE_NODES
|
||||
defaultValue: '[127.0.0.1:9233]'
|
||||
type: '[]string'
|
||||
description: A list of nodes to access the configured store. This has no effect
|
||||
when 'memory' store is configured. Note that the behaviour how nodes are used
|
||||
is dependent on the library of the configured store. See the Environment Variable
|
||||
Types description for more details.
|
||||
introductionVersion: 7.0.0
|
||||
introductionVersion: 8.0.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_PERSISTENT_STORE_TTL:
|
||||
name: OCIS_PERSISTENT_STORE_TTL;COLLABORATION_STORE_TTL
|
||||
defaultValue: 30m0s
|
||||
name: OCIS_PERSISTENT_STORE_TTL;USERLOG_STORE_TTL
|
||||
defaultValue: 336h0m0s
|
||||
type: Duration
|
||||
description: Time to live for events in the store. Defaults to '30m' (30 minutes).
|
||||
description: Time to live for events in the store. Defaults to '336h' (2 weeks).
|
||||
See the Environment Variable Types description for more details.
|
||||
introductionVersion: 7.0.0
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
@@ -9101,17 +9103,19 @@ OCIS_REVA_GATEWAY_TLS_MODE:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_SERVICE_ACCOUNT_ID:
|
||||
name: OCIS_SERVICE_ACCOUNT_ID;GRAPH_SERVICE_ACCOUNT_ID
|
||||
name: SETTINGS_SERVICE_ACCOUNT_IDS;OCIS_SERVICE_ACCOUNT_ID
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: The ID of the service account the service should use. See the 'auth-service'
|
||||
service description for more details.
|
||||
type: '[]string'
|
||||
description: 'The list of all service account IDs. These will be assigned the hidden
|
||||
''service-account'' role. Note: When using ''OCIS_SERVICE_ACCOUNT_ID'' this will
|
||||
contain only one value while ''SETTINGS_SERVICE_ACCOUNT_IDS'' can have multiple.
|
||||
See the ''auth-service'' service description for more details about service accounts.'
|
||||
introductionVersion: "5.0"
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_SERVICE_ACCOUNT_SECRET:
|
||||
name: OCIS_SERVICE_ACCOUNT_SECRET;GRAPH_SERVICE_ACCOUNT_SECRET
|
||||
name: OCIS_SERVICE_ACCOUNT_SECRET;CLIENTLOG_SERVICE_ACCOUNT_SECRET
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: The service account secret.
|
||||
@@ -9120,7 +9124,7 @@ OCIS_SERVICE_ACCOUNT_SECRET:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD:
|
||||
name: OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD;SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD
|
||||
name: OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD
|
||||
defaultValue: "true"
|
||||
type: bool
|
||||
description: Set this to true if you want to enforce passwords on all public shares.
|
||||
@@ -9129,28 +9133,27 @@ OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD:
|
||||
name: OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD;SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD
|
||||
name: OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD
|
||||
defaultValue: "false"
|
||||
type: bool
|
||||
description: Set this to true if you want to enforce passwords on Uploader, Editor
|
||||
or Contributor shares.
|
||||
description: Set this to true if you want to enforce passwords for writable shares.
|
||||
Only effective if the setting for 'passwords on all public shares' is set to false.
|
||||
introductionVersion: "5.0"
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_SPACES_MAX_QUOTA:
|
||||
name: OCIS_SPACES_MAX_QUOTA;STORAGE_USERS_OCIS_MAX_QUOTA
|
||||
name: OCIS_SPACES_MAX_QUOTA;FRONTEND_MAX_QUOTA
|
||||
defaultValue: "0"
|
||||
type: uint64
|
||||
description: Set a global max quota for spaces in bytes. A value of 0 equals unlimited.
|
||||
If not using the global OCIS_SPACES_MAX_QUOTA, you must define the FRONTEND_MAX_QUOTA
|
||||
in the frontend service.
|
||||
description: Set the global max quota value in bytes. A value of 0 equals unlimited.
|
||||
The value is provided via capabilities.
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_SYSTEM_USER_API_KEY:
|
||||
name: OCIS_SYSTEM_USER_API_KEY;SHARING_PUBLIC_CS3_SYSTEM_USER_API_KEY
|
||||
name: OCIS_SYSTEM_USER_API_KEY
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: API key for the STORAGE-SYSTEM system user.
|
||||
@@ -9159,7 +9162,7 @@ OCIS_SYSTEM_USER_API_KEY:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_SYSTEM_USER_ID:
|
||||
name: OCIS_SYSTEM_USER_ID;SHARING_PUBLIC_CS3_SYSTEM_USER_ID
|
||||
name: OCIS_SYSTEM_USER_ID;SETTINGS_SYSTEM_USER_ID
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: ID of the oCIS STORAGE-SYSTEM system user. Admins need to set the ID
|
||||
@@ -9171,7 +9174,7 @@ OCIS_SYSTEM_USER_ID:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_SYSTEM_USER_IDP:
|
||||
name: OCIS_SYSTEM_USER_IDP;SHARING_PUBLIC_CS3_SYSTEM_USER_IDP
|
||||
name: OCIS_SYSTEM_USER_IDP;SETTINGS_SYSTEM_USER_IDP
|
||||
defaultValue: internal
|
||||
type: string
|
||||
description: IDP of the oCIS STORAGE-SYSTEM system user.
|
||||
@@ -9180,7 +9183,7 @@ OCIS_SYSTEM_USER_IDP:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_TRACING_COLLECTOR:
|
||||
name: OCIS_TRACING_COLLECTOR;SHARING_TRACING_COLLECTOR
|
||||
name: OCIS_TRACING_COLLECTOR;APP_REGISTRY_TRACING_COLLECTOR
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: The HTTP endpoint for sending spans directly to a collector, i.e. http://jaeger-collector:14268/api/traces.
|
||||
@@ -9190,7 +9193,7 @@ OCIS_TRACING_COLLECTOR:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_TRACING_ENABLED:
|
||||
name: OCIS_TRACING_ENABLED;SHARING_TRACING_ENABLED
|
||||
name: OCIS_TRACING_ENABLED;APP_REGISTRY_TRACING_ENABLED
|
||||
defaultValue: "false"
|
||||
type: bool
|
||||
description: Activates tracing.
|
||||
@@ -9199,7 +9202,7 @@ OCIS_TRACING_ENABLED:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_TRACING_ENDPOINT:
|
||||
name: OCIS_TRACING_ENDPOINT;SHARING_TRACING_ENDPOINT
|
||||
name: OCIS_TRACING_ENDPOINT;APP_REGISTRY_TRACING_ENDPOINT
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: The endpoint of the tracing agent.
|
||||
@@ -9208,7 +9211,7 @@ OCIS_TRACING_ENDPOINT:
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_TRACING_TYPE:
|
||||
name: OCIS_TRACING_TYPE;SHARING_TRACING_TYPE
|
||||
name: OCIS_TRACING_TYPE;APP_REGISTRY_TRACING_TYPE
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: The type of tracing. Defaults to '', which is the same as 'jaeger'.
|
||||
@@ -9221,28 +9224,27 @@ OCIS_TRANSFER_SECRET:
|
||||
name: OCIS_TRANSFER_SECRET
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: The storage transfer secret.
|
||||
description: Transfer secret for signing file up- and download requests.
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_TRANSLATION_PATH:
|
||||
name: OCIS_TRANSLATION_PATH;GRAPH_TRANSLATION_PATH
|
||||
name: OCIS_TRANSLATION_PATH;SETTINGS_TRANSLATION_PATH
|
||||
defaultValue: ""
|
||||
type: string
|
||||
description: (optional) Set this to a path with custom translations to overwrite
|
||||
the builtin translations. Note that file and folder naming rules apply, see the
|
||||
documentation for more details.
|
||||
introductionVersion: 7.0.0
|
||||
introductionVersion: 7.1.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
deprecationInfo: ""
|
||||
OCIS_URL:
|
||||
name: OCIS_URL;OCIS_OIDC_ISSUER;AUTH_BASIC_IDP_URL
|
||||
name: OCIS_URL;OCIS_OIDC_ISSUER
|
||||
defaultValue: https://localhost:9200
|
||||
type: string
|
||||
description: The identity provider value to set in the userids of the CS3 user objects
|
||||
for users returned by this user provider.
|
||||
description: The OIDC issuer URL to assign to the demo users.
|
||||
introductionVersion: pre5.0
|
||||
deprecationVersion: ""
|
||||
removalVersion: ""
|
||||
|
||||
@@ -39,14 +39,6 @@ variables:
|
||||
default_value: ""
|
||||
description: ""
|
||||
do_ignore: true
|
||||
- rawname: GITHUB_TOKEN
|
||||
path: tools/ci-reporter/cmd/list-failed-commits/main.go:116
|
||||
foundincode: true
|
||||
name: GITHUB_TOKEN
|
||||
type: ""
|
||||
default_value: ""
|
||||
description: ""
|
||||
do_ignore: true
|
||||
- rawname: _serverMaxConnectionAgeEnv
|
||||
path: ocis-pkg/service/grpc/keepalive.go:19
|
||||
foundincode: true
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 'Acceptance Testing'
|
||||
date: 2026-03-18T00:00:00+00:00
|
||||
title: "Acceptance Testing"
|
||||
date: 2018-05-02T00:00:00+00:00
|
||||
weight: 20
|
||||
geekdocRepo: https://github.com/owncloud/ocis
|
||||
geekdocEditPath: edit/master/docs/ocis/development
|
||||
@@ -591,7 +591,160 @@ The sample `fontsMap.json` file is located in `tests/config/drone/fontsMap.json`
|
||||
|
||||
## Running Test on Helm Setup
|
||||
|
||||
Refer to the [Running API Tests in Kubernetes Cluster](../../../tests/config/k8s/README.md) documentation for running tests against a K8s setup.
|
||||
The following tools must be installed:
|
||||
|
||||
* Install [k3d](https://k3d.io/stable/#install-script)
|
||||
* Install [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)
|
||||
* Install [helm](https://helm.sh/docs/intro/install/)
|
||||
|
||||
Also, clone the [ocis-charts](https://github.com/owncloud/ocis-charts/) repository.
|
||||
|
||||
1. Setup Basicauth\
|
||||
Enable basic authentication for the proxy in the `ocis-charts` repo:
|
||||
```bash
|
||||
cd ocis-charts
|
||||
|
||||
# Enable basic auth in proxy deployment
|
||||
sed -i '/- name: PROXY_HTTP_ADDR/i \
|
||||
- name: PROXY_ENABLE_BASIC_AUTH \
|
||||
value: "true"' ./charts/ocis/templates/proxy/deployment.yaml
|
||||
|
||||
# copy authbasic service
|
||||
cp -r <path-to-ocis-repo>/tests/config/drone/k8s/authbasic ./charts/ocis/templates/
|
||||
|
||||
# change admin password
|
||||
sed -i '/- name: IDM_ADMIN_PASSWORD/{n;N;N;N;d;}' ./charts/ocis/templates/idm/deployment.yaml
|
||||
sed -i '/- name: IDM_ADMIN_PASSWORD/a\\n value: "admin"' ./charts/ocis/templates/idm/deployment.yaml
|
||||
|
||||
# Update values.yaml
|
||||
cp <path-to-ocis-repo>/tests/config/drone/k8s/values.yaml ./charts/ocis/ci/deployment-values.yaml
|
||||
|
||||
# Update template values
|
||||
sed -i '/{{- $_ := set .scope "appNameAuthMachine" "authmachine" -}}/a \
|
||||
{{- $_ := set .scope "appNameAuthBasic" "authbasic" -}}' \
|
||||
./charts/ocis/templates/_common/_tplvalues.tpl
|
||||
```
|
||||
|
||||
2. Install Charts Using k3d
|
||||
|
||||
```bash
|
||||
k3d cluster create drone \
|
||||
--api-port ocis-server:33199 \
|
||||
-p '80:80@loadbalancer' \
|
||||
-p '443:443@loadbalancer' \
|
||||
--k3s-arg '--tls-san=k3d@server:*' \
|
||||
--k3s-arg '--disable=metrics-server@server:*'
|
||||
|
||||
k3d kubeconfig get drone > kubeconfig.yaml
|
||||
|
||||
chmod 0600 kubeconfig.yaml
|
||||
|
||||
kubectl create configmap coredns-custom \
|
||||
--namespace kube-system \
|
||||
--from-literal='rewritehost.override=rewrite name exact ocis-server host.k3d.internal'
|
||||
|
||||
kubectl -n kube-system rollout restart deployment coredns
|
||||
|
||||
make helm-install-atomic
|
||||
```
|
||||
|
||||
3. Run Test\
|
||||
To run test you should set `K8S` to true:
|
||||
```bash
|
||||
cd <path-to-ocis-repo>
|
||||
|
||||
# build and run ocis wrapper
|
||||
make -C ./tests/ociswrapper
|
||||
./tests/ociswrapper/bin/ociswrapper serve \
|
||||
--url https://ocis-server \
|
||||
--admin-username admin \
|
||||
--admin-password admin \
|
||||
--skip-ocis-run
|
||||
|
||||
K8S=true TEST_SERVER_URL="https://ocis-server" \
|
||||
make test-acceptance-api BEHAT_FEATURE=tests/acceptance/features/apiArchiver/downloadById.feature
|
||||
```
|
||||
|
||||
4. Run Test With ociswrapper
|
||||
```bash
|
||||
ociswrapper serve \
|
||||
--url https://ocis-server \
|
||||
--admin-username admin \
|
||||
--admin-password admin \
|
||||
--skip-ocis-run
|
||||
```
|
||||
|
||||
5. Run Antivirus Test\
|
||||
To run the clamav service, run these commands deploying the helm chart:
|
||||
```bash
|
||||
cp -r config/drone/k8s/clamav charts/ocis/templates/
|
||||
|
||||
sed -i 's/{{ *\.Values\.features\.virusscan\.infectedFileHandling *| *quote *}}/"delete"/' \
|
||||
ocis/templates/antivirus/deployment.yaml
|
||||
|
||||
sed -i '/name: ANTIVIRUS_SCANNER_TYPE/{n;s/value: *"icap"/value: "clamav"/}' \
|
||||
charts/ocis/templates/antivirus/deployment.yaml
|
||||
|
||||
sed -i '/- name: ANTIVIRUS_SCANNER_TYPE/i \
|
||||
- name: ANTIVIRUS_CLAMAV_SOCKET\n \
|
||||
value: "tcp://clamav:3310"' \
|
||||
charts/ocis/templates/antivirus/deployment.yaml
|
||||
```
|
||||
|
||||
5. Run Email Test\
|
||||
To run the email service, run these commands deploying the helm chart:
|
||||
```bash
|
||||
cp -r <path-to-ocis-repo>/tests/config/drone/k8s/mailpit charts/ocis/templates/
|
||||
```
|
||||
After ocis is deployed:
|
||||
```bash
|
||||
kubectl port-forward svc/mailpit $EMAIL_PORT:8025 -n ocis
|
||||
```
|
||||
|
||||
6. Run Tika Test\
|
||||
To run the tika service, run these commands deploying the helm chart:
|
||||
```bash
|
||||
cp -r <path-to-ocis-repo>/tests/config/drone/k8s/tika charts/ocis/templates/
|
||||
```
|
||||
|
||||
### Running Core API Test Suites from Pipeline "8"
|
||||
|
||||
For running specific core API suites (`coreApiWebdavMove1`, `coreApiWebdavPreviews`, `coreApiWebdavUpload`, `coreApiWebdavUploadTUS`) on k8s:
|
||||
|
||||
1. **Additional Configs** (after step 1 above):
|
||||
```bash
|
||||
# Create fonts configmaps
|
||||
echo '{"defaultFont": "/etc/ocis/fonts/NotoSans.ttf"}' > fontsMap.json
|
||||
kubectl create configmap -n ocis sharing-banned-passwords \
|
||||
--from-file=banned-password-list.txt=<path-to-ocis-repo>/tests/config/drone/banned-password-list.txt
|
||||
kubectl create configmap -n ocis ocis-fonts-map --from-file=./fontsMap.json
|
||||
|
||||
# Patch sharing for banned passwords
|
||||
sed -i 's|/etc/ocis/sharing-banned-passwords.txt|/etc/ocis/config/drone/banned-password-list.txt|' ./charts/ocis/templates/sharing/deployment.yaml
|
||||
sed -i 's|- name: configs|- name: banned-passwords|' ./charts/ocis/templates/sharing/deployment.yaml
|
||||
sed -i 's|mountPath: /etc/ocis$|mountPath: /etc/ocis/config/drone|' ./charts/ocis/templates/sharing/deployment.yaml
|
||||
sed -i 's|name: sharing-banned-passwords-{{ .appName }}|name: sharing-banned-passwords|' ./charts/ocis/templates/sharing/deployment.yaml
|
||||
|
||||
kubectl create configmap -n ocis sharing-banned-passwords \
|
||||
--from-file=banned-password-list.txt=<path-to-ocis-repo>/tests/config/drone/banned-password-list.txt
|
||||
```
|
||||
|
||||
2. **Install and Setup** (after step 2 above):
|
||||
```bash
|
||||
make helm-install-atomic
|
||||
```
|
||||
|
||||
3. **Run Tests**:
|
||||
```bash
|
||||
cd <path-to-ocis-repo>
|
||||
K8S=true \
|
||||
TEST_OCIS=true \
|
||||
TEST_WITH_GRAPH_API=true \
|
||||
TEST_SERVER_URL="https://ocis-server" \
|
||||
OCIS_WRAPPER_URL="http://localhost:5200" \
|
||||
make test-acceptance-api \
|
||||
BEHAT_FEATURE=tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature
|
||||
```
|
||||
|
||||
## Generating Code Coverage Report by Running Acceptance Tests
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ require (
|
||||
github.com/open-policy-agent/opa v1.12.3
|
||||
github.com/orcaman/concurrent-map v1.0.0
|
||||
github.com/owncloud/libre-graph-api-go v1.0.5-0.20260216101009-eeac018af245
|
||||
github.com/owncloud/reva/v2 v2.0.0-20260324082555-823c2f1c2593
|
||||
github.com/owncloud/reva/v2 v2.0.0-20260304131727-ce3149532498
|
||||
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-20260324082555-823c2f1c2593 h1:RNHAod2gNBEac0KQJfJ6+PCX1t7g9hFmONTGrXFvFII=
|
||||
github.com/owncloud/reva/v2 v2.0.0-20260324082555-823c2f1c2593/go.mod h1:+rCy6oGYb2/qs5gmQa8y/pHARw634vB73MZGDY2SBIQ=
|
||||
github.com/owncloud/reva/v2 v2.0.0-20260304131727-ce3149532498 h1:ozyudPff1XLWSeTDW4ajT1tCoSQf18cFQRxtLWFCNbk=
|
||||
github.com/owncloud/reva/v2 v2.0.0-20260304131727-ce3149532498/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,14 +60,6 @@ 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 {
|
||||
@@ -89,8 +81,6 @@ 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:
|
||||
@@ -107,8 +97,6 @@ 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,7 +21,6 @@ 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"),
|
||||
)...,
|
||||
)
|
||||
}
|
||||
+1
-11
@@ -2,7 +2,6 @@ package kql
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/jinzhu/now"
|
||||
@@ -26,7 +25,7 @@ func toNodes[T ast.Node](in interface{}) ([]T, error) {
|
||||
return []T{v}, nil
|
||||
case []T:
|
||||
return v, nil
|
||||
case []*ast.OperatorNode, []*ast.DateTimeNode, []*ast.NumericNode:
|
||||
case []*ast.OperatorNode, []*ast.DateTimeNode:
|
||||
return toNodes[T](v)
|
||||
case []interface{}:
|
||||
var nodes []T
|
||||
@@ -71,15 +70,6 @@ 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,7 +40,6 @@ GroupNode <-
|
||||
PropertyRestrictionNodes <-
|
||||
YesNoPropertyRestrictionNode /
|
||||
DateTimeRestrictionNode /
|
||||
NumericRestrictionNode /
|
||||
TextPropertyRestrictionNode
|
||||
|
||||
YesNoPropertyRestrictionNode <-
|
||||
@@ -70,16 +69,6 @@ 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)
|
||||
@@ -235,11 +224,6 @@ String <-
|
||||
return v, nil
|
||||
}
|
||||
|
||||
Number <-
|
||||
[0-9]+ ("." [0-9]+)? {
|
||||
return c.text, nil
|
||||
}
|
||||
|
||||
Digit <-
|
||||
[0-9] {
|
||||
return c.text, nil
|
||||
|
||||
+2564
-1856
File diff suppressed because it is too large.
Load diff
@@ -858,97 +858,6 @@ 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,35 +73,6 @@ 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,7 +27,6 @@ import (
|
||||
"github.com/thejerf/suture/v4"
|
||||
|
||||
ociscfg "github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/defaults"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/log"
|
||||
ogrpc "github.com/owncloud/ocis/v2/ocis-pkg/service/grpc"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
|
||||
@@ -371,13 +370,6 @@ func Start(ctx context.Context, o ...Option) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Log the effective data and config paths at startup so operators can
|
||||
// verify that data is written to the expected location.
|
||||
s.Log.Info().
|
||||
Str("data_path", defaults.BaseDataPath()).
|
||||
Str("config_path", defaults.BaseConfigPath()).
|
||||
Msg("effective data and config paths")
|
||||
|
||||
// cancel the context when a signal is received.
|
||||
var cancel context.CancelFunc = func() {}
|
||||
if ctx == nil {
|
||||
|
||||
@@ -1,109 +0,0 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
# Translators:
|
||||
# Martin <github@diemattels.at>, 2026
|
||||
# Miha Podobnik, 2026
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-03-24 00:06+0000\n"
|
||||
"PO-Revision-Date: 2026-01-02 10:10+0000\n"
|
||||
"Last-Translator: Miha Podobnik, 2026\n"
|
||||
"Language-Team: Slovenian (https://app.transifex.com/owncloud-org/teams/6149/sl/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: sl\n"
|
||||
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
|
||||
|
||||
#: pkg/service/response.go:44
|
||||
msgid "description"
|
||||
msgstr "opis"
|
||||
|
||||
#: pkg/service/response.go:43
|
||||
msgid "display name"
|
||||
msgstr "prikazno ime"
|
||||
|
||||
#: pkg/service/response.go:42
|
||||
msgid "expiration date"
|
||||
msgstr "datum poteka"
|
||||
|
||||
#: pkg/service/response.go:41
|
||||
msgid "password"
|
||||
msgstr "geslo"
|
||||
|
||||
#: pkg/service/response.go:40
|
||||
msgid "permission"
|
||||
msgstr "dovoljenje"
|
||||
|
||||
#: pkg/service/response.go:45
|
||||
msgid "shared-with-me"
|
||||
msgstr "deljeno-z-mano"
|
||||
|
||||
#: pkg/service/response.go:39
|
||||
msgid "some field"
|
||||
msgstr "neko polje"
|
||||
|
||||
#: pkg/service/response.go:26
|
||||
msgid "{resource} was downloaded via public link {token}"
|
||||
msgstr "{resource} je bil prenesen prek javne povezave {token}"
|
||||
|
||||
#: pkg/service/response.go:24
|
||||
msgid "{user} added {resource} to {folder}"
|
||||
msgstr "{user} je dodal {resource} v {folder}"
|
||||
|
||||
#: pkg/service/response.go:36
|
||||
msgid "{user} added {sharee} as member of {space}"
|
||||
msgstr "{user} je dodal {sharee} kot član {space}"
|
||||
|
||||
#: pkg/service/response.go:27
|
||||
msgid "{user} deleted {resource} from {folder}"
|
||||
msgstr "{user} je izbrisal {resource} iz {folder}"
|
||||
|
||||
#: pkg/service/response.go:28
|
||||
msgid "{user} moved {resource} to {folder}"
|
||||
msgstr "{user} je premaknil {resource} v {folder}"
|
||||
|
||||
#: pkg/service/response.go:35
|
||||
msgid "{user} removed link to {resource}"
|
||||
msgstr "{user} je odstranil povezavo do {resource}"
|
||||
|
||||
#: pkg/service/response.go:32
|
||||
msgid "{user} removed {sharee} from {resource}"
|
||||
msgstr "{user} je odstranil uporabnika {sharee} iz {resource}"
|
||||
|
||||
#: pkg/service/response.go:37
|
||||
msgid "{user} removed {sharee} from {space}"
|
||||
msgstr "{user} je odstranil uporabnika {sharee} iz {space}"
|
||||
|
||||
#: pkg/service/response.go:29
|
||||
msgid "{user} renamed {oldResource} to {resource}"
|
||||
msgstr "{user} je preimenoval/a {oldResource} v {resource}"
|
||||
|
||||
#: pkg/service/response.go:33
|
||||
msgid "{user} shared {resource} via link"
|
||||
msgstr "{user} je omogočil souporabo {resource} prek povezave"
|
||||
|
||||
#: pkg/service/response.go:30
|
||||
msgid "{user} shared {resource} with {sharee}"
|
||||
msgstr "Uporabnik {user} je omogočil souporabo {resource} z {sharee}"
|
||||
|
||||
#: pkg/service/response.go:34
|
||||
msgid "{user} updated {field} for a link {token} on {resource}"
|
||||
msgstr ""
|
||||
"Uporabnik {user} je posodobil polje {field} za povezavo {token} na viru "
|
||||
"{resource}"
|
||||
|
||||
#: pkg/service/response.go:31
|
||||
msgid "{user} updated {field} for the {resource}"
|
||||
msgstr "{user} je preimenoval/a {oldResource} v {resource}"
|
||||
|
||||
#: pkg/service/response.go:25
|
||||
msgid "{user} updated {resource} in {folder}"
|
||||
msgstr "Uporabnik {user} je posodobil {resource} v {folder}"
|
||||
@@ -16,7 +16,7 @@
|
||||
},
|
||||
"babel": {
|
||||
"presets": [
|
||||
["react-app", { "absoluteRuntime": false }]
|
||||
"react-app"
|
||||
]
|
||||
},
|
||||
"browserslist": {
|
||||
|
||||
@@ -355,7 +355,7 @@ func loadMiddlewares(logger log.Logger, cfg *config.Config,
|
||||
middleware.UserCS3Claim(cfg.UserCS3Claim),
|
||||
middleware.AutoprovisionAccounts(cfg.AutoprovisionAccounts),
|
||||
middleware.EventsPublisher(publisher),
|
||||
middleware.MultiInstance(cfg.MultiInstance.Enabled, cfg.MultiInstance.InstanceID, cfg.MultiInstance.MemberClaim, cfg.MultiInstance.GuestClaim, cfg.MultiInstance.GuestRole),
|
||||
middleware.MultiInstance(cfg.MultiInstance.Enabled, cfg.MultiInstance.InstanceID, cfg.MultiInstance.MasterID, cfg.MultiInstance.MemberClaim, cfg.MultiInstance.GuestClaim, cfg.MultiInstance.GuestRole),
|
||||
),
|
||||
middleware.MultiFactor(cfg.MultiFactorAuthentication, middleware.Logger(logger)),
|
||||
middleware.SelectorCookie(
|
||||
|
||||
@@ -251,6 +251,7 @@ type ClaimSpaceManagement struct {
|
||||
type MultiInstanceConfig struct {
|
||||
Enabled bool `yaml:"enabled" env:"OCIS_MULTI_INSTANCE_ENABLED" desc:"Enable multiple instances of Infinite Scale." introductionVersion:"8.0.0"`
|
||||
InstanceID string `yaml:"instanceid" env:"OCIS_MULTI_INSTANCE_INSTANCEID" desc:"The unique id of this instance" introductionVersion:"8.0.0"`
|
||||
MasterID string `yaml:"master_id" env:"OCIS_MULTI_INSTANCE_MASTER_ID" desc:"The master ID that grants access to all instances. Users with this ID in their memberOf or guestOf claims can access any instance. Leave empty to disable." introductionVersion:"NEXT"`
|
||||
MemberClaim string `yaml:"member_claim" env:"OCIS_MULTI_INSTANCE_MEMBER_CLAIM" desc:"The claim name for the 'memberOf' property" introductionVersion:"8.0.0"`
|
||||
GuestClaim string `yaml:"guest_claim" env:"OCIS_MULTI_INSTANCE_GUEST_CLAIM" desc:"The claim name for the 'guestOf' property" introductionVersion:"8.0.0"`
|
||||
GuestRole string `yaml:"guest_role" env:"OCIS_MULTI_INSTANCE_GUEST_ROLE" desc:"The role that should be assigned to a guest user" introductionVersion:"8.0.0"`
|
||||
|
||||
@@ -9,7 +9,6 @@ directives:
|
||||
- '''none'''
|
||||
font-src:
|
||||
- '''self'''
|
||||
- 'data:'
|
||||
frame-ancestors:
|
||||
- '''self'''
|
||||
frame-src:
|
||||
|
||||
@@ -43,6 +43,7 @@ func AccountResolver(optionSetters ...Option) func(next http.Handler) http.Handl
|
||||
eventsPublisher: options.EventsPublisher,
|
||||
multiInstance: options.MultiInstanceEnabled,
|
||||
instanceID: options.InstanceID,
|
||||
masterID: options.MasterID,
|
||||
memberClaim: options.MemberClaim,
|
||||
guestClaim: options.GuestClaim,
|
||||
guestRoleName: options.GuestRoleName,
|
||||
@@ -70,6 +71,7 @@ type accountResolver struct {
|
||||
guestClaim string
|
||||
guestRoleName string
|
||||
instanceID string
|
||||
masterID string
|
||||
}
|
||||
|
||||
// TODO do not use the context to store values: https://medium.com/@cep21/how-to-correctly-use-context-context-in-go-1-7-8f2c0fafdf39
|
||||
@@ -221,6 +223,17 @@ func (m accountResolver) resolveUserType(claims map[string]interface{}) (isMembe
|
||||
// single instance behaviour - any user is considered a member
|
||||
return true, false
|
||||
}
|
||||
|
||||
// Check for master-id first (if configured)
|
||||
if m.masterID != "" {
|
||||
for _, miid := range readClaim(m.memberClaim, claims) {
|
||||
if miid != "" && miid == m.masterID {
|
||||
return true, false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check for instance-specific ID
|
||||
for _, miid := range readClaim(m.memberClaim, claims) {
|
||||
if miid != "" && miid == m.instanceID {
|
||||
return true, false
|
||||
|
||||
@@ -295,3 +295,180 @@ func mockRequest(claims map[string]interface{}) (*http.Request, *httptest.Respon
|
||||
type mockHandler struct{}
|
||||
|
||||
func (m mockHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request) {}
|
||||
|
||||
func TestResolveUserType(t *testing.T) {
|
||||
const (
|
||||
instanceID1 = "ec730a6c-1b63-4b45-b83b-9e2311afdf85"
|
||||
instanceID2 = "8d24cb5f-6ee6-4b98-86df-c4c268dddb46"
|
||||
masterID = "11111111-1111-1111-1111-111111111111"
|
||||
)
|
||||
|
||||
testCases := []struct {
|
||||
name string
|
||||
multiInstance bool
|
||||
instanceID string
|
||||
masterID string
|
||||
memberClaim string
|
||||
guestClaim string
|
||||
claims map[string]interface{}
|
||||
expectMember bool
|
||||
expectGuest bool
|
||||
description string
|
||||
}{
|
||||
{
|
||||
name: "single instance mode - always member",
|
||||
multiInstance: false,
|
||||
instanceID: instanceID1,
|
||||
masterID: "",
|
||||
memberClaim: "owncloudMemberOf",
|
||||
guestClaim: "owncloudGuestOf",
|
||||
claims: map[string]interface{}{},
|
||||
expectMember: true,
|
||||
expectGuest: false,
|
||||
description: "In single instance mode, any user should be considered a member",
|
||||
},
|
||||
{
|
||||
name: "multi-instance: user has matching instance ID in memberClaim",
|
||||
multiInstance: true,
|
||||
instanceID: instanceID1,
|
||||
masterID: "",
|
||||
memberClaim: "owncloudMemberOf",
|
||||
guestClaim: "owncloudGuestOf",
|
||||
claims: map[string]interface{}{
|
||||
"owncloudMemberOf": instanceID1,
|
||||
},
|
||||
expectMember: true,
|
||||
expectGuest: false,
|
||||
description: "User with matching instance ID should be granted member access",
|
||||
},
|
||||
{
|
||||
name: "multi-instance: user has matching instance ID in guestClaim",
|
||||
multiInstance: true,
|
||||
instanceID: instanceID1,
|
||||
masterID: "",
|
||||
memberClaim: "owncloudMemberOf",
|
||||
guestClaim: "owncloudGuestOf",
|
||||
claims: map[string]interface{}{
|
||||
"owncloudGuestOf": instanceID1,
|
||||
},
|
||||
expectMember: false,
|
||||
expectGuest: true,
|
||||
description: "User with matching instance ID in guestClaim should be granted guest access",
|
||||
},
|
||||
{
|
||||
name: "multi-instance: user has no matching instance ID",
|
||||
multiInstance: true,
|
||||
instanceID: instanceID1,
|
||||
masterID: "",
|
||||
memberClaim: "owncloudMemberOf",
|
||||
guestClaim: "owncloudGuestOf",
|
||||
claims: map[string]interface{}{
|
||||
"owncloudMemberOf": instanceID2,
|
||||
},
|
||||
expectMember: false,
|
||||
expectGuest: false,
|
||||
description: "User without matching instance ID should be denied access",
|
||||
},
|
||||
{
|
||||
name: "multi-instance with master-id: user has master-id in memberClaim",
|
||||
multiInstance: true,
|
||||
instanceID: instanceID1,
|
||||
masterID: masterID,
|
||||
memberClaim: "owncloudMemberOf",
|
||||
guestClaim: "owncloudGuestOf",
|
||||
claims: map[string]interface{}{
|
||||
"owncloudMemberOf": masterID,
|
||||
},
|
||||
expectMember: true,
|
||||
expectGuest: false,
|
||||
description: "User with master-id in memberClaim should be granted member access to any instance",
|
||||
},
|
||||
{
|
||||
name: "multi-instance with master-id disabled: user has master-id value but feature disabled",
|
||||
multiInstance: true,
|
||||
instanceID: instanceID1,
|
||||
masterID: "", // Empty = disabled
|
||||
memberClaim: "owncloudMemberOf",
|
||||
guestClaim: "owncloudGuestOf",
|
||||
claims: map[string]interface{}{
|
||||
"owncloudMemberOf": masterID,
|
||||
},
|
||||
expectMember: false,
|
||||
expectGuest: false,
|
||||
description: "When master-id is empty/disabled, having the master-id value should not grant access",
|
||||
},
|
||||
{
|
||||
name: "multi-instance with master-id: user has both master-id and instance-id",
|
||||
multiInstance: true,
|
||||
instanceID: instanceID1,
|
||||
masterID: masterID,
|
||||
memberClaim: "owncloudMemberOf",
|
||||
guestClaim: "owncloudGuestOf",
|
||||
claims: map[string]interface{}{
|
||||
"owncloudMemberOf": []string{masterID, instanceID1},
|
||||
},
|
||||
expectMember: true,
|
||||
expectGuest: false,
|
||||
description: "User with both master-id and instance-id should be granted access (master-id matches first)",
|
||||
},
|
||||
{
|
||||
name: "multi-instance with master-id: array with master-id in middle",
|
||||
multiInstance: true,
|
||||
instanceID: instanceID1,
|
||||
masterID: masterID,
|
||||
memberClaim: "owncloudMemberOf",
|
||||
guestClaim: "owncloudGuestOf",
|
||||
claims: map[string]interface{}{
|
||||
"owncloudMemberOf": []string{instanceID2, masterID, "other-id"},
|
||||
},
|
||||
expectMember: true,
|
||||
expectGuest: false,
|
||||
description: "Master-id should be found when it's in an array with other values",
|
||||
},
|
||||
{
|
||||
name: "multi-instance with master-id: user on wrong instance but has master-id",
|
||||
multiInstance: true,
|
||||
instanceID: instanceID2, // Different instance
|
||||
masterID: masterID,
|
||||
memberClaim: "owncloudMemberOf",
|
||||
guestClaim: "owncloudGuestOf",
|
||||
claims: map[string]interface{}{
|
||||
"owncloudMemberOf": masterID,
|
||||
},
|
||||
expectMember: true,
|
||||
expectGuest: false,
|
||||
description: "Master-id should grant access to ANY instance, regardless of which instance is checking",
|
||||
},
|
||||
{
|
||||
name: "multi-instance: empty claim values",
|
||||
multiInstance: true,
|
||||
instanceID: instanceID1,
|
||||
masterID: masterID,
|
||||
memberClaim: "owncloudMemberOf",
|
||||
guestClaim: "owncloudGuestOf",
|
||||
claims: map[string]interface{}{
|
||||
"owncloudMemberOf": "",
|
||||
},
|
||||
expectMember: false,
|
||||
expectGuest: false,
|
||||
description: "Empty string values should not grant access",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
resolver := accountResolver{
|
||||
multiInstance: tc.multiInstance,
|
||||
instanceID: tc.instanceID,
|
||||
masterID: tc.masterID,
|
||||
memberClaim: tc.memberClaim,
|
||||
guestClaim: tc.guestClaim,
|
||||
}
|
||||
|
||||
isMember, isGuest := resolver.resolveUserType(tc.claims)
|
||||
|
||||
assert.Equal(t, tc.expectMember, isMember, "isMember mismatch: %s", tc.description)
|
||||
assert.Equal(t, tc.expectGuest, isGuest, "isGuest mismatch: %s", tc.description)
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -80,6 +80,7 @@ type Options struct {
|
||||
// Multi-Instance Options
|
||||
MultiInstanceEnabled bool
|
||||
InstanceID string
|
||||
MasterID string
|
||||
MemberClaim string
|
||||
GuestClaim string
|
||||
GuestRoleName string
|
||||
@@ -273,10 +274,11 @@ func ServiceAccount(id string, secret string) Option {
|
||||
}
|
||||
|
||||
// MultiInstance sets muli-instance options
|
||||
func MultiInstance(enabled bool, iid string, memberClaim, guestClaim string, guestRole string) Option {
|
||||
func MultiInstance(enabled bool, iid string, masterID string, memberClaim, guestClaim string, guestRole string) Option {
|
||||
return func(o *Options) {
|
||||
o.MultiInstanceEnabled = enabled
|
||||
o.InstanceID = iid
|
||||
o.MasterID = masterID
|
||||
o.MemberClaim = memberClaim
|
||||
o.GuestClaim = guestClaim
|
||||
o.GuestRoleName = guestRole
|
||||
|
||||
@@ -58,7 +58,6 @@ 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,27 +84,3 @@ 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,10 +87,6 @@ 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,7 +2,6 @@ package engine
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"math"
|
||||
"path"
|
||||
"reflect"
|
||||
@@ -16,7 +15,6 @@ 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"
|
||||
@@ -317,18 +315,6 @@ 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()
|
||||
@@ -416,33 +402,6 @@ 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))
|
||||
@@ -468,13 +427,12 @@ 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"),
|
||||
Extracted: getFieldValue[bool](fields, "Extracted"),
|
||||
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"),
|
||||
Document: content.Document{
|
||||
Name: getFieldValue[string](fields, "Name"),
|
||||
Title: getFieldValue[string](fields, "Title"),
|
||||
|
||||
@@ -23,7 +23,6 @@ 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
|
||||
@@ -31,24 +30,17 @@ 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
|
||||
Extracted bool
|
||||
ID string
|
||||
RootID string
|
||||
Path string
|
||||
ParentID string
|
||||
Type uint64
|
||||
Deleted bool
|
||||
Hidden bool
|
||||
}
|
||||
|
||||
func resourceIDtoSearchID(id storageProvider.ResourceId) *searchMessage.ResourceID {
|
||||
|
||||
@@ -125,67 +125,6 @@ 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,20 +124,35 @@ func walk(offset int, nodes []ast.Node) (bleveQuery.Query, int, error) {
|
||||
next = q
|
||||
}
|
||||
case *ast.DateTimeNode:
|
||||
q := dateTimeQuery(n)
|
||||
if q == nil {
|
||||
q := &bleveQuery.DateRangeQuery{
|
||||
Start: bleveQuery.BleveQueryTime{},
|
||||
End: bleveQuery.BleveQueryTime{},
|
||||
InclusiveStart: nil,
|
||||
InclusiveEnd: nil,
|
||||
FieldVal: getField(n.Key),
|
||||
}
|
||||
|
||||
if n.Operator == nil {
|
||||
continue
|
||||
}
|
||||
if prev == nil {
|
||||
prev = q
|
||||
} else {
|
||||
next = q
|
||||
}
|
||||
case *ast.NumericNode:
|
||||
q := numericQuery(n)
|
||||
if q == nil {
|
||||
|
||||
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:
|
||||
continue
|
||||
}
|
||||
|
||||
if prev == nil {
|
||||
prev = q
|
||||
} else {
|
||||
@@ -355,68 +370,6 @@ 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,107 +565,6 @@ 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,9 +87,6 @@ func HandleEvents(s Searcher, bus events.Consumer, logger log.Logger, cfg *confi
|
||||
case events.FileUploaded:
|
||||
indexSpaceDebouncer.Debounce(getSpaceID(ev.Ref))
|
||||
case events.UploadReady:
|
||||
if ev.Failed {
|
||||
return
|
||||
}
|
||||
indexSpaceDebouncer.Debounce(getSpaceID(ev.FileRef))
|
||||
case events.SpaceRenamed:
|
||||
indexSpaceDebouncer.Debounce(ev.ID)
|
||||
|
||||
@@ -462,22 +462,17 @@ func (s *Service) IndexSpace(spaceID *provider.StorageSpaceId) error {
|
||||
}
|
||||
s.logger.Debug().Str("path", ref.Path).Msg("Walking tree")
|
||||
|
||||
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
|
||||
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
|
||||
}
|
||||
s.logger.Debug().Str("path", ref.Path).Msg("element hasn't changed. Skipping.")
|
||||
return nil
|
||||
}
|
||||
|
||||
s.UpsertItem(ref)
|
||||
@@ -491,13 +486,6 @@ 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
|
||||
}
|
||||
|
||||
@@ -543,10 +531,9 @@ 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,
|
||||
Extracted: true,
|
||||
Path: utils.MakeRelativePath(path),
|
||||
Type: uint64(stat.Info.Type),
|
||||
Document: doc,
|
||||
}
|
||||
r.Hidden = strings.HasPrefix(r.Path, ".")
|
||||
|
||||
|
||||
@@ -3,9 +3,6 @@ package search_test
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1"
|
||||
userv1beta1 "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
|
||||
@@ -166,7 +163,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("Lookup", mock.Anything).Return(nil, engine.ErrResourceNotFound)
|
||||
indexClient.On("Search", mock.Anything, mock.Anything).Return(&searchsvc.SearchIndexResponse{}, nil)
|
||||
gatewayClient.On("Stat", mock.Anything, mock.MatchedBy(func(sreq *sprovider.StatRequest) bool {
|
||||
return sreq.Ref.ResourceId.StorageId == "storageid" &&
|
||||
sreq.Ref.ResourceId.OpaqueId == "spaceid" &&
|
||||
@@ -203,139 +200,6 @@ var _ = Describe("Searchprovider", func() {
|
||||
err := s.IndexSpace(&sprovider.StorageSpaceId{OpaqueId: "storageid$spaceid!spaceid"})
|
||||
Expect(err).ShouldNot(HaveOccurred())
|
||||
})
|
||||
|
||||
It("descends into already-indexed directories to index unvisited children", func() {
|
||||
// Simulate a large tree where all directories are already indexed
|
||||
// (mtime matches) but each contains one unindexed file — e.g. after
|
||||
// a Tika crash interrupted a previous reindex run. The fix ensures
|
||||
// we never SkipDir for directories, so children are always visited.
|
||||
//
|
||||
// 10,000 directories: pessimistic-case benchmark confirming the walker
|
||||
// scales linearly even when every directory is already indexed.
|
||||
const numDirs = 10000
|
||||
|
||||
gatewayClient.On("GetUserByClaim", mock.Anything, mock.Anything).Return(&userv1beta1.GetUserByClaimResponse{
|
||||
Status: status.NewOK(context.Background()),
|
||||
User: user,
|
||||
}, nil)
|
||||
extractor.On("Extract", mock.Anything, mock.Anything, mock.Anything).Return(content.Document{}, nil)
|
||||
|
||||
// The indexed mtime that the engine returns for directories.
|
||||
indexedMtime := time.Unix(5000, 0).UTC().Format(time.RFC3339Nano)
|
||||
|
||||
// Build root: a container that lists numDirs child directories.
|
||||
rootInfo := &sprovider.ResourceInfo{
|
||||
Id: &sprovider.ResourceId{StorageId: "storageid", SpaceId: "spaceid", OpaqueId: "spaceid"},
|
||||
Type: sprovider.ResourceType_RESOURCE_TYPE_CONTAINER,
|
||||
Path: ".",
|
||||
Mtime: &typesv1beta1.Timestamp{Seconds: 5000},
|
||||
}
|
||||
dirInfos := make([]*sprovider.ResourceInfo, numDirs)
|
||||
for i := 0; i < numDirs; i++ {
|
||||
dirInfos[i] = &sprovider.ResourceInfo{
|
||||
Id: &sprovider.ResourceId{StorageId: "storageid", SpaceId: "spaceid", OpaqueId: fmt.Sprintf("dir-%d", i)},
|
||||
Type: sprovider.ResourceType_RESOURCE_TYPE_CONTAINER,
|
||||
Path: fmt.Sprintf("dir-%d", i),
|
||||
Mtime: &typesv1beta1.Timestamp{Seconds: 5000},
|
||||
}
|
||||
}
|
||||
|
||||
// Pre-build file infos for each directory (map for O(1) dispatch).
|
||||
fileInfoByDir := make(map[string]*sprovider.ResourceInfo, numDirs)
|
||||
for i := 0; i < numDirs; i++ {
|
||||
dirID := fmt.Sprintf("dir-%d", i)
|
||||
fileInfoByDir[dirID] = &sprovider.ResourceInfo{
|
||||
Id: &sprovider.ResourceId{StorageId: "storageid", SpaceId: "spaceid", OpaqueId: fmt.Sprintf("file-%d", i)},
|
||||
ParentId: &sprovider.ResourceId{StorageId: "storageid", SpaceId: "spaceid", OpaqueId: dirID},
|
||||
Type: sprovider.ResourceType_RESOURCE_TYPE_FILE,
|
||||
Path: fmt.Sprintf("file-%d.pdf", i),
|
||||
Size: 1024,
|
||||
Mtime: &typesv1beta1.Timestamp{Seconds: 5000},
|
||||
}
|
||||
}
|
||||
|
||||
// Build path-to-fileInfo map for O(1) Stat dispatch.
|
||||
fileInfoByPath := make(map[string]*sprovider.ResourceInfo, numDirs)
|
||||
for dirID, fi := range fileInfoByDir {
|
||||
fileInfoByPath["./"+dirID+"/"+fi.Path] = fi
|
||||
}
|
||||
|
||||
// Single Stat mock dispatching via map — avoids 10k separate matchers.
|
||||
gatewayClient.On("Stat", mock.Anything, mock.Anything).Return(
|
||||
func(_ context.Context, sreq *sprovider.StatRequest, _ ...grpc.CallOption) *sprovider.StatResponse {
|
||||
if sreq.Ref.ResourceId != nil && sreq.Ref.ResourceId.OpaqueId == "spaceid" {
|
||||
return &sprovider.StatResponse{
|
||||
Status: status.NewOK(context.Background()),
|
||||
Info: rootInfo,
|
||||
}
|
||||
}
|
||||
if fi, ok := fileInfoByPath[sreq.Ref.Path]; ok {
|
||||
return &sprovider.StatResponse{
|
||||
Status: status.NewOK(context.Background()),
|
||||
Info: fi,
|
||||
}
|
||||
}
|
||||
return &sprovider.StatResponse{Status: status.NewOK(context.Background()), Info: rootInfo}
|
||||
},
|
||||
func(_ context.Context, _ *sprovider.StatRequest, _ ...grpc.CallOption) error {
|
||||
return nil
|
||||
},
|
||||
)
|
||||
|
||||
// Single ListContainer mock dispatching via map.
|
||||
gatewayClient.On("ListContainer", mock.Anything, mock.Anything).Return(
|
||||
func(_ context.Context, req *sprovider.ListContainerRequest, _ ...grpc.CallOption) *sprovider.ListContainerResponse {
|
||||
opaqueID := req.Ref.ResourceId.OpaqueId
|
||||
if opaqueID == "spaceid" {
|
||||
return &sprovider.ListContainerResponse{
|
||||
Status: status.NewOK(context.Background()),
|
||||
Infos: dirInfos,
|
||||
}
|
||||
}
|
||||
if fi, ok := fileInfoByDir[opaqueID]; ok {
|
||||
return &sprovider.ListContainerResponse{
|
||||
Status: status.NewOK(context.Background()),
|
||||
Infos: []*sprovider.ResourceInfo{fi},
|
||||
}
|
||||
}
|
||||
return &sprovider.ListContainerResponse{
|
||||
Status: status.NewOK(context.Background()),
|
||||
Infos: nil,
|
||||
}
|
||||
},
|
||||
func(_ context.Context, _ *sprovider.ListContainerRequest, _ ...grpc.CallOption) error {
|
||||
return nil
|
||||
},
|
||||
)
|
||||
|
||||
// Lookup: root and directories are already indexed with matching mtime.
|
||||
// Use a map for O(1) lookup instead of linear scan (matters at 10k dirs).
|
||||
indexedIDs := make(map[string]bool, numDirs+1)
|
||||
indexedIDs["storageid$spaceid!spaceid"] = true
|
||||
for i := 0; i < numDirs; i++ {
|
||||
indexedIDs[fmt.Sprintf("storageid$spaceid!dir-%d", i)] = true
|
||||
}
|
||||
indexedResource := &engine.Resource{Document: content.Document{Mtime: indexedMtime}, Extracted: true}
|
||||
indexClient.On("Lookup", mock.MatchedBy(func(id string) bool {
|
||||
return indexedIDs[id] || len(id) > 18 // dir-N or file-N IDs
|
||||
})).Return(func(id string) (*engine.Resource, error) {
|
||||
if indexedIDs[id] {
|
||||
return indexedResource, nil
|
||||
}
|
||||
// Files are not indexed.
|
||||
return nil, engine.ErrResourceNotFound
|
||||
})
|
||||
|
||||
// Track Upsert calls — each unindexed file should trigger one.
|
||||
var upsertCount atomic.Int32
|
||||
indexClient.On("Upsert", mock.Anything, mock.Anything).Run(func(_ mock.Arguments) {
|
||||
upsertCount.Add(1)
|
||||
}).Return(nil)
|
||||
|
||||
err := s.IndexSpace(&sprovider.StorageSpaceId{OpaqueId: "storageid$spaceid!spaceid"})
|
||||
Expect(err).ShouldNot(HaveOccurred())
|
||||
Expect(int(upsertCount.Load())).To(Equal(numDirs), "every unindexed file inside an already-indexed directory must be visited")
|
||||
})
|
||||
})
|
||||
|
||||
Describe("UpdateTags", func() {
|
||||
|
||||
@@ -184,92 +184,6 @@ 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.
|
||||
|
||||
@@ -1,286 +0,0 @@
|
||||
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
|
||||
}
|
||||
@@ -1,104 +0,0 @@
|
||||
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,7 +18,6 @@ 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. Retrying...\n";
|
||||
echo "[INFO] Mailbox is empty...\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) && trim($value->subject, ".") === trim($subject, ".")) {
|
||||
if (isset($value->subject) && $value->subject === $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) && trim($notification->subject, ".") === trim($subject, ".")
|
||||
if (isset($notification->subject) && $notification->subject === $subject
|
||||
&& isset($notification->messageRichParameters->resource->name)
|
||||
&& $notification->messageRichParameters->resource->name === $resource
|
||||
) {
|
||||
|
||||
@@ -236,12 +236,8 @@ class OcisConfigContext implements Context {
|
||||
*/
|
||||
public function theConfigHasBeenSetToPath(string $configVariable, string $path, ?string $serviceName = null): void {
|
||||
if (getenv("K8S") === "true") {
|
||||
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
|
||||
// In K8s, use the path where the ConfigMap is mounted
|
||||
// For example: The banned-password-list.txt is mounted at /etc/ocis/config/drone/
|
||||
$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: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)
|
||||
- [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)
|
||||
|
||||
#### [[OCM] Hide & Enable Sync fail with received federated shares](https://github.com/owncloud/ocis/issues/10719)
|
||||
|
||||
@@ -401,5 +401,6 @@ 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.
|
||||
@@ -0,0 +1,15 @@
|
||||
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 "settings" service
|
||||
Given the config "OCIS_DEFAULT_LANGUAGE" has been set to "de" for "notifications" 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"
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
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,8 +38,6 @@ 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
|
||||
@@ -92,8 +90,6 @@ 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' data:; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline' |
|
||||
| Content-Security-Policy | child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; 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' |
|
||||
| X-Content-Type-Options | nosniff |
|
||||
| X-Frame-Options | SAMEORIGIN |
|
||||
| X-Permitted-Cross-Domain-Policies | none |
|
||||
@@ -246,7 +246,7 @@ Feature: download file
|
||||
And the following headers should be set
|
||||
| header | value |
|
||||
| Content-Disposition | attachment; filename*=UTF-8''%22quote%22double%22.txt; filename=""quote"double".txt" |
|
||||
| Content-Security-Policy | child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; default-src 'none'; font-src 'self' data:; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline' |
|
||||
| Content-Security-Policy | child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; 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' |
|
||||
| X-Content-Type-Options | nosniff |
|
||||
| X-Frame-Options | SAMEORIGIN |
|
||||
| X-Permitted-Cross-Domain-Policies | none |
|
||||
|
||||
@@ -11,9 +11,8 @@ directives:
|
||||
- '''none'''
|
||||
font-src:
|
||||
- '''self'''
|
||||
- 'data:'
|
||||
frame-ancestors:
|
||||
- '''self'''
|
||||
- '''none'''
|
||||
frame-src:
|
||||
- '''self'''
|
||||
- 'blob:'
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
{{/*
|
||||
|
||||
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 -}}
|
||||
-3
@@ -73,7 +73,6 @@ spec:
|
||||
key: jwt-secret
|
||||
|
||||
{{- include "ocis.caEnv" $ | nindent 12}}
|
||||
{{- include "ocis.extraEnvs" . | nindent 12}}
|
||||
|
||||
{{- include "ocis.livenessProbe" . | nindent 10 }}
|
||||
|
||||
@@ -92,7 +91,6 @@ spec:
|
||||
mountPath: /etc/ocis/ldap-ca
|
||||
readOnly: true
|
||||
{{- include "ocis.caPath" $ | nindent 12}}
|
||||
{{- include "ocis.extraVolMounts" . | nindent 12}}
|
||||
|
||||
{{- include "ocis.imagePullSecrets" $ | nindent 6 }}
|
||||
volumes:
|
||||
@@ -102,4 +100,3 @@ spec:
|
||||
secret:
|
||||
secretName: {{ include "secrets.ldapCASecret" . }}
|
||||
{{- include "ocis.caVolume" $ | nindent 8}}
|
||||
{{- include "ocis.extraVolumes" . | nindent 8}}
|
||||
File renamed without changes.
File renamed without changes.
Loaded 100 of 127 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user