Commit Graph

96 Commits

Author SHA1 Message Date
Jörn Friedrich Dreyer
02ec13f9a7 prevent segfault in create home middleware
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-07-23 07:57:47 +02:00
Jörn Friedrich Dreyer
c550a2e4d8 fix staticchek, remove a few debug logs
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-07-22 12:53:22 +02:00
Jörn Friedrich Dreyer
b9e05e9b47 use same signing parameters as oc10
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-07-22 12:53:22 +02:00
Jörn Friedrich Dreyer
cf448f0124 initial signing-key middleware
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-07-22 12:53:22 +02:00
Ilja Neumann
06f4e2d296 Add option to disable TLS
Can be used to disable TLS when the ocis-proxy is behind an
TLS-Terminating reverse proxy.

env PROXY_TLS=false or cli --tls=false
2020-07-20 15:27:35 +02:00
A.Unger
3d8bdca07a provide token configuration from config 2020-07-13 14:59:35 +02:00
Jörn Friedrich Dreyer
83b2b3c48c Change: Add OIDC config flags
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-07-10 20:08:35 +02:00
Jörn Friedrich Dreyer
e41d993af9 Add Accounts UI routes
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-07-10 17:02:01 +02:00
Ilja Neumann
94ea9ede89 Abort middleware execution if no token header is present 2020-07-10 16:48:29 +02:00
David Christofas
78ba2950d3 only send createhome requests if the account has been migrated
Signed-off-by: David Christofas <dchristofas@owncloud.com>
2020-07-10 16:48:29 +02:00
Jörn Friedrich Dreyer
ed95005c6c use on_premises_sam_account_name property of accounts and groups
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-07-10 15:58:59 +02:00
A.Unger
9ddf0d555b avoid setting a nil context 2020-07-09 14:29:42 +02:00
A.Unger
94adb97ac1 create root span on ocis-proxy 2020-07-09 14:15:20 +02:00
Vincent Petry
318c34925b Merge pull request #45 from owncloud/tus-endpoint
Point /data to reva frontend
2020-06-25 14:14:58 +02:00
Jörn Friedrich Dreyer
94ebbc0933 send autocreate home request to reva gateway
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-06-25 10:47:28 +02:00
Benedikt Kulmann
3873079c11 Add /data endpoint to builtin default config 2020-06-25 10:19:17 +02:00
David Christofas
2491087264 autoprovision new users on login
Signed-off-by: David Christofas <dchristofas@owncloud.com>
2020-06-24 17:36:30 +02:00
David Christofas
f0b9d2b80f respect the account_enabled flag
Signed-off-by: David Christofas <dchristofas@owncloud.com>
2020-06-24 12:07:49 +02:00
Jörn Friedrich Dreyer
8e4f814c3a remove unused mock
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-06-19 14:53:25 +02:00
Jörn Friedrich Dreyer
39508bd7b6 go where no man has gone before ...
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-06-19 14:48:36 +02:00
Jörn Friedrich Dreyer
823832ff8f add more tests
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-06-19 11:19:09 +02:00
Jörn Friedrich Dreyer
00afda3c04 test middleware
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-06-18 21:40:06 +02:00
Jörn Friedrich Dreyer
4a436a4171 parrallel test execution seems to make the coverage miscount
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-06-18 19:08:14 +02:00
Jörn Friedrich Dreyer
399230d3de no confusing names
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-06-18 19:07:31 +02:00
Jörn Friedrich Dreyer
e7a3ed3fa3 make tests use mock from ocis-accounts
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-06-18 18:33:16 +02:00
Jörn Friedrich Dreyer
2cb3870104 some refactoring and testing love
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-06-18 17:58:06 +02:00
Jörn Friedrich Dreyer
09ecfd08ee cache account
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-06-17 17:26:33 +02:00
Jörn Friedrich Dreyer
ac2694251b update to new accounts api
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-06-16 18:17:32 +02:00
A.Unger
afb2291eb9 Fix user claims on x-access-token Reva header; initialize cache size 2020-06-12 12:00:21 +02:00
Benedikt Kulmann
fc7b6c1a81 Fix that response is ignored
The request to the accounts service is written to the cache, but the
retrieved uuid was not used, because it was overwritten by the value
from the (non-existant) cache entry.
2020-06-03 15:45:23 +02:00
Ilja Neumann
d7c0728e00 Disable OIDC Keep-Alive and instantiate client once
This should reduce file-descriptor leaks.
2020-05-29 11:15:36 +02:00
Ilja Neumann
6b76c2783e Re-enable selector-test 2020-05-28 16:05:10 +02:00
Benedikt Kulmann
e1847b5c4a Fix flag description 2020-05-26 17:41:30 +02:00
Benedikt Kulmann
89a0f13956 Make jwt secret for reva token manager configurable. 2020-05-26 16:31:05 +02:00
Benedikt Kulmann
87ff5f5d43 Set minted token on request header instead of response writer header. 2020-05-26 16:10:37 +02:00
A.Unger
85c4232901 fix linters 2020-05-22 12:55:42 +02:00
Ilja Neumann
ee82f69390 Create JWT from claims 2020-05-13 13:42:07 +02:00
Benedikt Kulmann
c47dc845b1 Use email claim for account GetRequest 2020-05-11 13:59:18 +02:00
A.Unger
a8c01a4da8 use latest accounts, get rid of replace, fix api 2020-05-11 12:52:21 +02:00
A.Unger
b74496bbf4 add alice and maintain a set order on the middlewares. Write uuid as a temporary response header 2020-05-06 14:30:41 +02:00
A.Unger
c6da8624a5 add uuid to context 2020-05-05 18:29:32 +02:00
A.Unger
1d735adac6 added eviction logiuc 2020-05-05 17:22:23 +02:00
A.Unger
c97ef8a464 add todo comment 2020-05-04 14:11:39 +02:00
A.Unger
0dffde2e6d added a generic cache 2020-05-04 14:08:19 +02:00
A.Unger
ad6a306a6f add trailing comma 2020-05-04 09:24:07 +02:00
A.Unger
a0ed0b2e90 refactor middleware code and provide an example flow to get UUID 2020-04-30 13:39:17 +02:00
Ilja Neumann
617628b1a6 Integration test 2020-04-06 09:52:37 +02:00
Ilja Neumann
976c13cf62 Redirect http-requests to https (#29) 2020-03-27 10:57:32 +01:00
Ilja Neumann
c523942899 User based routing
Implements a configurable "migration" policy-selector which reads the preferred_username attribute from
the oidc claims and checks if the uid exists in the ocis-accounts service.

A configurable policy-name can be selected based on the outcome of the check.
2020-03-27 06:36:17 +01:00
Ilja Neumann
b20b05806e Integrate oid-middleware
This feature is required for user-based routing.
2020-03-26 09:44:51 +01:00