From 3a83f3bb4d64dcb79ffc8dcb57e2dfb23d5d9fe8 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Tue, 28 Jul 2020 17:34:06 +0200 Subject: [PATCH 1/2] Route user provisioning api to ocis-ocs --- config/proxy-example.json | 21 ++++++++++++++------- pkg/proxy/proxy.go | 2 +- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/config/proxy-example.json b/config/proxy-example.json index b8e5063cb..28fd674de 100644 --- a/config/proxy-example.json +++ b/config/proxy-example.json @@ -7,7 +7,9 @@ "insecure": true }, "policy_selector": { - "static": {"policy" : "reva"} + "static": { + "policy": "reva" + } }, "policies": [ { @@ -33,6 +35,11 @@ "endpoint": "/ocs/", "backend": "http://localhost:9140" }, + { + "type": "regex", + "endpoint": "/ocs/v[12].php/cloud/user", + "backend": "http://localhost:9110" + }, { "endpoint": "/remote.php/", "backend": "http://localhost:9140" @@ -58,13 +65,13 @@ "backend": "http://localhost:9140" }, { - "endpoint": "/api/v0/accounts", - "backend": "http://localhost:9181" - }, - { + "endpoint": "/api/v0/accounts", + "backend": "http://localhost:9181" + }, + { "endpoint": "/accounts.js", - "backend": "http://localhost:9181" - } + "backend": "http://localhost:9181" + } ] }, { diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index fa43b0241..b5641c7d0 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -255,7 +255,7 @@ func defaultPolicies() []config.Policy { }, { Type: config.RegexRoute, - Endpoint: "/ocs/v[12].php/cloud/user/signing-key", + Endpoint: "/ocs/v[12].php/cloud/user",// we have `user` and `users` in ocis-ocs Backend: "http://localhost:9110", }, { From b65846ff8ee8fe6c9e3b057fb925c638049054cb Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Tue, 28 Jul 2020 17:36:19 +0200 Subject: [PATCH 2/2] Changelog --- changelog/unreleased/user-provisioning-api.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelog/unreleased/user-provisioning-api.md diff --git a/changelog/unreleased/user-provisioning-api.md b/changelog/unreleased/user-provisioning-api.md new file mode 100644 index 000000000..72f3262f6 --- /dev/null +++ b/changelog/unreleased/user-provisioning-api.md @@ -0,0 +1,5 @@ +Change: Add route for user provisioning API in ocis-ocs + +We added a route to send requests on the user provisioning API endpoints to ocis-ocs. + +https://github.com/owncloud/ocis-proxy/pull/80