From fced29a6bee38826d2b8734d1548a20062bdc98f Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Thu, 19 May 2022 07:56:41 +0200 Subject: [PATCH 1/2] update deployments proxy config --- .../oc10_ocis_parallel/config/ocis/proxy.yaml | 6 +- .../ocis_hello/config/ocis/proxy.yaml | 205 +++++------------- .../drone/ocis/proxy.yaml | 6 +- 3 files changed, 61 insertions(+), 156 deletions(-) diff --git a/deployments/examples/oc10_ocis_parallel/config/ocis/proxy.yaml b/deployments/examples/oc10_ocis_parallel/config/ocis/proxy.yaml index 7c9a1c21b5b..7a3688598cf 100755 --- a/deployments/examples/oc10_ocis_parallel/config/ocis/proxy.yaml +++ b/deployments/examples/oc10_ocis_parallel/config/ocis/proxy.yaml @@ -17,7 +17,7 @@ policies: - endpoint: /archiver backend: http://localhost:9140 - type: regex - endpoint: /ocs/v[12].php/cloud/(users?|groups) + endpoint: /ocs/v[12].php/cloud/user/signing-key backend: http://localhost:9110 - endpoint: /ocs/ backend: http://localhost:9140 @@ -53,10 +53,6 @@ policies: 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 diff --git a/deployments/examples/ocis_hello/config/ocis/proxy.yaml b/deployments/examples/ocis_hello/config/ocis/proxy.yaml index 0eef29b5732..7f19ee79615 100644 --- a/deployments/examples/ocis_hello/config/ocis/proxy.yaml +++ b/deployments/examples/ocis_hello/config/ocis/proxy.yaml @@ -3,149 +3,62 @@ policy_selector: policy: ocis policies: -- name: ocis - routes: - # defaults, taken from https://owncloud.dev/extensions/proxy/configuration/ - - type: "" - method: "" - endpoint: / - backend: http://localhost:9100 - service: "" - apache_vhost: false - - type: "" - method: "" - endpoint: /.well-known/ - backend: http://localhost:9130 - service: "" - apache_vhost: false - - type: "" - method: "" - endpoint: /konnect/ - backend: http://localhost:9130 - service: "" - apache_vhost: false - - type: "" - method: "" - endpoint: /signin/ - backend: http://localhost:9130 - service: "" - apache_vhost: false - - type: "" - method: "" - endpoint: /archiver - backend: http://localhost:9140 - service: "" - apache_vhost: false - - type: regex - method: "" - endpoint: /ocs/v[12].php/cloud/(users?|groups) - backend: http://localhost:9110 - service: "" - apache_vhost: false - - type: "" - method: "" - endpoint: /ocs/ - backend: http://localhost:9140 - service: "" - apache_vhost: false - - type: query - method: "" - endpoint: /remote.php/?preview=1 - backend: http://localhost:9115 - service: "" - apache_vhost: false - - type: "" - method: REPORT - endpoint: /remote.php/dav/ - backend: http://localhost:9115 - service: "" - apache_vhost: false - - type: "" - method: "" - endpoint: /remote.php/ - backend: "" - service: ocdav - apache_vhost: false - - type: "" - method: "" - endpoint: /dav/ - backend: "" - service: ocdav - apache_vhost: false - - type: "" - method: "" - endpoint: /webdav/ - backend: "" - service: ocdav - apache_vhost: false - - type: "" - method: "" - endpoint: /status.php - backend: "" - service: ocdav - apache_vhost: false - - type: "" - method: "" - endpoint: /index.php/ - backend: "" - service: ocdav - apache_vhost: false - - type: "" - method: "" - endpoint: /apps/ - backend: "" - service: ocdav - apache_vhost: false - - type: "" - method: "" - endpoint: /data - backend: http://localhost:9140 - service: "" - apache_vhost: false - - type: "" - method: "" - endpoint: /app/ - backend: http://localhost:9140 - service: "" - apache_vhost: false - - type: "" - method: "" - endpoint: /graph/ - backend: http://localhost:9120 - service: "" - apache_vhost: false - - type: "" - method: "" - endpoint: /graph-explorer - backend: http://localhost:9135 - service: "" - apache_vhost: false - - type: "" - method: "" - endpoint: /api/v0/accounts - backend: http://localhost:9181 - service: "" - apache_vhost: false - - type: "" - method: "" - endpoint: /accounts.js - backend: http://localhost:9181 - service: "" - apache_vhost: false - - type: "" - method: "" - endpoint: /api/v0/settings - backend: http://localhost:9190 - service: "" - apache_vhost: false - - type: "" - method: "" - endpoint: /settings.js - backend: http://localhost:9190 - service: "" - apache_vhost: false - # oCIS Hello specific routes - - endpoint: "/api/v0/greet" - backend: http://ocis-hello:9105 - - endpoint: "/hello.js" - backend: http://ocis-hello:9105 + - name: ocis + routes: + # defaults, taken from https://owncloud.dev/extensions/proxy/configuration/ + - endpoint: / + backend: http://localhost:9100 + - endpoint: /.well-known/ + backend: http://localhost:9130 + - endpoint: /konnect/ + backend: http://localhost:9130 + - endpoint: /signin/ + backend: http://localhost:9130 + - endpoint: /archiver + backend: http://localhost:9140 + - 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 + - method: REPORT + endpoint: /remote.php/dav/ + backend: http://localhost:9115 + - type: query + endpoint: /dav/?preview=1 + backend: http://localhost:9115 + - type: query + endpoint: /webdav/?preview=1 + backend: http://localhost:9115 + - endpoint: /remote.php/ + service: com.owncloud.web.ocdav + - endpoint: /dav/ + service: com.owncloud.web.ocdav + - endpoint: /webdav/ + service: com.owncloud.web.ocdav + - endpoint: /status.php + service: com.owncloud.web.ocdav + - endpoint: /index.php/ + service: com.owncloud.web.ocdav + - endpoint: /apps/ + service: com.owncloud.web.ocdav + - endpoint: /data + backend: http://localhost:9140 + - endpoint: /app/ + backend: http://localhost:9140 + - endpoint: /graph/ + backend: http://localhost:9120 + - endpoint: /graph-explorer + backend: http://localhost:9135 + - endpoint: /api/v0/settings + backend: http://localhost:9190 + - endpoint: /settings.js + backend: http://localhost:9190 + # oCIS Hello specific routes + - endpoint: "/api/v0/greet" + backend: http://ocis-hello:9105 + - endpoint: "/hello.js" + backend: http://ocis-hello:9105 diff --git a/tests/parallelDeployAcceptance/drone/ocis/proxy.yaml b/tests/parallelDeployAcceptance/drone/ocis/proxy.yaml index 7c9a1c21b5b..7a3688598cf 100644 --- a/tests/parallelDeployAcceptance/drone/ocis/proxy.yaml +++ b/tests/parallelDeployAcceptance/drone/ocis/proxy.yaml @@ -17,7 +17,7 @@ policies: - endpoint: /archiver backend: http://localhost:9140 - type: regex - endpoint: /ocs/v[12].php/cloud/(users?|groups) + endpoint: /ocs/v[12].php/cloud/user/signing-key backend: http://localhost:9110 - endpoint: /ocs/ backend: http://localhost:9140 @@ -53,10 +53,6 @@ policies: 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 From a861f9c12625af37c2fa103a5b7c6871cbb9e868 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Thu, 19 May 2022 07:56:52 +0200 Subject: [PATCH 2/2] remove legacy accounts route from proxy default routes --- .../unreleased/fix-remove-legacy-accounts-routes.md | 8 ++++++++ extensions/proxy/pkg/config/defaults/defaultconfig.go | 10 ---------- 2 files changed, 8 insertions(+), 10 deletions(-) create mode 100644 changelog/unreleased/fix-remove-legacy-accounts-routes.md diff --git a/changelog/unreleased/fix-remove-legacy-accounts-routes.md b/changelog/unreleased/fix-remove-legacy-accounts-routes.md new file mode 100644 index 00000000000..f8aa3a0fa72 --- /dev/null +++ b/changelog/unreleased/fix-remove-legacy-accounts-routes.md @@ -0,0 +1,8 @@ +Bugfix: remove legacy accounts proxy routes + +We've removed the legacy accounts routes from the proxy default config. +There were no longer used since the switch to IDM as the default user +backend. Also accounts is no longer part of the oCIS binary and therefore +should not be part of the proxy default route config. + +https://github.com/owncloud/ocis/pull/3831 diff --git a/extensions/proxy/pkg/config/defaults/defaultconfig.go b/extensions/proxy/pkg/config/defaults/defaultconfig.go index 87e803d7068..64934fb895b 100644 --- a/extensions/proxy/pkg/config/defaults/defaultconfig.go +++ b/extensions/proxy/pkg/config/defaults/defaultconfig.go @@ -156,16 +156,6 @@ func DefaultPolicies() []config.Policy { Endpoint: "/graph-explorer", Backend: "http://localhost:9135", }, - // if we were using the go micro api gateway we could look up the endpoint in the registry dynamically - { - Endpoint: "/api/v0/accounts", - Backend: "http://localhost:9181", - }, - // TODO the lookup needs a better mechanism - { - Endpoint: "/accounts.js", - Backend: "http://localhost:9181", - }, { Endpoint: "/api/v0/settings", Backend: "http://localhost:9190",