remove non working proxy route and fix cs3 users example

This commit is contained in:
Willy Kloucek
2021-09-07 13:06:37 +02:00
parent 35c27afcb6
commit 3aa519c9de
5 changed files with 54 additions and 14 deletions

View File

@@ -0,0 +1,22 @@
#!/bin/sh
set -e
mkdir -p /var/tmp/ocis/.config/
cp /config/proxy-config.json /var/tmp/ocis/.config/proxy-config.json
cp /config/web-config.dist.json /var/tmp/ocis/.config/web-config.json
sed -i 's/ocis.owncloud.test/'${OCIS_DOMAIN:-ocis.owncloud.test}'/g' /var/tmp/ocis/.config/web-config.json
ocis server&
sleep 10
# stop builtin accounts since we use LDAP only
ocis kill accounts
# stop builtin LDAP server since we use external LDAP only
ocis kill glauth
ocis kill proxy
sleep 10
ocis proxy server # workaround for loading proxy configuration
wait # wait for oCIS to exit

View File

@@ -29,7 +29,7 @@
},
{
"type": "regex",
"endpoint": "/ocs/v[12].php/cloud/(users?|groups)",
"endpoint": "/ocs/v[12].php/cloud/user/signing-key",
"backend": "http://localhost:9110"
},
{
@@ -73,14 +73,6 @@
"endpoint": "/graph-explorer/",
"backend": "http://localhost:9135"
},
{
"endpoint": "/api/v0/accounts",
"backend": "http://localhost:9181"
},
{
"endpoint": "/accounts.js",
"backend": "http://localhost:9181"
},
{
"endpoint": "/api/v0/settings",
"backend": "http://localhost:9190"

View File

@@ -0,0 +1,22 @@
{
"server": "https://ocis.owncloud.test",
"theme": "owncloud",
"version": "0.1.0",
"openIdConnect": {
"metadata_url": "https://ocis.owncloud.test/.well-known/openid-configuration",
"authority": "https://ocis.owncloud.test",
"client_id": "web",
"response_type": "code",
"scope": "openid profile email"
},
"apps": ["files"],
"external_apps": [
{
"id": "settings",
"path": "/settings.js"
}
],
"options": {
"hideSearchBar": true
}
}

View File

@@ -48,9 +48,11 @@ services:
ocis-net:
depends_on:
- ldap-server
entrypoint:
- /bin/sh
- /entrypoint-override.sh
environment:
# CS3 users from ldap specific configuration
PROXY_CONFIG_FILE: "/config/proxy-config.json"
IDP_LDAP_FILTER: "(&(objectclass=inetOrgPerson)(objectClass=owncloud))"
IDP_LDAP_URI: ldap://ldap-server:389
IDP_LDAP_BIND_DN: "cn=admin,dc=owncloud,dc=com"
@@ -70,6 +72,10 @@ services:
STORAGE_LDAP_ATTRIBUTEFILTER: '(&(objectclass=owncloud)({{attr}}={{value}}))'
STORAGE_LDAP_FINDFILTER: '(&(objectclass=owncloud)(|(uid={{query}}*)(cn={{query}}*)(displayname={{query}}*)(mail={{query}}*)(description={{query}}*)))'
STORAGE_LDAP_GROUPFILTER: '(&(objectclass=groupOfUniqueNames)(objectclass=owncloud)(ownclouduuid={{.OpaqueId}}*))'
# web ui
WEB_UI_CONFIG: "/var/tmp/ocis/.config/web-config.json"
# proxy
PROXY_CONFIG_FILE: "/var/tmp/ocis/.config/proxy-config.json"
# General oCIS config
OCIS_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}
OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-error} # make oCIS less verbose
@@ -79,6 +85,8 @@ services:
OCIS_JWT_SECRET: ${OCIS_JWT_SECRET:-Pive-Fumkiu4}
OCIS_TRANSFER_SECRET: ${STORAGE_TRANSFER_SECRET:-replace-me-with-a-transfer-secret}
volumes:
- ./config/ocis/entrypoint-override.sh:/entrypoint-override.sh
- ./config/ocis/web-config.dist.json:/config/web-config.dist.json
- ./config/ocis/proxy-config.json:/config/proxy-config.json
- ocis-data:/var/tmp/ocis
labels:

View File

@@ -303,10 +303,6 @@ func defaultPolicies() []config.Policy {
Endpoint: "/ocs/",
Backend: "http://localhost:9140",
},
{
Endpoint: "/ocs/v[12].php/cloud/users/signing-key",
Backend: "http://localhost:9110",
},
{
Type: config.QueryRoute,
Endpoint: "/remote.php/?preview=1",