Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drop json config support #3366

Merged
merged 8 commits into from
Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -1454,7 +1454,7 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on =
user = "33:33"
environment = {
# Keycloak IDP specific configuration
"PROXY_OIDC_ISSUER": "https://keycloak/auth/realmsowncloud",
"PROXY_OIDC_ISSUER": "https://keycloak/auth/realms/owncloud",
"WEB_OIDC_AUTHORITY": "https://keycloak/auth/realms/owncloud",
"WEB_OIDC_CLIENT_ID": "ocis-web",
"WEB_OIDC_METADATA_URL": "https://keycloak/auth/realms/owncloud/.well-known/openid-configuration",
Expand Down Expand Up @@ -2272,7 +2272,7 @@ def copyConfigs():
"commands": [
# ocis proxy config
"mkdir -p /etc/ocis",
"cp %s/ocis/proxy.json /etc/ocis/proxy.json" % (PARALLEL_DEPLOY_CONFIG_PATH),
"cp %s/ocis/proxy.yaml /etc/ocis/proxy.yaml" % (PARALLEL_DEPLOY_CONFIG_PATH),
# oc10 configs
"mkdir -p /etc/templates",
"mkdir -p /etc/pre_server.d",
Expand Down
7 changes: 7 additions & 0 deletions changelog/unreleased/drop-json-config-file-support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Change: Drop json config file support

We've remove the support to configure oCIS and it's service with a json file.
From now on we only support yaml configuration files, since they have the possibility
to add comments.

https://github.com/owncloud/ocis/pull/3366
109 changes: 0 additions & 109 deletions deployments/examples/oc10_ocis_parallel/config/ocis/proxy.json

This file was deleted.

54 changes: 54 additions & 0 deletions deployments/examples/oc10_ocis_parallel/config/ocis/proxy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
policy_selector:
claims:
default_policy: oc10
unauthenticated_policy: oc10
policies:
- name: ocis
routes:
- endpoint: "/"
backend: http://localhost:9100
- endpoint: "/.well-known/"
backend: http://localhost:9130
- type: regex
endpoint: "/ocs/v[12].php/cloud/user/signing-key"
backend: http://localhost:9110
- endpoint: "/ocs/"
backend: http://localhost:9140
- type: query
endpoint: "/remote.php/?preview=1"
backend: http://localhost:9115
- endpoint: "/remote.php/"
backend: http://localhost:9140
- endpoint: "/dav/"
backend: http://localhost:9140
- endpoint: "/webdav/"
backend: http://localhost:9140
- endpoint: "/status.php"
backend: http://localhost:9140
- endpoint: "/index.php/"
backend: http://localhost:9140
- endpoint: "/index.php/login"
backend: http://localhost:9100
- endpoint: "/login"
backend: http://localhost:9100
- endpoint: "/data"
backend: http://localhost:9140
- endpoint: "/graph/"
backend: http://localhost:9120
- endpoint: "/app/"
backend: http://localhost:9140
- endpoint: "/archiver"
backend: http://localhost:9140
- endpoint: "/graph-explorer/"
backend: http://localhost:9135
- endpoint: "/api/v0/settings"
backend: http://localhost:9190
- endpoint: "/settings.js"
backend: http://localhost:9190
- name: oc10
routes:
- endpoint: "/"
backend: http://oc10:8080
- endpoint: "/data"
backend: http://localhost:9140
3 changes: 1 addition & 2 deletions deployments/examples/oc10_ocis_parallel/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ services:
OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-error} # make oCIS less verbose
OCIS_URL: https://${CLOUD_DOMAIN:-cloud.owncloud.test}
PROXY_TLS: "false" # do not use SSL between Traefik and oCIS
PROXY_CONFIG_FILE: "/var/tmp/ocis/.config/proxy-config.json"
# change default secrets
OCIS_JWT_SECRET: ${OCIS_JWT_SECRET:-Pive-Fumkiu4}
STORAGE_TRANSFER_SECRET: ${STORAGE_TRANSFER_SECRET:-replace-me-with-a-transfer-secret}
Expand All @@ -126,7 +125,7 @@ services:
# basic auth (not recommended, but needed for eg. WebDav clients that do not support OpenID Connect)
PROXY_ENABLE_BASIC_AUTH: "${PROXY_ENABLE_BASIC_AUTH:-false}"
volumes:
- ./config/ocis/proxy.json:/etc/ocis/proxy.json
- ./config/ocis/proxy.yaml:/etc/ocis/proxy.yaml
- ocis-data:/var/lib/ocis
# shared volume with oC10
- oc10-data:/mnt/data
Expand Down
111 changes: 0 additions & 111 deletions deployments/examples/ocis_hello/config/ocis/proxy.json

This file was deleted.

55 changes: 55 additions & 0 deletions deployments/examples/ocis_hello/config/ocis/proxy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
policy_selector:
static:
policy: ocis
policies:
- name: ocis
routes:
- endpoint: "/"
backend: http://localhost:9100
- endpoint: "/.well-known/"
backend: http://localhost:9130
- endpoint: "/konnect/"
backend: http://localhost:9130
- endpoint: "/signin/"
backend: http://localhost:9130
- type: regex
endpoint: "/ocs/v[12].php/cloud/(users?|groups)"
backend: http://localhost:9110
- endpoint: "/ocs/"
backend: http://localhost:9140
- type: query
endpoint: "/remote.php/?preview=1"
backend: http://localhost:9115
- endpoint: "/remote.php/"
backend: http://localhost:9140
- endpoint: "/dav/"
backend: http://localhost:9140
- endpoint: "/webdav/"
backend: http://localhost:9140
- endpoint: "/status.php"
backend: http://localhost:9140
- endpoint: "/index.php/"
backend: http://localhost:9140
- endpoint: "/data"
backend: http://localhost:9140
- endpoint: "/app/"
backend: http://localhost:9140
- endpoint: "/archiver"
backend: http://localhost:9140
- endpoint: "/graph/"
backend: http://localhost:9120
- 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
- endpoint: "/settings.js"
backend: http://localhost:9190
- endpoint: "/api/v0/greet"
backend: http://ocis-hello:9105
- endpoint: "/hello.js"
backend: http://ocis-hello:9105
2 changes: 1 addition & 1 deletion deployments/examples/ocis_hello/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ services:
volumes:
- ./config/ocis/entrypoint-override.sh:/entrypoint-override.sh
- ./config/ocis/web-config.dist.json:/config/web-config.dist.json
- ./config/ocis/proxy.json:/etc/ocis/proxy.json
- ./config/ocis/proxy.yaml:/etc/ocis/proxy.yaml
- ocis-data:/var/lib/ocis
labels:
- "traefik.enable=true"
Expand Down
Loading