streamline configuration
This commit is contained in:
@@ -61,6 +61,10 @@
|
|||||||
"endpoint": "/index.php/",
|
"endpoint": "/index.php/",
|
||||||
"backend": "http://localhost:9140"
|
"backend": "http://localhost:9140"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"endpoint": "/app/",
|
||||||
|
"backend": "http://localhost:9140"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"endpoint": "/data",
|
"endpoint": "/data",
|
||||||
"backend": "http://localhost:9140"
|
"backend": "http://localhost:9140"
|
||||||
|
|||||||
@@ -5,34 +5,23 @@ set -e
|
|||||||
ocis server&
|
ocis server&
|
||||||
sleep 10
|
sleep 10
|
||||||
|
|
||||||
# stop builtin idp since we use Keycloak as a replacement
|
# stop builtin IDP since we use Keycloak as a replacement
|
||||||
ocis kill idp
|
ocis kill idp
|
||||||
|
|
||||||
echo "##################################################"
|
echo "##################################################"
|
||||||
echo "change default secrets:"
|
echo "change default secrets:"
|
||||||
|
|
||||||
# REVA
|
ocis accounts update --password $STORAGE_LDAP_BIND_PASSWORD bc596f3c-c955-4328-80a0-60d018b4ad57 # REVA
|
||||||
REVA_USER_UUID=$(ocis accounts list | grep " | Reva Inter " | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' -o)
|
|
||||||
echo " Reva user UUID: $REVA_USER_UUID"
|
|
||||||
ocis accounts update --password $STORAGE_LDAP_BIND_PASSWORD $REVA_USER_UUID
|
|
||||||
|
|
||||||
echo "default secrets changed"
|
|
||||||
echo "##################################################"
|
echo "##################################################"
|
||||||
|
|
||||||
echo "##################################################"
|
echo "##################################################"
|
||||||
echo "delete demo users" # demo users are provided by keycloak
|
echo "delete demo users" # users are provided by keycloak
|
||||||
|
|
||||||
set +e # accounts can only delete once, so it will fail the second time
|
set +e # accounts can only delete once, so it will fail the second time
|
||||||
# IDP
|
# only admin, IDP and REVA user will be created because of ACCOUNTS_DEMO_USERS_AND_GROUPS=false
|
||||||
IDP_USER_UUID=$(ocis accounts list | grep "| Kopano IDP " | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' -o)
|
ocis accounts remove 820ba2a1-3f54-4538-80a4-2d73007e30bf # IDP user
|
||||||
echo " IDP user UUID: $IDP_USER_UUID"
|
ocis accounts remove ddc2004c-0977-11eb-9d3f-a793888cd0f8 # admin
|
||||||
ocis accounts remove $IDP_USER_UUID
|
|
||||||
|
|
||||||
ocis accounts remove 4c510ada-c86b-4815-8820-42cdf82c3d51
|
|
||||||
ocis accounts remove ddc2004c-0977-11eb-9d3f-a793888cd0f8
|
|
||||||
ocis accounts remove 932b4540-8d16-481e-8ef4-588e4b6b151c
|
|
||||||
ocis accounts remove 058bff95-6708-4fe5-91e4-9ea3d377588b
|
|
||||||
ocis accounts remove f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo "##################################################"
|
echo "##################################################"
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ services:
|
|||||||
OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-error} # make oCIS less verbose
|
OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-error} # make oCIS less verbose
|
||||||
PROXY_OIDC_INSECURE: "${INSECURE:-false}" # needed if Traefik is using self generated certificates
|
PROXY_OIDC_INSECURE: "${INSECURE:-false}" # needed if Traefik is using self generated certificates
|
||||||
PROXY_TLS: "false" # do not use SSL between Traefik and oCIS
|
PROXY_TLS: "false" # do not use SSL between Traefik and oCIS
|
||||||
|
ACCOUNTS_DEMO_USERS_AND_GROUPS: false # don't generate demo users
|
||||||
# change default secrets
|
# change default secrets
|
||||||
IDP_LDAP_BIND_PASSWORD: ${IDP_LDAP_BIND_PASSWORD:-idp}
|
IDP_LDAP_BIND_PASSWORD: ${IDP_LDAP_BIND_PASSWORD:-idp}
|
||||||
STORAGE_LDAP_BIND_PASSWORD: ${STORAGE_LDAP_BIND_PASSWORD:-reva}
|
STORAGE_LDAP_BIND_PASSWORD: ${STORAGE_LDAP_BIND_PASSWORD:-reva}
|
||||||
|
|||||||
@@ -76,6 +76,10 @@
|
|||||||
"endpoint": "/graph/",
|
"endpoint": "/graph/",
|
||||||
"backend": "http://localhost:9120"
|
"backend": "http://localhost:9120"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"endpoint": "/app/",
|
||||||
|
"backend": "http://localhost:9140"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"endpoint": "/graph-explorer/",
|
"endpoint": "/graph-explorer/",
|
||||||
"backend": "http://localhost:9135"
|
"backend": "http://localhost:9135"
|
||||||
|
|||||||
@@ -12,12 +12,42 @@
|
|||||||
"selector_cookie_name": "owncloud-selector",
|
"selector_cookie_name": "owncloud-selector",
|
||||||
"default_policy": "oc10",
|
"default_policy": "oc10",
|
||||||
"matches_policies": [
|
"matches_policies": [
|
||||||
{"priority": 10, "property": "mail", "match": "marie@example.org", "policy": "ocis"},
|
{
|
||||||
{"priority": 20, "property": "mail", "match": "[^@]+@example.org", "policy": "oc10"},
|
"priority": 10,
|
||||||
{"priority": 30, "property": "username", "match": "(einstein|feynman)", "policy": "ocis"},
|
"property": "mail",
|
||||||
{"priority": 40, "property": "username", "match": ".+", "policy": "oc10"},
|
"match": "marie@example.org",
|
||||||
{"priority": 50, "property": "id", "match": "4c510ada-c86b-4815-8820-42cdf82c3d51", "policy": "ocis"},
|
"policy": "ocis"
|
||||||
{"priority": 60, "property": "id", "match": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c", "policy": "oc10"}
|
},
|
||||||
|
{
|
||||||
|
"priority": 20,
|
||||||
|
"property": "mail",
|
||||||
|
"match": "[^@]+@example.org",
|
||||||
|
"policy": "oc10"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"priority": 30,
|
||||||
|
"property": "username",
|
||||||
|
"match": "(einstein|feynman)",
|
||||||
|
"policy": "ocis"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"priority": 40,
|
||||||
|
"property": "username",
|
||||||
|
"match": ".+",
|
||||||
|
"policy": "oc10"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"priority": 50,
|
||||||
|
"property": "id",
|
||||||
|
"match": "4c510ada-c86b-4815-8820-42cdf82c3d51",
|
||||||
|
"policy": "ocis"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"priority": 60,
|
||||||
|
"property": "id",
|
||||||
|
"match": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c",
|
||||||
|
"policy": "oc10"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"unauthenticated_policy": "oc10"
|
"unauthenticated_policy": "oc10"
|
||||||
}
|
}
|
||||||
@@ -80,6 +110,10 @@
|
|||||||
"endpoint": "/data",
|
"endpoint": "/data",
|
||||||
"backend": "http://localhost:9140"
|
"backend": "http://localhost:9140"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"endpoint": "/app/",
|
||||||
|
"backend": "http://localhost:9140"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"endpoint": "/graph/",
|
"endpoint": "/graph/",
|
||||||
"backend": "http://localhost:9120"
|
"backend": "http://localhost:9120"
|
||||||
|
|||||||
@@ -66,6 +66,10 @@
|
|||||||
"endpoint": "/data",
|
"endpoint": "/data",
|
||||||
"backend": "http://localhost:9140"
|
"backend": "http://localhost:9140"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"endpoint": "/app/",
|
||||||
|
"backend": "http://localhost:9140"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"endpoint": "/graph/",
|
"endpoint": "/graph/",
|
||||||
"backend": "http://localhost:9120"
|
"backend": "http://localhost:9120"
|
||||||
|
|||||||
@@ -299,10 +299,6 @@ func defaultPolicies() []config.Policy {
|
|||||||
Endpoint: "/ocs/v[12].php/cloud/(users?|groups)", // we have `user`, `users` and `groups` in ocis-ocs
|
Endpoint: "/ocs/v[12].php/cloud/(users?|groups)", // we have `user`, `users` and `groups` in ocis-ocs
|
||||||
Backend: "http://localhost:9110",
|
Backend: "http://localhost:9110",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
Endpoint: "/app/",
|
|
||||||
Backend: "http://localhost:9140",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
Endpoint: "/ocs/",
|
Endpoint: "/ocs/",
|
||||||
Backend: "http://localhost:9140",
|
Backend: "http://localhost:9140",
|
||||||
@@ -336,6 +332,10 @@ func defaultPolicies() []config.Policy {
|
|||||||
Endpoint: "/data",
|
Endpoint: "/data",
|
||||||
Backend: "http://localhost:9140",
|
Backend: "http://localhost:9140",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Endpoint: "/app/",
|
||||||
|
Backend: "http://localhost:9140",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
Endpoint: "/graph/",
|
Endpoint: "/graph/",
|
||||||
Backend: "http://localhost:9120",
|
Backend: "http://localhost:9120",
|
||||||
|
|||||||
Reference in New Issue
Block a user